chargebee 2.41.0 → 3.0.0-beta.2
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 +11 -15
- package/LICENSE +1 -1
- package/README.md +90 -170
- package/cjs/RequestWrapper.js +84 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +80 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +90 -55
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +24 -35
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +230 -747
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4336
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +276 -911
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2935
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,54 +1,105 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
3
4
|
declare module 'chargebee' {
|
|
4
5
|
export interface PricingPageSession {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
id?: string;
|
|
7
|
+
url?: string;
|
|
8
|
+
created_at?: number;
|
|
9
|
+
expires_at?: number;
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
export namespace PricingPageSession {
|
|
13
|
+
export class PricingPageSessionResource {
|
|
14
|
+
createForNewSubscription(
|
|
15
|
+
input: CreateForNewSubscriptionInputParam,
|
|
16
|
+
headers?: ChargebeeRequestHeader,
|
|
17
|
+
): Promise<ChargebeeResponse<CreateForNewSubscriptionResponse>>;
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
createForExistingSubscription(
|
|
20
|
+
input: CreateForExistingSubscriptionInputParam,
|
|
21
|
+
headers?: ChargebeeRequestHeader,
|
|
22
|
+
): Promise<ChargebeeResponse<CreateForExistingSubscriptionResponse>>;
|
|
23
|
+
}
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export class PricingPageSessionResource {
|
|
18
|
-
create_for_new_subscription(input:CreateForNewSubscriptionInputParam):ChargebeeRequest<CreateForNewSubscriptionResponse>;
|
|
19
|
-
|
|
20
|
-
create_for_existing_subscription(input:CreateForExistingSubscriptionInputParam):ChargebeeRequest<CreateForExistingSubscriptionResponse>;
|
|
25
|
+
export interface CreateForNewSubscriptionResponse {
|
|
26
|
+
pricing_page_session: PricingPageSession;
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
|
|
29
|
+
export interface CreateForExistingSubscriptionResponse {
|
|
30
|
+
pricing_page_session: PricingPageSession;
|
|
24
31
|
}
|
|
32
|
+
|
|
33
|
+
// REQUEST PARAMS
|
|
34
|
+
//---------------
|
|
35
|
+
|
|
25
36
|
export interface CreateForNewSubscriptionInputParam {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
subscription?:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
billing_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
34
|
-
|
|
35
|
-
shipping_address?:{city?:string,company?:string,country?:string,email?:string,first_name?:string,last_name?:string,line1?:string,line2?:string,line3?:string,phone?:string,state?:string,state_code?:string,validation_status?:ValidationStatus,zip?:string};
|
|
36
|
-
|
|
37
|
-
redirect_url?:string;
|
|
38
|
-
|
|
39
|
-
business_entity_id?:string;
|
|
40
|
-
}
|
|
41
|
-
export interface CreateForExistingSubscriptionResponse {
|
|
42
|
-
pricing_page_session:PricingPageSession;
|
|
37
|
+
redirect_url?: string;
|
|
38
|
+
business_entity_id?: string;
|
|
39
|
+
pricing_page?: PricingPageCreateForNewSubscriptionInputParam;
|
|
40
|
+
subscription?: SubscriptionCreateForNewSubscriptionInputParam;
|
|
41
|
+
customer?: CustomerCreateForNewSubscriptionInputParam;
|
|
42
|
+
billing_address?: BillingAddressCreateForNewSubscriptionInputParam;
|
|
43
|
+
shipping_address?: ShippingAddressCreateForNewSubscriptionInputParam;
|
|
43
44
|
}
|
|
44
45
|
export interface CreateForExistingSubscriptionInputParam {
|
|
45
|
-
|
|
46
|
-
pricing_page
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
redirect_url?: string;
|
|
47
|
+
pricing_page?: PricingPageCreateForExistingSubscriptionInputParam;
|
|
48
|
+
subscription?: SubscriptionCreateForExistingSubscriptionInputParam;
|
|
49
|
+
}
|
|
50
|
+
export interface BillingAddressCreateForNewSubscriptionInputParam {
|
|
51
|
+
first_name?: string;
|
|
52
|
+
last_name?: string;
|
|
53
|
+
email?: string;
|
|
54
|
+
company?: string;
|
|
55
|
+
phone?: string;
|
|
56
|
+
line1?: string;
|
|
57
|
+
line2?: string;
|
|
58
|
+
line3?: string;
|
|
59
|
+
city?: string;
|
|
60
|
+
state_code?: string;
|
|
61
|
+
state?: string;
|
|
62
|
+
zip?: string;
|
|
63
|
+
country?: string;
|
|
64
|
+
validation_status?: ValidationStatus;
|
|
65
|
+
}
|
|
66
|
+
export interface PricingPageCreateForNewSubscriptionInputParam {
|
|
67
|
+
id: string;
|
|
68
|
+
}
|
|
69
|
+
export interface CustomerCreateForNewSubscriptionInputParam {
|
|
70
|
+
id?: string;
|
|
71
|
+
email?: string;
|
|
72
|
+
first_name?: string;
|
|
73
|
+
last_name?: string;
|
|
74
|
+
company?: string;
|
|
75
|
+
phone?: string;
|
|
76
|
+
locale?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface ShippingAddressCreateForNewSubscriptionInputParam {
|
|
79
|
+
first_name?: string;
|
|
80
|
+
last_name?: string;
|
|
81
|
+
email?: string;
|
|
82
|
+
company?: string;
|
|
83
|
+
phone?: string;
|
|
84
|
+
line1?: string;
|
|
85
|
+
line2?: string;
|
|
86
|
+
line3?: string;
|
|
87
|
+
city?: string;
|
|
88
|
+
state_code?: string;
|
|
89
|
+
state?: string;
|
|
90
|
+
zip?: string;
|
|
91
|
+
country?: string;
|
|
92
|
+
validation_status?: ValidationStatus;
|
|
93
|
+
}
|
|
94
|
+
export interface SubscriptionCreateForNewSubscriptionInputParam {
|
|
95
|
+
id?: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface PricingPageCreateForExistingSubscriptionInputParam {
|
|
99
|
+
id: string;
|
|
100
|
+
}
|
|
101
|
+
export interface SubscriptionCreateForExistingSubscriptionInputParam {
|
|
102
|
+
id: string;
|
|
103
|
+
}
|
|
53
104
|
}
|
|
54
|
-
}
|
|
105
|
+
}
|
|
@@ -1,367 +1,111 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface PromotionalCredit {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
customer_id:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Type of promotional credits \* decrement - Decrement \* increment - Increment
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
type:'decrement' | 'increment';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Amount in decimal
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
amount_in_decimal?:string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Promotional credits amount
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
amount:number;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description The currency code (ISO 4217 format) for promotional credit
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
currency_code:string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Detailed description of this promotional credits.
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
description:string;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @description Type of promotional credits provided to customer \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits \* general - General
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
credit_type:CreditType;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @description Describes why promotional credits were provided
|
|
63
|
-
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
|
-
reference?:string;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Closing balance as on end date.
|
|
70
|
-
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
closing_balance:number;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description The user who added/deducted the credit. If created via API, this contains the name given for the API key used.
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
done_by?:string;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Timestamp indicating when this promotional credit resource is created.
|
|
84
|
-
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
created_at:number;
|
|
6
|
+
id: string;
|
|
7
|
+
customer_id: string;
|
|
8
|
+
type: 'increment' | 'decrement';
|
|
9
|
+
amount_in_decimal?: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
currency_code: string;
|
|
12
|
+
description: string;
|
|
13
|
+
credit_type: CreditType;
|
|
14
|
+
reference?: string;
|
|
15
|
+
closing_balance: number;
|
|
16
|
+
done_by?: string;
|
|
17
|
+
created_at: number;
|
|
88
18
|
}
|
|
89
|
-
export namespace PromotionalCredit {
|
|
90
|
-
export class PromotionalCreditResource {
|
|
91
|
-
/**
|
|
92
|
-
* @description This API call can be used to add promotional credits to a customer. [Learn more about Promotional Credits](https://www.chargebee.com/docs/2.0/credit-notes.html#creating-promotional-credits).
|
|
93
|
-
|
|
94
|
-
For example, if a customer has credits of $10, if you pass the **amount** as $10, then the customer's credit balance would become $20.
|
|
95
19
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
add(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @description This endpoint retrieves the promotional credit based on the promotional credit id
|
|
129
|
-
|
|
130
|
-
*/
|
|
131
|
-
|
|
132
|
-
retrieve(account_credit_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
133
|
-
}
|
|
134
|
-
export interface AddResponse {
|
|
135
|
-
customer:Customer;
|
|
136
|
-
|
|
137
|
-
promotional_credit:PromotionalCredit;
|
|
20
|
+
export namespace PromotionalCredit {
|
|
21
|
+
export class PromotionalCreditResource {
|
|
22
|
+
add(
|
|
23
|
+
input: AddInputParam,
|
|
24
|
+
headers?: ChargebeeRequestHeader,
|
|
25
|
+
): Promise<ChargebeeResponse<AddResponse>>;
|
|
26
|
+
|
|
27
|
+
deduct(
|
|
28
|
+
input: DeductInputParam,
|
|
29
|
+
headers?: ChargebeeRequestHeader,
|
|
30
|
+
): Promise<ChargebeeResponse<DeductResponse>>;
|
|
31
|
+
|
|
32
|
+
set(
|
|
33
|
+
input: SetInputParam,
|
|
34
|
+
headers?: ChargebeeRequestHeader,
|
|
35
|
+
): Promise<ChargebeeResponse<SetResponse>>;
|
|
36
|
+
|
|
37
|
+
list(
|
|
38
|
+
input?: ListInputParam,
|
|
39
|
+
headers?: ChargebeeRequestHeader,
|
|
40
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
41
|
+
|
|
42
|
+
retrieve(
|
|
43
|
+
account_credit_id: string,
|
|
44
|
+
headers?: ChargebeeRequestHeader,
|
|
45
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
138
46
|
}
|
|
139
|
-
export interface AddInputParam {
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* @description Identifier of the customer.
|
|
143
|
-
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
customer_id:string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @description Promotional credits amount.
|
|
150
|
-
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
amount?:number;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @description Amount in decimal.
|
|
157
|
-
|
|
158
|
-
*/
|
|
159
|
-
|
|
160
|
-
amount_in_decimal?:string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* @description The currency code (ISO 4217 format) for promotional credit.
|
|
164
|
-
|
|
165
|
-
*/
|
|
166
|
-
|
|
167
|
-
currency_code?:string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @description Detailed description of this promotional credits.
|
|
171
47
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* @description Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits
|
|
178
|
-
|
|
179
|
-
*/
|
|
180
|
-
|
|
181
|
-
credit_type?:CreditType;
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @description Describes why promotional credits were provided.
|
|
185
|
-
|
|
186
|
-
*/
|
|
187
|
-
|
|
188
|
-
reference?:string;
|
|
48
|
+
export interface AddResponse {
|
|
49
|
+
customer: Customer;
|
|
50
|
+
promotional_credit: PromotionalCredit;
|
|
189
51
|
}
|
|
190
|
-
export interface DeductResponse {
|
|
191
|
-
customer:Customer;
|
|
192
|
-
|
|
193
|
-
promotional_credit:PromotionalCredit;
|
|
194
|
-
}
|
|
195
|
-
export interface DeductInputParam {
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* @description Identifier of the customer.
|
|
199
52
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* @description Promotional credits amount.
|
|
206
|
-
|
|
207
|
-
*/
|
|
208
|
-
|
|
209
|
-
amount?:number;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* @description Amount in decimal.
|
|
53
|
+
export interface DeductResponse {
|
|
54
|
+
customer: Customer;
|
|
55
|
+
promotional_credit: PromotionalCredit;
|
|
56
|
+
}
|
|
213
57
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* @description The currency code (ISO 4217 format) for promotional credit.
|
|
58
|
+
export interface SetResponse {
|
|
59
|
+
customer: Customer;
|
|
60
|
+
promotional_credit: PromotionalCredit;
|
|
61
|
+
}
|
|
220
62
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* @description Detailed description of this promotional credits.
|
|
63
|
+
export interface ListResponse {
|
|
64
|
+
list: { promotional_credit: PromotionalCredit }[];
|
|
65
|
+
next_offset?: string;
|
|
66
|
+
}
|
|
227
67
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* @description Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits
|
|
68
|
+
export interface RetrieveResponse {
|
|
69
|
+
promotional_credit: PromotionalCredit;
|
|
70
|
+
}
|
|
234
71
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
credit_type?:CreditType;
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* @description Describes why promotional credits were provided.
|
|
72
|
+
// REQUEST PARAMS
|
|
73
|
+
//---------------
|
|
241
74
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
75
|
+
export interface AddInputParam {
|
|
76
|
+
customer_id: string;
|
|
77
|
+
amount?: number;
|
|
78
|
+
amount_in_decimal?: string;
|
|
79
|
+
currency_code?: string;
|
|
80
|
+
description: string;
|
|
81
|
+
credit_type?: CreditType;
|
|
82
|
+
reference?: string;
|
|
245
83
|
}
|
|
246
|
-
export interface
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
84
|
+
export interface DeductInputParam {
|
|
85
|
+
customer_id: string;
|
|
86
|
+
amount?: number;
|
|
87
|
+
amount_in_decimal?: string;
|
|
88
|
+
currency_code?: string;
|
|
89
|
+
description: string;
|
|
90
|
+
credit_type?: CreditType;
|
|
91
|
+
reference?: string;
|
|
250
92
|
}
|
|
251
93
|
export interface SetInputParam {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* @description Promotional credits amount.
|
|
262
|
-
|
|
263
|
-
*/
|
|
264
|
-
|
|
265
|
-
amount?:number;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* @description Amount in decimal.
|
|
269
|
-
|
|
270
|
-
*/
|
|
271
|
-
|
|
272
|
-
amount_in_decimal?:string;
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* @description The currency code (ISO 4217 format) for promotional credit.
|
|
276
|
-
|
|
277
|
-
*/
|
|
278
|
-
|
|
279
|
-
currency_code?:string;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* @description Detailed description of this promotional credits.
|
|
283
|
-
|
|
284
|
-
*/
|
|
285
|
-
|
|
286
|
-
description:string;
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* @description Type of promotional credits provided to customer. \* general - General \* referral_rewards - Referral \* loyalty_credits - Loyalty Credits
|
|
290
|
-
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
|
-
credit_type?:CreditType;
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* @description Describes why promotional credits were provided.
|
|
297
|
-
|
|
298
|
-
*/
|
|
299
|
-
|
|
300
|
-
reference?:string;
|
|
301
|
-
}
|
|
302
|
-
export interface ListResponse {
|
|
303
|
-
/**
|
|
304
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
305
|
-
|
|
306
|
-
*/
|
|
307
|
-
|
|
308
|
-
list:{promotional_credit:PromotionalCredit}[];
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
312
|
-
|
|
313
|
-
*/
|
|
314
|
-
|
|
315
|
-
next_offset?:string;
|
|
94
|
+
customer_id: string;
|
|
95
|
+
amount?: number;
|
|
96
|
+
amount_in_decimal?: string;
|
|
97
|
+
currency_code?: string;
|
|
98
|
+
description: string;
|
|
99
|
+
credit_type?: CreditType;
|
|
100
|
+
reference?: string;
|
|
316
101
|
}
|
|
317
102
|
export interface ListInputParam {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
limit?:number;
|
|
325
|
-
|
|
326
|
-
/**
|
|
327
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
328
|
-
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
offset?:string;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
335
|
-
|
|
336
|
-
*/
|
|
337
|
-
|
|
338
|
-
id?:{is?:string,is_not?:string,starts_with?:string};
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
342
|
-
|
|
343
|
-
*/
|
|
344
|
-
|
|
345
|
-
created_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
349
|
-
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
|
-
type?:{in?:string,is?:'decrement' | 'increment',is_not?:'decrement' | 'increment',not_in?:string};
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* @description This endpoint lists the promotional credits set for a customer
|
|
356
|
-
|
|
357
|
-
*/
|
|
358
|
-
|
|
359
|
-
customer_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
360
|
-
}
|
|
361
|
-
export interface RetrieveResponse {
|
|
362
|
-
promotional_credit:PromotionalCredit;
|
|
103
|
+
limit?: number;
|
|
104
|
+
offset?: string;
|
|
105
|
+
id?: filter.String;
|
|
106
|
+
created_at?: filter.Timestamp;
|
|
107
|
+
type?: filter.Enum;
|
|
108
|
+
customer_id?: filter.String;
|
|
363
109
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
110
|
}
|
|
367
|
-
}
|
|
111
|
+
}
|