@rechargeapps/storefront-client 0.2.0 → 0.4.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/dist/cjs/api/charge.js +54 -0
- package/dist/cjs/api/charge.js.map +1 -0
- package/dist/cjs/api/onetime.js +40 -0
- package/dist/cjs/api/onetime.js.map +1 -0
- package/dist/cjs/api/order.js +19 -0
- package/dist/cjs/api/order.js.map +1 -0
- package/dist/cjs/api/subscription.js +49 -0
- package/dist/cjs/api/subscription.js.map +1 -1
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/request.js +11 -10
- package/dist/cjs/utils/request.js.map +1 -1
- package/dist/esm/api/charge.js +42 -0
- package/dist/esm/api/charge.js.map +1 -0
- package/dist/esm/api/onetime.js +32 -0
- package/dist/esm/api/onetime.js.map +1 -0
- package/dist/esm/api/order.js +14 -0
- package/dist/esm/api/order.js.map +1 -0
- package/dist/esm/api/subscription.js +43 -1
- package/dist/esm/api/subscription.js.map +1 -1
- package/dist/esm/index.js +4 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/request.js +11 -8
- package/dist/esm/utils/request.js.map +1 -1
- package/dist/index.d.ts +605 -58
- package/dist/umd/recharge-storefront-client.min.js +10 -10
- package/dist/umd/recharge-storefront-client.min.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,440 @@
|
|
|
1
1
|
declare const login: () => Promise<boolean>;
|
|
2
2
|
declare const logout: () => void;
|
|
3
3
|
|
|
4
|
+
/** HEXA, RGBA, HSLA */
|
|
5
|
+
declare type ColorString = string;
|
|
6
|
+
/** HTML String */
|
|
7
|
+
declare type HTMLString = string;
|
|
8
|
+
/** ISO 8601 date time, YYYY-MM-DD */
|
|
9
|
+
declare type IsoDateString = string;
|
|
10
|
+
interface Property {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
interface ListParams<T> {
|
|
15
|
+
/** default is 50, max is 250 */
|
|
16
|
+
limit?: number;
|
|
17
|
+
/** next or previous cursor returned by previous list call */
|
|
18
|
+
cursor?: number;
|
|
19
|
+
/** sort list by option */
|
|
20
|
+
sort_by?: T;
|
|
21
|
+
}
|
|
22
|
+
interface ExternalId {
|
|
23
|
+
/** The order ID as it appears in the external e-commerce platform. */
|
|
24
|
+
ecommerce: string | null;
|
|
25
|
+
}
|
|
26
|
+
interface ExternalTransactionId {
|
|
27
|
+
/** The ID of the associated transaction in a payment processor system (like Stripe). */
|
|
28
|
+
payment_processor: number | null;
|
|
29
|
+
}
|
|
30
|
+
interface AssociatedAddress {
|
|
31
|
+
address1: string;
|
|
32
|
+
address2: string | null;
|
|
33
|
+
city: string;
|
|
34
|
+
company: string | null;
|
|
35
|
+
country_code: string;
|
|
36
|
+
country?: string;
|
|
37
|
+
first_name: string;
|
|
38
|
+
last_name: string;
|
|
39
|
+
phone: string | null;
|
|
40
|
+
province: string;
|
|
41
|
+
zip: string;
|
|
42
|
+
}
|
|
43
|
+
interface ProductImage {
|
|
44
|
+
/** The url where a large image file is located. */
|
|
45
|
+
large?: string;
|
|
46
|
+
/** The url where a medium image file is located. */
|
|
47
|
+
medium?: string;
|
|
48
|
+
/** The url of the original sized product image. */
|
|
49
|
+
original?: string;
|
|
50
|
+
/** The url where a small image file is located. */
|
|
51
|
+
small?: string;
|
|
52
|
+
/** The sort order in which the x image from the array should appear when displayed. */
|
|
53
|
+
sort_order?: number;
|
|
54
|
+
}
|
|
55
|
+
interface LineItem {
|
|
56
|
+
subscription_id?: number;
|
|
57
|
+
/** The Subscription or Onetime ID associated with the line_item. */
|
|
58
|
+
purchase_item_id: number;
|
|
59
|
+
/** An object containing the associated product ID as it appears in the external system. */
|
|
60
|
+
external_product_id: ExternalId;
|
|
61
|
+
/** An object containing the associated variant ID as it appears in the external system. */
|
|
62
|
+
external_variant_id: ExternalId;
|
|
63
|
+
/** The weight of the item in grams. */
|
|
64
|
+
grams: number;
|
|
65
|
+
/** A unique, human-friendly string for the Product. */
|
|
66
|
+
handle: string | null;
|
|
67
|
+
/** An object containing URLs of the Product image. */
|
|
68
|
+
images: ProductImage;
|
|
69
|
+
/** An array of name value pairs of additional line_item attributes. */
|
|
70
|
+
properties: Property[];
|
|
71
|
+
/** An indicator of the type of the purchase item. */
|
|
72
|
+
purchase_item_type: 'subscription' | 'onetime';
|
|
73
|
+
/** The quantity of the line_item. */
|
|
74
|
+
quantity: number;
|
|
75
|
+
/** The SKU (stock keeping unit) of the Product associated with the line_item. */
|
|
76
|
+
sku: string | null;
|
|
77
|
+
/** The total tax due associated with the line_item. */
|
|
78
|
+
tax_due: string;
|
|
79
|
+
/** an array containing tax_line objects associated with this line_item. */
|
|
80
|
+
tax_lines: TaxLine[];
|
|
81
|
+
/** A boolean indicating if the line_item is taxable or non-taxable. */
|
|
82
|
+
taxable: boolean;
|
|
83
|
+
/** The taxable revenue associated with the line_item. */
|
|
84
|
+
taxable_amount: string;
|
|
85
|
+
/** The title of the Product of this line_item. */
|
|
86
|
+
title: string;
|
|
87
|
+
/** The total price of the line_item including tax. */
|
|
88
|
+
total_price: string;
|
|
89
|
+
/** The unit price of the line_item. */
|
|
90
|
+
unit_price: string;
|
|
91
|
+
/** A boolean indicator if tax is included in the price of an item. */
|
|
92
|
+
unit_price_includes_tax: boolean;
|
|
93
|
+
/** The name of a variant of the Product of this line_item. */
|
|
94
|
+
variant_title: string | null;
|
|
95
|
+
}
|
|
96
|
+
interface TaxLine {
|
|
97
|
+
/** The total tax associated with the listed jurisdiction. */
|
|
98
|
+
price: string;
|
|
99
|
+
/** The tax rate associated with the listed jurisdiction. */
|
|
100
|
+
rate: string;
|
|
101
|
+
/** The title/name of the taxing jurisdiction. */
|
|
102
|
+
title: string;
|
|
103
|
+
}
|
|
104
|
+
interface Discount {
|
|
105
|
+
/** The ID of the Discount. */
|
|
106
|
+
id: string;
|
|
107
|
+
/** The code of the Discount. */
|
|
108
|
+
code: string;
|
|
109
|
+
/** The value of the Discount. */
|
|
110
|
+
value: number;
|
|
111
|
+
/** The type of the value of the Discount. */
|
|
112
|
+
value_type: 'percentage' | 'fixed_amount';
|
|
113
|
+
}
|
|
114
|
+
declare type SubType<T, TRequired extends keyof T = keyof T, TOptional extends keyof T = keyof T> = Required<Pick<T, TRequired>> & Partial<Pick<T, TOptional>>;
|
|
115
|
+
|
|
116
|
+
interface ShippingLine {
|
|
117
|
+
/** The code associated with the shipping_line of a Charge. */
|
|
118
|
+
code: string;
|
|
119
|
+
/** The price of the shipping_line. */
|
|
120
|
+
price: string;
|
|
121
|
+
/** The source of the shipping_line. */
|
|
122
|
+
source: string;
|
|
123
|
+
/** The title of the shipping_line. */
|
|
124
|
+
title: string;
|
|
125
|
+
/** A boolean indicating if the shipping_line is taxable. */
|
|
126
|
+
taxable: boolean;
|
|
127
|
+
/** An array of tax lines associated with the shipping_line. */
|
|
128
|
+
tax_lines: TaxLine[];
|
|
129
|
+
}
|
|
130
|
+
declare type OrderStatus = 'success' | 'error' | 'queued' | 'cancelled' | 'pending_charge_status';
|
|
131
|
+
declare type OrderType = 'checkout' | 'recurring';
|
|
132
|
+
interface Order {
|
|
133
|
+
/** The unique numeric identifier for the order. */
|
|
134
|
+
id: number;
|
|
135
|
+
/** The id of the associated Address within Recharge. */
|
|
136
|
+
address_id: number;
|
|
137
|
+
/** The billing address at the time the order was created. See Addresses for detailed address information. */
|
|
138
|
+
billing_address: AssociatedAddress;
|
|
139
|
+
/** An object containing parameters of the Charge. */
|
|
140
|
+
charge: {
|
|
141
|
+
/** The id of the charge associated with this order. */
|
|
142
|
+
id: number;
|
|
143
|
+
/** An object containing external transaction ids associated with this charge, as they appear in external platforms. */
|
|
144
|
+
external_transaction_id: ExternalTransactionId;
|
|
145
|
+
};
|
|
146
|
+
/** Details of the access method used by the purchase. */
|
|
147
|
+
client_details: {
|
|
148
|
+
/** The IP address of the buyer as detected in Checkout. */
|
|
149
|
+
browser_ip: string;
|
|
150
|
+
/** The user agent detected during Checkout. */
|
|
151
|
+
user_agent: string;
|
|
152
|
+
};
|
|
153
|
+
/** The date when the order was created. */
|
|
154
|
+
created_at: IsoDateString;
|
|
155
|
+
/** The currency of the payment used to create the order. */
|
|
156
|
+
currency: string;
|
|
157
|
+
/** Object that contains information about the Customer. */
|
|
158
|
+
customer: {
|
|
159
|
+
/** The ID of the associated customer record. */
|
|
160
|
+
id: number;
|
|
161
|
+
/** The user email. */
|
|
162
|
+
email: string;
|
|
163
|
+
/** An object containing customer information associated with this charge. */
|
|
164
|
+
external_customer_id: ExternalId;
|
|
165
|
+
/** The hash of the Customer associated with the Charge. */
|
|
166
|
+
hash: string;
|
|
167
|
+
};
|
|
168
|
+
/** An array of Discounts associated with the Order. */
|
|
169
|
+
discounts: Discount[];
|
|
170
|
+
/** The cart token as it appears in an external system. */
|
|
171
|
+
external_cart_token: string;
|
|
172
|
+
/** An object containing external order ids. */
|
|
173
|
+
external_order_id?: ExternalId;
|
|
174
|
+
/** An object containing the external order numbers. */
|
|
175
|
+
external_order_number: ExternalId;
|
|
176
|
+
/** A boolean representing if this Order is generated from a prepaid purchase. */
|
|
177
|
+
is_prepaid?: boolean;
|
|
178
|
+
/** A list of line_item objects. */
|
|
179
|
+
line_items: LineItem[];
|
|
180
|
+
/** Notes associated with the Order. */
|
|
181
|
+
note: string;
|
|
182
|
+
/** An array of name value pairs of note attributes on the Order. */
|
|
183
|
+
order_attributes: Property[];
|
|
184
|
+
/** The date time that the associated charge was processed at. */
|
|
185
|
+
processed_at: IsoDateString | null;
|
|
186
|
+
/** The date time of when the associated charge is/was scheduled to process. */
|
|
187
|
+
scheduled_at: IsoDateString;
|
|
188
|
+
/** The shipping address where the order will be shipped. See Addresses for detailed Address information. */
|
|
189
|
+
shipping_address: AssociatedAddress;
|
|
190
|
+
/** An array of shipping lines associated with the order. */
|
|
191
|
+
shipping_lines: ShippingLine[];
|
|
192
|
+
/** The status of creating the Order. */
|
|
193
|
+
status: OrderStatus;
|
|
194
|
+
/** The subtotal price (sum of all line items * their quantity) of the order less discounts. */
|
|
195
|
+
subtotal_price: string;
|
|
196
|
+
/** A comma separated list of tags on the Order. */
|
|
197
|
+
tags: string;
|
|
198
|
+
/** An array of tax lines that apply to the Order. */
|
|
199
|
+
tax_lines: TaxLine[];
|
|
200
|
+
/** A boolean indicator of the taxability of the Order. */
|
|
201
|
+
taxable: boolean;
|
|
202
|
+
/** The total discounted dollar value of the Order. */
|
|
203
|
+
total_discounts: string;
|
|
204
|
+
/** The total price of all line items of the Order. */
|
|
205
|
+
total_line_items_price: string;
|
|
206
|
+
/** The total amount due of the Order. */
|
|
207
|
+
total_price: string;
|
|
208
|
+
/** The total dollar amount of refunds associated with the Order. */
|
|
209
|
+
total_refunds: string;
|
|
210
|
+
/** The total tax due associated with the Order. */
|
|
211
|
+
total_tax: string;
|
|
212
|
+
/** The total weight of the order in grams. */
|
|
213
|
+
total_weight_grams: number;
|
|
214
|
+
/** An indicator of the order’s type. */
|
|
215
|
+
type: OrderType;
|
|
216
|
+
/** The date time at which the order was most recently updated. */
|
|
217
|
+
updated_at: IsoDateString;
|
|
218
|
+
/** Error information about the order if status is 'error' */
|
|
219
|
+
error: string | null;
|
|
220
|
+
}
|
|
221
|
+
interface OrdersResponse {
|
|
222
|
+
next_cursor: null | string;
|
|
223
|
+
previous_cursor: null | string;
|
|
224
|
+
orders: Order[];
|
|
225
|
+
}
|
|
226
|
+
declare type OrderSortBy = 'id-asc' | 'id-desc' | 'updated_at-asc' | 'updated_at-desc' | 'processed_at-asc' | 'processed_at-desc' | 'scheduled_at-asc' | 'scheduled_at-desc';
|
|
227
|
+
interface OrderListParams extends ListParams<OrderSortBy> {
|
|
228
|
+
address_id?: string;
|
|
229
|
+
charge_id?: string;
|
|
230
|
+
created_at_min?: IsoDateString;
|
|
231
|
+
created_at_max?: IsoDateString;
|
|
232
|
+
customer_id?: string;
|
|
233
|
+
external_customer_id?: string;
|
|
234
|
+
ids?: string[];
|
|
235
|
+
scheduled_at_max?: IsoDateString;
|
|
236
|
+
scheduled_at_min?: IsoDateString;
|
|
237
|
+
has_external_order?: string;
|
|
238
|
+
status?: OrderStatus;
|
|
239
|
+
type?: OrderType;
|
|
240
|
+
purchase_item_id?: string;
|
|
241
|
+
updated_at_max?: IsoDateString;
|
|
242
|
+
updated_at_min?: IsoDateString;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
interface ChargeAnalyticsData {
|
|
246
|
+
utm_params: {
|
|
247
|
+
utm_campaign: string;
|
|
248
|
+
utm_content: string;
|
|
249
|
+
utm_data_source: string;
|
|
250
|
+
utm_source: string;
|
|
251
|
+
utm_medium: string;
|
|
252
|
+
utm_term: string;
|
|
253
|
+
utm_timestamp: string;
|
|
254
|
+
}[];
|
|
255
|
+
}
|
|
256
|
+
declare type ChargeStatus = 'success' | 'error' | 'queued' | 'skipped' | 'refunded' | 'partially_refunded' | 'pending_manual_payment' | 'pending';
|
|
257
|
+
interface Charge {
|
|
258
|
+
/** The unique numeric identifier for the Charge. */
|
|
259
|
+
id: number;
|
|
260
|
+
/** The ID of the shipping Address tied to the Charge.*/
|
|
261
|
+
address_id: number;
|
|
262
|
+
/** An object containing analytics data associated with the Charge. */
|
|
263
|
+
analytics_data: ChargeAnalyticsData;
|
|
264
|
+
/** All the billing information related to the charge. */
|
|
265
|
+
billing_address: AssociatedAddress;
|
|
266
|
+
/** Details of the access method used by the purchaser. */
|
|
267
|
+
client_details: {
|
|
268
|
+
/** The IP address of the buyer as detected in Checkout. */
|
|
269
|
+
browser_ip: string;
|
|
270
|
+
/** The user agent detected during Checkout. */
|
|
271
|
+
user_agent: string;
|
|
272
|
+
};
|
|
273
|
+
/** The date and time when the transaction was created. */
|
|
274
|
+
created_at: IsoDateString;
|
|
275
|
+
/** The code of the currency for this Charge, such as USD. */
|
|
276
|
+
currency: string;
|
|
277
|
+
/** An object containing Customer information associated with this Charge. */
|
|
278
|
+
customer: {
|
|
279
|
+
/** The ID of the associated customer record. */
|
|
280
|
+
id: number;
|
|
281
|
+
/** The user email. */
|
|
282
|
+
email: string;
|
|
283
|
+
/** An object containing customer information associated with this charge. */
|
|
284
|
+
external_customer_id: string;
|
|
285
|
+
/** The hash of the Customer associated with the Charge. */
|
|
286
|
+
hash: string;
|
|
287
|
+
};
|
|
288
|
+
/** An array of Discounts associated with the Charge. */
|
|
289
|
+
discounts: Discount[];
|
|
290
|
+
/** An object containing the associated external order ID. */
|
|
291
|
+
external_order_id: ExternalId;
|
|
292
|
+
/** An object containing the associated external transaction ID. */
|
|
293
|
+
external_transaction_id: ExternalTransactionId;
|
|
294
|
+
/** A list of line_item objects, each containing information about a distinct purchase item. */
|
|
295
|
+
line_items: LineItem;
|
|
296
|
+
/** Notes associated with the Charge. */
|
|
297
|
+
note: string;
|
|
298
|
+
/** An array of name-value pairs of order attributes on the Charge. */
|
|
299
|
+
order_attributes: Property[];
|
|
300
|
+
/** The number of Orders generated from this Charge (>1 for prepaid Subscriptions). */
|
|
301
|
+
orders_count: number;
|
|
302
|
+
/** The payment processor used for this Charge. */
|
|
303
|
+
payment_processor: string;
|
|
304
|
+
/** The date and time when the transaction was processed. */
|
|
305
|
+
processed_at: IsoDateString;
|
|
306
|
+
/** The date when the next attempt will be placed. */
|
|
307
|
+
retry_date: IsoDateString;
|
|
308
|
+
/** The date time of when the Charge is/was scheduled to process. */
|
|
309
|
+
scheduled_at: IsoDateString;
|
|
310
|
+
/** The shipping Address of the Charge. */
|
|
311
|
+
shipping_address: AssociatedAddress;
|
|
312
|
+
/** An array of shipping lines associated with the Charge. */
|
|
313
|
+
shipping_lines: ShippingLine[];
|
|
314
|
+
/** The status of the Charge. */
|
|
315
|
+
status: ChargeStatus;
|
|
316
|
+
/** The combined price of all line_items without taxes and shipping. */
|
|
317
|
+
subtotal_price: string;
|
|
318
|
+
/** A comma-separated list of tags on the Charge. */
|
|
319
|
+
tags: string;
|
|
320
|
+
/** An array of tax lines that apply to the Charge. */
|
|
321
|
+
tax_lines: TaxLine[];
|
|
322
|
+
/** A boolean indicator of the taxability of the Charge. */
|
|
323
|
+
taxable: boolean;
|
|
324
|
+
/** The sum of the Discounts applied to the Charge. */
|
|
325
|
+
total_discounts: string;
|
|
326
|
+
/** The total price of all line items of the Charge. */
|
|
327
|
+
total_line_items_price: string;
|
|
328
|
+
/** The sum of all the prices of all the items in the Charge, taxes and discounts included (must be positive). */
|
|
329
|
+
total_price: string;
|
|
330
|
+
/** The sum of all refunds that were applied to the Charge. */
|
|
331
|
+
total_refunds: string;
|
|
332
|
+
/** The total tax due associated with the Charge. */
|
|
333
|
+
total_tax: string;
|
|
334
|
+
/** The total weight of the Charge’s line items in grams. */
|
|
335
|
+
total_weight_grams: number;
|
|
336
|
+
/** An indicator of the Charge’s type, either checkout or recurring. */
|
|
337
|
+
type: 'checkout' | 'recurring';
|
|
338
|
+
/** The date time at which the Charge was most recently updated. */
|
|
339
|
+
updated_at: IsoDateString;
|
|
340
|
+
}
|
|
341
|
+
interface ChargeListResponse {
|
|
342
|
+
next_cursor: null | string;
|
|
343
|
+
previous_cursor: null | string;
|
|
344
|
+
charges: Charge[];
|
|
345
|
+
}
|
|
346
|
+
interface ApplyDiscountRequest {
|
|
347
|
+
/** Code of the Discount you want to apply to a Charge. */
|
|
348
|
+
discount_code?: string;
|
|
349
|
+
/** ID of the Discount you want to apply to a Charge. */
|
|
350
|
+
discount_id?: number;
|
|
351
|
+
}
|
|
352
|
+
interface RefundChargeRequest {
|
|
353
|
+
/** Amount of money that will be refunded. It can be fully or partially refunded. */
|
|
354
|
+
amount: string;
|
|
355
|
+
/** If this parameter has value true, the Charge will be totally refunded. */
|
|
356
|
+
full_refund?: boolean;
|
|
357
|
+
}
|
|
358
|
+
declare type ChargeSortBy = 'id-asc' | 'id-desc' | 'updated_at-asc' | 'updated_at-desc' | 'scheduled_at-asc' | 'scheduled_at-desc';
|
|
359
|
+
interface ChargeListParams extends ListParams<ChargeSortBy> {
|
|
360
|
+
/** Filter Charges by Address. */
|
|
361
|
+
address_id?: string;
|
|
362
|
+
/** Filter Charges by Customer. */
|
|
363
|
+
customer_id?: string;
|
|
364
|
+
/** List Charges that contain the given discount_id. */
|
|
365
|
+
discount_id?: string;
|
|
366
|
+
/** List Charges that contain the given discount_code. */
|
|
367
|
+
discount_code?: string;
|
|
368
|
+
/** Filter Charges by the associated order ID in the external e-commerce platform. */
|
|
369
|
+
external_order_id?: string;
|
|
370
|
+
/**
|
|
371
|
+
* Filter Charges by ID.
|
|
372
|
+
* If passing multiple values, must be comma separated. Non-integer values will result in a 422 error.
|
|
373
|
+
*/
|
|
374
|
+
ids?: string;
|
|
375
|
+
/** Filter Charges by a Subscription or Onetime ID. */
|
|
376
|
+
purchase_item_id?: string;
|
|
377
|
+
/** Filter Charges by a comma-separated list of Subscription or Onetime IDs. */
|
|
378
|
+
purchase_item_ids?: string;
|
|
379
|
+
/** Filter Charges by specific scheduled charge date. */
|
|
380
|
+
scheduled_at?: IsoDateString;
|
|
381
|
+
/** Show Charges scheduled to be processed before the given date. */
|
|
382
|
+
scheduled_at_max?: IsoDateString;
|
|
383
|
+
/** Show Charges scheduled to be processed after the given date. */
|
|
384
|
+
scheduled_at_min?: IsoDateString;
|
|
385
|
+
/** Filter charges by status. */
|
|
386
|
+
status?: ChargeStatus;
|
|
387
|
+
/** Show charges updated before the given date. */
|
|
388
|
+
updated_at_max?: IsoDateString;
|
|
389
|
+
/** Show charges updated after the given date. */
|
|
390
|
+
updated_at_min?: IsoDateString;
|
|
391
|
+
/** Show charges processed after, and including, the given date. */
|
|
392
|
+
processed_at_max?: IsoDateString;
|
|
393
|
+
/** Show charges processed before, and including, the given date. */
|
|
394
|
+
processed_at_min?: IsoDateString;
|
|
395
|
+
/** Show Charges created after the given date. */
|
|
396
|
+
created_at_min?: IsoDateString;
|
|
397
|
+
/** Show Charges created before the given date. */
|
|
398
|
+
created_at_max?: IsoDateString;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare function getCharge(id: number | string): Promise<Charge>;
|
|
402
|
+
/** Lists charges */
|
|
403
|
+
declare function listCharges(query?: ChargeListParams): Promise<ChargeListResponse>;
|
|
404
|
+
/**
|
|
405
|
+
* You cannot add a Discount to an existing queued Charge if the Charge or the associated Address already has one.
|
|
406
|
+
* You can provide either discount_id or discount_code. If both parameters are passed, the value for discount_id will take precedence.
|
|
407
|
+
* If a Charge has a Discount and it gets updated, or a regeneration occurs, the Discount will be lost. Regeneration is a process that refreshes the Charge JSON with new data in the case of the Subscription or Address being updated.
|
|
408
|
+
*/
|
|
409
|
+
declare function applyDiscount(id: number | string, request: ApplyDiscountRequest): Promise<Charge>;
|
|
410
|
+
/**
|
|
411
|
+
* Remove a Discount from a Charge without destroying the Discount.
|
|
412
|
+
* In most cases the Discount should be removed from the Address. When the Discount is removed from the Address, the Discount is also removed from any future Charges.
|
|
413
|
+
* If the Discount is on the parent Address, you cannot remove it using charge_id.
|
|
414
|
+
* When removing your Discount, it is preferable to pass the address_id so that the Discount stays removed if the Charge is regenerated. Only pass charge_id in edge cases in which there are two or more Charges on a parent Address and you only want to remove the Discount from one Charge.
|
|
415
|
+
* If you pass both parameters, it will remove the Discount from the Address.
|
|
416
|
+
*/
|
|
417
|
+
declare function removeDiscount(id: number | string): Promise<Charge>;
|
|
418
|
+
declare function skipCharge(id: number | string): Promise<Charge>;
|
|
419
|
+
declare function unskipCharge(id: number | string): Promise<Charge>;
|
|
420
|
+
declare function refundCharge(id: number | string, request: RefundChargeRequest): Promise<Charge>;
|
|
421
|
+
/** The charge processing route can be used to process Charges that are in a queued or error status. */
|
|
422
|
+
declare function processCharge(id: number | string): Promise<Charge>;
|
|
423
|
+
/**
|
|
424
|
+
* If you are leveraging the authorize/capture workflow with Recharge, the charge/{id}/capture_payment endpoint is how to capture the funds of a previously authorized Charge.
|
|
425
|
+
*/
|
|
426
|
+
declare function captureCharge(id: number | string): Promise<Charge>;
|
|
427
|
+
|
|
4
428
|
declare type Method = 'get' | 'post' | 'put' | 'delete';
|
|
5
429
|
declare type Request = <T>(method: Method, url: string, options?: RequestOptions) => Promise<T>;
|
|
6
430
|
interface GetRequestOptions {
|
|
7
|
-
id?: string;
|
|
431
|
+
id?: string | number;
|
|
8
432
|
query?: unknown;
|
|
9
433
|
}
|
|
10
434
|
interface CRUDRequestOptions {
|
|
11
|
-
id?: string;
|
|
435
|
+
id?: string | number;
|
|
12
436
|
data?: unknown;
|
|
437
|
+
query?: unknown;
|
|
13
438
|
}
|
|
14
439
|
/** Custom headers we use within our storefront client */
|
|
15
440
|
interface CustomHeaders {
|
|
@@ -34,25 +459,6 @@ interface Bundle {
|
|
|
34
459
|
selections: BundleSelection[];
|
|
35
460
|
}
|
|
36
461
|
|
|
37
|
-
/** HEXA, RGBA, HSLA */
|
|
38
|
-
declare type ColorString = string;
|
|
39
|
-
/** HTML String */
|
|
40
|
-
declare type HTMLString = string;
|
|
41
|
-
/** ISO 8601 date time */
|
|
42
|
-
declare type IsoDateString = string;
|
|
43
|
-
interface Properties {
|
|
44
|
-
name: string;
|
|
45
|
-
value: string;
|
|
46
|
-
}
|
|
47
|
-
interface ListParams<T> {
|
|
48
|
-
/** default is 50, max is 250 */
|
|
49
|
-
limit?: number;
|
|
50
|
-
/** next or previous cursor returned by previous list call */
|
|
51
|
-
cursor?: number;
|
|
52
|
-
/** sort list by option */
|
|
53
|
-
sort_by?: T;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
462
|
declare type FirstOption = 'onetime' | 'autodeliver';
|
|
57
463
|
declare type IntervalUnit = 'day' | 'week' | 'month';
|
|
58
464
|
declare type PriceAdjustmentsType = 'percentage';
|
|
@@ -422,64 +828,159 @@ declare const resetCache: () => void;
|
|
|
422
828
|
declare const getBundleId: (bundle: Bundle) => Promise<string>;
|
|
423
829
|
declare const validateBundle: (bundle: Bundle) => Promise<boolean>;
|
|
424
830
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
831
|
+
interface Onetime {
|
|
832
|
+
/** Unique numeric identifier for the Onetime purchase. */
|
|
833
|
+
id: number;
|
|
834
|
+
/** Unique numeric identifier for the address the Onetime Purchase is associated with (cannot be used with next_charge_scheduled_at) */
|
|
835
|
+
address_id: number;
|
|
836
|
+
/** The time the Onetime item was first created. */
|
|
837
|
+
created_at: IsoDateString;
|
|
838
|
+
/** Unique numeric identifier for the customer the Onetime purchase is tied to. */
|
|
839
|
+
customer_id: number;
|
|
840
|
+
/** An object containing the product id as it appears in external platforms. */
|
|
841
|
+
external_product_id: ExternalId;
|
|
842
|
+
/** An object containing the variant id as it appears in external platforms. */
|
|
843
|
+
external_variant_id: ExternalId;
|
|
844
|
+
/** Flag indicating if the the onetime is cancelled. */
|
|
845
|
+
is_cancelled: boolean;
|
|
846
|
+
/**
|
|
847
|
+
* Date of the Onetime purchase execution.
|
|
848
|
+
* Cannot be used with add_to_next_charge
|
|
849
|
+
*/
|
|
850
|
+
next_charge_scheduled_at: IsoDateString;
|
|
851
|
+
/** The price of the item before discounts, taxes, or shipping have been applied. */
|
|
852
|
+
price: string;
|
|
853
|
+
/** The name of the product in a shop’s catalog. */
|
|
854
|
+
product_title: string;
|
|
855
|
+
/** An array containing key value pairs for any supplementary data. */
|
|
856
|
+
properties: Property[];
|
|
857
|
+
/** The number of items in the Onetime purchase. */
|
|
858
|
+
quantity: number;
|
|
859
|
+
/** A unique identifier of the item in the fulfillment. */
|
|
860
|
+
sku: string;
|
|
861
|
+
/** Flag that is automatically updated to true when SKU is passed on POST or PUT. */
|
|
862
|
+
sku_override: boolean;
|
|
863
|
+
/** The time the Onetime purchase was last updated. */
|
|
435
864
|
updated_at: IsoDateString;
|
|
865
|
+
/** The name of the variant in a shop’s catalog. */
|
|
866
|
+
variant_title: string;
|
|
867
|
+
/** Presentment currency */
|
|
868
|
+
presentment_currency: string | null;
|
|
869
|
+
}
|
|
870
|
+
declare type RequiredCreateProps$1 = 'address_id' | 'external_variant_id' | 'next_charge_scheduled_at' | 'product_title' | 'quantity';
|
|
871
|
+
declare type OptionalCreateProps$1 = 'external_product_id' | 'properties' | 'sku';
|
|
872
|
+
interface CreateProps {
|
|
873
|
+
/** Instructs to add the Onetime to the next charge scheduled under this Address. */
|
|
874
|
+
add_to_next_charge?: boolean;
|
|
875
|
+
}
|
|
876
|
+
declare type CreateOnetimeRequest = SubType<Onetime, RequiredCreateProps$1, OptionalCreateProps$1> & CreateProps;
|
|
877
|
+
declare type OptionalUpdateProps$1 = 'address_id' | 'next_charge_scheduled_at' | 'properties' | 'quantity' | 'external_variant_id' | 'sku';
|
|
878
|
+
declare type UpdateOnetimeRequest = Partial<Pick<Onetime, OptionalUpdateProps$1>>;
|
|
879
|
+
interface OnetimesResponse {
|
|
880
|
+
next_cursor: null | string;
|
|
881
|
+
previous_cursor: null | string;
|
|
882
|
+
onetimes: Onetime[];
|
|
883
|
+
}
|
|
884
|
+
declare type OnetimesSortBy = 'id-asc' | 'id-desc' | 'created_at-asc' | 'created_at-desc' | 'updated_at-asc' | 'updated_at-desc';
|
|
885
|
+
declare type OnetimeListParams = ListParams<OnetimesSortBy>;
|
|
886
|
+
|
|
887
|
+
declare const getOnetime: (id: string | number) => Promise<Onetime>;
|
|
888
|
+
declare const listOnetimes: (query?: OnetimeListParams) => Promise<OnetimesResponse>;
|
|
889
|
+
declare const createOnetime: (data: CreateOnetimeRequest) => Promise<Onetime>;
|
|
890
|
+
declare const updateOnetime: (id: string | number, data: UpdateOnetimeRequest) => Promise<Onetime>;
|
|
891
|
+
declare const deleteOnetime: (id: string | number) => Promise<void>;
|
|
892
|
+
|
|
893
|
+
declare const getOrder: (id: string | number) => Promise<Order>;
|
|
894
|
+
declare const listOrders: (query?: OrderListParams) => Promise<OrdersResponse>;
|
|
895
|
+
|
|
896
|
+
interface Subscription {
|
|
897
|
+
/** Unique numeric identifier for the subscription. */
|
|
436
898
|
id: number;
|
|
899
|
+
/** Unique numeric identifier for the address the subscription is associated with. */
|
|
437
900
|
address_id: number;
|
|
901
|
+
/** Unique numeric identifier for the customer the subscription is tied to. */
|
|
902
|
+
customer_id: number;
|
|
903
|
+
/** An object used to contain analytics data such as utm parameters. */
|
|
438
904
|
analytics_data: {
|
|
439
905
|
utm_params: Record<string, unknown>;
|
|
440
906
|
};
|
|
907
|
+
/** Reason provided for cancellation. */
|
|
441
908
|
cancellation_reason: string | null;
|
|
909
|
+
/** Additional comment for cancellation. */
|
|
442
910
|
cancellation_reason_comments: string | null;
|
|
911
|
+
/** The time the subscription was cancelled. */
|
|
443
912
|
cancelled_at: string | null;
|
|
444
|
-
|
|
913
|
+
/**
|
|
914
|
+
* The number of units (specified in order_interval_unit) between each Charge. For example, order_interval_unit=month and charge_interval_frequency=3, indicate charge every 3 months.
|
|
915
|
+
* Charges must use the same unit types as orders.
|
|
916
|
+
* Max: 1000
|
|
917
|
+
*/
|
|
918
|
+
charge_interval_frequency: number;
|
|
919
|
+
/** The time the subscription was created. */
|
|
445
920
|
created_at: IsoDateString;
|
|
446
|
-
|
|
447
|
-
cutoff_day_of_month_before_and_after: number | null;
|
|
448
|
-
cutoff_day_of_week_before_and_after: number | null;
|
|
449
|
-
email: string;
|
|
921
|
+
/** Set the number of charges until subscription expires. */
|
|
450
922
|
expire_after_specific_number_of_charges: number | null;
|
|
451
|
-
|
|
923
|
+
/** An object containing the product id as it appears in external platforms. */
|
|
924
|
+
external_product_id: ExternalId;
|
|
925
|
+
/** An object containing the variant id as it appears in external platforms. */
|
|
926
|
+
external_variant_id: ExternalId;
|
|
927
|
+
/** Retrieves true if there is queued charge. Otherwise, retrieves false. */
|
|
928
|
+
has_queued_charges: boolean;
|
|
929
|
+
/** Value is set to true if it is a prepaid item. */
|
|
930
|
+
is_prepaid: boolean;
|
|
931
|
+
/** Value is set to true if it is not a prepaid item */
|
|
452
932
|
is_skippable: boolean;
|
|
933
|
+
/** Value is set to true if it is not a prepaid item and if in Customer portal settings swap is allowed for customers. */
|
|
453
934
|
is_swappable: boolean;
|
|
935
|
+
/** Retrieves true if charge has an error max retries reached. Otherwise, retrieves false. */
|
|
936
|
+
max_retries_reached: boolean;
|
|
937
|
+
/** Date of the next charge for the subscription. */
|
|
454
938
|
next_charge_scheduled_at: IsoDateString;
|
|
939
|
+
/**
|
|
940
|
+
* The set day of the month order is created. Default is that there isn’t a strict day of the month when the order is created.
|
|
941
|
+
* This is only applicable to subscriptions with order_interval_unit:“month”.
|
|
942
|
+
*/
|
|
943
|
+
order_day_of_month: number | null;
|
|
944
|
+
/**
|
|
945
|
+
* The set day of the week order is created. Default is that there isn’t a strict day of the week order is created.
|
|
946
|
+
* This is only applicable to subscriptions with order_interval_unit = “week”.
|
|
947
|
+
* Value of 0 equals to Monday, 1 to Tuesday etc.
|
|
948
|
+
*/
|
|
949
|
+
order_day_of_week: number | null;
|
|
950
|
+
/**
|
|
951
|
+
* The number of units (specified in order_interval_unit) between each order. For example, order_interval_unit=month and order_interval_frequency=3, indicate order every 3 months. Max value: 1000
|
|
952
|
+
*/
|
|
953
|
+
order_interval_frequency: number;
|
|
954
|
+
/** The frequency unit used to determine when a subscription’s order is created. */
|
|
955
|
+
order_interval_unit: 'day' | 'week' | 'month';
|
|
956
|
+
/** The presentment currency of the subscription. */
|
|
455
957
|
presentment_currency: string | null;
|
|
456
|
-
|
|
958
|
+
/** The price of the item before discounts, taxes, or shipping have been applied. */
|
|
959
|
+
price: string;
|
|
960
|
+
/** The name of the product in a store’s catalog. */
|
|
457
961
|
product_title: string | null;
|
|
962
|
+
/** A list of line item objects, each one containing information about the subscription. Custom key-value pairs can be installed here, they will appear on the connected queued charge and after it is processed on the order itself. */
|
|
963
|
+
properties: Property[];
|
|
964
|
+
/** The number of items in the subscription. */
|
|
458
965
|
quantity: number;
|
|
459
|
-
|
|
460
|
-
shopify_product_id: number;
|
|
461
|
-
shopify_variant_id: number;
|
|
966
|
+
/** A unique identifier of the item in the fulfillment. In cases where SKU is blank, it will be dynamically pulled whenever it is used. */
|
|
462
967
|
sku: string | null;
|
|
968
|
+
/** Flag that is automatically updated to true when SKU is passed on create or update. When sku_override is true, the SKU on the subscription will be used to generate charges and orders. When sku_override is false, Recharge will dynamically fetch the SKU from the corresponding external platform variant. */
|
|
463
969
|
sku_override: boolean;
|
|
970
|
+
/**
|
|
971
|
+
* The status of the subscription.
|
|
972
|
+
* expired - This status occurs when the maximum number of charges for a product has been reached.
|
|
973
|
+
*/
|
|
974
|
+
status: 'active' | 'cancelled' | 'expired';
|
|
975
|
+
/** The date time at which the purchase_item record was last updated. */
|
|
976
|
+
updated_at: IsoDateString;
|
|
977
|
+
/** The name of the variant in a shop’s catalog. */
|
|
464
978
|
variant_title: string;
|
|
465
|
-
charge_interval_frequency: number;
|
|
466
|
-
external_product_id: {
|
|
467
|
-
ecommerce: string;
|
|
468
|
-
};
|
|
469
|
-
external_variant_id: {
|
|
470
|
-
ecommerce: string;
|
|
471
|
-
};
|
|
472
|
-
has_queued_charges: boolean;
|
|
473
|
-
locked_pending_charge_id: number | null;
|
|
474
|
-
max_retries_reached: boolean;
|
|
475
|
-
order_interval_frequency: number;
|
|
476
|
-
price: string;
|
|
477
|
-
status: SubscriptionStatus;
|
|
478
979
|
}
|
|
479
|
-
interface
|
|
980
|
+
interface SubscriptionsResponse {
|
|
480
981
|
next_cursor: null | string;
|
|
481
982
|
previous_cursor: null | string;
|
|
482
|
-
subscriptions:
|
|
983
|
+
subscriptions: Subscription[];
|
|
483
984
|
}
|
|
484
985
|
declare type SubscriptionSortBy = 'id-asc' | 'id-desc' | 'created_at-asc' | 'created_at-desc' | 'updated_at-asc' | 'updated_at-desc';
|
|
485
986
|
interface SubscriptionListParams extends ListParams<SubscriptionSortBy> {
|
|
@@ -487,8 +988,54 @@ interface SubscriptionListParams extends ListParams<SubscriptionSortBy> {
|
|
|
487
988
|
created_at_max?: IsoDateString;
|
|
488
989
|
customer_id?: string;
|
|
489
990
|
}
|
|
991
|
+
declare type RequiredCreateProps = 'address_id' | 'charge_interval_frequency' | 'external_variant_id' | 'next_charge_scheduled_at' | 'order_interval_frequency' | 'order_interval_unit' | 'quantity';
|
|
992
|
+
declare type OptionalCreateProps = 'expire_after_specific_number_of_charges' | 'order_day_of_month' | 'order_day_of_week' | 'external_product_id' | 'product_title' | 'properties' | 'status';
|
|
993
|
+
declare type CreateSubscriptionRequest = SubType<Subscription, RequiredCreateProps, OptionalCreateProps>;
|
|
994
|
+
declare type OptionalUpdateProps = 'charge_interval_frequency' | 'expire_after_specific_number_of_charges' | 'order_day_of_month' | 'order_day_of_week' | 'order_interval_frequency' | 'order_interval_unit' | 'quantity' | 'external_product_id' | 'external_variant_id' | 'properties' | 'sku' | 'sku_override';
|
|
995
|
+
declare type UpdateSubscriptionRequest = Partial<Pick<Subscription, OptionalUpdateProps>>;
|
|
996
|
+
interface UpdateSubscriptionParams {
|
|
997
|
+
/** Controls whether the QUEUED charges linked to the subscription should be regenerated upon subscription update. By default the flag is set to false which will delay charge regeneration 5 seconds. This enables running multiple calls to perform changes and receive responses much faster since the API won’t wait for a charge regeneration to complete. Setting this parameter to true will cause charge regeneration to complete before returning a response. */
|
|
998
|
+
commit?: boolean;
|
|
999
|
+
}
|
|
1000
|
+
interface CancelSubscriptionRequest {
|
|
1001
|
+
cancellation_reason: string;
|
|
1002
|
+
cancellation_reason_comments?: string;
|
|
1003
|
+
send_email?: boolean;
|
|
1004
|
+
}
|
|
490
1005
|
|
|
491
|
-
declare const
|
|
1006
|
+
declare const getSubscription: (id: string | number) => Promise<Subscription>;
|
|
1007
|
+
declare const listSubscriptions: (query?: SubscriptionListParams) => Promise<SubscriptionsResponse>;
|
|
1008
|
+
/**
|
|
1009
|
+
* When creating a subscription via API, order_interval_frequency and charge_interval_frequency values do not necessarily
|
|
1010
|
+
* need to match the values set in the respective Plans. The product, however, does need to have at least one Plan in order
|
|
1011
|
+
* to be added to a subscription.
|
|
1012
|
+
*/
|
|
1013
|
+
declare const createSubscription: (data: CreateSubscriptionRequest) => Promise<Subscription>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Updating parameters like frequency, charge_interval_frequency, order_interval_frequency, order_interval_unit will cause our algorithm to automatically recalculate the next charge date (next_charge_scheduled_at).
|
|
1016
|
+
* WARNING: This update will remove skipped and manually changed charges.
|
|
1017
|
+
* If you want to change the next charge date (next_charge_scheduled_at) we recommend you to update these parameters first.
|
|
1018
|
+
* When updating order_interval_unit OR order_interval_frequency OR charge_interval_frequency all three parameters are required.
|
|
1019
|
+
*/
|
|
1020
|
+
declare const updateSubscription: (id: string | number, data: UpdateSubscriptionRequest, query?: UpdateSubscriptionParams) => Promise<Subscription>;
|
|
1021
|
+
/**
|
|
1022
|
+
* If there are two active subscriptions with the same address_id, and you update their
|
|
1023
|
+
* next_charge_date parameters to match, their charges will get merged into a new charge
|
|
1024
|
+
* with a new id
|
|
1025
|
+
*/
|
|
1026
|
+
declare const updateSubscriptionChargeDate: (id: string | number, date: IsoDateString) => Promise<Subscription>;
|
|
1027
|
+
declare const updateSubscriptionAddress: (id: string | number, address_id: string | number) => Promise<Subscription>;
|
|
1028
|
+
/**
|
|
1029
|
+
* An involuntary subscription cancelled due to max retries reached will trigger the
|
|
1030
|
+
* charge/max_retries_reached webhook. If this leads to the subscription being cancelled,
|
|
1031
|
+
* the subscription/cancelled webhook will trigger.
|
|
1032
|
+
*/
|
|
1033
|
+
declare const cancelSubscription: (id: string | number, data: CancelSubscriptionRequest) => Promise<Subscription>;
|
|
1034
|
+
/**
|
|
1035
|
+
* When activating subscription, following attributes will be set to null: cancelled_at, cancellation_reason
|
|
1036
|
+
* and cancellation_reason_comments.
|
|
1037
|
+
*/
|
|
1038
|
+
declare const activateSubscription: (id: string | number) => Promise<Subscription>;
|
|
492
1039
|
|
|
493
1040
|
declare type InitOptions = Omit<Partial<StorefrontOptions>, 'environment' | 'apiKey'>;
|
|
494
1041
|
declare const api: {
|
|
@@ -499,4 +1046,4 @@ declare const api: {
|
|
|
499
1046
|
};
|
|
500
1047
|
declare function initRecharge(opt?: InitOptions): void;
|
|
501
1048
|
|
|
502
|
-
export { Bundle, BundleSelection, BundleTranslations, CDNBaseWidgetSettings, CDNBundleLayoutSettings, CDNBundleSettings, CDNBundleStep, CDNBundleStepOption, CDNBundleVariant, CDNBundleVariantOptionSource, CDNBundleVariantSelectionDefault, CDNPrices, CDNProduct, CDNProductAndSettings, CDNProductKeyObject, CDNProductOption, CDNProductOptionValue, CDNProductRaw, CDNProductResource, CDNProductsAndSettings, CDNProductsAndSettingsResource, CDNSellingPlan, CDNSellingPlanAllocations, CDNSellingPlanGroup, CDNStoreSettings, CDNSubscriptionOption, CDNVariant, CDNVariantOptionValue, CDNWidgetSettings, CDNWidgetSettingsRaw, CDNWidgetSettingsResource, CRUDRequestOptions, FirstOption, GetRequestOptions, InitOptions, IntervalUnit, Method, PriceAdjustmentsType, Request, RequestHeaders, RequestOptions, RequestOptionsHeaders, StorefrontEnvironment, StorefrontOptions, StorefrontPurchaseOption, Translations, WidgetIconColor, WidgetTemplateType, api, getBundleId, getBundleSettings, getProduct, getProductAndSettings, getProducts, getProductsAndSettings, getStoreSettings, getWidgetSettings, initRecharge, listSubscriptions, login, logout, resetCache, validateBundle };
|
|
1049
|
+
export { Bundle, BundleSelection, BundleTranslations, CDNBaseWidgetSettings, CDNBundleLayoutSettings, CDNBundleSettings, CDNBundleStep, CDNBundleStepOption, CDNBundleVariant, CDNBundleVariantOptionSource, CDNBundleVariantSelectionDefault, CDNPrices, CDNProduct, CDNProductAndSettings, CDNProductKeyObject, CDNProductOption, CDNProductOptionValue, CDNProductRaw, CDNProductResource, CDNProductsAndSettings, CDNProductsAndSettingsResource, CDNSellingPlan, CDNSellingPlanAllocations, CDNSellingPlanGroup, CDNStoreSettings, CDNSubscriptionOption, CDNVariant, CDNVariantOptionValue, CDNWidgetSettings, CDNWidgetSettingsRaw, CDNWidgetSettingsResource, CRUDRequestOptions, FirstOption, GetRequestOptions, InitOptions, IntervalUnit, Method, PriceAdjustmentsType, Request, RequestHeaders, RequestOptions, RequestOptionsHeaders, StorefrontEnvironment, StorefrontOptions, StorefrontPurchaseOption, Translations, WidgetIconColor, WidgetTemplateType, activateSubscription, api, applyDiscount, cancelSubscription, captureCharge, createOnetime, createSubscription, deleteOnetime, getBundleId, getBundleSettings, getCharge, getOnetime, getOrder, getProduct, getProductAndSettings, getProducts, getProductsAndSettings, getStoreSettings, getSubscription, getWidgetSettings, initRecharge, listCharges, listOnetimes, listOrders, listSubscriptions, login, logout, processCharge, refundCharge, removeDiscount, resetCache, skipCharge, unskipCharge, updateOnetime, updateSubscription, updateSubscriptionAddress, updateSubscriptionChargeDate, validateBundle };
|