chargebee 2.25.3 → 2.26.1
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 +35 -0
- package/README.md +55 -49
- package/lib/chargebee.js +1 -1
- package/package.json +1 -1
- package/types/core.d.ts +1 -0
- package/types/resources/Address.d.ts +245 -5
- package/types/resources/AdvanceInvoiceSchedule.d.ts +78 -2
- package/types/resources/AttachedItem.d.ts +305 -13
- package/types/resources/Card.d.ts +485 -13
- package/types/resources/Comment.d.ts +177 -11
- package/types/resources/Contact.d.ts +54 -0
- package/types/resources/ContractTerm.d.ts +83 -0
- package/types/resources/Coupon.d.ts +665 -20
- package/types/resources/CouponCode.d.ts +56 -5
- package/types/resources/CouponSet.d.ts +224 -17
- package/types/resources/CreditNote.d.ts +1202 -44
- package/types/resources/CreditNoteEstimate.d.ts +75 -6
- package/types/resources/Customer.d.ts +2132 -73
- package/types/resources/DifferentialPrice.d.ts +266 -15
- package/types/resources/Discount.d.ts +107 -0
- package/types/resources/Download.d.ts +18 -0
- package/types/resources/EntitlementOverride.d.ts +101 -7
- package/types/resources/Estimate.d.ts +1181 -27
- package/types/resources/Event.d.ts +145 -8
- package/types/resources/Export.d.ts +703 -32
- package/types/resources/Feature.d.ts +356 -22
- package/types/resources/Gift.d.ts +351 -24
- package/types/resources/Hierarchy.d.ts +30 -0
- package/types/resources/HostedPage.d.ts +1212 -37
- package/types/resources/ImpactedItem.d.ts +41 -1
- package/types/resources/ImpactedSubscription.d.ts +36 -1
- package/types/resources/InAppSubscription.d.ts +636 -9
- package/types/resources/Invoice.d.ts +2293 -93
- package/types/resources/InvoiceEstimate.d.ts +75 -6
- package/types/resources/Item.d.ts +542 -16
- package/types/resources/ItemEntitlement.d.ts +172 -13
- package/types/resources/ItemFamily.d.ts +173 -15
- package/types/resources/ItemPrice.d.ts +971 -26
- package/types/resources/Media.d.ts +24 -0
- package/types/resources/NonSubscription.d.ts +51 -3
- package/types/resources/Order.d.ts +1224 -32
- package/types/resources/PaymentIntent.d.ts +318 -8
- package/types/resources/PaymentReferenceNumber.d.ts +24 -0
- package/types/resources/PaymentSource.d.ts +1259 -55
- package/types/resources/PaymentVoucher.d.ts +262 -14
- package/types/resources/PortalSession.d.ts +187 -10
- package/types/resources/PromotionalCredit.d.ts +351 -16
- package/types/resources/Purchase.d.ts +274 -5
- package/types/resources/Quote.d.ts +1595 -62
- package/types/resources/QuoteLineGroup.d.ts +134 -5
- package/types/resources/QuotedCharge.d.ts +63 -5
- package/types/resources/QuotedSubscription.d.ts +192 -5
- package/types/resources/ResourceMigration.d.ts +73 -3
- package/types/resources/SiteMigrationDetail.d.ts +98 -5
- package/types/resources/Subscription.d.ts +3462 -137
- package/types/resources/SubscriptionEntitlement.d.ts +116 -8
- package/types/resources/SubscriptionEstimate.d.ts +36 -2
- package/types/resources/TaxWithheld.d.ts +32 -0
- package/types/resources/ThirdPartyPaymentMethod.d.ts +24 -0
- package/types/resources/TimeMachine.d.ts +99 -7
- package/types/resources/Token.d.ts +179 -7
- package/types/resources/Transaction.d.ts +597 -25
- package/types/resources/UnbilledCharge.d.ts +355 -14
- package/types/resources/Usage.d.ts +259 -13
- package/types/resources/VirtualBankAccount.d.ts +255 -17
|
@@ -1,41 +1,178 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
2
|
declare module 'chargebee' {
|
|
3
3
|
export interface Event {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @description Uniquely identifies a event
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
4
10
|
id:string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @description Timestamp indicating when this event had occurred.
|
|
14
|
+
|
|
15
|
+
*/
|
|
16
|
+
|
|
5
17
|
occurred_at:number;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @description Source of the event \* hosted_page - Operation made through the Hosted Pages \* admin_console - Operation made through the Chargebee admin UI \* external_service - Operation that are triggered via webhook \* portal - Operation made through [Self-Serve Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html) \* system - Operation that are triggered by ChargeBee System \* scheduled_job - Operation made through the Scheduled Jobs \* migration - Deprecated \* none - If no source can be identified for an operation \* api - Operation made through the API \* bulk_operation - Operation that are triggerd through bulk operation. \* js_api - Operation made through the JS API
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
6
24
|
source:Source;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @description The "user" that triggered the event. The value depends on the `source` attribute:
|
|
28
|
+
|
|
29
|
+
* When `source` is `admin_console`: the email address of the user that triggered the event.
|
|
30
|
+
* When `source` is `api`, `js_api` or `bulk_operation`: the [name](https://www.chargebee.com/docs/api_keys.html#create-an-api-key) of the API key that was used to trigger the event.
|
|
31
|
+
* When the `source` is `external_service`: the name of the service that called our webhook. Eg. `ADYEN`, `STRIPE`, `AMAZON_PAYMENTS` etc.
|
|
32
|
+
* When the `source` is `hosted_page` or `portal`: the `user` attribute is not passed.
|
|
33
|
+
|
|
34
|
+
*/
|
|
35
|
+
|
|
7
36
|
user?:string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @description The types of event provided by chargebee. Refer [event types](#event_types) for all the event types provided by us currently. \* card_deleted - Sent when a card is deleted for a customer \* customer_deleted - Sent when a customer is deleted \* subscription_cancelled - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* coupon_deleted - Sent when a coupon is deleted. \* customer_changed - Sent when a customer is changed \* invoice_deleted - Event triggered when an invoice is deleted. \* quote_deleted - Triggered when quote is deleted \* subscription_shipping_address_updated - Triggered when shipping address is added or updated for a subscription. \* differential_price_created - Triggered when a differential price is created \* subscription_created - Sent when a new subscription is created. \* card_updated - Sent when the card is updated for a customer. \* coupon_created - Sent when a coupon is created. \* payment_initiated - Sent when a payment is initiated via direct debit \* quote_created - Triggered when quote is created \* quote_updated - Triggered when quote is updated \* add_usages_reminder - Sent every month day before renewal date of plan's period \* payment_source_added - Sent when a payment source is added for a customer. \* contract_term_created - Triggered when new contract term is created \* business_entity_updated - Sent when a business entity is updated. \* subscription_changed - Sent after the subscription's recurring items have been changed \* customer_created - Sent when a customer is created. This event happens when only a new customer is created or when a customer is automatically created during new subscription creation. \* subscription_deleted - Sent when a subscription has been deleted \* differential_price_deleted - Triggered when a differential price is deleted \* coupon_set_deleted - Sent when a coupon set is deleted \* refund_initiated - Sent when a refund is initiated via direct debit \* transaction_deleted - Triggered when a transaction is deleted. \* order_cancelled - Triggered when order is cancelled \* entitlement_overrides_removed - Triggered when an override entitlement is removed \* coupon_codes_added - Sent when coupon codes are added in coupon set \* item_family_deleted - Triggered when an item family is deleted \* card_added - Sent when a card is added for a customer. \* payment_failed - Sent when attempt to charge customer's credit card fails \* subscription_reactivated_with_backdating - Sent when the subscription is moved from cancelled state to active or in_trial state with past date \* gift_cancelled - Triggered when a gift is cancelled. \* entitlement_overrides_auto_removed - Triggered when Subscription entitlements overrides for a feature are auto removed after expiry \* payment_source_deleted - Sent when a payment source is deleted for a customer \* payment_source_expiring - Sent when the customer's payment source is expiring soon. Sent 30 days before the expiry date. \* credit_note_created - Sent when a credit note is created \* subscription_resumption_scheduled - Triggered when the subscription resumption is scheduled. \* item_price_deleted - Triggered when an item price is deleted \* subscription_advance_invoice_schedule_updated - Triggered when scheduled advance invoice is updated for a subscription. \* item_deleted - Triggered when an item is deleted \* gift_claimed - Triggered when a gift is claimed \* feature_reactivated - Triggered when a feature \`status\` transitions to \`active\` for the second time or more. \* item_price_updated - Triggered when an item price is updated \* order_ready_to_process - Triggered when order reaches it's order date \* subscription_activated - Sent after the subscription has been moved from trial to active state \* subscription_resumed - Sent when the subscription is moved from paused state to active state \* entitlement_overrides_updated - Triggered when an override entitlement is updated \* item_updated - Triggered when an item is updated \* credit_note_deleted - Sent when a credit note is deleted \* subscription_advance_invoice_schedule_added - Triggered when advance invoice is scheduled for a subscription. \* differential_price_updated - Triggered when a differential price is updated \* coupon_set_updated - Sent when a coupon set is changed \* subscription_reactivated - Sent when the subscription is moved from cancelled state to active or in_trial state \* order_deleted - Triggered when order is deleted \* token_expired - Sent when a Token is expired \* addon_updated - Sent when a addon is changed. \* subscription_scheduled_changes_removed - Sent when scheduled change for the subscription is removed. \* transaction_updated - Triggered when a transaction is updated. E.g. (1) When a transaction is removed, (2) or when an excess payment is applied on an invoice, (3) or when amount_capturable gets updated. \* subscription_cancellation_reminder - Sent when the customer's subscription is nearing it's scheduled cancellation date. \* payment_refunded - Sent when a payment refund is made \* subscription_started - Sent when a 'future' subscription gets started at the scheduled date. \* attached_item_created - Triggered when an Attached item is created \* invoice_generated - Event triggered when a new invoice is generated. In case of metered billing, this event is triggered when a "Pending" invoice is closed. \* token_created - Sent when a Token is created \* item_family_created - Triggered when an item family is created \* order_delivered - Triggered when order is marked as delivered \* subscription_created_with_backdating - Sent when a new subscription is created with backdating. \* pending_invoice_created - Event triggered (in the case of metered billing) when a "Pending" invoice is created that has usage related charges or line items to be added, before being closed. This is triggered only when the "Notify for Pending Invoices" option is enabled. \* unbilled_charges_deleted - Triggered when unbilled charges are deleted \* promotional_credits_added - Sent when a customer prmotion credits added \* subscription_canceled_with_backdating - Sent when the subscription gets cancelled. If cancelled due to non payment or card not present, the subscription will have the possible reason as 'cancel_reason'. \* item_entitlements_updated - Triggered when item entitlements are updated to a feature \* card_expired - Sent when a card for a customer is expired \* payment_intent_created - Sent when a Payment intent is created \* subscription_changed_with_backdating - Sent after the subscription's recurring items have been changed with backdated date \* subscription_scheduled_cancellation_removed - Sent when scheduled cancellation is removed for the subscription. \* authorization_succeeded - Triggered when a authorization transaction is created. \* invoice_generated_with_backdating - Event triggered when a new invoice is generated with past date as invoice date. \* feature_updated - Triggered when an feature is updated \* subscription_cancellation_scheduled - Sent when subscription is scheduled to cancel at end of current term \* order_created - Triggered when order is created \* hierarchy_deleted - Triggered when a hierarchy is deleted \* plan_deleted - Sent when a plan is deleted. \* subscription_activated_with_backdating - Sent after the subscription changes to \`active\` from another \`status\`, while the change is backdated. \* plan_updated - Sent when a plan is changed. \* tax_withheld_recorded - Triggered when a tax withheld is recorded for an invoice \* tax_withheld_refunded - Sent when a tax withheld refund is made \* unbilled_charges_voided - Triggered when unbilled charges are voided \* customer_moved_out - Sent when a customer is copied to another site \* credit_note_created_with_backdating - Sent when a credit note is created with past date as credit note date \* gift_updated - Triggered when a gift is updated \* order_resent - Triggered when order is resent \* feature_created - Triggered when a feature is created. \* hierarchy_created - Triggered when a hierarchy is created \* addon_deleted - Sent when a addon is deleted. \* coupon_codes_deleted - Sent when coupon codes are deleted in coupon set \* subscription_paused - Sent when the subscription is paused. \* order_updated - Triggered when order is updated \* unbilled_charges_created - Triggered when unbilled charges are created \* feature_archived - Triggered when an feature is archived \* customer_moved_in - Sent when a customer is copied from another site \* attached_item_deleted - Triggered when an Attached item is deleted \* payment_succeeded - Sent when the payment is successfully collected \* mrr_updated - Sent when either of MRR or CMRR of a subscription changes \* unbilled_charges_invoiced - Triggered when unbilled charges are invoiced \* subscription_pause_scheduled - Sent when the subscription is scheduled to pause. \* order_returned - Triggered when order is marked as returned \* payment_source_expired - Sent when a payment source for a customer is expired \* contract_term_terminated - Triggered when contract term is terminated \* subscription_scheduled_resumption_removed - Triggered when scheduled resumption is removed for the subscription. \* subscription_changes_scheduled - Sent when subscription changes are scheduled for later. Changes will be applied at the end of current term. \* order_ready_to_ship - Triggered when order reaches it's shipping date \* payment_source_updated - Sent when the payment source is updated for a customer or when role is assigned to the payment source. \* pending_invoice_updated - Event triggered when the option "Notify and wait to close invoices" is enabled, and the 'Pending' invoice is updated. \* subscription_advance_invoice_schedule_removed - Triggered when scheduled advance invoice is removed for a subscription. \* tax_withheld_deleted - Triggered when a tax withheld is deleted \* business_entity_created - Sent when a business entity is created. \* item_price_created - Triggered when an item price is created \* purchase_created - Triggered when purchase action completed successfully \* virtual_bank_account_updated - Sent when the virtual bank account is updated for a customer. \* credit_note_updated - Sent when a credit note is updated \* subscription_scheduled_pause_removed - Triggered when scheduled pause is removed for the subscription. \* subscription_trial_end_reminder - Sent when the customer's trial period is about to end. \* feature_activated - Triggered when a feature \`status\` transitions to \`active\` for the first time. \* subscription_renewed - Sent when the subscription is renewed from the current term. \* card_expiry_reminder - Sent when the customer's credit card is expiring soon. Sent 30 days before the expiry date. \* coupon_set_created - Sent when a coupon set is created \* virtual_bank_account_deleted - Sent when a virtual bank account is deleted for a customer. \* gift_scheduled - Triggered when a new gift is created \* business_entity_deleted - Sent when a business entity is deleted. \* plan_created - Sent when a plan is created. \* item_created - Triggered when an item is created \* coupon_codes_updated - Sent when coupon codes are updated \* gift_unclaimed - Triggered when a new gift is unclaimed and is ready to be claimed \* promotional_credits_deducted - Sent when a customer prmotion credits deducted \* subscription_entitlements_created - Triggered when subscription entitlements are created for a new subscription \* contract_term_renewed - Triggered when new contract term is renewed \* item_entitlements_removed - Triggered when item entitlements are removed for a feature \* virtual_bank_account_added - Sent when a virtual bank account is added for a customer. \* gift_expired - Triggered when a gift expires \* contract_term_cancelled - Triggered when contract term is cancelled \* contract_term_completed - Triggered when contract term is completed \* feature_deleted - Triggered when a feature is deleted \* authorization_voided - Triggered when a authorization transaction is voided. Authorization can be voided either manually or when blocked funds are released by the gateway after a certain period of time. \* item_family_updated - Triggered when an item family is updated \* subscription_renewal_reminder - Sent before each subscription's renewal based on plan's period \* addon_created - Sent when a addon is created. \* attached_item_updated - Triggered when an Attached item is updated \* invoice_updated - Triggered when the invoice's shipping/billing address is updated, if the invoice is voided, or when the amount due is modified due to payments applied/removed. \* payment_intent_updated - Sent when a Payment intent is updated \* coupon_updated - Sent when a coupon is changed. \* token_consumed - Sent when a Token is consumed \* transaction_created - Triggered when a transaction is recorded
|
|
40
|
+
|
|
41
|
+
*/
|
|
42
|
+
|
|
8
43
|
event_type?:EventType;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @description The Chargebee API Version used for rendering this event content. While processing webhooks, ensure this version is same as the API version used by your webhook server's client library. \* v1 - Chargebee API version V1 \* v2 - Chargebee API version V2
|
|
47
|
+
|
|
48
|
+
*/
|
|
49
|
+
|
|
9
50
|
api_version?:ApiVersion;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @description The JSON data associated with this event. Has resources (*subscription* , *invoice* etc) based on the [event type](#event_types). These resources are structured based on the Chargebee API version indicated by the *api_version* attribute.
|
|
54
|
+
|
|
55
|
+
*/
|
|
56
|
+
|
|
10
57
|
content:object;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @description Array of webhook call statuses: one for each of the webhooks configured for the site. This object is only available after the first webhook call for the event has completed or timed out. Also, creation/updation of the `webhook` object data is a queued operation and hence there can be an additional delay of up to 5 seconds.
|
|
61
|
+
|
|
62
|
+
*/
|
|
63
|
+
|
|
11
64
|
webhooks?:Event.Webhook[];
|
|
12
65
|
}
|
|
13
66
|
export namespace Event {
|
|
14
|
-
export class EventResource {
|
|
67
|
+
export class EventResource {
|
|
68
|
+
/**
|
|
69
|
+
* @description Retrieves list of events.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
*/
|
|
73
|
+
|
|
15
74
|
list(input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @description Retrieves a specific event identified by a unique event identifier.
|
|
78
|
+
|
|
79
|
+
**Note:** Only events that are less than 90 days old will be retrieved.
|
|
80
|
+
|
|
81
|
+
*/
|
|
82
|
+
|
|
16
83
|
retrieve(event_id:string):ChargebeeRequest<RetrieveResponse>;
|
|
17
84
|
}
|
|
18
|
-
export interface ListResponse {
|
|
19
|
-
|
|
20
|
-
|
|
85
|
+
export interface ListResponse {
|
|
86
|
+
/**
|
|
87
|
+
* @description Retrieves list of events.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
*/
|
|
91
|
+
|
|
92
|
+
list:{event:Event}[];
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @description Retrieves list of events.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
next_offset?:string;
|
|
21
101
|
}
|
|
22
102
|
export interface ListInputParam {
|
|
23
|
-
[key : string]: any;
|
|
103
|
+
[key : string]: any;
|
|
104
|
+
/**
|
|
105
|
+
* @description The number of resources to be returned.
|
|
106
|
+
|
|
107
|
+
*/
|
|
108
|
+
|
|
24
109
|
limit?:number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @description Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set \`offset\` to the value of \`next_offset\` obtained in the previous iteration of the API call.
|
|
113
|
+
|
|
114
|
+
*/
|
|
115
|
+
|
|
25
116
|
offset?:string;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @description Uniquely identifies a event
|
|
120
|
+
|
|
121
|
+
*/
|
|
122
|
+
|
|
26
123
|
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @description Returns the events (occurred in the past 6 days) which has this status in any of the events' webhooks.
|
|
127
|
+
**Note**: To retrieve events which have occurred before the 6 day period, use the occurred_at(start_time/end_time) attribute.
|
|
128
|
+
|
|
129
|
+
*/
|
|
130
|
+
|
|
27
131
|
webhook_status?:{in?:string,is?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',is_not?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped',not_in?:string};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @description Specify it if you need to fetch events of a particular type.
|
|
135
|
+
|
|
136
|
+
*/
|
|
137
|
+
|
|
28
138
|
event_type?:{in?:string,is?:'subscription_pause_scheduled' | 'order_delivered' | 'subscription_advance_invoice_schedule_added' | 'gift_expired' | 'tax_withheld_deleted' | 'coupon_codes_added' | 'unbilled_charges_deleted' | 'gift_cancelled' | 'coupon_updated' | 'order_cancelled' | 'coupon_deleted' | 'product_updated' | 'subscription_scheduled_changes_removed' | 'pending_invoice_created' | 'product_deleted' | 'entitlement_overrides_auto_removed' | 'unbilled_charges_created' | 'subscription_resumed' | 'subscription_cancelled' | 'item_entitlements_removed' | 'business_entity_created' | 'payment_source_deleted' | 'quote_deleted' | 'invoice_updated' | 'coupon_set_updated' | 'differential_price_updated' | 'subscription_advance_invoice_schedule_removed' | 'entitlement_overrides_removed' | 'subscription_activated_with_backdating' | 'card_deleted' | 'order_ready_to_ship' | 'subscription_trial_end_reminder' | 'subscription_shipping_address_updated' | 'variant_updated' | 'voucher_create_failed' | 'gift_claimed' | 'business_entity_updated' | 'subscription_scheduled_resumption_removed' | 'payment_initiated' | 'feature_archived' | 'subscription_reactivated_with_backdating' | 'customer_deleted' | 'token_expired' | 'card_added' | 'coupon_created' | 'refund_initiated' | 'invoice_generated_with_backdating' | 'add_usages_reminder' | 'item_price_deleted' | 'virtual_bank_account_deleted' | 'subscription_created' | 'voucher_created' | 'feature_activated' | 'subscription_entitlements_created' | 'payment_source_locally_deleted' | 'order_returned' | 'subscription_deleted' | 'invoice_generated' | 'voucher_expired' | 'authorization_succeeded' | 'payment_source_added' | 'gift_scheduled' | 'item_price_created' | 'subscription_changes_scheduled' | 'subscription_changed_with_backdating' | 'variant_created' | 'subscription_scheduled_cancellation_removed' | 'payment_refunded' | 'gift_unclaimed' | 'product_created' | 'differential_price_created' | 'virtual_bank_account_added' | 'payment_intent_created' | 'transaction_created' | 'credit_note_created_with_backdating' | 'contract_term_terminated' | 'item_family_updated' | 'order_created' | 'payment_succeeded' | 'plan_deleted' | 'subscription_canceled_with_backdating' | 'unbilled_charges_voided' | 'quote_created' | 'customer_moved_in' | 'coupon_set_deleted' | 'subscription_advance_invoice_schedule_updated' | 'attached_item_created' | 'customer_changed' | 'subscription_started' | 'item_deleted' | 'subscription_activated' | 'payment_source_expiring' | 'subscription_reactivated' | 'order_updated' | 'subscription_scheduled_pause_removed' | 'subscription_cancellation_reminder' | 'addon_deleted' | 'subscription_created_with_backdating' | 'order_deleted' | 'item_entitlements_updated' | 'token_consumed' | 'addon_updated' | 'hierarchy_deleted' | 'subscription_cancellation_scheduled' | 'gift_updated' | 'subscription_trial_extended' | 'subscription_renewed' | 'feature_updated' | 'addon_created' | 'feature_deleted' | 'item_family_created' | 'card_expiry_reminder' | 'token_created' | 'purchase_created' | 'plan_created' | 'entitlement_overrides_updated' | 'plan_updated' | 'promotional_credits_added' | 'item_family_deleted' | 'subscription_resumption_scheduled' | 'feature_reactivated' | 'coupon_codes_deleted' | 'card_expired' | 'credit_note_updated' | 'promotional_credits_deducted' | 'payment_source_expired' | 'customer_moved_out' | 'subscription_paused' | 'order_ready_to_process' | 'feature_created' | 'hierarchy_created' | 'attached_item_deleted' | 'transaction_deleted' | 'credit_note_created' | 'item_updated' | 'item_created' | 'coupon_set_created' | 'transaction_updated' | 'payment_intent_updated' | 'variant_deleted' | 'mrr_updated' | 'order_resent' | 'unbilled_charges_invoiced' | 'tax_withheld_recorded' | 'item_price_updated' | 'differential_price_deleted' | 'coupon_codes_updated' | 'virtual_bank_account_updated' | 'contract_term_created' | 'subscription_changed' | 'contract_term_cancelled' | 'contract_term_renewed' | 'invoice_deleted' | 'payment_failed' | 'credit_note_deleted' | 'tax_withheld_refunded' | 'contract_term_completed' | 'card_updated' | 'customer_created' | 'pending_invoice_updated' | 'quote_updated' | 'subscription_renewal_reminder' | 'attached_item_updated' | 'payment_source_updated' | 'business_entity_deleted' | 'authorization_voided',is_not?:'subscription_pause_scheduled' | 'order_delivered' | 'subscription_advance_invoice_schedule_added' | 'gift_expired' | 'tax_withheld_deleted' | 'coupon_codes_added' | 'unbilled_charges_deleted' | 'gift_cancelled' | 'coupon_updated' | 'order_cancelled' | 'coupon_deleted' | 'product_updated' | 'subscription_scheduled_changes_removed' | 'pending_invoice_created' | 'product_deleted' | 'entitlement_overrides_auto_removed' | 'unbilled_charges_created' | 'subscription_resumed' | 'subscription_cancelled' | 'item_entitlements_removed' | 'business_entity_created' | 'payment_source_deleted' | 'quote_deleted' | 'invoice_updated' | 'coupon_set_updated' | 'differential_price_updated' | 'subscription_advance_invoice_schedule_removed' | 'entitlement_overrides_removed' | 'subscription_activated_with_backdating' | 'card_deleted' | 'order_ready_to_ship' | 'subscription_trial_end_reminder' | 'subscription_shipping_address_updated' | 'variant_updated' | 'voucher_create_failed' | 'gift_claimed' | 'business_entity_updated' | 'subscription_scheduled_resumption_removed' | 'payment_initiated' | 'feature_archived' | 'subscription_reactivated_with_backdating' | 'customer_deleted' | 'token_expired' | 'card_added' | 'coupon_created' | 'refund_initiated' | 'invoice_generated_with_backdating' | 'add_usages_reminder' | 'item_price_deleted' | 'virtual_bank_account_deleted' | 'subscription_created' | 'voucher_created' | 'feature_activated' | 'subscription_entitlements_created' | 'payment_source_locally_deleted' | 'order_returned' | 'subscription_deleted' | 'invoice_generated' | 'voucher_expired' | 'authorization_succeeded' | 'payment_source_added' | 'gift_scheduled' | 'item_price_created' | 'subscription_changes_scheduled' | 'subscription_changed_with_backdating' | 'variant_created' | 'subscription_scheduled_cancellation_removed' | 'payment_refunded' | 'gift_unclaimed' | 'product_created' | 'differential_price_created' | 'virtual_bank_account_added' | 'payment_intent_created' | 'transaction_created' | 'credit_note_created_with_backdating' | 'contract_term_terminated' | 'item_family_updated' | 'order_created' | 'payment_succeeded' | 'plan_deleted' | 'subscription_canceled_with_backdating' | 'unbilled_charges_voided' | 'quote_created' | 'customer_moved_in' | 'coupon_set_deleted' | 'subscription_advance_invoice_schedule_updated' | 'attached_item_created' | 'customer_changed' | 'subscription_started' | 'item_deleted' | 'subscription_activated' | 'payment_source_expiring' | 'subscription_reactivated' | 'order_updated' | 'subscription_scheduled_pause_removed' | 'subscription_cancellation_reminder' | 'addon_deleted' | 'subscription_created_with_backdating' | 'order_deleted' | 'item_entitlements_updated' | 'token_consumed' | 'addon_updated' | 'hierarchy_deleted' | 'subscription_cancellation_scheduled' | 'gift_updated' | 'subscription_trial_extended' | 'subscription_renewed' | 'feature_updated' | 'addon_created' | 'feature_deleted' | 'item_family_created' | 'card_expiry_reminder' | 'token_created' | 'purchase_created' | 'plan_created' | 'entitlement_overrides_updated' | 'plan_updated' | 'promotional_credits_added' | 'item_family_deleted' | 'subscription_resumption_scheduled' | 'feature_reactivated' | 'coupon_codes_deleted' | 'card_expired' | 'credit_note_updated' | 'promotional_credits_deducted' | 'payment_source_expired' | 'customer_moved_out' | 'subscription_paused' | 'order_ready_to_process' | 'feature_created' | 'hierarchy_created' | 'attached_item_deleted' | 'transaction_deleted' | 'credit_note_created' | 'item_updated' | 'item_created' | 'coupon_set_created' | 'transaction_updated' | 'payment_intent_updated' | 'variant_deleted' | 'mrr_updated' | 'order_resent' | 'unbilled_charges_invoiced' | 'tax_withheld_recorded' | 'item_price_updated' | 'differential_price_deleted' | 'coupon_codes_updated' | 'virtual_bank_account_updated' | 'contract_term_created' | 'subscription_changed' | 'contract_term_cancelled' | 'contract_term_renewed' | 'invoice_deleted' | 'payment_failed' | 'credit_note_deleted' | 'tax_withheld_refunded' | 'contract_term_completed' | 'card_updated' | 'customer_created' | 'pending_invoice_updated' | 'quote_updated' | 'subscription_renewal_reminder' | 'attached_item_updated' | 'payment_source_updated' | 'business_entity_deleted' | 'authorization_voided',not_in?:string};
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @description Source of the event
|
|
142
|
+
|
|
143
|
+
*/
|
|
144
|
+
|
|
29
145
|
source?:{in?:string,is?:'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service',is_not?:'admin_console' | 'system' | 'scheduled_job' | 'js_api' | 'bulk_operation' | 'hosted_page' | 'migration' | 'api' | 'none' | 'portal' | 'external_service',not_in?:string};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* @description Timestamp indicating when this event had occurred.
|
|
149
|
+
|
|
150
|
+
*/
|
|
151
|
+
|
|
30
152
|
occurred_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @description Retrieves list of events.
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
*/
|
|
159
|
+
|
|
31
160
|
sort_by?:{asc?:'occurred_at',desc?:'occurred_at'};
|
|
32
161
|
}
|
|
33
|
-
export interface RetrieveResponse {
|
|
34
|
-
|
|
162
|
+
export interface RetrieveResponse {
|
|
163
|
+
/**
|
|
164
|
+
* @description Retrieves a specific event identified by a unique event identifier.
|
|
165
|
+
|
|
166
|
+
**Note:** Only events that are less than 90 days old will be retrieved.
|
|
167
|
+
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
event:Event;
|
|
35
171
|
}
|
|
36
172
|
|
|
37
|
-
export interface Webhook {
|
|
173
|
+
export interface Webhook {
|
|
38
174
|
id?:string;
|
|
175
|
+
|
|
39
176
|
webhook_status?:'not_configured' | 're_scheduled' | 'scheduled' | 'failed' | 'not_applicable' | 'succeeded' | 'skipped';
|
|
40
177
|
}
|
|
41
178
|
}
|