chargebee 2.29.0 → 2.30.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ### v2.30.0 (2023-11-30)
2
+ * * *
3
+
4
+ #### New Enum values:
5
+ * swiss_reference has been added to PaymentReferenceNumber#TypeEnum.
6
+
7
+ #### New Input parameters:
8
+ * subscription[po_number] has been added to Quote#EditCreateSubForCustomerQuoteRequest in Quote resource.
9
+ * subscription[po_number] has been added to Quote#EditCreateSubCustomerQuoteForItemsRequest in Quote resource.
10
+
11
+ * * *
12
+
1
13
  ### v2.29.0 (2023-10-31)
2
14
  * * *
3
15
 
package/lib/chargebee.js CHANGED
@@ -11,7 +11,7 @@ ChargeBee._env = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: 80000,
14
- clientVersion: 'v2.29.0',
14
+ clientVersion: 'v2.30.0',
15
15
  port: 443,
16
16
  timemachineWaitInMillis: 3000,
17
17
  exportWaitInMillis: 3000
@@ -2608,13 +2608,6 @@ var _endpoints = {
2608
2608
  true
2609
2609
  ]
2610
2610
  ],
2611
- "non_subscription": [[
2612
- "process_receipt",
2613
- "POST",
2614
- "/non_subscriptions",
2615
- "/one_time_purchase",
2616
- true
2617
- ]],
2618
2611
  "entitlement_override": [
2619
2612
  [
2620
2613
  "add_entitlement_override_for_subscription",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"chargebee",
3
- "version":"2.29.0",
3
+ "version":"2.30.0",
4
4
  "description":"A library for integrating with ChargeBee.",
5
5
  "keywords":[
6
6
  "payments",
@@ -14,7 +14,7 @@ declare module 'chargebee' {
14
14
 
15
15
  */
16
16
 
17
- type:'frn' | 'kid' | 'fik' | 'ocr';
17
+ type:'frn' | 'kid' | 'fik' | 'swiss_reference' | 'ocr';
18
18
 
19
19
  /**
20
20
  * @description A number is generated based on the configuration type of the PRN during the invoice creation process.
@@ -547,7 +547,7 @@ Ireland** . The first two characters of the VAT number in such a case is `X
547
547
 
548
548
  */
549
549
 
550
- subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,start_date?:number,trial_end?:number};
550
+ subscription?:{contract_term_billing_cycle_on_renewal?:number,id?:string,po_number?:string,start_date?:number,trial_end?:number};
551
551
 
552
552
  /**
553
553
  * @description Parameters for shipping_address
@@ -86,120 +86,4 @@ declare module 'chargebee' {
86
86
 
87
87
  expired_at?:number;
88
88
  }
89
- export namespace Token {
90
- export class TokenResource {
91
- /**
92
- * @description Generate a token that holds card related information.
93
-
94
- */
95
-
96
- create_for_card(input?:CreateForCardInputParam):ChargebeeRequest<CreateForCardResponse>;
97
-
98
- /**
99
- * @description Generate a token using the one time token created by payment gateways for any specific payment method.
100
-
101
- */
102
-
103
- create_using_temp_token(input:CreateUsingTempTokenInputParam):ChargebeeRequest<CreateUsingTempTokenResponse>;
104
-
105
- /**
106
- * @description Retrieve a token using token ID.
107
-
108
- */
109
-
110
- retrieve(cb_token_id:string):ChargebeeRequest<RetrieveResponse>;
111
- }
112
- export interface CreateForCardResponse {
113
- token:Token;
114
- }
115
- export interface CreateForCardInputParam {
116
-
117
- /**
118
- * @description Parameters for card
119
-
120
- */
121
-
122
- card?:{additional_information?:object,billing_addr1?:string,billing_addr2?:string,billing_city?:string,billing_country?:string,billing_state?:string,billing_state_code?:string,billing_zip?:string,card_type?:'discover' | 'bancontact' | 'other' | 'visa' | 'jcb' | 'diners_club' | 'mastercard' | 'not_applicable' | 'american_express',cvv?:string,expiry_month:number,expiry_year:number,first_name?:string,gateway_account_id?:string,last_name?:string,number:string};
123
- }
124
- export interface CreateUsingTempTokenResponse {
125
- token:Token;
126
- }
127
- export interface CreateUsingTempTokenInputParam {
128
-
129
- /**
130
- * @description The gateway account to which the token is associated.
131
-
132
- */
133
-
134
- gateway_account_id?:string;
135
-
136
- /**
137
- * @description Type of payment method of the token. \* google_pay - Payments made via Google Pay. \* apple_pay - Payments made via Apple Pay. \* unionpay - Payments made via UnionPay. \* ideal - Payments made via iDEAL. \* amazon_payments - Payments made via Amazon Payments. \* bancontact - Payments made via Bancontact Card. \* netbanking_emandates - Netbanking (eMandates) Payments. \* alipay - Payments made via Alipay. \* card - Card based payment including credit cards and debit cards. Details about the card can be obtained from the card resource. \* dotpay - Payments made via Dotpay. \* giropay - Payments made via giropay. \* upi - UPI Payments. \* sofort - Payments made via Sofort. \* direct_debit - Represents bank account for which the direct debit or ACH agreement/mandate is created. \* generic - Payments made via Generic Payment Method. \* wechat_pay - Payments made via WeChat Pay. \* paypal_express_checkout - Payments made via PayPal Express Checkout.
138
-
139
- */
140
-
141
- payment_method_type:PaymentMethodType;
142
-
143
- /**
144
- * @description Single-use token created by payment gateways. In Stripe, a single-use token is created for Apple Pay Wallet, card details or direct debit. In Braintree, a nonce is created for Apple Pay Wallet, PayPal, or card details. In Authorize.net, a nonce is created for card details. In Adyen, an encrypted data is created from the card details.
145
-
146
- */
147
-
148
- id_at_vault:string;
149
-
150
- /**
151
- * @description Represents what type of object at gateway eg. &quot;token&quot; in case Stripe token and &quot;source&quot; in case of Stripe Source.
152
-
153
- */
154
-
155
- gw_obj_type?:string;
156
-
157
- /**
158
- * @description Used to derieve Bank Account Scheme by default will take site default currency.
159
-
160
- */
161
-
162
- currency_code?:string;
163
-
164
- /**
165
- * @description * &#x60;checkout_com&#x60;: While adding a new payment method using [permanent token](./payment_sources?#create_using_permanent_token) or passing raw card details to Checkout.com, &#x60;document&#x60; ID and &#x60;country_of_residence&#x60; are required to support payments through [dLocal](https://www.checkout.com/docs/previous/payments/payment-methods/cards/dlocal).
166
- * &#x60;payer&#x60;: User related information.
167
- * &#x60;country_of_residence&#x60;: This is required since the billing country associated with the user&#x27;s payment method may not be the same as their country of residence. Hence the user&#x27;s country of residence needs to be specified. The country code should be a [two-character ISO code](https://www.checkout.com/docs/developer-resources/testing/codes/country-codes).
168
- * &#x60;document&#x60;: Document ID is the user&#x27;s [identification number](https://docs.dlocal.com/reference/country-reference#documents) based on their country.
169
- * &#x60;bluesnap&#x60;: While passing raw card details to BlueSnap, if &#x60;fraud_session_id&#x60; is added, [additional validation](https://developers.bluesnap.com/reference/fraud-prevention) is performed to avoid fraudulent transactions.
170
- * &#x60;fraud&#x60;: Fraud identification related information.
171
- * &#x60;fraud_session_id&#x60;: Your [BlueSnap fraud session ID](https://developers.bluesnap.com/reference/fraud-prevention#section-implementing-device-data-collector) required to perform anti-fraud validation.
172
- * &#x60;braintree&#x60;: While passing raw card details to Braintree, your &#x60;fraud_merchant_id&#x60; and the user&#x27;s &#x60;device_session_id&#x60; can be added to perform [additional validation](https://developer.paypal.com/braintree/docs/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) and avoid fraudulent transactions.
173
- * &#x60;fraud&#x60;: Fraud identification related information.
174
- * &#x60;device_session_id&#x60;: Session ID associated with the user&#x27;s device.
175
- * &#x60;fraud_merchant_id&#x60;: Your [merchant ID](https://developer.paypal.com/braintree/docs/guides/premium-fraud-management-tools/device-data-collection/javascript/v3#collecting-device-data) for fraud detection.
176
- * &#x60;chargebee_payments&#x60;: While passing raw card details to Chargebee Payments, if &#x60;fraud_session_id&#x60; is added, additional validation is performed to avoid fraudulent transactions.
177
- * &#x60;fraud&#x60;: Fraud identification related information.
178
- * &#x60;fraud_session_id&#x60;: Your Chargebee Payments fraud session ID required to perform anti-fraud validation.
179
- .
180
-
181
- */
182
-
183
- additional_information?:object;
184
-
185
- /**
186
- * @description Parameters for token_additional_detail
187
-
188
- */
189
-
190
- token_additional_detail?:{expiry_month?:number,expiry_year?:number,first_name?:string,last_name?:string};
191
-
192
- /**
193
- * @description Parameters for token_billing_address
194
-
195
- */
196
-
197
- token_billing_address?:{city?:string,country_code?:string,line1?:string,line2?:string,state?:string,state_code?:string,zip?:string};
198
- }
199
- export interface RetrieveResponse {
200
- token:Token;
201
- }
202
-
203
-
204
- }
205
89
  }
