chargebee 2.24.0 → 2.25.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a9362e4ef388e73d2664362adfc29ad58156c08
4
- data.tar.gz: 813149625fe51364a45da1c0e8fd97bd78ceb818
3
+ metadata.gz: 6802473f9e53098c12e06f210e96a9067fa92b23
4
+ data.tar.gz: fa7fdb9c0533e6c5d8751517fa26516bce474130
5
5
  SHA512:
6
- metadata.gz: 65f7645d7b39d76d4c234828616995ddb03159978a0cf542b2732cafb81dab70923ee50d41c1ac893294197faff4870a729191702ee9578f6d9ecaa21e662b44
7
- data.tar.gz: 90c6412b8612dd53ad6a1d4c7eb54a4da0067e81aacb6814531329c27ebdf82c03d50ec853c8f29e834e0a76802cb44f03455218bc72687c5a50b40902682dc6
6
+ metadata.gz: 8ed018f8398ebf065b7a25b92a70bf47bb0dd8a702ab85cc061ade52fd305155c10389fae40c043661e9bf8b1798a88d0b95a13384e090a954c1553021f94cb3
7
+ data.tar.gz: 9237adea2f062d4fad042d1c9dda997e8d621bbe2ea820132e313679746555fd73d090455d01bdce7da3e3f573d923cf4e20cfedcbbd70ab425a61bcaf39b320
data/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
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
+
1
30
  ### v2.24.0 (2023-03-24)
2
31
  * * *
3
32
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.24.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.24.0'
8
- s.date = '2023-03-24'
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
 
@@ -73,6 +73,7 @@ Gem::Specification.new do |s|
73
73
  lib/chargebee/models/item_family.rb
74
74
  lib/chargebee/models/item_price.rb
75
75
  lib/chargebee/models/model.rb
76
+ lib/chargebee/models/non_subscription.rb
76
77
  lib/chargebee/models/order.rb
77
78
  lib/chargebee/models/payment_intent.rb
78
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
  #-----------
@@ -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.24.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.24.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-03-24 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
@@ -149,6 +149,7 @@ files:
149
149
  - lib/chargebee/models/item_family.rb
150
150
  - lib/chargebee/models/item_price.rb
151
151
  - lib/chargebee/models/model.rb
152
+ - lib/chargebee/models/non_subscription.rb
152
153
  - lib/chargebee/models/order.rb
153
154
  - lib/chargebee/models/payment_intent.rb
154
155
  - lib/chargebee/models/payment_source.rb