chargebee 2.23.0 → 2.25.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a3b8e280cfa9e70dc97bb62beda8d83a508d6a3
4
- data.tar.gz: 5f4b6675e3acf83b23c50bd7a0d28ec6a8014dc2
3
+ metadata.gz: 6802473f9e53098c12e06f210e96a9067fa92b23
4
+ data.tar.gz: fa7fdb9c0533e6c5d8751517fa26516bce474130
5
5
  SHA512:
6
- metadata.gz: 4ab7cd552055af62a89b811f273b3277d68b0c7dcb08f590bfc0775756da0f6c56617095ebc32f7324a91dbf49d2fcc2fd843d4e446b680f581cf7c1d1f4856e
7
- data.tar.gz: 9a683cd77db7ffae024ec673cc050734c2cbb7cd862eaca9be9a3da6eab5652221473fc9d1a417a5a211620182a0b96aaf75b151655767fc7500bb18f597ec5c
6
+ metadata.gz: 8ed018f8398ebf065b7a25b92a70bf47bb0dd8a702ab85cc061ade52fd305155c10389fae40c043661e9bf8b1798a88d0b95a13384e090a954c1553021f94cb3
7
+ data.tar.gz: 9237adea2f062d4fad042d1c9dda997e8d621bbe2ea820132e313679746555fd73d090455d01bdce7da3e3f573d923cf4e20cfedcbbd70ab425a61bcaf39b320
data/CHANGELOG.md CHANGED
@@ -1,3 +1,61 @@
1
+ ### v2.25.0 (2023-04-28)
2
+ * * *
3
+
4
+ #### Fixes:
5
+ * SubscriptionId attribute has been maid as required in InAppSubscription resource.
6
+
7
+ #### New Attributes:
8
+ * TotalContractValueBeforeTax has been added to the ContractTerm resource.
9
+ * TotalContractValueBeforeTax#SubscriptionContractTerm has been added to the Subscription resource.
10
+ * TotalContractValueBeforeTax#SubscriptionEstimateContractTerm has been addded to the SubscriptionEstimate resource.
11
+ * CouponConstraints has been added to the Coupon resource.
12
+
13
+ #### New Resource:
14
+ * NonSubscription have been added.
15
+
16
+ #### Added Input Parameters:
17
+ * contract_term[total_amount_raised_before_tax]#ImportSubscriptionRequest, contract_term[total_amount_raised_before_tax]#ImportForItemsRequest, contract_term[total_amount_raised_before_tax]#ImportContractTermRequest and contract_term[total_amount_raised_before_tax]#ImportForCustomerRequest parameter has been added to Subscription resource.
18
+ * contract_term[total_contract_value_before_tax]#ImportContractTermRequest parameter has been added to Subscription resource.
19
+ * coupon_constraints[entity_type]#CreateForItemsRequestParams, coupon_constraints[type]#CreateForItemsRequestParams and coupon_constraints[value]#CreateForItemsRequestParams parameter has been added to the Coupon resource.
20
+ * coupon_constraints[entity_type]#UpdateForItemsRequestParams, coupon_constraints[type]#UpdateForItemsRequestParams and coupon_constraints[value]#UpdateForItemsRequestParams parameter has been added to the Coupon resource.
21
+ * export_type#CustomersRequest and export_type#SubscriptionsRequest parameter has been added to the Export resource.
22
+
23
+ #### New Enum Class:
24
+ * ExportType has been added.
25
+
26
+ #### New Enum values:
27
+ * pending_authorization has been added to StatusEnum#PaymentIntentPaymentAttempt to the PaymentIntent resource.
28
+
29
+
30
+ ### v2.24.0 (2023-03-24)
31
+ * * *
32
+
33
+ #### Fixes:
34
+ * Fixed list_discounts subscriptions API error.
35
+
36
+ #### New Attributes:
37
+ * Einvoice#reference_number has been added to the credit_note resource.
38
+ * Einvoice#reference_number has been added to the invoice resource.
39
+ * einvoicing_method has been added to the customer resource.
40
+ * store_status and invoice_id have been addded to the in_app_subscriptions resource.
41
+
42
+ #### Added Input Parameters:
43
+ * UpdateForItemsRequestParams#discount_quantity and UpdateRequestParams#discount_quantity parameter has been added to the coupon resource.
44
+ * UpdateBillingInfoRequestParams#einvoicing_method and CreateRequestParams#einvoicing_method parameter has been added to the customer resource.
45
+ * CreateCustomerParams#einvoicing_method , UpdateCustomerParams#einvoicing_metho and UpdateForItemsCustomerParams#einvoicing_method parameter has been added to the Subscription resource.
46
+ * CreateSubscriptionInfoParams#meta_data parameter has been added to the purchase resource.
47
+
48
+ #### New Endpoints:
49
+ * credit_note#send_einvoice has been added to the CreditNote resource.
50
+ * invoice#send_einvoice has been added to the Invoice resource.
51
+ * in_app_subscriptions#import_subscription and in_app_subscriptions#retrieve_store_subs requests have been added to the in_app_subscriptions resource.
52
+
53
+ #### New Enum Class:
54
+ * EinvoicingMethod has been added.
55
+ * StoreStatus has been added in in_app_subscriptions resource.
56
+
57
+
58
+
1
59
  ### v2.23.0 (2023-02-17)
