Constructor
new TransportationServer(sdk, serverUrl, opts)
Create a new Transportation server instance.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sdk |
ShelfNetwork
|
Parent SDK instance. |
||||||||||||||||||||||||||||||
serverUrl |
string
|
Transportation URL. |
||||||||||||||||||||||||||||||
opts |
Object
|
|
Classes
Members
Methods
(async) getPrice(query) → {JsonApiResponse}
Get transportation price.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
query |
object
|
Request options.
|
Returns:
- Type:
-
JsonApiResponse
(async) getPriceBulk(cities) → {JsonApiResponse}
Calculate multiple transportation prices.
- Source:
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cities |
Array.<object>
|
Array of cities data.
|
|||||||||||||||||||||||||||||
query.lotType |
string
|
<optional> |
Lot type. |
Returns:
- Type:
-
JsonApiResponse