chargebee 2.17.0 → 2.18.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: 65e6e95db66864efd299e96eda68304c07b587fb
4
- data.tar.gz: 2ef8f249d2f102e142f6c4fa7b562b53be51f318
3
+ metadata.gz: 6994e13a91dc47bbf3f63735c34c9839f2eb1fcb
4
+ data.tar.gz: 6cb09f1f4aa27f72fe79dec482a8e52300061feb
5
5
  SHA512:
6
- metadata.gz: 40fa38ae24cba51b64b07a3daa2626bc599efbe04c18258ce81c607aeec5205cede94f2094a3e4998dabe2643c4f31954fa7918c32c65e1bf8cd9b5f4a2d10ce
7
- data.tar.gz: b6c913a7f1c9f42c2c6806ac2164bc6113888501a28edb928b29d220dfbdb2d6e191c36c533ca03a67c82d46ad10db815bcd90bac6a05eb468cce6c9bcf5fe12
6
+ metadata.gz: 4c777678c1172b1c629af82a8594424c5ce06d247bb4e0e6bc2516433102a113012d8d647b107f683aa7991534f4165a0758f15126e606d072aa67d9ad6808d9
7
+ data.tar.gz: 7cde013c7dc67ef27afe0e9e2aa5e6412803798fa8f5f68a6bf7c8c45215650ce191b986e5f923933997246c16919c3f2ab589bcc3bc1aac9b0c5d631d7e4589
data/CHANGELOG.md CHANGED
@@ -1,4 +1,28 @@
1
- ### v2.17.0 (2022-07-18)
1
+ ### v2.18.0 (2022-08-22)
2
+ * * *
3
+
4
+ #### Fixes:
5
+ * Added github action and gemlock files.
6
+
7
+ #### New endpoints:
8
+ * Purchase#Retrieve has been added to the Purchase resource.
9
+
10
+ #### New attributes:
11
+ * ResourceVersion has been added to the Token resource.
12
+ * UpdatedAt has been added to the Token and UnbilledCharge resources.
13
+ * ReferenceLineItemId has been added to the CreditNote#LineItem, CreditNoteEstimate#LineItem, Quote#LineItem, QuoteLineGroup#LineItem, InvoiceEstimate#LineItem and Invoice#LineItem subResources.
14
+ * Index has been added to the Order#ShippingAddress, Invoice#ShippingAddress, Quote#ShippingAddress, QuotedCharge#ItemTier, QuotedSubscription#ItemTier, Subscription#ItemTier, Subscription#ShippingAddress and SubscriptionEstimate#ShippingAddress subResources.
15
+ * VoidWithCreditNote has been added to the Invoice#VoidInvoiceRequest subresources.
16
+ * PaymentMethodDetails has been added to the Transaction resource.
17
+
18
+ #### New Resource:
19
+ * InAppSubscription have been added.
20
+
21
+ #### Removed input parameters:
22
+ * BusinessEntityId has been removed from Purchase#CreateRequest and Purchase#EstimateRequest.
23
+
24
+
25
+ ### v2.17.0 (2022-07-08)
2
26
  * * *
3
27
 
4
28
  ### Fixes:
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,55 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ chargebee (2.18.0)
5
+ cgi (>= 0.1.0, < 1.0.0)
6
+ json_pure (~> 2.1)
7
+ rest-client (>= 1.8, <= 2.0.2)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ cgi (0.3.2)
13
+ diff-lcs (1.4.4)
14
+ domain_name (0.5.20190701)
15
+ unf (>= 0.0.5, < 1.0.0)
16
+ http-cookie (1.0.5)
17
+ domain_name (~> 0.5)
18
+ json_pure (2.6.2)
19
+ mime-types (3.4.1)
20
+ mime-types-data (~> 3.2015)
21
+ mime-types-data (3.2022.0105)
22
+ mocha (1.13.0)
23
+ netrc (0.11.0)
24
+ rest-client (2.0.2)
25
+ http-cookie (>= 1.0.2, < 2.0)
26
+ mime-types (>= 1.16, < 4.0)
27
+ netrc (~> 0.8)
28
+ rspec (3.0.0)
29
+ rspec-core (~> 3.0.0)
30
+ rspec-expectations (~> 3.0.0)
31
+ rspec-mocks (~> 3.0.0)
32
+ rspec-core (3.0.4)
33
+ rspec-support (~> 3.0.0)
34
+ rspec-expectations (3.0.4)
35
+ diff-lcs (>= 1.2.0, < 2.0)
36
+ rspec-support (~> 3.0.0)
37
+ rspec-mocks (3.0.4)
38
+ rspec-support (~> 3.0.0)
39
+ rspec-support (3.0.4)
40
+ unf (0.1.4)
41
+ unf_ext
42
+ unf_ext (0.0.8.2)
43
+
44
+ PLATFORMS
45
+ arm64-darwin-21
46
+ x86_64-darwin-20
47
+ x86_64-linux
48
+
49
+ DEPENDENCIES
50
+ chargebee!
51
+ mocha
52
+ rspec (~> 3.0.0)
53
+
54
+ BUNDLED WITH
55
+ 2.3.17
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.17.0'
8
- s.date = '2022-07-18'
7
+ s.version = '2.18.0'
8
+ s.date = '2022-08-22'
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
 
