@shipengine/js-api 4.11.1 → 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.
- package/auctane-pay/api.d.ts +5 -0
- package/auctane-pay/types.d.ts +6 -1
- package/index.js +7 -0
- package/index.mjs +7 -0
- package/package.json +1 -1
package/auctane-pay/api.d.ts
CHANGED
|
@@ -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
|
}
|
package/auctane-pay/types.d.ts
CHANGED
|
@@ -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:
|
|
111
|
+
paymentMethod: PaymentMethodType;
|
|
107
112
|
/**
|
|
108
113
|
* The Display Name to show in any text
|
|
109
114
|
* based UI/context for the Logo.
|
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
|
}
|
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
|
}
|