@shipengine/js-api 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -0
- package/index.mjs +9 -0
- package/insurance/api.d.ts +4 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3501,6 +3501,15 @@ class InsuranceAPI {
|
|
|
3501
3501
|
this.get = (insuranceProvider) => {
|
|
3502
3502
|
return this.client.get(`/v1/insurance/${insuranceProvider}/balance`);
|
|
3503
3503
|
};
|
|
3504
|
+
/**
|
|
3505
|
+
* The `addFunds` method add funds to the account balance of the given `insuranceProvider`.
|
|
3506
|
+
*/
|
|
3507
|
+
this.addFunds = (insuranceProvider, params) => {
|
|
3508
|
+
return this.client.patch(
|
|
3509
|
+
`/v1/insurance/${insuranceProvider}/add_funds`,
|
|
3510
|
+
params
|
|
3511
|
+
);
|
|
3512
|
+
};
|
|
3504
3513
|
this.client = client;
|
|
3505
3514
|
}
|
|
3506
3515
|
}
|
package/index.mjs
CHANGED
|
@@ -3497,6 +3497,15 @@ class InsuranceAPI {
|
|
|
3497
3497
|
this.get = (insuranceProvider) => {
|
|
3498
3498
|
return this.client.get(`/v1/insurance/${insuranceProvider}/balance`);
|
|
3499
3499
|
};
|
|
3500
|
+
/**
|
|
3501
|
+
* The `addFunds` method add funds to the account balance of the given `insuranceProvider`.
|
|
3502
|
+
*/
|
|
3503
|
+
this.addFunds = (insuranceProvider, params) => {
|
|
3504
|
+
return this.client.patch(
|
|
3505
|
+
`/v1/insurance/${insuranceProvider}/add_funds`,
|
|
3506
|
+
params
|
|
3507
|
+
);
|
|
3508
|
+
};
|
|
3500
3509
|
this.client = client;
|
|
3501
3510
|
}
|
|
3502
3511
|
}
|
package/insurance/api.d.ts
CHANGED
|
@@ -11,4 +11,8 @@ export declare class InsuranceAPI {
|
|
|
11
11
|
* by ID.
|
|
12
12
|
*/
|
|
13
13
|
get: (insuranceProvider: InsuranceProvider) => Promise<import("axios").AxiosResponse<InsuranceAccount, any>>;
|
|
14
|
+
/**
|
|
15
|
+
* The `addFunds` method add funds to the account balance of the given `insuranceProvider`.
|
|
16
|
+
*/
|
|
17
|
+
addFunds: (insuranceProvider: InsuranceProvider, params: InsuranceAccount) => Promise<import("axios").AxiosResponse<InsuranceAccount, any>>;
|
|
14
18
|
}
|