2
60
  * * *
3
61
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.23.0)
4
+ chargebee (2.25.0)
5
5
  cgi (>= 0.1.0, < 1.0.0)
6
6
  json_pure (~> 2.1)
7
7
  rest-client (>= 1.8, <= 2.0.2)
data/chargebee.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
  s.required_ruby_version = '>= 1.9.3'
6
6
  s.name = 'chargebee'
7
- s.version = '2.23.0'
8
- s.date = '2023-02-17'
7
+ s.version = '2.25.0'
8
+ s.date = '2023-04-28'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
 
@@ -53,6 +53,7 @@ Gem::Specification.new do |s|
53
53
  lib/chargebee/models/credit_note_estimate.rb
54
54
  lib/chargebee/models/customer.rb
55
55
  lib/chargebee/models/differential_price.rb
56
+ lib/chargebee/models/discount.rb
56
57
  lib/chargebee/models/download.rb
57
58
  lib/chargebee/models/entitlement_override.rb
58
59
  lib/chargebee/models/estimate.rb
@@ -72,6 +73,7 @@ Gem::Specification.new do |s|
72
73
  lib/chargebee/models/item_family.rb
73
74
  lib/chargebee/models/item_price.rb
74
75
  lib/chargebee/models/model.rb
76
+ lib/chargebee/models/non_subscription.rb
75
77
  lib/chargebee/models/order.rb
76
78
  lib/chargebee/models/payment_intent.rb
77
79
  lib/chargebee/models/payment_source.rb
@@ -2,7 +2,8 @@ module ChargeBee
2
2
  class ContractTerm < Model
3
3
 
4
4
  attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end,
5
- :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
5
+ :total_contract_value, :total_contract_value_before_tax, :cancellation_cutoff_period, :created_at,
6
+ :subscription_id, :remaining_billing_cycles
6
7
 
7
8
  # OPERATIONS
8
9
  #-----------
@@ -9,11 +9,15 @@ module ChargeBee
9
9
  attr_accessor :item_type, :currencies, :item_family_ids, :item_price_periods
10
10
  end
11
11
 
12
+ class CouponConstraint < Model
13
+ attr_accessor :entity_type, :type, :value
14
+ end
15
+
12
16
  attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
13
17
  :discount_quantity, :currency_code, :duration_type, :duration_month, :valid_till, :max_redemptions,
14
18
  :status, :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
15
19
  :resource_version, :updated_at, :included_in_mrr, :period, :period_unit, :plan_ids, :addon_ids,
