@shipengine/js-api 0.14.1 → 0.15.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/carriers/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { Money } from "../payments";
2
+ import { Currency, Money } from "../payments";
3
3
  import { Carrier, CarrierAutoFundingSettings, CarrierAutoFundingSettingsResponse, CarrierConnection, WalletTransactionHistory } from "./types";
4
4
  export declare class CarriersAPI {
5
5
  private client;
@@ -15,4 +15,10 @@ export declare class CarriersAPI {
15
15
  updateAutoFunding: (carrierId: string, options: CarrierAutoFundingSettings) => Promise<import("axios").AxiosResponse<CarrierAutoFundingSettingsResponse, any>>;
16
16
  getAutoFunding: (carrierId: string) => Promise<import("axios").AxiosResponse<CarrierAutoFundingSettingsResponse, any>>;
17
17
  getWalletHistory: (startDate: Date, endDate: Date, page: number) => Promise<import("axios").AxiosResponse<WalletTransactionHistory, any>>;
18
+ getCountries: (carrierId: string) => Promise<import("axios").AxiosResponse<{
19
+ countries: string[];
20
+ }, any>>;
21
+ getCurrencies: (carrierId: string) => Promise<import("axios").AxiosResponse<{
22
+ currencies: Currency[];
23
+ }, any>>;
18
24
  }
package/index.js CHANGED
@@ -2914,6 +2914,12 @@ class CarriersAPI {
2914
2914
  }
2915
2915
  });
2916
2916
  };
2917
+ this.getCountries = (carrierId) => {
2918
+ return this.client.get(`/v1/carriers/${carrierId}/countries`);
2919
+ };
2920
+ this.getCurrencies = (carrierId) => {
2921
+ return this.client.get(`/v1/carriers/${carrierId}/currencies`);
2922
+ };
2917
2923
  this.client = client;
2918
2924
  }
2919
2925
  }
@@ -5229,7 +5235,7 @@ class RateCardsAPI {
5229
5235
  this.client = client;
5230
5236
  this.list = (carrierIds) => {
5231
5237
  return this.client.get(
5232
- `/v1/rate-cards?carrier_ids=${carrierIds.toString()}`
5238
+ `/v1/rate_cards?carrier_ids=${carrierIds.toString()}`
5233
5239
  );
5234
5240
  };
5235
5241
  this.client = client;
package/index.mjs CHANGED
@@ -2910,6 +2910,12 @@ class CarriersAPI {
2910
2910
  }
2911
2911
  });
2912
2912
  };
2913
+ this.getCountries = (carrierId) => {
2914
+ return this.client.get(`/v1/carriers/${carrierId}/countries`);
2915
+ };
2916
+ this.getCurrencies = (carrierId) => {
2917
+ return this.client.get(`/v1/carriers/${carrierId}/currencies`);
2918
+ };
2913
2919
  this.client = client;
2914
2920
  }
2915
2921
  }
@@ -5225,7 +5231,7 @@ class RateCardsAPI {
5225
5231
  this.client = client;
5226
5232
  this.list = (carrierIds) => {
5227
5233
  return this.client.get(
5228
- `/v1/rate-cards?carrier_ids=${carrierIds.toString()}`
5234
+ `/v1/rate_cards?carrier_ids=${carrierIds.toString()}`
5229
5235
  );
5230
5236
  };
5231
5237
  this.client = client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.14.1",
3
+ "version": "0.15.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {