2017 © Pedro Peláez
 

library royalmail-php-library

PHP library for Royal Mail shipping shipping methods

image

meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  • Monday, July 4, 2016
  • by meanbee
  • Repository
  • 8 Watchers
  • 2 Stars
  • 387 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 4 Open issues
  • 18 Versions
  • 2 % Grown

The README.md

Royal Mail PHP Shipping Method Library

image, (*1)

This repository contains the source code for the Meanbee Royal Mail PHP Library. It takes the country code, package value, and package weight and then outputs an array of objects containing the available shipping methods., (*2)

Using the Library

To use the library, call the getMethods method with your country code (in the ISO 3166 format), package value, and package weight., (*3)

Example Usage

$calculateMethodClass = new CalculateMethodClass();

$calculateMethodClass->getMethods('GB', 20, 0.050);

This will return an array of objects where each object contains the shipping method name, minimum weight, maximum weight, price of the method, maximum insurance value, and proper name of the shipping method., (*4)

Unit Testing

This program is automatically unit tested with phpunit and travis., (*5)

CSV data format

This library uses six CSV files to determine which shipping methods are available:, (*6)

  1. 1_countryCodeToZone.csv, (*7)

    • Country code
    • World zone. Each country, defined by its country code can be in more then one zone. The code "GB" for Great Britain is in the EU and the GB World zone. There are four world zones:
      • WORLD_ZONE_GB
      • WORLD_ZONE_EU
      • WORLD_ZONE_ONE
      • WORLD_ZONE_TWO
  2. 2_zoneToDeliveryMethod.csv, (*8)

    • World zone
    • Shipping zone.

    Each shipping method's name starts with the world zone it links to as prices differ between zones., (*9)

  3. 3_deliveryMethodMeta.csv, (*10)

    • Delivery method
    • Minimum price of method
    • Maximum price available to the method (the maximum price of shipping cart this method applies to)
    • Max insurance available on method
    • Human-friendly method name
    • Delivery group
  4. 4_deliveryToPrice.csv, (*11)

    • Method name
    • Minimum weight
    • Maximum weight
    • Price of method
    • Max insurance value
    • In the case of small or medium parcel up to 2kg in weight "SMALL" or "MEDIUM" else blank

Method names are constructed in the WORLDZONE_NAME_WITH_UNDERSCORES format with a separate method being added for each separate foramt. Examples of these can be seen in multiple of the csvs. In the case of extra insurance available on the item, another method must be created. An example can be seen in the 3_deliveryMethodMeta.csv., (*12)

The Versions

04/07 2016

dev-develop

dev-develop https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

04/07 2016

dev-master

9999999-dev https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

04/07 2016

2.1.0

2.1.0.0 https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

04/07 2016

dev-51-merge-csv-3-and-5

dev-51-merge-csv-3-and-5 https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

02/07 2016

dev-separating-concerns

dev-separating-concerns https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

02/07 2016

dev-50-add-group-to-methods

dev-50-add-group-to-methods https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

17/06 2016

v2.0.1

2.0.1.0 https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

OSL-3.0

The Development Requires

php library royalmail meanbee shipping method

17/06 2016
15/05 2016

dev-42-assign-to-type

dev-42-assign-to-type https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

15/05 2016

dev-27-getallmethods-function

dev-27-getallmethods-function https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

15/05 2016

dev-23-restrict-privacy-of-variables

dev-23-restrict-privacy-of-variables https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

13/05 2016

dev-22-rename-calculatemethod-class

dev-22-rename-calculatemethod-class https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

13/05 2016

dev-38-grumphp

dev-38-grumphp https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

13/05 2016

dev-24-calculate-method-constructor

dev-24-calculate-method-constructor https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

13/05 2016

dev-25-reduce-new-data-instantiations

dev-25-reduce-new-data-instantiations https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

07/01 2016

1.0.1

1.0.1.0 https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

07/01 2016

1.0.3

1.0.3.0 https://github.com/meanbee/royalmail-php-library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires

php library royalmail meanbee shipping method

07/01 2016

1.0.0

1.0.0.0 https://github.com/meanbee/Royalmail-PHP-Library

PHP library for Royal Mail shipping shipping methods

  Sources   Download

The Development Requires