@@ -1,33 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- declare module 'chargebee' {
3
- export interface Media {
4
-
5
- /**
6
- * @description The unique identifier for the media file. This is auto-generated by Chargebee.
7
-
8
- */
9
-
10
- id:string;
11
-
12
- /**
13
- * @description The public URL for accessing the media file. This is auto-generated by Chargebee.
14
-
15
- */
16
-
17
- url?:string;
18
-
19
- /**
20
- * @description The [alternative text](https://webaim.org/techniques/alttext/) for the image. Applicable only when the top-level &#x60;media_type&#x60; is &#x60;image&#x60;.
21
-
22
- */
23
-
24
- alt_text?:string;
25
-
26
- /**
27
- * @description The [media type](https://en.wikipedia.org/wiki/Media_type) of the file.
28
-
29
- */
30
-
31
- media_type?:string;
32
- }
33
- }
@@ -1,65 +0,0 @@
1
- ///<reference path='./../core.d.ts'/>
2
- declare module 'chargebee' {
3
- export interface NonSubscription {
4
-
5
- /**
6
- * @description The unique immutable identifier of the invoice imported in Chargebee for which the receipt was sent.
7
-
8
- */
9
-
10
- invoice_id:string;
11
-
12
- /**
13
- * @description The unique immutable identifier of the customer object to which the invoice belongs.
14
-
15
- */
16
-
17
- customer_id?:string;
18
-
19
- /**
20
- * @description The [&#x60;subscription_item.item_price_id&#x60;](https://apidocs.chargebee.com/docs/api/subscriptions?prod_cat_ver&#x3D;2#subscription_item_tiers_item_price_id) where the &#x60;item_type&#x60; is &#x60;charge&#x60;.
21
-
22
- */
23
-
24
- charge_id:string;
25
- }
26
- export namespace NonSubscription {
27
- export class NonSubscriptionResource {
28
- /**
29
- * @description This API is used to sync consumable, non-consumable, and non-renewing product payments in Chargebee.
30
-
31
- */
32
-
33
- process_receipt(non_subscription_app_id:string, input:ProcessReceiptInputParam):ChargebeeRequest<ProcessReceiptResponse>;
34
- }
35
- export interface ProcessReceiptResponse {
36
- non_subscription:NonSubscription;
37
- }
38
- export interface ProcessReceiptInputParam {
39
-
40
- /**
41
- * @description **Google Play Store** : The purchase &#x60;token&#x60; taken from the Android device after successful creation of the in-app purchase.
42
-
43
- **Apple App Store** : The Base64 encoded [App Store in-app purchase receipt](https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/validating_receipts_with_the_app_store?language&#x3D;objc#overview) taken from the Apple device after successful creation of the in-app purchase.
44
-
45
- */
46
-
47
- receipt:string;
48
-
49
- /**
50
- * @description Parameters for product
51
-
52
- */
53
-
54
- product?:{currency_code:string,id:string,name?:string,price:number,price_in_decimal?:string,type:'non_consumable' | 'consumable' | 'non_renewing_subscription'};
55
-
56
- /**
57
- * @description Parameters for customer
58
-
59
- */
60
-
61
- customer?:{email?:string,first_name?:string,id?:string,last_name?:string};
62
- }
63
-
64
- }
65
- }