16
- :item_constraints, :item_constraint_criteria, :redemptions, :invoice_notes, :meta_data
20
+ :item_constraints, :item_constraint_criteria, :redemptions, :invoice_notes, :meta_data, :coupon_constraints
17
21
 
18
22
  # OPERATIONS
19
23
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNote < Model
3
3
 
4
4
  class Einvoice < Model
5
- attr_accessor :id, :status, :message
5
+ attr_accessor :id, :reference_number, :status, :message
6
6
  end
7
7
 
8
8
  class LineItem < Model
@@ -104,6 +104,10 @@ module ChargeBee
104
104
  Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers)
105
105
  end
106
106
 
107
+ def self.send_einvoice(id, env=nil, headers={})
108
+ Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers)
109
+ end
110
+
107
111
  def self.import_credit_note(params, env=nil, headers={})
108
112
  Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers)
109
113
  end
@@ -45,8 +45,8 @@ module ChargeBee
45
45
  :card_status, :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address,
46
46
  :referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id, :preferred_currency_code,
47
47
  :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments, :balances, :entity_identifiers,
48
- :is_einvoice_enabled, :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing, :customer_type,
49
- :business_customer_without_vat_number, :client_profile_id, :relationship, :use_default_hierarchy_settings,
48
+ :is_einvoice_enabled, :einvoicing_method, :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing,
49
+ :customer_type, :business_customer_without_vat_number, :client_profile_id, :relationship, :use_default_hierarchy_settings,
50
50
  :parent_account_access, :child_account_access, :vat_number_prefix, :entity_identifier_scheme,
51
51
  :entity_identifier_standard
52
52
 
@@ -0,0 +1,12 @@
1
+ module ChargeBee
2
+ class Discount < Model
3
+
4
+ attr_accessor :id, :invoice_name, :type, :percentage, :amount, :currency_code, :duration_type,
5
+ :period, :period_unit, :included_in_mrr, :apply_on, :item_price_id, :created_at, :apply_till,
6
+ :applied_count, :coupon_id, :index
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ end # ~Discount
12
+ end # ~ChargeBee
@@ -1,7 +1,7 @@
1
1
  module ChargeBee
2
2
  class InAppSubscription < Model
3
3
 
4
- attr_accessor :app_id, :subscription_id, :customer_id, :plan_id
4
+ attr_accessor :app_id, :subscription_id, :customer_id, :plan_id, :store_status, :invoice_id
5
5
 
6
6
  # OPERATIONS
7
7
  #-----------
@@ -14,5 +14,13 @@ module ChargeBee
14
14
  Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_receipt"), params, env, headers)
15
15
  end
16
16
 
17
+ def self.import_subscription(id, params, env=nil, headers={})
18
+ Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_subscription"), params, env, headers)
19
+ end
20
+
21
+ def self.retrieve_store_subs(id, params, env=nil, headers={})
22
+ Request.send('post', uri_path("in_app_subscriptions",id.to_s,"retrieve"), params, env, headers)
23
+ end
24
+
17
25
  end # ~InAppSubscription
18
26
  end # ~ChargeBee
@@ -62,7 +62,7 @@ module ChargeBee
62
62
  end
63
63
 
64
64
  class Einvoice < Model
65
- attr_accessor :id, :status, :message
65
+ attr_accessor :id, :reference_number, :status, :message
66
66
  end
67
67
 
68
68
  attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
@@ -215,5 +215,9 @@ module ChargeBee
215
215
  Request.send('post', uri_path("invoices",id.to_s,"resend_einvoice"), {}, env, headers)
216
216
  end
217
217
 
218
+ def self.send_einvoice(id, env=nil, headers={})
219
+ Request.send('post', uri_path("invoices",id.to_s,"send_einvoice"), {}, env, headers)
220
+ end
221
+
218
222
  end # ~Invoice
219
223
  end # ~ChargeBee
