FeeCalculatorServer

FeeCalculatorServer

Facilitates interaction with the FeeCalculator server.

Constructor

new FeeCalculatorServer(sdk, serverUrl, opts) → {Promise.<JsonApiResponse>}

Create a new FeeCalculator server instance.

Source:
Parameters:
Name Type Description
sdk ShelfNetwork

Parent SDK instance.

serverUrl string

FeeCalculator URL.

opts Object
Name Type Attributes Description
allowHttp boolean <optional>

Allow connecting to http servers, default: false. This must be set to false in production deployments!

proxy Object <optional>

Proxy configuration. Look axios docs for more info

httpBasicAuth Object <optional>

HTTP basic auth credentials. Look axios docs for more info.

customHeaders Object <optional>

Custom headers for request.

Returns:
Type:
Promise.<JsonApiResponse>

Classes

FeeCalculatorServer

Methods

getPurchaseFee(query) → {Promise.<JsonApiResponse>}

Get purchase fee (fee charged for just buying a car).

Source:
Parameters:
Name Type Description
query object

Request query.

Name Type Description
filter object

Query filter.

Name Type Attributes Description
price number

Expected price that vehicle will be bought for.

priceCurrency string <optional>

Currency of price (currency of lot). If not specified, USD will be used.

platform string

Platform ID of lot.

requestingPlatform string <optional>

User's platform ID.

feeCurrency string <optional>

Currency of fee to be returned. If not specified, USD will be used.

Returns:
Type:
Promise.<JsonApiResponse>

Fees response

getRegistrationFeeGe(query) → {Promise.<JsonApiResponse>}

Get registration fee for Georgia.

Source:
Parameters:
Name Type Description
query object

Request query.

Name Type Description
filter object

Query filter.

Name Type Attributes Description
engineVolumeCm number

Engine volume of the vehicle (in cubic centimeters)

productionYear number

Vehicle production year.

fuelType string <optional>

Fuel type of vehicle (values other than HYBRID and ELECTRIC won't influence the result).

wheelPosition string <optional>

Wheel position of vehicle (values other than RIGHT won't influence the result).

Returns:
Type:
Promise.<JsonApiResponse>

Fees response

getRegistrationFeeUa(query) → {Promise.<JsonApiResponse>}

Get registration fee for Ukraine.

Source:
Parameters:
Name Type Description
query object

Request query.

Name Type Description
filter object

Query filter.

Name Type Attributes Description
productionYear number

Vehicle production year.

expectedRegistrationYear number <optional>

A year when a car is expected to be registered. If not specified, a current year will be used.

engineVolumeCm number

Engine volume of the vehicle (in cubic centimeters)

price number

Expected price that vehicle will be bought for.

priceCurrency string <optional>

Currency of price (currency of lot). If not specified, USD will be used.

feeCurrency string <optional>

Currency of fee to be returned. If not specified, USD will be used.

fuelType string

Fuel type of vehicle (values other than HYBRID, ELECTRIC, GAS and DIESEL won't influence the result)

Returns:
Type:
Promise.<JsonApiResponse>

Fees response