2017 © Pedro Peláez
 

library shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

image

yumaeda/shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

  • Friday, June 22, 2018
  • by yumaeda
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 300 % Grown

The README.md

This is PHP library for calculating shipping fee based on the regions in Japan., (*1)

  • This API is experimental and may be removed anytime without any notice.
  • The author shall not be held responsible or liable, under any circumstances, for any damages resulting from using this component.

Installation

  1. Add this require line to your composer.json:
{
    "require": {
        "yumaeda/shipping-fee": "1.0.*"
    }
}
  1. composer install on your terminal.

How to Use

<?php
use Yumaeda\Shipping\YamatoShippingFee;

$prefecture = <Prefecture Key>;             // e.g. 'TOKYO'
$btl_qty    = <Number of bottles>;          // e.g. 12
$is_cool    = <Refrigerated delivery flag>; // e.g. true
$price      = <Total purchanse (JPN)>;      // e.g. 999999

$yamato_fee = new YamatoShippingFee($prefecture, $is_cool, $btl_qty, $price);
$yamato_fee->setRegionalFee('HOKKAIDO', 1310);
$yamato_fee->setRegionalFee('TOHOKU', 1010);
$yamato_fee->setRegionalFee('KANTO', 910);
$yamato_fee->setRegionalFee('SHINETSU', 910);
$yamato_fee->setRegionalFee('TOKAI', 910);
$yamato_fee->setRegionalFee('HOKURIKU', 910);
$yamato_fee->setRegionalFee('KANSAI', 1010);
$yamato_fee->setRegionalFee('CYUGOKU', 1110);
$yamato_fee->setRegionalFee('SHIKOKU', 1110);
$yamato_fee->setRegionalFee('KYUSYU', 1310);
$yamato_fee->setRegionalFee('OKINAWA', 2800);
$fee = yamato_fee->calculate();

Testing

$ vendor/bin/phpunit --debug

Contributing

Please send a pull request., (*2)

Support

Please send an email to yumaeda@gmail.com., (*3)

Author

Yukitaka Maeda, (*4)

Software License

MIT, (*5)

The Versions

22/06 2018

dev-master

9999999-dev https://github.com/yumaeda/shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

shipping japan fee

15/05 2018

v1.0.2

1.0.2.0 https://github.com/yumaeda/shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

shipping japan fee

29/04 2018

v1.0.1

1.0.1.0 https://github.com/yumaeda/shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

shipping japan fee

29/04 2018

v1.0.0

1.0.0.0 https://github.com/yumaeda/shipping-fee

Calculates shipping fee upon delivery in Japan based on various conditions

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

shipping japan fee