@@ -0,0 +1,14 @@
1
+ module ChargeBee
2
+ class NonSubscription < Model
3
+
4
+ attr_accessor :app_id, :invoice_id, :customer_id, :charge_id
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ def self.process_receipt(id, params, env=nil, headers={})
10
+ Request.send('post', uri_path("non_subscriptions",id.to_s,"one_time_purchase"), params, env, headers)
11
+ end
12
+
13
+ end # ~NonSubscription
14
+ end # ~ChargeBee
@@ -38,7 +38,7 @@ module ChargeBee
38
38
  end
39
39
 
40
40
  class ContractTerm < Model
41
- attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
41
+ attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :total_contract_value_before_tax, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
42
42
  end
43
43
 
44
44
  class Discount < Model
@@ -5,8 +5,8 @@ module ChargeBee
5
5
  attr_accessor :entitlement_overrides
6
6
  end
7
7
 
8
- attr_accessor :id, :subscription_id, :feature_id, :feature_name, :feature_unit, :value, :name,
9
- :is_overridden, :is_enabled, :expires_at, :components
8
+ attr_accessor :subscription_id, :feature_id, :feature_name, :feature_unit, :value, :name, :is_overridden,
9
+ :is_enabled, :expires_at, :components
10
10
 
11
11
  # OPERATIONS
12
12
  #-----------
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  class ContractTerm < Model
9
- attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
9
+ attr_accessor :id, :status, :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :total_contract_value_before_tax, :cancellation_cutoff_period, :created_at, :subscription_id, :remaining_billing_cycles
10
10
  end
11
11
 
12
12
  attr_accessor :id, :currency_code, :status, :trial_end_action, :next_billing_at, :pause_date,
@@ -178,7 +178,7 @@ module ChargeBee
178
178
 
179
179
  def coupon()
180
180
  coupon = get(:coupon, Coupon,
181
- {:item_constraints => Coupon::ItemConstraint, :item_constraint_criteria => Coupon::ItemConstraintCriteria});
181
+ {:item_constraints => Coupon::ItemConstraint, :item_constraint_criteria => Coupon::ItemConstraintCriteria, :coupon_constraints => Coupon::CouponConstraint});
182
182
  return coupon;
183
183
  end
184
184
 
@@ -313,6 +313,11 @@ module ChargeBee
313
313
  return in_app_subscription;
314
314
  end
315
315
 
316
+ def non_subscription()
317
+ non_subscription = get(:non_subscription, NonSubscription);
318
+ return non_subscription;
319
+ end
320
+
316
321
  def entitlement_override()
317
322
  entitlement_override = get(:entitlement_override, EntitlementOverride);
318
323
  return entitlement_override;
data/lib/chargebee.rb CHANGED
@@ -68,7 +68,7 @@ require File.dirname(__FILE__) + '/chargebee/models/token.rb'
68
68
 
69
69
  module ChargeBee
70
70
 
71
- VERSION = '2.23.0'
71
+ VERSION = '2.25.0'
72
72
 
73
73
  @@default_env = nil
74
74
  @@verify_ca_certs = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chargebee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-02-17 00:00:00.000000000 Z
12
+ date: 2023-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -129,6 +129,7 @@ files:
129
129
  - lib/chargebee/models/credit_note_estimate.rb
130
130
  - lib/chargebee/models/customer.rb
131
131
  - lib/chargebee/models/differential_price.rb
132
+ - lib/chargebee/models/discount.rb
132
133
  - lib/chargebee/models/download.rb
133
134
  - lib/chargebee/models/entitlement_override.rb
134
135
  - lib/chargebee/models/estimate.rb
@@ -148,6 +149,7 @@ files:
148
149
  - lib/chargebee/models/item_family.rb
149
150
  - lib/chargebee/models/item_price.rb
150
151
  - lib/chargebee/models/model.rb
152
+ - lib/chargebee/models/non_subscription.rb
151
153
  - lib/chargebee/models/order.rb
152
154
  - lib/chargebee/models/payment_intent.rb
153
155
  - lib/chargebee/models/payment_source.rb