Skip to content

Latest commit

 

History

History
178 lines (130 loc) · 9.9 KB

File metadata and controls

178 lines (130 loc) · 9.9 KB

IPS

Exposes Israel postal service API

Kind: global class
Author: Benny Megidish

IPS.calculateShippingRate(destination, weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

calculate shipping rate for regular (non bulk) shipments

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
destination string destination country name (in CamelCase English)
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.calculateBulkShippingRate(destination, weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

calculate shipping rate for bulk shipments

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
destination string destination country name (in CamelCase English)
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.calculateAbroadShippingRate(destination, weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

Deprecated

calculate shipping rate for abroad shipments

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
destination string destination country name (in CamelCase English)
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.calculateLocalShippingRate(weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

Deprecated

calculate shipping rate for local shipments (in Israel)

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.calculateAbroadBulkShippingRate(destination, weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

Deprecated

calculate bulk shipping rate for abroad bulk shipments

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
destination string destination country name (in CamelCase English)
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.calculateLocalBulkShippingRate(weight, shipmentType, shipmentSubtype, serviceOption, quantity) ⇒ Promise.<ResponseParser>

Deprecated

calculate bulk shipping rate for local bulk shipments (in Israel)

Kind: instance method of IPS
Returns: Promise.<ResponseParser> - a promise with the parsed shipment data (@see {@class ResponseParser})

Param Type Default Description
weight float weight of the shipment in grams
shipmentType string type of shipment (as defines in {@class Options})
shipmentSubtype object subtype of shipment (as define in the shipmentType {@class Options})
serviceOption string null additional service options (nullable)
quantity integer 1 amount of packages

IPS.preloadDestinations(shipmentMethod)

pre-loads the destinations for the requested shipment method by default, the destinations are loaded lazily on-demand

Kind: instance method of IPS

Param Type Description
shipmentMethod string method of shipment as defined in the {@class Options#ShipmentMethods} class

IPS.getAllDestinations(shipmentType) ⇒ Array.<string>

return all the available destinations for the shipment type

Kind: instance method of IPS
Returns: Array.<string> - array that contains all the available destination for the shipment type

Param Type Description
shipmentType string type of shipment as defined in the {@class Options} class

IPS.isEligibleForExpressShipment(shipmentType, destination) ⇒ boolean

verify if the shipment is eligible for economic shipment

Kind: instance method of IPS
Returns: boolean - true, if the shipment is eligible for economic shipment, otherwise, false

Param Type Description
shipmentType string type of shipment as defined in the {@class Options} class
destination string destination country name (in CamelCase English)

IPS.isEligibleForEconomicShipment(shipmentType, destination) ⇒ boolean

verify if the shipment is eligible for economic shipment

Kind: instance method of IPS
Returns: boolean - true, if the shipment is eligible for economic shipment, otherwise, false

Param Type Description
shipmentType string type of shipment as defined in the {@class Options} class
destination string destination country name (in CamelCase English)