dodopayments 2.4.5 → 2.5.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/CHANGELOG.md +21 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/checkout-sessions.d.mts +14 -0
- package/resources/checkout-sessions.d.mts.map +1 -1
- package/resources/checkout-sessions.d.ts +14 -0
- package/resources/checkout-sessions.d.ts.map +1 -1
- package/resources/customers/customers.d.mts +64 -1
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +64 -1
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +3 -0
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +3 -0
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payments.d.mts +6 -0
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +6 -0
- package/resources/payments.d.ts.map +1 -1
- package/resources/products/products.d.mts +4 -4
- package/resources/products/products.d.mts.map +1 -1
- package/resources/products/products.d.ts +4 -4
- package/resources/products/products.d.ts.map +1 -1
- package/resources/subscriptions.d.mts +27 -1
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +27 -1
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +6 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +6 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/src/client.ts +6 -0
- package/src/resources/checkout-sessions.ts +28 -0
- package/src/resources/customers/customers.ts +96 -0
- package/src/resources/customers/index.ts +1 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/payments.ts +5 -0
- package/src/resources/products/products.ts +5 -5
- package/src/resources/subscriptions.ts +51 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -118,6 +118,17 @@ export class Subscriptions extends APIResource {
|
|
|
118
118
|
{ query, ...options },
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
+
|
|
122
|
+
updatePaymentMethod(
|
|
123
|
+
subscriptionID: string,
|
|
124
|
+
body: SubscriptionUpdatePaymentMethodParams,
|
|
125
|
+
options?: RequestOptions,
|
|
126
|
+
): APIPromise<SubscriptionUpdatePaymentMethodResponse> {
|
|
127
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/update-payment-method`, {
|
|
128
|
+
body,
|
|
129
|
+
...options,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
121
132
|
}
|
|
122
133
|
|
|
123
134
|
export type SubscriptionListResponsesDefaultPageNumberPagination =
|
|
@@ -311,6 +322,11 @@ export interface Subscription {
|
|
|
311
322
|
*/
|
|
312
323
|
expires_at?: string | null;
|
|
313
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Saved payment method id used for recurring charges
|
|
327
|
+
*/
|
|
328
|
+
payment_method_id?: string | null;
|
|
329
|
+
|
|
314
330
|
/**
|
|
315
331
|
* Tax identifier provided for this subscription (if applicable)
|
|
316
332
|
*/
|
|
@@ -517,6 +533,11 @@ export interface SubscriptionListResponse {
|
|
|
517
533
|
*/
|
|
518
534
|
discount_id?: string | null;
|
|
519
535
|
|
|
536
|
+
/**
|
|
537
|
+
* Saved payment method id used for recurring charges
|
|
538
|
+
*/
|
|
539
|
+
payment_method_id?: string | null;
|
|
540
|
+
|
|
520
541
|
/**
|
|
521
542
|
* Tax identifier provided for this subscription (if applicable)
|
|
522
543
|
*/
|
|
@@ -588,6 +609,16 @@ export namespace SubscriptionRetrieveUsageHistoryResponse {
|
|
|
588
609
|
}
|
|
589
610
|
}
|
|
590
611
|
|
|
612
|
+
export interface SubscriptionUpdatePaymentMethodResponse {
|
|
613
|
+
client_secret?: string | null;
|
|
614
|
+
|
|
615
|
+
expires_on?: string | null;
|
|
616
|
+
|
|
617
|
+
payment_id?: string | null;
|
|
618
|
+
|
|
619
|
+
payment_link?: string | null;
|
|
620
|
+
}
|
|
621
|
+
|
|
591
622
|
export interface SubscriptionCreateParams {
|
|
592
623
|
/**
|
|
593
624
|
* Billing address information for the subscription
|
|
@@ -824,6 +855,24 @@ export interface SubscriptionRetrieveUsageHistoryParams extends DefaultPageNumbe
|
|
|
824
855
|
start_date?: string | null;
|
|
825
856
|
}
|
|
826
857
|
|
|
858
|
+
export type SubscriptionUpdatePaymentMethodParams =
|
|
859
|
+
| SubscriptionUpdatePaymentMethodParams.Variant0
|
|
860
|
+
| SubscriptionUpdatePaymentMethodParams.Variant1;
|
|
861
|
+
|
|
862
|
+
export declare namespace SubscriptionUpdatePaymentMethodParams {
|
|
863
|
+
export interface Variant0 {
|
|
864
|
+
type: 'new';
|
|
865
|
+
|
|
866
|
+
return_url?: string | null;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface Variant1 {
|
|
870
|
+
payment_method_id: string;
|
|
871
|
+
|
|
872
|
+
type: 'existing';
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
|
|
827
876
|
export declare namespace Subscriptions {
|
|
828
877
|
export {
|
|
829
878
|
type AddonCartResponseItem as AddonCartResponseItem,
|
|
@@ -836,6 +885,7 @@ export declare namespace Subscriptions {
|
|
|
836
885
|
type SubscriptionListResponse as SubscriptionListResponse,
|
|
837
886
|
type SubscriptionChargeResponse as SubscriptionChargeResponse,
|
|
838
887
|
type SubscriptionRetrieveUsageHistoryResponse as SubscriptionRetrieveUsageHistoryResponse,
|
|
888
|
+
type SubscriptionUpdatePaymentMethodResponse as SubscriptionUpdatePaymentMethodResponse,
|
|
839
889
|
type SubscriptionListResponsesDefaultPageNumberPagination as SubscriptionListResponsesDefaultPageNumberPagination,
|
|
840
890
|
type SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination as SubscriptionRetrieveUsageHistoryResponsesDefaultPageNumberPagination,
|
|
841
891
|
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
@@ -844,5 +894,6 @@ export declare namespace Subscriptions {
|
|
|
844
894
|
type SubscriptionChangePlanParams as SubscriptionChangePlanParams,
|
|
845
895
|
type SubscriptionChargeParams as SubscriptionChargeParams,
|
|
846
896
|
type SubscriptionRetrieveUsageHistoryParams as SubscriptionRetrieveUsageHistoryParams,
|
|
897
|
+
type SubscriptionUpdatePaymentMethodParams as SubscriptionUpdatePaymentMethodParams,
|
|
847
898
|
};
|
|
848
899
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.5.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '2.
|
|
1
|
+
export const VERSION = '2.5.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|