Skip to content

2019.4.0

Choose a tag to compare

@danh91 danh91 released this 06 Apr 18:38

Major change

Versioning will follow the CalVer convention with the format YYYY.MM.DD_MICRO

What is new?

  • Integration of Australia Post Postage Assessment Calculator

  • Introduce PurplShip custom errors (MethodNotSupportedError, OriginNotServicedError, MultiItemShipmentSupportError)

  • Introduction of multi-mapper per proxy configurable by the client. (will be used to decouple Freight from package shipping API)

import purplship

australia_post = purplship.gateway["aups"].create(
    {
        "api_key": "username",
        "password": "password",
        "account_number": "1234567",
        "api": "Postage",
    }
)

Changes

  • Update Fluent API to offer Typed or Dict (JSON) as parameters
# Typed
import purplship
from purplship.domain.Types import TrackingRequest

purplship.tracking.fetch(
    TrackingRequest(tracking_numbers=["1Z12345E6205277936"])
).from_(ups).parse()
# Dict (JSON)
purplship.tracking.fetch(
    {"tracking_numbers": ["1Z12345E6205277936"]}
).from_(ups).parse()