@shipengine/js-api 0.12.0 → 0.13.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.
@@ -1,11 +1,11 @@
1
1
  import { AxiosInstance } from "axios";
2
- import { BillingInfo, CarrierRegistration, CarrierRegistrationResponse, CreateFundingSourceResponse, CreditCardInfo, FundingSource, ListFundingSourcesResponse } from "./types";
2
+ import { CarrierRegistration, CarrierRegistrationResponse, CreateFundingSourceResponse, CreditCardInfo, FundingSource, FundingSourceAddress, ListFundingSourcesResponse } from "./types";
3
3
  export declare class FundingSourcesAPI {
4
4
  private client;
5
5
  constructor(client: AxiosInstance);
6
6
  list: () => Promise<import("axios").AxiosResponse<ListFundingSourcesResponse, any>>;
7
7
  get: (fundingSourceId: string) => Promise<import("axios").AxiosResponse<FundingSource, any>>;
8
8
  create: (fundingSource: FundingSource) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
9
- update: (billingInfo: BillingInfo, creditCardInfo: CreditCardInfo, fundingSourceId: string) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
9
+ update: (billingInfo: FundingSourceAddress, creditCardInfo: CreditCardInfo, fundingSourceId: string) => Promise<import("axios").AxiosResponse<CreateFundingSourceResponse, any>>;
10
10
  registerCarrier: (carrier: CarrierRegistration) => Promise<import("axios").AxiosResponse<CarrierRegistrationResponse, any>>;
11
11
  }
@@ -2,7 +2,7 @@ import { CreditCardVendor } from "../payments";
2
2
  export type FundingSource = {
3
3
  acceptedTerms: Term[];
4
4
  agreeToTerms: boolean;
5
- billingInfo: BillingInfo;
5
+ billingInfo: FundingSourceAddress;
6
6
  paymentMethod: PaymentMethod;
7
7
  };
8
8
  export interface CarrierRegistration {
@@ -12,10 +12,11 @@ export interface CarrierRegistration {
12
12
  agreeToTerms: boolean;
13
13
  carrierCode: "stamps_com" | "ups_walleted" | "dhl_express_worldwide";
14
14
  fundingSourceId: string;
15
+ pickupAddress?: FundingSourceAddress;
15
16
  }
16
17
  ];
17
18
  }
18
- export interface BillingInfo {
19
+ export interface FundingSourceAddress {
19
20
  addressLine1: string;
20
21
  addressLine2?: string;
21
22
  cityLocality: string;
@@ -55,7 +56,7 @@ export interface CarrierRegistrationResponse {
55
56
  }
56
57
  export interface CreateFundingSourceResponse {
57
58
  fundingSource: {
58
- billingInfo: BillingInfo;
59
+ billingInfo: FundingSourceAddress;
59
60
  currencyCode: string;
60
61
  fundingSourceId: string;
61
62
  PaymentMethod: PaymentMethod | {
@@ -66,7 +67,7 @@ export interface CreateFundingSourceResponse {
66
67
  export interface ListFundingSourcesResponse {
67
68
  fundingSources: [
68
69
  {
69
- billingInfo: BillingInfo;
70
+ billingInfo: FundingSourceAddress;
70
71
  currencyCode: string;
71
72
  fundingSourceId: string;
72
73
  paymentMethod: PaymentMethod | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {