@shipengine/js-api 0.44.0 → 0.45.1

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.
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { AccountBillingPlanResponse } from "./types";
2
+ import { AccountBillingPlanResponse, UpdateAccountBillingPlanRequestBody, UpdateAccountBillingPlanResponse } from "./types";
3
3
  /**
4
4
  * # Account Billing Plan API module - /v1/account/billing_plan
5
5
  */
@@ -10,4 +10,8 @@ export declare class AccountBillingPlanAPI {
10
10
  * The `get` method retrieves the account billing plan for the current user.
11
11
  */
12
12
  get: () => Promise<import("axios").AxiosResponse<AccountBillingPlanResponse, any>>;
13
+ /**
14
+ * The `update` method updates the code of the account billing plan
15
+ */
16
+ update: (reqBody: UpdateAccountBillingPlanRequestBody) => Promise<import("axios").AxiosResponse<UpdateAccountBillingPlanResponse, any>>;
13
17
  }
@@ -28,3 +28,10 @@ export type AccountBillingPlanResponse = {
28
28
  };
29
29
  trialEndAt?: string;
30
30
  };
31
+ export type UpdateAccountBillingPlanResponse = {
32
+ code: string;
33
+ name: string;
34
+ };
35
+ export type UpdateAccountBillingPlanRequestBody = {
36
+ code: string;
37
+ };
@@ -25,17 +25,16 @@ export type AbbreviatedCreditCardInfo = {
25
25
  provider: Provider;
26
26
  };
27
27
  export type Provider = "visa" | "mastercard" | "americanExpress" | "discover";
28
+ export type FundingSourceCarrier = {
29
+ acceptedTerms: Term[];
30
+ agreeToTerms: boolean;
31
+ carrierCode: string;
32
+ fundingSourceId: string;
33
+ iovationBlackBox: IovationBlackBox;
34
+ pickupAddress?: FundingSourceAddress;
35
+ };
28
36
  export interface CarrierRegistration {
29
- carriers: [
30
- {
31
- acceptedTerms: Term[];
32
- agreeToTerms: boolean;
33
- carrierCode: string;
34
- fundingSourceId: string;
35
- iovationBlackBox: IovationBlackBox;
36
- pickupAddress?: FundingSourceAddress;
37
- }
38
- ];
37
+ carriers: FundingSourceCarrier[];
39
38
  }
40
39
  export interface FundingSourceAddress {
41
40
  addressLine1: string;
package/index.js CHANGED
@@ -3318,6 +3318,12 @@ class AccountBillingPlanAPI {
3318
3318
  this.get = () => {
3319
3319
  return this.client.get("/v1/account/billing_plan");
3320
3320
  };
3321
+ /**
3322
+ * The `update` method updates the code of the account billing plan
3323
+ */
3324
+ this.update = (reqBody) => {
3325
+ return this.client.put(`/v1/account/billing_plan`, reqBody);
3326
+ };
3321
3327
  this.client = client;
3322
3328
  }
3323
3329
  }
package/index.mjs CHANGED
@@ -3314,6 +3314,12 @@ class AccountBillingPlanAPI {
3314
3314
  this.get = () => {
3315
3315
  return this.client.get("/v1/account/billing_plan");
3316
3316
  };
3317
+ /**
3318
+ * The `update` method updates the code of the account billing plan
3319
+ */
3320
+ this.update = (reqBody) => {
3321
+ return this.client.put(`/v1/account/billing_plan`, reqBody);
3322
+ };
3317
3323
  this.client = client;
3318
3324
  }
3319
3325
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.44.0",
3
+ "version": "0.45.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {