chargebee 3.13.0 → 3.14.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 +56 -0
- package/cjs/coreCommon.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +66 -0
- package/esm/coreCommon.js +1 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +66 -0
- package/package.json +1 -1
- package/types/core.d.ts +8 -1
- package/types/index.d.ts +7 -0
- package/types/resources/Comment.d.ts +0 -9
- package/types/resources/Content.d.ts +4 -0
- package/types/resources/CreditNote.d.ts +3 -1
- package/types/resources/CreditNoteEstimate.d.ts +31 -31
- package/types/resources/Currency.d.ts +11 -5
- package/types/resources/Customer.d.ts +1 -0
- package/types/resources/Estimate.d.ts +2 -0
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/GatewayErrorDetail.d.ts +1 -0
- package/types/resources/HostedPage.d.ts +2 -0
- package/types/resources/Invoice.d.ts +5 -1
- package/types/resources/InvoiceEstimate.d.ts +42 -42
- package/types/resources/OfferEvent.d.ts +25 -0
- package/types/resources/OfferFulfillment.d.ts +77 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +1 -13
- package/types/resources/OmnichannelSubscription.d.ts +13 -12
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
- package/types/resources/OmnichannelSubscriptionItemOffer.d.ts +22 -0
- package/types/resources/OmnichannelTransaction.d.ts +13 -0
- package/types/resources/Order.d.ts +0 -1
- package/types/resources/PersonalizedOffer.d.ts +64 -0
- package/types/resources/Quote.d.ts +35 -34
- package/types/resources/QuoteLineGroup.d.ts +21 -21
- package/types/resources/Ramp.d.ts +46 -0
- package/types/resources/SalesOrder.d.ts +1 -1
- package/types/resources/Subscription.d.ts +1 -1
- package/types/resources/SubscriptionEstimate.d.ts +0 -1
- package/types/resources/Transaction.d.ts +1 -0
- package/types/resources/UsageFile.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +12 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
///<reference path='./filter.d.ts'/>
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface Invoice {
|
|
6
|
+
[key: string]: unknown;
|
|
6
7
|
id: string;
|
|
7
8
|
customer_id: string;
|
|
8
9
|
payment_owner?: string;
|
|
@@ -776,7 +777,6 @@ declare module 'chargebee' {
|
|
|
776
777
|
country?: string;
|
|
777
778
|
zip?: string;
|
|
778
779
|
validation_status?: ValidationStatusEnum;
|
|
779
|
-
index: number;
|
|
780
780
|
}
|
|
781
781
|
export interface BillingAddress {
|
|
782
782
|
first_name?: string;
|
|
@@ -880,6 +880,7 @@ declare module 'chargebee' {
|
|
|
880
880
|
notes_to_remove?: NotesToRemoveCreateForChargeItemsAndChargesInputParam[];
|
|
881
881
|
tax_providers_fields?: TaxProvidersFieldsCreateForChargeItemsAndChargesInputParam[];
|
|
882
882
|
discounts?: DiscountsCreateForChargeItemsAndChargesInputParam[];
|
|
883
|
+
[key: `cf_${string}`]: unknown;
|
|
883
884
|
}
|
|
884
885
|
export interface ChargeInputParam {
|
|
885
886
|
customer_id?: string;
|
|
@@ -985,6 +986,7 @@ declare module 'chargebee' {
|
|
|
985
986
|
payments?: PaymentsImportInvoiceInputParam[];
|
|
986
987
|
notes?: NotesImportInvoiceInputParam[];
|
|
987
988
|
line_item_addresses?: LineItemAddressesImportInvoiceInputParam[];
|
|
989
|
+
[key: `cf_${string}`]: unknown;
|
|
988
990
|
}
|
|
989
991
|
export interface ApplyPaymentsInputParam {
|
|
990
992
|
comment?: string;
|
|
@@ -1083,6 +1085,7 @@ declare module 'chargebee' {
|
|
|
1083
1085
|
remove_general_note?: boolean;
|
|
1084
1086
|
invoice_date?: number;
|
|
1085
1087
|
notes_to_remove?: NotesToRemoveCloseInputParam[];
|
|
1088
|
+
[key: `cf_${string}`]: unknown;
|
|
1086
1089
|
}
|
|
1087
1090
|
export interface CollectPaymentInputParam {
|
|
1088
1091
|
amount?: number;
|
|
@@ -1137,6 +1140,7 @@ declare module 'chargebee' {
|
|
|
1137
1140
|
billing_address?: BillingAddressUpdateDetailsInputParam;
|
|
1138
1141
|
shipping_address?: ShippingAddressUpdateDetailsInputParam;
|
|
1139
1142
|
statement_descriptor?: StatementDescriptorUpdateDetailsInputParam;
|
|
1143
|
+
[key: `cf_${string}`]: unknown;
|
|
1140
1144
|
}
|
|
1141
1145
|
export interface ApplyPaymentScheduleSchemeInputParam {
|
|
1142
1146
|
scheme_id: string;
|
|
@@ -12,15 +12,15 @@ declare module 'chargebee' {
|
|
|
12
12
|
amount_paid?: number;
|
|
13
13
|
amount_due?: number;
|
|
14
14
|
line_items?: InvoiceEstimate.LineItem[];
|
|
15
|
-
discounts?: InvoiceEstimate.Discount[];
|
|
16
|
-
taxes?: InvoiceEstimate.Tax[];
|
|
17
|
-
line_item_taxes?: InvoiceEstimate.LineItemTax[];
|
|
18
15
|
line_item_tiers?: InvoiceEstimate.LineItemTier[];
|
|
19
|
-
line_item_credits?: InvoiceEstimate.LineItemCredit[];
|
|
20
16
|
line_item_discounts?: InvoiceEstimate.LineItemDiscount[];
|
|
17
|
+
line_item_taxes?: InvoiceEstimate.LineItemTax[];
|
|
18
|
+
line_item_credits?: InvoiceEstimate.LineItemCredit[];
|
|
19
|
+
line_item_addresses?: InvoiceEstimate.LineItemAddress[];
|
|
20
|
+
discounts?: InvoiceEstimate.Discount[];
|
|
21
|
+
taxes?: InvoiceEstimate.Tax[];
|
|
21
22
|
round_off_amount?: number;
|
|
22
23
|
customer_id?: string;
|
|
23
|
-
line_item_addresses?: InvoiceEstimate.LineItemAddress[];
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export namespace InvoiceEstimate {
|
|
@@ -73,24 +73,31 @@ declare module 'chargebee' {
|
|
|
73
73
|
entity_id?: string;
|
|
74
74
|
customer_id?: string;
|
|
75
75
|
}
|
|
76
|
-
export interface
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
export interface LineItemTier {
|
|
77
|
+
line_item_id?: string;
|
|
78
|
+
starting_unit: number;
|
|
79
|
+
ending_unit?: number;
|
|
80
|
+
quantity_used: number;
|
|
81
|
+
unit_amount: number;
|
|
82
|
+
starting_unit_in_decimal?: string;
|
|
83
|
+
ending_unit_in_decimal?: string;
|
|
84
|
+
quantity_used_in_decimal?: string;
|
|
85
|
+
unit_amount_in_decimal?: string;
|
|
86
|
+
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
87
|
+
package_size?: number;
|
|
88
|
+
}
|
|
89
|
+
export interface LineItemDiscount {
|
|
90
|
+
line_item_id: string;
|
|
91
|
+
discount_type:
|
|
80
92
|
| 'item_level_coupon'
|
|
81
93
|
| 'document_level_coupon'
|
|
82
94
|
| 'promotional_credits'
|
|
83
95
|
| 'prorated_credits'
|
|
84
96
|
| 'item_level_discount'
|
|
85
97
|
| 'document_level_discount';
|
|
86
|
-
|
|
98
|
+
coupon_id?: string;
|
|
87
99
|
entity_id?: string;
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
export interface Tax {
|
|
91
|
-
name: string;
|
|
92
|
-
amount: number;
|
|
93
|
-
description?: string;
|
|
100
|
+
discount_amount: number;
|
|
94
101
|
}
|
|
95
102
|
export interface LineItemTax {
|
|
96
103
|
line_item_id?: string;
|
|
@@ -117,37 +124,11 @@ declare module 'chargebee' {
|
|
|
117
124
|
tax_amount_in_local_currency?: number;
|
|
118
125
|
local_currency_code?: string;
|
|
119
126
|
}
|
|
120
|
-
export interface LineItemTier {
|
|
121
|
-
line_item_id?: string;
|
|
122
|
-
starting_unit: number;
|
|
123
|
-
ending_unit?: number;
|
|
124
|
-
quantity_used: number;
|
|
125
|
-
unit_amount: number;
|
|
126
|
-
starting_unit_in_decimal?: string;
|
|
127
|
-
ending_unit_in_decimal?: string;
|
|
128
|
-
quantity_used_in_decimal?: string;
|
|
129
|
-
unit_amount_in_decimal?: string;
|
|
130
|
-
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
131
|
-
package_size?: number;
|
|
132
|
-
}
|
|
133
127
|
export interface LineItemCredit {
|
|
134
128
|
cn_id: string;
|
|
135
129
|
applied_amount: number;
|
|
136
130
|
line_item_id?: string;
|
|
137
131
|
}
|
|
138
|
-
export interface LineItemDiscount {
|
|
139
|
-
line_item_id: string;
|
|
140
|
-
discount_type:
|
|
141
|
-
| 'item_level_coupon'
|
|
142
|
-
| 'document_level_coupon'
|
|
143
|
-
| 'promotional_credits'
|
|
144
|
-
| 'prorated_credits'
|
|
145
|
-
| 'item_level_discount'
|
|
146
|
-
| 'document_level_discount';
|
|
147
|
-
coupon_id?: string;
|
|
148
|
-
entity_id?: string;
|
|
149
|
-
discount_amount: number;
|
|
150
|
-
}
|
|
151
132
|
export interface LineItemAddress {
|
|
152
133
|
line_item_id?: string;
|
|
153
134
|
first_name?: string;
|
|
@@ -169,6 +150,25 @@ declare module 'chargebee' {
|
|
|
169
150
|
| 'partially_valid'
|
|
170
151
|
| 'invalid';
|
|
171
152
|
}
|
|
153
|
+
export interface Discount {
|
|
154
|
+
amount: number;
|
|
155
|
+
description?: string;
|
|
156
|
+
entity_type:
|
|
157
|
+
| 'item_level_coupon'
|
|
158
|
+
| 'document_level_coupon'
|
|
159
|
+
| 'promotional_credits'
|
|
160
|
+
| 'prorated_credits'
|
|
161
|
+
| 'item_level_discount'
|
|
162
|
+
| 'document_level_discount';
|
|
163
|
+
discount_type?: 'fixed_amount' | 'percentage';
|
|
164
|
+
entity_id?: string;
|
|
165
|
+
coupon_set_code?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface Tax {
|
|
168
|
+
name: string;
|
|
169
|
+
amount: number;
|
|
170
|
+
description?: string;
|
|
171
|
+
}
|
|
172
172
|
// REQUEST PARAMS
|
|
173
173
|
//---------------
|
|
174
174
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OfferEvent {}
|
|
6
|
+
|
|
7
|
+
export namespace OfferEvent {
|
|
8
|
+
export class OfferEventResource {
|
|
9
|
+
offerEvents(
|
|
10
|
+
input: OfferEventsInputParam,
|
|
11
|
+
headers?: ChargebeeRequestHeader,
|
|
12
|
+
): Promise<ChargebeeResponse<OfferEventsResponse>>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OfferEventsResponse {}
|
|
16
|
+
|
|
17
|
+
// REQUEST PARAMS
|
|
18
|
+
//---------------
|
|
19
|
+
|
|
20
|
+
export interface OfferEventsInputParam {
|
|
21
|
+
personalized_offer_id: string;
|
|
22
|
+
type: 'viewed' | 'dismissed';
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OfferFulfillment {
|
|
6
|
+
id: string;
|
|
7
|
+
personalized_offer_id: string;
|
|
8
|
+
option_id: string;
|
|
9
|
+
processing_type:
|
|
10
|
+
| 'billing_update'
|
|
11
|
+
| 'checkout'
|
|
12
|
+
| 'url_redirect'
|
|
13
|
+
| 'webhook'
|
|
14
|
+
| 'email';
|
|
15
|
+
status: 'in_progress' | 'completed' | 'failed';
|
|
16
|
+
redirect_url?: string;
|
|
17
|
+
failed_at?: number;
|
|
18
|
+
created_at: number;
|
|
19
|
+
completed_at?: number;
|
|
20
|
+
error?: OfferFulfillment.Error;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export namespace OfferFulfillment {
|
|
24
|
+
export class OfferFulfillmentResource {
|
|
25
|
+
offerFulfillments(
|
|
26
|
+
input: OfferFulfillmentsInputParam,
|
|
27
|
+
headers?: ChargebeeRequestHeader,
|
|
28
|
+
): Promise<ChargebeeResponse<OfferFulfillmentsResponse>>;
|
|
29
|
+
|
|
30
|
+
offerFulfillmentsGet(
|
|
31
|
+
offer_fulfillment_id: string,
|
|
32
|
+
headers?: ChargebeeRequestHeader,
|
|
33
|
+
): Promise<ChargebeeResponse<OfferFulfillmentsGetResponse>>;
|
|
34
|
+
|
|
35
|
+
offerFulfillmentsUpdate(
|
|
36
|
+
offer_fulfillment_id: string,
|
|
37
|
+
input: OfferFulfillmentsUpdateInputParam,
|
|
38
|
+
headers?: ChargebeeRequestHeader,
|
|
39
|
+
): Promise<ChargebeeResponse<OfferFulfillmentsUpdateResponse>>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface OfferFulfillmentsResponse {
|
|
43
|
+
offer_fulfillment: OfferFulfillment;
|
|
44
|
+
hosted_page?: HostedPage;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface OfferFulfillmentsGetResponse {
|
|
48
|
+
offer_fulfillment: OfferFulfillment;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface OfferFulfillmentsUpdateResponse {
|
|
52
|
+
offer_fulfillment: OfferFulfillment;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface Error {
|
|
56
|
+
code:
|
|
57
|
+
| 'billing_update_failed'
|
|
58
|
+
| 'checkout_abandoned'
|
|
59
|
+
| 'external_fulfillment_failed'
|
|
60
|
+
| 'internal_error'
|
|
61
|
+
| 'fulfillment_expired';
|
|
62
|
+
message: string;
|
|
63
|
+
}
|
|
64
|
+
// REQUEST PARAMS
|
|
65
|
+
//---------------
|
|
66
|
+
|
|
67
|
+
export interface OfferFulfillmentsInputParam {
|
|
68
|
+
personalized_offer_id: string;
|
|
69
|
+
option_id: string;
|
|
70
|
+
}
|
|
71
|
+
export interface OfferFulfillmentsUpdateInputParam {
|
|
72
|
+
id: string;
|
|
73
|
+
status: 'completed' | 'failed';
|
|
74
|
+
failure_reason?: string;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -12,7 +12,7 @@ declare module 'chargebee' {
|
|
|
12
12
|
created_at: number;
|
|
13
13
|
resource_version?: number;
|
|
14
14
|
omnichannel_one_time_order_items: OmnichannelOneTimeOrderItem[];
|
|
15
|
-
purchase_transaction?:
|
|
15
|
+
purchase_transaction?: OmnichannelTransaction;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export namespace OmnichannelOneTimeOrder {
|
|
@@ -37,18 +37,6 @@ declare module 'chargebee' {
|
|
|
37
37
|
next_offset?: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export interface OmnichannelTransaction {
|
|
41
|
-
id: string;
|
|
42
|
-
id_at_source: string;
|
|
43
|
-
app_id: string;
|
|
44
|
-
price_currency?: string;
|
|
45
|
-
price_units?: number;
|
|
46
|
-
price_nanos?: number;
|
|
47
|
-
type: 'purchase' | 'renewal';
|
|
48
|
-
transacted_at?: number;
|
|
49
|
-
created_at: number;
|
|
50
|
-
resource_version?: number;
|
|
51
|
-
}
|
|
52
40
|
// REQUEST PARAMS
|
|
53
41
|
//---------------
|
|
54
42
|
|
|
@@ -11,7 +11,7 @@ declare module 'chargebee' {
|
|
|
11
11
|
created_at: number;
|
|
12
12
|
resource_version?: number;
|
|
13
13
|
omnichannel_subscription_items: OmnichannelSubscriptionItem[];
|
|
14
|
-
initial_purchase_transaction?:
|
|
14
|
+
initial_purchase_transaction?: OmnichannelTransaction;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export namespace OmnichannelSubscription {
|
|
@@ -33,6 +33,12 @@ declare module 'chargebee' {
|
|
|
33
33
|
): Promise<
|
|
34
34
|
ChargebeeResponse<OmnichannelTransactionsForOmnichannelSubscriptionResponse>
|
|
35
35
|
>;
|
|
36
|
+
|
|
37
|
+
move(
|
|
38
|
+
omnichannel_subscription_id: string,
|
|
39
|
+
input: MoveInputParam,
|
|
40
|
+
headers?: ChargebeeRequestHeader,
|
|
41
|
+
): Promise<ChargebeeResponse<MoveResponse>>;
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
export interface RetrieveResponse {
|
|
@@ -49,18 +55,10 @@ declare module 'chargebee' {
|
|
|
49
55
|
next_offset?: string;
|
|
50
56
|
}
|
|
51
57
|
|
|
52
|
-
export interface
|
|
53
|
-
|
|
54
|
-
id_at_source: string;
|
|
55
|
-
app_id: string;
|
|
56
|
-
price_currency?: string;
|
|
57
|
-
price_units?: number;
|
|
58
|
-
price_nanos?: number;
|
|
59
|
-
type: 'purchase' | 'renewal';
|
|
60
|
-
transacted_at?: number;
|
|
61
|
-
created_at: number;
|
|
62
|
-
resource_version?: number;
|
|
58
|
+
export interface MoveResponse {
|
|
59
|
+
omnichannel_subscription: OmnichannelSubscription;
|
|
63
60
|
}
|
|
61
|
+
|
|
64
62
|
// REQUEST PARAMS
|
|
65
63
|
//---------------
|
|
66
64
|
|
|
@@ -74,5 +72,8 @@ declare module 'chargebee' {
|
|
|
74
72
|
limit?: number;
|
|
75
73
|
offset?: string;
|
|
76
74
|
}
|
|
75
|
+
export interface MoveInputParam {
|
|
76
|
+
to_customer_id: string;
|
|
77
|
+
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -29,6 +29,7 @@ declare module 'chargebee' {
|
|
|
29
29
|
resumes_at?: number;
|
|
30
30
|
has_scheduled_changes: boolean;
|
|
31
31
|
resource_version?: number;
|
|
32
|
+
omnichannel_subscription_item_offers: OmnichannelSubscriptionItemOffer[];
|
|
32
33
|
upcoming_renewal?: OmnichannelSubscriptionItem.UpcomingRenewal;
|
|
33
34
|
linked_item?: OmnichannelSubscriptionItem.LinkedItem;
|
|
34
35
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OmnichannelSubscriptionItemOffer {
|
|
6
|
+
id: string;
|
|
7
|
+
offer_id_at_source?: string;
|
|
8
|
+
category: CategoryEnum;
|
|
9
|
+
category_at_source?: string;
|
|
10
|
+
type: TypeEnum;
|
|
11
|
+
type_at_source?: string;
|
|
12
|
+
discount_type?: DiscountTypeEnum;
|
|
13
|
+
duration: string;
|
|
14
|
+
percentage?: number;
|
|
15
|
+
price_currency?: string;
|
|
16
|
+
price_units?: number;
|
|
17
|
+
price_nanos?: number;
|
|
18
|
+
offer_term_start?: number;
|
|
19
|
+
offer_term_end?: number;
|
|
20
|
+
resource_version?: number;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -13,5 +13,18 @@ declare module 'chargebee' {
|
|
|
13
13
|
transacted_at?: number;
|
|
14
14
|
created_at: number;
|
|
15
15
|
resource_version?: number;
|
|
16
|
+
linked_omnichannel_subscriptions?: OmnichannelTransaction.LinkedOmnichannelSubscription[];
|
|
17
|
+
linked_omnichannel_one_time_orders?: OmnichannelTransaction.LinkedOmnichannelOneTimeOrder[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace OmnichannelTransaction {
|
|
21
|
+
export interface LinkedOmnichannelSubscription {
|
|
22
|
+
omnichannel_subscription_id?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface LinkedOmnichannelOneTimeOrder {
|
|
25
|
+
omnichannel_one_time_order_id?: string;
|
|
26
|
+
}
|
|
27
|
+
// REQUEST PARAMS
|
|
28
|
+
//---------------
|
|
16
29
|
}
|
|
17
30
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface PersonalizedOffer {
|
|
6
|
+
id: string;
|
|
7
|
+
offer_id: string;
|
|
8
|
+
content: PersonalizedOffer.Content;
|
|
9
|
+
options: PersonalizedOffer.Option[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export namespace PersonalizedOffer {
|
|
13
|
+
export class PersonalizedOfferResource {
|
|
14
|
+
personalizedOffers(
|
|
15
|
+
input: PersonalizedOffersInputParam,
|
|
16
|
+
headers?: ChargebeeRequestHeader,
|
|
17
|
+
): Promise<ChargebeeResponse<PersonalizedOffersResponse>>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface PersonalizedOffersResponse {
|
|
21
|
+
personalized_offers: PersonalizedOffer[];
|
|
22
|
+
brand?: Brand;
|
|
23
|
+
expires_at: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Content {
|
|
27
|
+
title: string;
|
|
28
|
+
description: string;
|
|
29
|
+
}
|
|
30
|
+
export interface Option {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
processing_type:
|
|
34
|
+
| 'billing_update'
|
|
35
|
+
| 'checkout'
|
|
36
|
+
| 'url_redirect'
|
|
37
|
+
| 'webhook'
|
|
38
|
+
| 'email';
|
|
39
|
+
processing_layout: 'in_app' | 'full_page';
|
|
40
|
+
redirect_url: string;
|
|
41
|
+
}
|
|
42
|
+
// REQUEST PARAMS
|
|
43
|
+
//---------------
|
|
44
|
+
|
|
45
|
+
export interface PersonalizedOffersInputParam {
|
|
46
|
+
first_name?: string;
|
|
47
|
+
last_name?: string;
|
|
48
|
+
email?: string;
|
|
49
|
+
roles?: string[];
|
|
50
|
+
external_user_id?: string;
|
|
51
|
+
subscription_id?: string;
|
|
52
|
+
customer_id: string;
|
|
53
|
+
custom?: any;
|
|
54
|
+
request_context?: RequestContextPersonalizedOffersInputParam;
|
|
55
|
+
}
|
|
56
|
+
export interface RequestContextPersonalizedOffersInputParam {
|
|
57
|
+
user_agent?: string;
|
|
58
|
+
locale?: string;
|
|
59
|
+
timezone?: string;
|
|
60
|
+
url?: string;
|
|
61
|
+
referrer_url?: string;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -42,11 +42,11 @@ declare module 'chargebee' {
|
|
|
42
42
|
updated_at?: number;
|
|
43
43
|
vat_number_prefix?: string;
|
|
44
44
|
line_items?: Quote.LineItem[];
|
|
45
|
-
|
|
45
|
+
line_item_tiers?: Quote.LineItemTier[];
|
|
46
46
|
line_item_discounts?: Quote.LineItemDiscount[];
|
|
47
|
-
taxes?: Quote.Tax[];
|
|
48
47
|
line_item_taxes?: Quote.LineItemTax[];
|
|
49
|
-
|
|
48
|
+
discounts?: Quote.Discount[];
|
|
49
|
+
taxes?: Quote.Tax[];
|
|
50
50
|
tax_category?: string;
|
|
51
51
|
currency_code: string;
|
|
52
52
|
notes?: any;
|
|
@@ -351,19 +351,18 @@ declare module 'chargebee' {
|
|
|
351
351
|
entity_id?: string;
|
|
352
352
|
customer_id?: string;
|
|
353
353
|
}
|
|
354
|
-
export interface
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
coupon_set_code?: string;
|
|
354
|
+
export interface LineItemTier {
|
|
355
|
+
line_item_id?: string;
|
|
356
|
+
starting_unit: number;
|
|
357
|
+
ending_unit?: number;
|
|
358
|
+
quantity_used: number;
|
|
359
|
+
unit_amount: number;
|
|
360
|
+
starting_unit_in_decimal?: string;
|
|
361
|
+
ending_unit_in_decimal?: string;
|
|
362
|
+
quantity_used_in_decimal?: string;
|
|
363
|
+
unit_amount_in_decimal?: string;
|
|
364
|
+
pricing_type?: 'per_unit' | 'flat_fee' | 'package';
|
|
365
|
+
package_size?: number;
|
|
367
366
|
}
|
|
368
367
|
export interface LineItemDiscount {
|
|
369
368
|
line_item_id: string;
|
|
@@ -378,11 +377,6 @@ declare module 'chargebee' {
|
|
|
378
377
|
entity_id?: string;
|
|
379
378
|
discount_amount: number;
|
|
380
379
|
}
|
|
381
|
-
export interface Tax {
|
|
382
|
-
name: string;
|
|
383
|
-
amount: number;
|
|
384
|
-
description?: string;
|
|
385
|
-
}
|
|
386
380
|
export interface LineItemTax {
|
|
387
381
|
line_item_id?: string;
|
|
388
382
|
tax_name: string;
|
|
@@ -408,18 +402,24 @@ declare module 'chargebee' {
|
|
|
408
402
|
tax_amount_in_local_currency?: number;
|
|
409
403
|
local_currency_code?: string;
|
|
410
404
|
}
|
|
411
|
-
export interface
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
405
|
+
export interface Discount {
|
|
406
|
+
amount: number;
|
|
407
|
+
description?: string;
|
|
408
|
+
entity_type:
|
|
409
|
+
| 'item_level_coupon'
|
|
410
|
+
| 'document_level_coupon'
|
|
411
|
+
| 'promotional_credits'
|
|
412
|
+
| 'prorated_credits'
|
|
413
|
+
| 'item_level_discount'
|
|
414
|
+
| 'document_level_discount';
|
|
415
|
+
discount_type?: 'fixed_amount' | 'percentage';
|
|
416
|
+
entity_id?: string;
|
|
417
|
+
coupon_set_code?: string;
|
|
418
|
+
}
|
|
419
|
+
export interface Tax {
|
|
420
|
+
name: string;
|
|
421
|
+
amount: number;
|
|
422
|
+
description?: string;
|
|
423
423
|
}
|
|
424
424
|
export interface ShippingAddress {
|
|
425
425
|
first_name?: string;
|
|
@@ -436,7 +436,6 @@ declare module 'chargebee' {
|
|
|
436
436
|
country?: string;
|
|
437
437
|
zip?: string;
|
|
438
438
|
validation_status?: ValidationStatusEnum;
|
|
439
|
-
index: number;
|
|
440
439
|
}
|
|
441
440
|
export interface BillingAddress {
|
|
442
441
|
first_name?: string;
|
|
@@ -1118,6 +1117,7 @@ declare module 'chargebee' {
|
|
|
1118
1117
|
*/
|
|
1119
1118
|
setup_fee?: number;
|
|
1120
1119
|
start_date?: number;
|
|
1120
|
+
offline_payment_method?: OfflinePaymentMethodEnum;
|
|
1121
1121
|
contract_term_billing_cycle_on_renewal?: number;
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
@@ -1216,6 +1216,7 @@ declare module 'chargebee' {
|
|
|
1216
1216
|
*/
|
|
1217
1217
|
setup_fee?: number;
|
|
1218
1218
|
start_date?: number;
|
|
1219
|
+
offline_payment_method?: OfflinePaymentMethodEnum;
|
|
1219
1220
|
contract_term_billing_cycle_on_renewal?: number;
|
|
1220
1221
|
}
|
|
1221
1222
|
|
|
@@ -19,10 +19,10 @@ declare module 'chargebee' {
|
|
|
19
19
|
| 'subscription_cancel';
|
|
20
20
|
billing_cycle_number?: number;
|
|
21
21
|
line_items?: QuoteLineGroup.LineItem[];
|
|
22
|
-
discounts?: QuoteLineGroup.Discount[];
|
|
23
22
|
line_item_discounts?: QuoteLineGroup.LineItemDiscount[];
|
|
24
|
-
taxes?: QuoteLineGroup.Tax[];
|
|
25
23
|
line_item_taxes?: QuoteLineGroup.LineItemTax[];
|
|
24
|
+
discounts?: QuoteLineGroup.Discount[];
|
|
25
|
+
taxes?: QuoteLineGroup.Tax[];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export namespace QuoteLineGroup {
|
|
@@ -75,20 +75,6 @@ declare module 'chargebee' {
|
|
|
75
75
|
entity_id?: string;
|
|
76
76
|
customer_id?: string;
|
|
77
77
|
}
|
|
78
|
-
export interface Discount {
|
|
79
|
-
amount: number;
|
|
80
|
-
description?: string;
|
|
81
|
-
entity_type:
|
|
82
|
-
| 'item_level_coupon'
|
|
83
|
-
| 'document_level_coupon'
|
|
84
|
-
| 'promotional_credits'
|
|
85
|
-
| 'prorated_credits'
|
|
86
|
-
| 'item_level_discount'
|
|
87
|
-
| 'document_level_discount';
|
|
88
|
-
discount_type?: 'fixed_amount' | 'percentage';
|
|
89
|
-
entity_id?: string;
|
|
90
|
-
coupon_set_code?: string;
|
|
91
|
-
}
|
|
92
78
|
export interface LineItemDiscount {
|
|
93
79
|
line_item_id: string;
|
|
94
80
|
discount_type:
|
|
@@ -102,11 +88,6 @@ declare module 'chargebee' {
|
|
|
102
88
|
entity_id?: string;
|
|
103
89
|
discount_amount: number;
|
|
104
90
|
}
|
|
105
|
-
export interface Tax {
|
|
106
|
-
name: string;
|
|
107
|
-
amount: number;
|
|
108
|
-
description?: string;
|
|
109
|
-
}
|
|
110
91
|
export interface LineItemTax {
|
|
111
92
|
line_item_id?: string;
|
|
112
93
|
tax_name: string;
|
|
@@ -132,6 +113,25 @@ declare module 'chargebee' {
|
|
|
132
113
|
tax_amount_in_local_currency?: number;
|
|
133
114
|
local_currency_code?: string;
|
|
134
115
|
}
|
|
116
|
+
export interface Discount {
|
|
117
|
+
amount: number;
|
|
118
|
+
description?: string;
|
|
119
|
+
entity_type:
|
|
120
|
+
| 'item_level_coupon'
|
|
121
|
+
| 'document_level_coupon'
|
|
122
|
+
| 'promotional_credits'
|
|
123
|
+
| 'prorated_credits'
|
|
124
|
+
| 'item_level_discount'
|
|
125
|
+
| 'document_level_discount';
|
|
126
|
+
discount_type?: 'fixed_amount' | 'percentage';
|
|
127
|
+
entity_id?: string;
|
|
128
|
+
coupon_set_code?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface Tax {
|
|
131
|
+
name: string;
|
|
132
|
+
amount: number;
|
|
133
|
+
description?: string;
|
|
134
|
+
}
|
|
135
135
|
// REQUEST PARAMS
|
|
136
136
|
//---------------
|
|
137
137
|
}
|