@@ -28,6 +28,8 @@ Gem::Specification.new do |s|
28
28
  # = MANIFEST =
29
29
  s.files = %w[
30
30
  CHANGELOG.md
31
+ Gemfile
32
+ Gemfile.lock
31
33
  LICENSE
32
34
  README.rdoc
33
35
  Rakefile
@@ -62,6 +64,7 @@ Gem::Specification.new do |s|
62
64
  lib/chargebee/models/hosted_page.rb
63
65
  lib/chargebee/models/impacted_item.rb
64
66
  lib/chargebee/models/impacted_subscription.rb
67
+ lib/chargebee/models/in_app_subscription.rb
65
68
  lib/chargebee/models/invoice.rb
66
69
  lib/chargebee/models/invoice_estimate.rb
67
70
  lib/chargebee/models/item.rb
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  class LineItem < Model
9
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
9
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
10
10
  end
11
11
 
12
12
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNoteEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -0,0 +1,18 @@
1
+ module ChargeBee
2
+ class InAppSubscription < Model
3
+
4
+ attr_accessor :app_id, :subscription_id, :customer_id, :plan_id
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ def self.process_receipt(id, params, env=nil, headers={})
10
+ Request.send('post', uri_path("in_app_subscriptions",id.to_s,"process_purchase_command"), params, env, headers)
11
+ end
12
+
13
+ def self.import_receipt(id, params, env=nil, headers={})
14
+ Request.send('post', uri_path("in_app_subscriptions",id.to_s,"import_receipt"), params, env, headers)
15
+ end
16
+
17
+ end # ~InAppSubscription
18
+ end # ~ChargeBee
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Invoice < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -54,7 +54,7 @@ module ChargeBee
54
54
  end
55
55
 
56
56
  class ShippingAddress < Model
57
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
57
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
58
58
  end
59
59
 
60
60
  class BillingAddress < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class InvoiceEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  class ShippingAddress < Model
9
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
9
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
10
10
  end
11
11
 
12
12
  class BillingAddress < Model
@@ -10,6 +10,10 @@ module ChargeBee
10
10
  Request.send('post', uri_path("purchases"), params, env, headers)
11
11
  end
12
12
 
13
+ def self.retrieve(id, env=nil, headers={})
14
+ Request.send('get', uri_path("purchases",id.to_s), {}, env, headers)
15
+ end
16
+
13
17
  def self.estimate(params, env=nil, headers={})
14
18
  Request.send('post', uri_path("purchases","estimate"), params, env, headers)
15
19
  end
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Quote < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -26,7 +26,7 @@ module ChargeBee
26
26
  end
27
27
 
28
28
  class ShippingAddress < Model
29
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
29
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
30
30
  end
31
31
 
32
32
  class BillingAddress < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class QuoteLineGroup < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class ItemTier < Model
17
- attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
17
+ attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal, :index
18
18
  end
19
19
 
20
20
  class Coupon < Model
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class ItemTier < Model
21
- attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
21
+ attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal, :index
22
22
  end
23
23
 
24
24
  class QuotedContractTerm < Model
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  class ItemTier < Model
9
- attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
9
+ attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal, :index
10
10
  end
11
11
 
12
12
  class ChargedItem < Model
@@ -30,7 +30,7 @@ module ChargeBee
30
30
  end
31
31
 
32
32
  class ShippingAddress < Model
33
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
33
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
34
34
  end
35
35
 
36
36
  class ReferralInfo < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class SubscriptionEstimate < Model
3
3
 
4
4
  class ShippingAddress < Model
5
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
5
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status, :index
6
6
  end
7
7
 
8
8
  class ContractTerm < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Token < Model
3
3
 
4
4
  attr_accessor :id, :gateway, :gateway_account_id, :payment_method_type, :status, :id_at_vault,
5
- :vault, :ip_address, :created_at, :expired_at
5
+ :vault, :ip_address, :resource_version, :updated_at, :created_at, :expired_at
6
6
 
7
7
  # OPERATIONS
8
8
  #-----------
@@ -23,7 +23,7 @@ module ChargeBee
23
23
  :error_code, :error_text, :voided_at, :resource_version, :updated_at, :fraud_reason, :amount_unused,
24
24
  :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
25
25
  :amount_capturable, :reversal_transaction_id, :linked_invoices, :linked_credit_notes, :linked_refunds,
26
- :linked_payments, :deleted, :iin, :last4, :merchant_reference_id, :business_entity_id
26
+ :linked_payments, :deleted, :iin, :last4, :merchant_reference_id, :business_entity_id, :payment_method_details
27
27
 
28
28
  # OPERATIONS
29
29
  #-----------
@@ -7,8 +7,8 @@ module ChargeBee
7
7
 
8
8
  attr_accessor :id, :customer_id, :subscription_id, :date_from, :date_to, :unit_amount, :pricing_model,
9
9
  :quantity, :amount, :currency_code, :discount_amount, :description, :entity_type, :entity_id,
10
- :is_voided, :voided_at, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :tiers,
11
- :deleted
10
+ :is_voided, :voided_at, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :updated_at,
11
+ :tiers, :deleted
12
12
 
13
13
  # OPERATIONS
14
14
  #-----------
@@ -303,6 +303,11 @@ module ChargeBee
303
303
  return item_entitlement;
304
304
  end
305
305
 
306
+ def in_app_subscription()
307
+ in_app_subscription = get(:in_app_subscription, InAppSubscription);
308
+ return in_app_subscription;
309
+ end
310
+
306
311
  def entitlement_override()
307
312
  entitlement_override = get(:entitlement_override, EntitlementOverride);
308
313
  return entitlement_override;
@@ -356,6 +361,12 @@ module ChargeBee
356
361
  return differential_prices;
357
362
  end
358
363
 
364
+ def in_app_subscriptions()
365
+ in_app_subscriptions = get_list(:in_app_subscriptions, InAppSubscription,
366
+ {});
367
+ return in_app_subscriptions;
368
+ end
369
+
359
370
 
360
371
  def to_s(*args)
361
372
  JSON.pretty_generate(@response)
data/lib/chargebee.rb CHANGED
@@ -53,7 +53,7 @@ require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
53
53
 
54
54
  module ChargeBee
55
55
 
56
- VERSION = '2.17.0'
56
+ VERSION = '2.18.0'
57
57
 
58
58
  @@default_env = nil
59
59
  @@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.17.0
4
+ version: 2.18.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: 2022-07-18 00:00:00.000000000 Z
12
+ date: 2022-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -104,6 +104,8 @@ extra_rdoc_files:
104
104
  - LICENSE
105
105
  files:
106
106
  - CHANGELOG.md
107
+ - Gemfile
108
+ - Gemfile.lock
107
109
  - LICENSE
108
110
  - README.rdoc
109
111
  - Rakefile
@@ -138,6 +140,7 @@ files:
138
140
  - lib/chargebee/models/hosted_page.rb
139
141
  - lib/chargebee/models/impacted_item.rb
140
142
  - lib/chargebee/models/impacted_subscription.rb
143
+ - lib/chargebee/models/in_app_subscription.rb
141
144
  - lib/chargebee/models/invoice.rb
142
145
  - lib/chargebee/models/invoice_estimate.rb
143
146
  - lib/chargebee/models/item.rb