chargebee 2.28.0 → 2.29.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/.github/ISSUE_TEMPLATE/bug_report.yml +81 -0
- package/.github/ISSUE_TEMPLATE/config.yml +6 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +8 -0
- package/.github/workflows/greeting.yml +47 -0
- package/CHANGELOG.md +47 -0
- package/SECURITY.md +8 -0
- package/lib/chargebee.js +1 -1
- package/lib/resources/api_endpoints.js +0 -7
- package/package.json +1 -1
- package/types/core.d.ts +4 -4
- package/types/resources/AttachedItem.d.ts +88 -88
- package/types/resources/Card.d.ts +68 -68
- package/types/resources/Comment.d.ts +50 -44
- package/types/resources/Coupon.d.ts +242 -207
- package/types/resources/CouponSet.d.ts +72 -68
- package/types/resources/CreditNote.d.ts +612 -236
- package/types/resources/Customer.d.ts +655 -513
- package/types/resources/DifferentialPrice.d.ts +99 -74
- package/types/resources/EntitlementOverride.d.ts +27 -12
- package/types/resources/Estimate.d.ts +450 -450
- package/types/resources/Event.d.ts +30 -12
- package/types/resources/Export.d.ts +200 -200
- package/types/resources/Feature.d.ts +66 -35
- package/types/resources/Gift.d.ts +54 -44
- package/types/resources/HostedPage.d.ts +381 -381
- package/types/resources/InAppSubscription.d.ts +94 -90
- package/types/resources/Invoice.d.ts +1242 -660
- package/types/resources/Item.d.ts +148 -142
- package/types/resources/ItemEntitlement.d.ts +36 -36
- package/types/resources/ItemFamily.d.ts +45 -45
- package/types/resources/ItemPrice.d.ts +317 -273
- package/types/resources/PaymentIntent.d.ts +60 -60
- package/types/resources/PaymentVoucher.d.ts +74 -59
- package/types/resources/PortalSession.d.ts +45 -20
- package/types/resources/PromotionalCredit.d.ts +68 -68
- package/types/resources/Purchase.d.ts +3 -3
- package/types/resources/Quote.d.ts +652 -363
- package/types/resources/QuoteLineGroup.d.ts +245 -0
- package/types/resources/QuotedCharge.d.ts +170 -0
- package/types/resources/QuotedSubscription.d.ts +219 -0
- package/types/resources/SiteMigrationDetail.d.ts +7 -7
- package/types/resources/Subscription.d.ts +1219 -932
- package/types/resources/SubscriptionEntitlement.d.ts +33 -12
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -1
- package/types/resources/TimeMachine.d.ts +15 -15
- package/types/resources/Token.d.ts +23 -23
- package/types/resources/Transaction.d.ts +229 -112
- package/types/resources/UnbilledCharge.d.ts +112 -67
- package/types/resources/Usage.d.ts +46 -47
- package/types/resources/VirtualBankAccount.d.ts +66 -66
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug for this repository.
|
|
3
|
+
labels:
|
|
4
|
+
- Bug
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
|
|
8
|
+
- type: textarea
|
|
9
|
+
id: what-happened
|
|
10
|
+
attributes:
|
|
11
|
+
label: Description of the Bug
|
|
12
|
+
description: Please provide a clear and concise description of the bug.
|
|
13
|
+
placeholder: Describe what you're experiencing.
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: repro-steps
|
|
19
|
+
attributes:
|
|
20
|
+
label: Steps to reproduce
|
|
21
|
+
description: Clear and concise instructions to reproduce the bug are essential for quick resolution.
|
|
22
|
+
placeholder: |
|
|
23
|
+
1. Fetch '...'
|
|
24
|
+
2. Update the '....'
|
|
25
|
+
3. Encounter the error
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: expected-behavior
|
|
31
|
+
attributes:
|
|
32
|
+
label: Expected Behavior
|
|
33
|
+
description: Describe what you expected to happen.
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: textarea
|
|
38
|
+
id: code-snippets
|
|
39
|
+
attributes:
|
|
40
|
+
label: Code Snippets (if applicable)
|
|
41
|
+
description: If relevant, provide code snippets to clarify the issue.
|
|
42
|
+
render: node
|
|
43
|
+
validations:
|
|
44
|
+
required: false
|
|
45
|
+
|
|
46
|
+
- type: input
|
|
47
|
+
id: os
|
|
48
|
+
attributes:
|
|
49
|
+
label: Operating System
|
|
50
|
+
placeholder: macOS
|
|
51
|
+
validations:
|
|
52
|
+
required: true
|
|
53
|
+
|
|
54
|
+
- type: input
|
|
55
|
+
id: language-version
|
|
56
|
+
attributes:
|
|
57
|
+
label: Language version
|
|
58
|
+
placeholder: Node 18.18.1
|
|
59
|
+
validations:
|
|
60
|
+
required: true
|
|
61
|
+
|
|
62
|
+
- type: input
|
|
63
|
+
id: lib-version
|
|
64
|
+
attributes:
|
|
65
|
+
label: Library version
|
|
66
|
+
placeholder: 2.28.0
|
|
67
|
+
validations:
|
|
68
|
+
required: true
|
|
69
|
+
|
|
70
|
+
- type: textarea
|
|
71
|
+
id: additional-context
|
|
72
|
+
attributes:
|
|
73
|
+
label: Additional context
|
|
74
|
+
description: Provide any other relevant information about the problem.
|
|
75
|
+
validations:
|
|
76
|
+
required: false
|
|
77
|
+
|
|
78
|
+
- type: markdown
|
|
79
|
+
attributes:
|
|
80
|
+
value: |
|
|
81
|
+
Thank you for taking the time to submit this bug report!
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Chargebee support
|
|
4
|
+
url: https://support.chargebee.com/
|
|
5
|
+
about: |
|
|
6
|
+
Github issues are not an official support channel for Chargebee. If you have an urgent request we suggest you contact us through an official channel: support@chargebee.com or https://support.chargebee.com/
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Request a New Feature for the project.
|
|
3
|
+
labels:
|
|
4
|
+
- Feature Request
|
|
5
|
+
|
|
6
|
+
body:
|
|
7
|
+
- type: textarea
|
|
8
|
+
id: problem
|
|
9
|
+
attributes:
|
|
10
|
+
label: What problem does your feature request address?
|
|
11
|
+
description: Please provide a clear and concise description of the problem you'd like to solve. For example, "I'm frequently frustrated when..."
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: solution
|
|
15
|
+
attributes:
|
|
16
|
+
label: Describe the desired solution
|
|
17
|
+
description: Please provide a clear and concise description of the solution you would like to see implemented.
|
|
18
|
+
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: alternatives
|
|
21
|
+
attributes:
|
|
22
|
+
label: Alternatives considered
|
|
23
|
+
description: Describe any alternative solutions or features you may have thought about in relation to this problem.
|
|
24
|
+
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: context
|
|
27
|
+
attributes:
|
|
28
|
+
label: Additional context
|
|
29
|
+
description: Feel free to include any other relevant information or context regarding your feature request.
|
|
30
|
+
|
|
31
|
+
- type: markdown
|
|
32
|
+
attributes:
|
|
33
|
+
value: |
|
|
34
|
+
Thank you for taking the time to submit your feature request!
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
### Description
|
|
2
|
+
Please provide a brief overview of the changes introduced by this pull request.
|
|
3
|
+
|
|
4
|
+
### Related Issues
|
|
5
|
+
Closes #IssueNumber
|
|
6
|
+
|
|
7
|
+
### Additional Information
|
|
8
|
+
Include any additional information that might be helpful in reviewing the changes introduced by this pull request.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Greet New Contributors
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issues:
|
|
5
|
+
types: [opened]
|
|
6
|
+
pull_request:
|
|
7
|
+
types: [opened]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Greet for issue
|
|
20
|
+
if: github.event_name == 'issues' && github.event.action == 'opened'
|
|
21
|
+
uses: actions/github-script@v6
|
|
22
|
+
with:
|
|
23
|
+
script: |
|
|
24
|
+
const issueComment = `
|
|
25
|
+
Hello @${context.payload.sender.login}, thank you for raising the issue. Your contribution is greatly appreciated and we look forward to addressing it.
|
|
26
|
+
`
|
|
27
|
+
github.rest.issues.createComment({
|
|
28
|
+
issue_number: context.payload.issue.number,
|
|
29
|
+
owner: context.repo.owner,
|
|
30
|
+
repo: context.repo.repo,
|
|
31
|
+
body: issueComment,
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
- name: Greet for pull request
|
|
35
|
+
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
|
36
|
+
uses: actions/github-script@v6
|
|
37
|
+
with:
|
|
38
|
+
script: |
|
|
39
|
+
const prComment = `
|
|
40
|
+
Thank you, @${context.payload.sender.login}, for the pull request. We will take a look at it and get back to you shortly.
|
|
41
|
+
`
|
|
42
|
+
github.rest.issues.createComment({
|
|
43
|
+
issue_number: context.payload.pull_request.number,
|
|
44
|
+
owner: context.repo.owner,
|
|
45
|
+
repo: context.repo.repo,
|
|
46
|
+
body: prComment,
|
|
47
|
+
})
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
### v2.29.0 (2023-10-31)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New attributes:
|
|
5
|
+
* statement_descriptor has been added to invoice resource.
|
|
6
|
+
* source has been added to the Hosted_Pages resource.
|
|
7
|
+
|
|
8
|
+
#### New Enum values:
|
|
9
|
+
* pay_com has been added to Gateway.
|
|
10
|
+
* pay_to, faster_payments, sepa_instant_transfer has been added to Customer#TypeEnum.
|
|
11
|
+
* pay_to, faster_payments, sepa_instant_transfer has been added to PaymentMethodEnum.
|
|
12
|
+
* pay_to, faster_payments, sepa_instant_transfer has been added to PaymentMethodTypeEnum.
|
|
13
|
+
* pay_to, faster_payments, sepa_instant_transfer has been added to TypeEnum.
|
|
14
|
+
* pay_to, faster_payments, sepa_instant_transfer, amazon_payments has been added to PaymentIntent#PaymentMethodTypeEnum.
|
|
15
|
+
|
|
16
|
+
#### New Input parameters:
|
|
17
|
+
* source has been added to HostedPage#CheckoutOneTimeForItemsRequest.
|
|
18
|
+
* source has been added to HostedPage#CheckoutNewForItemsRequest.
|
|
19
|
+
* source has been added to HostedPage#CheckoutExistingForItemsRequest.
|
|
20
|
+
* statement_descriptor_descriptor has been added to Invoice#CreateRequest.
|
|
21
|
+
* statement_descriptor_descriptor has been added to Invoice#CreateForChargeItemsAndChargesRequest.
|
|
22
|
+
* statement_descriptor_descriptor has been added to Invoice#UpdateDetailsRequest.
|
|
23
|
+
* statement_descriptor_additional_info has been added to Invoice#CreateRequest.
|
|
24
|
+
* statement_descriptor_additional_info has been added to Invoice#CreateForChargeItemsAndChargesRequest.
|
|
25
|
+
* statement_descriptor_additional_info has been added to Invoice#UpdateDetailsRequest.
|
|
26
|
+
* statement_descriptor_descriptor has been added to Subscription#CreateRequest.
|
|
27
|
+
* statement_descriptor_descriptor has been added to Subscription#CreateForCustomerRequest.
|
|
28
|
+
* statement_descriptor_descriptor has been added to Subscription#CreateWithItemsRequest.
|
|
29
|
+
* statement_descriptor_descriptor has been added to Subscription#UpdateRequest.
|
|
30
|
+
* statement_descriptor_descriptor has been added to Subscription#UpdateForItemsRequest.
|
|
31
|
+
* statement_descriptor_descriptor has been added to Subscription#ReactivateRequest.
|
|
32
|
+
* statement_descriptor_additional_info has been added to Subscription#CreateRequest.
|
|
33
|
+
* statement_descriptor_additional_info has been added to Subscription#CreateForCustomerRequest.
|
|
34
|
+
* statement_descriptor_additional_info has been added to Subscription#CreateWithItemsRequest.
|
|
35
|
+
* statement_descriptor_additional_info has been added to Subscription#UpdateRequest.
|
|
36
|
+
* statement_descriptor_additional_info has been added to Subscription#UpdateForItemsRequest.
|
|
37
|
+
* statement_descriptor_additional_info has been added to Subscription#ReactivateRequest.
|
|
38
|
+
|
|
39
|
+
#### Updates to old parameters:
|
|
40
|
+
* duration_type, discount_type in coupons has been made optional.
|
|
41
|
+
* proration_type in addons is now supported.
|
|
42
|
+
* csv_tax_rule has been removed.
|
|
43
|
+
* Tax1JurisTypeEnum has been removed.
|
|
44
|
+
* Tax2JurisTypeEnum has been removed.
|
|
45
|
+
* Tax3JurisTypeEnum has been removed.
|
|
46
|
+
* Tax4JurisTypeEnum has been removed.
|
|
47
|
+
|
|
1
48
|
### v2.28.0 (2023-09-26)
|
|
2
49
|
* * *
|
|
3
50
|
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
At Chargebee, we take data integrity and security very seriously. Due to the nature of the product and service we provide, we are committed to working with individuals to stay updated on the latest security techniques and fix any security weakness in our application or infrastructure reported to us responsibly by external parties.
|
|
4
|
+
|
|
5
|
+
https://www.chargebee.com/security/responsible-disclosure-policy/
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
Reach out to us at security@chargebee.com. Please do not open GitHub issues or pull requests as this makes the problem immediately visible to everyone, including malicious actors. Chargebee's security team will triage your report and respond according to its impact.
|
package/lib/chargebee.js
CHANGED
package/package.json
CHANGED
package/types/core.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ declare module 'chargebee' {
|
|
|
46
46
|
type ExportType = 'data' | 'import_friendly_data'
|
|
47
47
|
type FreePeriodUnit = 'week' | 'month' | 'year' | 'day'
|
|
48
48
|
type FriendOfferType = 'coupon_code' | 'coupon' | 'none'
|
|
49
|
-
type Gateway = 'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay'
|
|
49
|
+
type Gateway = 'bluepay' | 'beanstream' | 'elavon' | 'orbital' | 'hdfc' | 'nmi' | 'moneris' | 'metrics_global' | 'ebanx' | 'pin' | 'stripe' | 'quickbooks' | 'razorpay' | 'eway_rapid' | 'balanced_payments' | 'ecentric' | 'wepay' | 'chargebee_payments' | 'bank_of_america' | 'braintree' | 'first_data_global' | 'paypal_express_checkout' | 'ingenico_direct' | 'moneris_us' | 'exact' | 'migs' | 'checkout_com' | 'not_applicable' | 'paypal_pro' | 'ogone' | 'eway' | 'gocardless' | 'global_payments' | 'paymill' | 'adyen' | 'paypal' | 'chargebee' | 'authorize_net' | 'tco' | 'bluesnap' | 'windcave' | 'paypal_payflow_pro' | 'amazon_payments' | 'mollie' | 'cybersource' | 'wirecard' | 'sage_pay' | 'vantiv' | 'worldpay' | 'pay_com'
|
|
50
50
|
type HierarchyOperationType = 'complete_hierarchy' | 'subordinates' | 'path_to_root'
|
|
51
51
|
type InvoiceDunningHandling = 'stop' | 'continue'
|
|
52
52
|
type ItemType = 'charge' | 'addon' | 'plan'
|
|
@@ -58,8 +58,8 @@ declare module 'chargebee' {
|
|
|
58
58
|
type OperationType = 'add' | 'remove'
|
|
59
59
|
type PauseOption = 'end_of_term' | 'billing_cycles' | 'immediately' | 'specific_date'
|
|
60
60
|
type PaymentInitiator = 'merchant' | 'customer'
|
|
61
|
-
type PaymentMethod = 'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card'
|
|
62
|
-
type PaymentMethodType = 'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card'
|
|
61
|
+
type PaymentMethod = 'other' | 'netbanking_emandates' | 'ach_credit' | 'dotpay' | 'boleto' | 'direct_debit' | 'chargeback' | 'wechat_pay' | 'pay_to' | 'cash' | 'giropay' | 'bank_transfer' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'custom' | 'unionpay' | 'check' | 'faster_payments' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'sepa_credit' | 'card'
|
|
62
|
+
type PaymentMethodType = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
|
|
63
63
|
type PaymentVoucherType = 'boleto'
|
|
64
64
|
type PeriodUnit = 'week' | 'month' | 'year' | 'day'
|
|
65
65
|
type PriceType = 'tax_exclusive' | 'tax_inclusive'
|
|
@@ -78,7 +78,7 @@ declare module 'chargebee' {
|
|
|
78
78
|
type Taxability = 'taxable' | 'exempt'
|
|
79
79
|
type TaxjarExemptionCategory = 'other' | 'wholesale' | 'government'
|
|
80
80
|
type TrialEndAction = 'activate_subscription' | 'plan_default' | 'cancel_subscription' | 'site_default'
|
|
81
|
-
type Type = 'giropay' | 'alipay' | 'ideal' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'card'
|
|
81
|
+
type Type = 'giropay' | 'alipay' | 'ideal' | 'sepa_instant_transfer' | 'google_pay' | 'netbanking_emandates' | 'dotpay' | 'unionpay' | 'direct_debit' | 'faster_payments' | 'generic' | 'sofort' | 'amazon_payments' | 'upi' | 'venmo' | 'apple_pay' | 'bancontact' | 'paypal_express_checkout' | 'wechat_pay' | 'pay_to' | 'card'
|
|
82
82
|
type UnbilledChargesHandling = 'invoice' | 'no_action'
|
|
83
83
|
type UnbilledChargesOption = 'invoice' | 'delete'
|
|
84
84
|
type UnpaidInvoicesHandling = 'schedule_payment_collection' | 'no_action'
|
|
@@ -104,11 +104,11 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
104
104
|
export namespace AttachedItem {
|
|
105
105
|
export class AttachedItemResource {
|
|
106
106
|
/**
|
|
107
|
-
* @description
|
|
107
|
+
* @description Creates an attached addon or a charge item for a plan.
|
|
108
108
|
|
|
109
109
|
*/
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
create(item_id:string, input:CreateInputParam):ChargebeeRequest<CreateResponse>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* @description Updates an attached addon or a charge item for a plan.
|
|
@@ -118,18 +118,11 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
118
118
|
update(attached_item_id:string, input:UpdateInputParam):ChargebeeRequest<UpdateResponse>;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* @description
|
|
122
|
-
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @description Creates an attached addon or a charge item for a plan.
|
|
121
|
+
* @description Retrieves details of an attached addon or a charge item.
|
|
129
122
|
|
|
130
123
|
*/
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
retrieve(attached_item_id:string, input:RetrieveInputParam):ChargebeeRequest<RetrieveResponse>;
|
|
133
126
|
|
|
134
127
|
/**
|
|
135
128
|
* @description Deletes an attached addon or a charge item.
|
|
@@ -137,30 +130,25 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
137
130
|
*/
|
|
138
131
|
|
|
139
132
|
delete(attached_item_id:string, input:DeleteInputParam):ChargebeeRequest<DeleteResponse>;
|
|
140
|
-
}
|
|
141
|
-
export interface RetrieveResponse {
|
|
142
|
-
attached_item:AttachedItem;
|
|
143
|
-
}
|
|
144
|
-
export interface RetrieveInputParam {
|
|
145
133
|
|
|
146
134
|
/**
|
|
147
|
-
* @description
|
|
135
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
148
136
|
|
|
149
137
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
138
|
+
|
|
139
|
+
list(item_id:string, input?:ListInputParam):ChargebeeRequest<ListResponse>;
|
|
152
140
|
}
|
|
153
|
-
export interface
|
|
141
|
+
export interface CreateResponse {
|
|
154
142
|
attached_item:AttachedItem;
|
|
155
143
|
}
|
|
156
|
-
export interface
|
|
144
|
+
export interface CreateInputParam {
|
|
157
145
|
|
|
158
146
|
/**
|
|
159
|
-
* @description The id of the
|
|
147
|
+
* @description The id of the addon or charge that is being attached to the plan-item.
|
|
160
148
|
|
|
161
149
|
*/
|
|
162
150
|
|
|
163
|
-
|
|
151
|
+
item_id:string;
|
|
164
152
|
|
|
165
153
|
/**
|
|
166
154
|
* @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API.
|
|
@@ -206,146 +194,158 @@ The value set explicitly for `billing_cycles` while [applying the addo
|
|
|
206
194
|
|
|
207
195
|
charge_once?:boolean;
|
|
208
196
|
}
|
|
209
|
-
export interface
|
|
197
|
+
export interface UpdateResponse {
|
|
198
|
+
attached_item:AttachedItem;
|
|
199
|
+
}
|
|
200
|
+
export interface UpdateInputParam {
|
|
201
|
+
|
|
210
202
|
/**
|
|
211
|
-
* @description
|
|
203
|
+
* @description The id of the parent item in the attachment relationship.
|
|
212
204
|
|
|
213
205
|
*/
|
|
214
206
|
|
|
215
|
-
|
|
207
|
+
parent_item_id:string;
|
|
216
208
|
|
|
217
209
|
/**
|
|
218
|
-
* @description
|
|
210
|
+
* @description The type of attachment for the addon. Only applicable for addon-items and is a required parameter as well for addon-items. \* recommended - The addon is recommended to go with the plan-item when using [Checkout](https://www.chargebee.com/docs/2.0/configure-inapp.html#fundamental-settings_recommending-addons-in-checkout) or [Portal](https://www.chargebee.com/docs/2.0/inapp-self-serve-portal.html#allow-change-subscription). \* optional - The addon is neither mandatory, nor recommended. This allows you to attach an addon so you can specify a `quantity` and `billing_cycles` for the addon, for when it is applied to subscriptions with the plan. \* mandatory - The addon is attached automatically to the subscription for the plan-item unless [explicitly removed](./subscriptions?prod_cat_ver=2) via API.
|
|
219
211
|
|
|
220
212
|
*/
|
|
221
213
|
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
export interface ListInputParam {
|
|
225
|
-
[key : string]: any;
|
|
226
|
-
/**
|
|
227
|
-
* @description The number of resources to be returned.
|
|
228
|
-
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
limit?:number;
|
|
214
|
+
type?:'optional' | 'mandatory' | 'recommended';
|
|
232
215
|
|
|
233
216
|
/**
|
|
234
|
-
* @description
|
|
217
|
+
* @description The number of subscription billing cycles for which this item is attached when applied to a subscription. Applicable only for items of type addon. Requires [addon billing cycles](https://www.chargebee.com/docs/2.0/addons-billingcycle.html) to be enabled for the site.
|
|
235
218
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
offset?:string;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* @description Filter attached items based on their id.
|
|
219
|
+
The value set explicitly for `billing_cycles` while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver=2).
|
|
242
220
|
|
|
243
221
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
222
|
+
|
|
223
|
+
billing_cycles?:number;
|
|
246
224
|
|
|
247
225
|
/**
|
|
248
|
-
* @description
|
|
226
|
+
* @description The default quantity of the addon to be attached when the quantity is not specified while [creating](subscriptions?prod_cat_ver=2#create_subscription_for_items)/[updating](subscriptions?prod_cat_ver=2#update_subscription_for_items) the subscription.
|
|
249
227
|
|
|
250
228
|
*/
|
|
251
|
-
|
|
252
|
-
|
|
229
|
+
|
|
230
|
+
quantity?:number;
|
|
253
231
|
|
|
254
232
|
/**
|
|
255
|
-
* @description
|
|
233
|
+
* @description The decimal representation of the quantity of the addon. Returned for quantity-based addons when [multi-decimal pricing](https://apidocs.chargebee.com/docs/api#handling_currency_units) is enabled.
|
|
256
234
|
|
|
257
235
|
*/
|
|
258
|
-
|
|
259
|
-
|
|
236
|
+
|
|
237
|
+
quantity_in_decimal?:string;
|
|
260
238
|
|
|
261
239
|
/**
|
|
262
|
-
* @description
|
|
240
|
+
* @description Indicates when the item is charged. This parameter only applies to charge-items. \* contract_termination - when a contract term is [terminated](./subscriptions?prod_cat_ver=2#cancel_subscription_for_items_contract_term_cancel_option). \* subscription_creation - the time of creation of the subscription. \* subscription_trial_start - the time when the trial period of the subscription begins. \* on_demand - Item can be charged on demand \* plan_activation - same as subscription activation, but also includes the case when the plan-item of the subscription is changed. \* subscription_activation - the moment a subscription enters an `active` or `non-renewing` state. Also includes reactivations of canceled subscriptions.
|
|
263
241
|
|
|
264
242
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
243
|
+
|
|
244
|
+
charge_on_event?:ChargeOnEvent;
|
|
267
245
|
|
|
268
246
|
/**
|
|
269
|
-
* @description Indicates
|
|
247
|
+
* @description Indicates if the charge-item is to be charged only once or each time the `charge_on_event` occurs. This parameter only applies to charge-items.
|
|
270
248
|
|
|
271
249
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
250
|
+
|
|
251
|
+
charge_once?:boolean;
|
|
252
|
+
}
|
|
253
|
+
export interface RetrieveResponse {
|
|
254
|
+
attached_item:AttachedItem;
|
|
255
|
+
}
|
|
256
|
+
export interface RetrieveInputParam {
|
|
274
257
|
|
|
275
258
|
/**
|
|
276
|
-
* @description
|
|
259
|
+
* @description Retrieves details of an attached addon or a charge item.
|
|
277
260
|
|
|
278
261
|
*/
|
|
279
262
|
|
|
280
|
-
|
|
263
|
+
parent_item_id:string;
|
|
281
264
|
}
|
|
282
|
-
export interface
|
|
265
|
+
export interface DeleteResponse {
|
|
283
266
|
attached_item:AttachedItem;
|
|
284
267
|
}
|
|
285
|
-
export interface
|
|
268
|
+
export interface DeleteInputParam {
|
|
286
269
|
|
|
287
270
|
/**
|
|
288
271
|
* @description The id of the addon or charge that is being attached to the plan-item.
|
|
289
272
|
|
|
290
273
|
*/
|
|
291
274
|
|
|
292
|
-
|
|
293
|
-
|
|
275
|
+
parent_item_id:string;
|
|
276
|
+
}
|
|
277
|
+
export interface ListResponse {
|
|
294
278
|
/**
|
|
295
|
-
* @description
|
|
279
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
296
280
|
|
|
297
281
|
*/
|
|
298
282
|
|
|
299
|
-
|
|
283
|
+
list:{attached_item:AttachedItem}[];
|
|
300
284
|
|
|
301
285
|
/**
|
|
302
|
-
* @description
|
|
303
|
-
|
|
304
|
-
The value set explicitly for `billing_cycles` while [applying the addon to a subscription](./subscriptions?prod_cat_ver=2#subscription_subscription_items) takes precedence over this parameter. This parameter, in turn, has a higher precedence than [the value set for the addon-item price](./item_prices?prod_cat_ver=2).
|
|
286
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
305
287
|
|
|
306
288
|
*/
|
|
307
289
|
|
|
308
|
-
|
|
309
|
-
|
|
290
|
+
next_offset?:string;
|
|
291
|
+
}
|
|
292
|
+
export interface ListInputParam {
|
|
293
|
+
[key : string]: any;
|
|
310
294
|
/**
|
|
311
|
-
* @description
|
|
295
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
312
296
|
|
|
313
297
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
298
|
+
|
|
299
|
+
limit?:number;
|
|
316
300
|
|
|
317
301
|
/**
|
|
318
|
-
* @description
|
|
302
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
319
303
|
|
|
320
304
|
*/
|
|
321
|
-
|
|
322
|
-
|
|
305
|
+
|
|
306
|
+
offset?:string;
|
|
323
307
|
|
|
324
308
|
/**
|
|
325
|
-
* @description
|
|
309
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
326
310
|
|
|
327
311
|
*/
|
|
312
|
+
|
|
313
|
+
id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
328
314
|
|
|
329
|
-
|
|
315
|
+
/**
|
|
316
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
317
|
+
|
|
318
|
+
*/
|
|
319
|
+
|
|
320
|
+
item_id?:{in?:string,is?:string,is_not?:string,not_in?:string,starts_with?:string};
|
|
330
321
|
|
|
331
322
|
/**
|
|
332
|
-
* @description
|
|
323
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
333
324
|
|
|
334
325
|
*/
|
|
326
|
+
|
|
327
|
+
type?:{in?:string,is?:'optional' | 'mandatory' | 'recommended',is_not?:'optional' | 'mandatory' | 'recommended',not_in?:string};
|
|
335
328
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
329
|
+
/**
|
|
330
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
331
|
+
|
|
332
|
+
*/
|
|
333
|
+
|
|
334
|
+
item_type?:{in?:string,is?:'charge' | 'addon' | 'plan',is_not?:'charge' | 'addon' | 'plan',not_in?:string};
|
|
342
335
|
|
|
343
336
|
/**
|
|
344
|
-
* @description
|
|
337
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
345
338
|
|
|
346
339
|
*/
|
|
340
|
+
|
|
341
|
+
charge_on_event?:{in?:string,is?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',is_not?:'subscription_creation' | 'subscription_activation' | 'subscription_trial_start' | 'contract_termination' | 'plan_activation' | 'on_demand',not_in?:string};
|
|
347
342
|
|
|
348
|
-
|
|
343
|
+
/**
|
|
344
|
+
* @description Returns a list of attached items satisfying **all** the conditions specified in the filter parameters below. The list is sorted by the date of creation in descending order (latest first).
|
|
345
|
+
|
|
346
|
+
*/
|
|
347
|
+
|
|
348
|
+
updated_at?:{after?:string,before?:string,between?:string,on?:string};
|
|
349
349
|
}
|
|
350
350
|
|
|
351
351
|
}
|