@whop/sdk 0.0.9 → 0.0.11
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 +34 -0
- package/client.d.mts +11 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -5
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/app-builds.d.mts +4 -0
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +4 -0
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +20 -0
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +20 -0
- package/resources/invoices.d.ts.map +1 -1
- package/resources/payment-methods.d.mts +163 -0
- package/resources/payment-methods.d.mts.map +1 -0
- package/resources/payment-methods.d.ts +163 -0
- package/resources/payment-methods.d.ts.map +1 -0
- package/resources/payment-methods.js +42 -0
- package/resources/payment-methods.js.map +1 -0
- package/resources/payment-methods.mjs +38 -0
- package/resources/payment-methods.mjs.map +1 -0
- package/resources/payments.d.mts +255 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +255 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +33 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +33 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/setup-intents.d.mts +363 -0
- package/resources/setup-intents.d.mts.map +1 -0
- package/resources/setup-intents.d.ts +363 -0
- package/resources/setup-intents.d.ts.map +1 -0
- package/resources/setup-intents.js +46 -0
- package/resources/setup-intents.js.map +1 -0
- package/resources/setup-intents.mjs +42 -0
- package/resources/setup-intents.mjs.map +1 -0
- package/resources/shared.d.mts +48 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +48 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +72 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +72 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +47 -1
- package/src/resources/app-builds.ts +5 -0
- package/src/resources/index.ts +20 -0
- package/src/resources/invoices.ts +24 -0
- package/src/resources/payment-methods.ts +213 -0
- package/src/resources/payments.ts +306 -0
- package/src/resources/setup-intents.ts +439 -0
- package/src/resources/shared.ts +57 -0
- package/src/resources/webhooks.ts +91 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as PaymentsAPI from "./payments.mjs";
|
|
3
|
+
import * as Shared from "./shared.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
export declare class PaymentMethods extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
10
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
11
|
+
* details and can be attached to a member for future one-time or recurring
|
|
12
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
13
|
+
* payments.
|
|
14
|
+
*
|
|
15
|
+
* Required permissions:
|
|
16
|
+
*
|
|
17
|
+
* - `member:payment_methods:read`
|
|
18
|
+
*/
|
|
19
|
+
retrieve(id: string, query: PaymentMethodRetrieveParams, options?: RequestOptions): APIPromise<PaymentMethodRetrieveResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
22
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
23
|
+
* details and can be attached to a member for future one-time or recurring
|
|
24
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
25
|
+
* payments.
|
|
26
|
+
*
|
|
27
|
+
* Required permissions:
|
|
28
|
+
*
|
|
29
|
+
* - `member:payment_methods:read`
|
|
30
|
+
*/
|
|
31
|
+
list(query: PaymentMethodListParams, options?: RequestOptions): PagePromise<PaymentMethodListResponsesCursorPage, PaymentMethodListResponse>;
|
|
32
|
+
}
|
|
33
|
+
export type PaymentMethodListResponsesCursorPage = CursorPage<PaymentMethodListResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* A stored payment method used to process payments. This could be a credit/debit
|
|
36
|
+
* card, bank account, PayPal wallet, etc.
|
|
37
|
+
*/
|
|
38
|
+
export interface PaymentMethodRetrieveResponse {
|
|
39
|
+
/**
|
|
40
|
+
* The ID of the payment method
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
45
|
+
*/
|
|
46
|
+
card: PaymentMethodRetrieveResponse.Card | null;
|
|
47
|
+
/**
|
|
48
|
+
* The date and time the payment method was created
|
|
49
|
+
*/
|
|
50
|
+
created_at: string;
|
|
51
|
+
/**
|
|
52
|
+
* The payment method type of the payment method
|
|
53
|
+
*/
|
|
54
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace PaymentMethodRetrieveResponse {
|
|
57
|
+
/**
|
|
58
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
59
|
+
*/
|
|
60
|
+
interface Card {
|
|
61
|
+
/**
|
|
62
|
+
* Possible card brands that a payment token can have
|
|
63
|
+
*/
|
|
64
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
65
|
+
/**
|
|
66
|
+
* Card expiration month, like 03 for March.
|
|
67
|
+
*/
|
|
68
|
+
exp_month: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* Card expiration year, like 27 for 2027.
|
|
71
|
+
*/
|
|
72
|
+
exp_year: number | null;
|
|
73
|
+
/**
|
|
74
|
+
* Last four digits of the card.
|
|
75
|
+
*/
|
|
76
|
+
last4: string | null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A stored payment method used to process payments. This could be a credit/debit
|
|
81
|
+
* card, bank account, PayPal wallet, etc.
|
|
82
|
+
*/
|
|
83
|
+
export interface PaymentMethodListResponse {
|
|
84
|
+
/**
|
|
85
|
+
* The ID of the payment method
|
|
86
|
+
*/
|
|
87
|
+
id: string;
|
|
88
|
+
/**
|
|
89
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
90
|
+
*/
|
|
91
|
+
card: PaymentMethodListResponse.Card | null;
|
|
92
|
+
/**
|
|
93
|
+
* The date and time the payment method was created
|
|
94
|
+
*/
|
|
95
|
+
created_at: string;
|
|
96
|
+
/**
|
|
97
|
+
* The payment method type of the payment method
|
|
98
|
+
*/
|
|
99
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace PaymentMethodListResponse {
|
|
102
|
+
/**
|
|
103
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
104
|
+
*/
|
|
105
|
+
interface Card {
|
|
106
|
+
/**
|
|
107
|
+
* Possible card brands that a payment token can have
|
|
108
|
+
*/
|
|
109
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
110
|
+
/**
|
|
111
|
+
* Card expiration month, like 03 for March.
|
|
112
|
+
*/
|
|
113
|
+
exp_month: number | null;
|
|
114
|
+
/**
|
|
115
|
+
* Card expiration year, like 27 for 2027.
|
|
116
|
+
*/
|
|
117
|
+
exp_year: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Last four digits of the card.
|
|
120
|
+
*/
|
|
121
|
+
last4: string | null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export interface PaymentMethodRetrieveParams {
|
|
125
|
+
/**
|
|
126
|
+
* The ID of the Member associated with the PaymentMethod
|
|
127
|
+
*/
|
|
128
|
+
member_id: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PaymentMethodListParams extends CursorPageParams {
|
|
131
|
+
/**
|
|
132
|
+
* The ID of the Member to list payment methods for
|
|
133
|
+
*/
|
|
134
|
+
member_id: string;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
137
|
+
*/
|
|
138
|
+
before?: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* The minimum creation date to filter by
|
|
141
|
+
*/
|
|
142
|
+
created_after?: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* The maximum creation date to filter by
|
|
145
|
+
*/
|
|
146
|
+
created_before?: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* The direction of the sort.
|
|
149
|
+
*/
|
|
150
|
+
direction?: Shared.Direction | null;
|
|
151
|
+
/**
|
|
152
|
+
* Returns the first _n_ elements from the list.
|
|
153
|
+
*/
|
|
154
|
+
first?: number | null;
|
|
155
|
+
/**
|
|
156
|
+
* Returns the last _n_ elements from the list.
|
|
157
|
+
*/
|
|
158
|
+
last?: number | null;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace PaymentMethods {
|
|
161
|
+
export { type PaymentMethodRetrieveResponse as PaymentMethodRetrieveResponse, type PaymentMethodListResponse as PaymentMethodListResponse, type PaymentMethodListResponsesCursorPage as PaymentMethodListResponsesCursorPage, type PaymentMethodRetrieveParams as PaymentMethodRetrieveParams, type PaymentMethodListParams as PaymentMethodListParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=payment-methods.d.mts.map
|
|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oC,IAAI,oCAAoC,EACjF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as PaymentsAPI from "./payments.js";
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
7
|
+
export declare class PaymentMethods extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
10
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
11
|
+
* details and can be attached to a member for future one-time or recurring
|
|
12
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
13
|
+
* payments.
|
|
14
|
+
*
|
|
15
|
+
* Required permissions:
|
|
16
|
+
*
|
|
17
|
+
* - `member:payment_methods:read`
|
|
18
|
+
*/
|
|
19
|
+
retrieve(id: string, query: PaymentMethodRetrieveParams, options?: RequestOptions): APIPromise<PaymentMethodRetrieveResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
22
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
23
|
+
* details and can be attached to a member for future one-time or recurring
|
|
24
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
25
|
+
* payments.
|
|
26
|
+
*
|
|
27
|
+
* Required permissions:
|
|
28
|
+
*
|
|
29
|
+
* - `member:payment_methods:read`
|
|
30
|
+
*/
|
|
31
|
+
list(query: PaymentMethodListParams, options?: RequestOptions): PagePromise<PaymentMethodListResponsesCursorPage, PaymentMethodListResponse>;
|
|
32
|
+
}
|
|
33
|
+
export type PaymentMethodListResponsesCursorPage = CursorPage<PaymentMethodListResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* A stored payment method used to process payments. This could be a credit/debit
|
|
36
|
+
* card, bank account, PayPal wallet, etc.
|
|
37
|
+
*/
|
|
38
|
+
export interface PaymentMethodRetrieveResponse {
|
|
39
|
+
/**
|
|
40
|
+
* The ID of the payment method
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
45
|
+
*/
|
|
46
|
+
card: PaymentMethodRetrieveResponse.Card | null;
|
|
47
|
+
/**
|
|
48
|
+
* The date and time the payment method was created
|
|
49
|
+
*/
|
|
50
|
+
created_at: string;
|
|
51
|
+
/**
|
|
52
|
+
* The payment method type of the payment method
|
|
53
|
+
*/
|
|
54
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
55
|
+
}
|
|
56
|
+
export declare namespace PaymentMethodRetrieveResponse {
|
|
57
|
+
/**
|
|
58
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
59
|
+
*/
|
|
60
|
+
interface Card {
|
|
61
|
+
/**
|
|
62
|
+
* Possible card brands that a payment token can have
|
|
63
|
+
*/
|
|
64
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
65
|
+
/**
|
|
66
|
+
* Card expiration month, like 03 for March.
|
|
67
|
+
*/
|
|
68
|
+
exp_month: number | null;
|
|
69
|
+
/**
|
|
70
|
+
* Card expiration year, like 27 for 2027.
|
|
71
|
+
*/
|
|
72
|
+
exp_year: number | null;
|
|
73
|
+
/**
|
|
74
|
+
* Last four digits of the card.
|
|
75
|
+
*/
|
|
76
|
+
last4: string | null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A stored payment method used to process payments. This could be a credit/debit
|
|
81
|
+
* card, bank account, PayPal wallet, etc.
|
|
82
|
+
*/
|
|
83
|
+
export interface PaymentMethodListResponse {
|
|
84
|
+
/**
|
|
85
|
+
* The ID of the payment method
|
|
86
|
+
*/
|
|
87
|
+
id: string;
|
|
88
|
+
/**
|
|
89
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
90
|
+
*/
|
|
91
|
+
card: PaymentMethodListResponse.Card | null;
|
|
92
|
+
/**
|
|
93
|
+
* The date and time the payment method was created
|
|
94
|
+
*/
|
|
95
|
+
created_at: string;
|
|
96
|
+
/**
|
|
97
|
+
* The payment method type of the payment method
|
|
98
|
+
*/
|
|
99
|
+
payment_method_type: PaymentsAPI.PaymentMethodTypes;
|
|
100
|
+
}
|
|
101
|
+
export declare namespace PaymentMethodListResponse {
|
|
102
|
+
/**
|
|
103
|
+
* The card data associated with the payment method, if its a debit or credit card.
|
|
104
|
+
*/
|
|
105
|
+
interface Card {
|
|
106
|
+
/**
|
|
107
|
+
* Possible card brands that a payment token can have
|
|
108
|
+
*/
|
|
109
|
+
brand: PaymentsAPI.CardBrands | null;
|
|
110
|
+
/**
|
|
111
|
+
* Card expiration month, like 03 for March.
|
|
112
|
+
*/
|
|
113
|
+
exp_month: number | null;
|
|
114
|
+
/**
|
|
115
|
+
* Card expiration year, like 27 for 2027.
|
|
116
|
+
*/
|
|
117
|
+
exp_year: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Last four digits of the card.
|
|
120
|
+
*/
|
|
121
|
+
last4: string | null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
export interface PaymentMethodRetrieveParams {
|
|
125
|
+
/**
|
|
126
|
+
* The ID of the Member associated with the PaymentMethod
|
|
127
|
+
*/
|
|
128
|
+
member_id: string;
|
|
129
|
+
}
|
|
130
|
+
export interface PaymentMethodListParams extends CursorPageParams {
|
|
131
|
+
/**
|
|
132
|
+
* The ID of the Member to list payment methods for
|
|
133
|
+
*/
|
|
134
|
+
member_id: string;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
137
|
+
*/
|
|
138
|
+
before?: string | null;
|
|
139
|
+
/**
|
|
140
|
+
* The minimum creation date to filter by
|
|
141
|
+
*/
|
|
142
|
+
created_after?: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* The maximum creation date to filter by
|
|
145
|
+
*/
|
|
146
|
+
created_before?: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* The direction of the sort.
|
|
149
|
+
*/
|
|
150
|
+
direction?: Shared.Direction | null;
|
|
151
|
+
/**
|
|
152
|
+
* Returns the first _n_ elements from the list.
|
|
153
|
+
*/
|
|
154
|
+
first?: number | null;
|
|
155
|
+
/**
|
|
156
|
+
* Returns the last _n_ elements from the list.
|
|
157
|
+
*/
|
|
158
|
+
last?: number | null;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace PaymentMethods {
|
|
161
|
+
export { type PaymentMethodRetrieveResponse as PaymentMethodRetrieveResponse, type PaymentMethodListResponse as PaymentMethodListResponse, type PaymentMethodListResponsesCursorPage as PaymentMethodListResponsesCursorPage, type PaymentMethodRetrieveParams as PaymentMethodRetrieveParams, type PaymentMethodListParams as PaymentMethodListParams, };
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=payment-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.d.ts","sourceRoot":"","sources":["../src/resources/payment-methods.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,2BAA2B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,6BAA6B,CAAC;IAI5C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,EAAE,uBAAuB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oCAAoC,EAAE,yBAA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C1C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PaymentMethods = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class PaymentMethods extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
11
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
12
|
+
* details and can be attached to a member for future one-time or recurring
|
|
13
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
14
|
+
* payments.
|
|
15
|
+
*
|
|
16
|
+
* Required permissions:
|
|
17
|
+
*
|
|
18
|
+
* - `member:payment_methods:read`
|
|
19
|
+
*/
|
|
20
|
+
retrieve(id, query, options) {
|
|
21
|
+
return this._client.get((0, path_1.path) `/payment_methods/${id}`, { query, ...options });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
25
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
26
|
+
* details and can be attached to a member for future one-time or recurring
|
|
27
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
28
|
+
* payments.
|
|
29
|
+
*
|
|
30
|
+
* Required permissions:
|
|
31
|
+
*
|
|
32
|
+
* - `member:payment_methods:read`
|
|
33
|
+
*/
|
|
34
|
+
list(query, options) {
|
|
35
|
+
return this._client.getAPIList('/payment_methods', (pagination_1.CursorPage), {
|
|
36
|
+
query,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.PaymentMethods = PaymentMethods;
|
|
42
|
+
//# sourceMappingURL=payment-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.js","sourceRoot":"","sources":["../src/resources/payment-methods.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,EAAU,EACV,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,uBAAqC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAxCD,wCAwCC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPage } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class PaymentMethods extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
8
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
9
|
+
* details and can be attached to a member for future one-time or recurring
|
|
10
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
11
|
+
* payments.
|
|
12
|
+
*
|
|
13
|
+
* Required permissions:
|
|
14
|
+
*
|
|
15
|
+
* - `member:payment_methods:read`
|
|
16
|
+
*/
|
|
17
|
+
retrieve(id, query, options) {
|
|
18
|
+
return this._client.get(path `/payment_methods/${id}`, { query, ...options });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A payment method is a stored representation of how a customer intends to pay,
|
|
22
|
+
* such as a card, bank account, or digital wallet. It holds the necessary billing
|
|
23
|
+
* details and can be attached to a member for future one-time or recurring
|
|
24
|
+
* charges. This lets you reuse the same payment credentials across multiple
|
|
25
|
+
* payments.
|
|
26
|
+
*
|
|
27
|
+
* Required permissions:
|
|
28
|
+
*
|
|
29
|
+
* - `member:payment_methods:read`
|
|
30
|
+
*/
|
|
31
|
+
list(query, options) {
|
|
32
|
+
return this._client.getAPIList('/payment_methods', (CursorPage), {
|
|
33
|
+
query,
|
|
34
|
+
...options,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=payment-methods.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-methods.mjs","sourceRoot":"","sources":["../src/resources/payment-methods.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;OAUG;IACH,QAAQ,CACN,EAAU,EACV,KAAkC,EAClC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAA,UAAqC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|