AzryLeasingServer

AzryLeasingServer

Facilitates interaction with the AZRY leasing server.

Constructor

new AzryLeasingServer(sdk, serverUrl, opts)

Create a new Azry Leasing server instance.

Source:
Parameters:
Name Type Description
sdk ShelfNetwork

Parent SDK instance.

serverUrl string

AzryLeasing 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.

withCredentials boolean <optional>

Indicates whether or not cross-site Access-Control requests should be made using credentials.

Methods

createStatement(attributes) → {JsonApiResponse}

Get multiple fees.

Source:
Parameters:
Name Type Description
attributes object

Leasing statement attributes.

Name Type Description
initialInstallment string

Initial payment.

amount string

Estimated price of the lot.

currency string

Leasing currency.

paymentsNumber string

Desired number of payments.

clientId string

User's account ID.

clientNationalId string

User's national ID.

clientName string

User's full name.

clientPhoneNumber string

User's phone number.

lotId string

Lot ID

lotLink string

Link to the lot.

Returns:
Type:
JsonApiResponse

(async) getStatement(lotId, clientId, opts) → {JsonApiResponse}

Get leasing statement by ID.

Source:
Parameters:
Name Type Description
lotId string

Lot ID.

clientId string

User accound ID

opts object

Request misc options

Name Type Description
status string

Request status

sort string

Sort by created_at/updated_at

Returns:
Type:
JsonApiResponse

(async) getStatements()

Get multiple leasing statements

Source:
Parameters:
Name Type Description
opts.sort string

Sort requests by: created_at, updated_at, lot_end_time

opts.status string

Filter by request status: created, confirmed

opts.lotId string

Filter by lot id

opts.clientId string

Filter by user account id