@shipengine/js-api 4.11.0 → 4.12.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.
@@ -33,4 +33,9 @@ export declare class AuctanePayAPI {
33
33
  * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Get-payment-methods
34
34
  */
35
35
  getPaymentMethods: () => Promise<import("axios").AxiosResponse<PaymentMethodsResponse, any>>;
36
+ /**
37
+ * The `deletePaymentMethod` method deletes a Payment Method for a given user.
38
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Delete-payment-method
39
+ */
40
+ deletePaymentMethod: (paymentMethodId: string) => Promise<import("axios").AxiosResponse<void, any>>;
36
41
  }
@@ -21,6 +21,11 @@ export interface AuctanePaySessionMetadata {
21
21
  * Allowed Payment Method for AuctanePay
22
22
  */
23
23
  export type AuctanePayPaymentMethod = "credit_card" | "pay_pal" | "stamps" | "pay_by_bank_us" | "pay_by_bank_eu";
24
+ /**
25
+ * @category Entities
26
+ * List of possible Payment Method types
27
+ */
28
+ export type PaymentMethodType = "unknown" | "visa" | "mastercard" | "amex" | "discover" | "maestro" | "dinersclub" | "ach" | "jcb" | "pulse" | "star" | "unionpay";
24
29
  /**
25
30
  * @category Entities
26
31
  * Payment Method Details for AuctanePay
@@ -103,7 +108,7 @@ export interface PaymentMethod {
103
108
  /** The nickname of the payment method */
104
109
  nickname: string;
105
110
  /** Enumeration of supported payment methods. */
106
- paymentMethod: "unknown" | "visa" | "mastercard" | "amex" | "discover" | "maestro" | "dinersclub" | "ach" | "jcb" | "pulse" | "star" | "unionpay";
111
+ paymentMethod: PaymentMethodType;
107
112
  /**
108
113
  * The Display Name to show in any text
109
114
  * based UI/context for the Logo.
package/carriers/api.d.ts CHANGED
@@ -46,7 +46,7 @@ export declare class CarriersAPI {
46
46
  * If no auto-funding rules have been set, the response will contain the default
47
47
  * values for auto-funding. Auto-funding is disabled by default.
48
48
  */
49
- getAutoFunding: (carrierId: string) => Promise<import("axios").AxiosResponse<CarrierAutoFundingSettingsResponse, any>>;
49
+ getAutoFunding: (carrierId: string) => Promise<import("axios").AxiosResponse<CarrierAutoFundingSettings, any>>;
50
50
  /**
51
51
  * The `getServices` method retrieves a list of shipping services that a given carrier offers.
52
52
  */
package/index.js CHANGED
@@ -279,6 +279,13 @@ class AuctanePayAPI {
279
279
  this.getPaymentMethods = () => {
280
280
  return this.client.get("/v1/payments/payment_methods");
281
281
  };
282
+ /**
283
+ * The `deletePaymentMethod` method deletes a Payment Method for a given user.
284
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Delete-payment-method
285
+ */
286
+ this.deletePaymentMethod = (paymentMethodId) => {
287
+ return this.client.delete(`/v1/payments/payment_methods/${paymentMethodId}`);
288
+ };
282
289
  this.client = client;
283
290
  }
284
291
  }
@@ -1249,9 +1256,7 @@ class CarriersAPI {
1249
1256
  * values for auto-funding. Auto-funding is disabled by default.
1250
1257
  */
1251
1258
  this.getAutoFunding = (carrierId) => {
1252
- return this.client.get(
1253
- `/v1/carriers/${carrierId}/auto_funding`
1254
- );
1259
+ return this.client.get(`/v1/carriers/${carrierId}/auto_funding`);
1255
1260
  };
1256
1261
  /**
1257
1262
  * The `getServices` method retrieves a list of shipping services that a given carrier offers.
package/index.mjs CHANGED
@@ -275,6 +275,13 @@ class AuctanePayAPI {
275
275
  this.getPaymentMethods = () => {
276
276
  return this.client.get("/v1/payments/payment_methods");
277
277
  };
278
+ /**
279
+ * The `deletePaymentMethod` method deletes a Payment Method for a given user.
280
+ * @docs https://auctane.atlassian.net/wiki/spaces/SEEU/pages/5906662077/AUCTANE+PAY+ENDPOINTS+FOR+SHIPSTATION+API#Delete-payment-method
281
+ */
282
+ this.deletePaymentMethod = (paymentMethodId) => {
283
+ return this.client.delete(`/v1/payments/payment_methods/${paymentMethodId}`);
284
+ };
278
285
  this.client = client;
279
286
  }
280
287
  }
@@ -1245,9 +1252,7 @@ class CarriersAPI {
1245
1252
  * values for auto-funding. Auto-funding is disabled by default.
1246
1253
  */
1247
1254
  this.getAutoFunding = (carrierId) => {
1248
- return this.client.get(
1249
- `/v1/carriers/${carrierId}/auto_funding`
1250
- );
1255
+ return this.client.get(`/v1/carriers/${carrierId}/auto_funding`);
1251
1256
  };
1252
1257
  /**
1253
1258
  * The `getServices` method retrieves a list of shipping services that a given carrier offers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/js-api",
3
- "version": "4.11.0",
3
+ "version": "4.12.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {