chargebee 2.17.0 → 2.19.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 +4 -4
- data/CHANGELOG.md +46 -1
- data/Gemfile +3 -0
- data/Gemfile.lock +55 -0
- data/chargebee.gemspec +5 -2
- data/lib/chargebee/models/credit_note.rb +1 -1
- data/lib/chargebee/models/credit_note_estimate.rb +1 -1
- data/lib/chargebee/models/customer.rb +1 -1
- data/lib/chargebee/models/in_app_subscription.rb +18 -0
- data/lib/chargebee/models/invoice.rb +2 -2
- data/lib/chargebee/models/invoice_estimate.rb +1 -1
- data/lib/chargebee/models/order.rb +1 -1
- data/lib/chargebee/models/quote.rb +2 -2
- data/lib/chargebee/models/quote_line_group.rb +1 -1
- data/lib/chargebee/models/quoted_charge.rb +1 -1
- data/lib/chargebee/models/quoted_subscription.rb +1 -1
- data/lib/chargebee/models/subscription.rb +12 -3
- data/lib/chargebee/models/subscription_estimate.rb +1 -1
- data/lib/chargebee/models/token.rb +1 -1
- data/lib/chargebee/models/transaction.rb +1 -1
- data/lib/chargebee/models/unbilled_charge.rb +2 -2
- data/lib/chargebee/result.rb +12 -1
- data/lib/chargebee.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18ef136d2026d74d5b20a00970b4b75fe659ee29
|
|
4
|
+
data.tar.gz: 0d763f180f2856ec9c9a28500c85e6e89074f056
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97c07fb3668490dec82f73640ae16cd12ccc77aaf23b3ca1dbad31cf3e410834e644aeae63c824a787e8c8ac1a57bcc183046a20e1a0b144fa5fdf857adb81dd
|
|
7
|
+
data.tar.gz: b3b2615fac6707599daf6cf4659b68cc05faf51391050ea8797b53effc28793a980084afa641a1ae1f897f5cf431c5b801fb8f06886edeaab7c5d9008c75ae35
|
data/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,49 @@
|
|
|
1
|
-
### v2.
|
|
1
|
+
### v2.19.0 (2022-09-20)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
#### New endpoints:
|
|
5
|
+
* subscriptions#list_discounts has been added to the subscriptions resource.
|
|
6
|
+
|
|
7
|
+
#### New attributes:
|
|
8
|
+
* billing_month has been added to the customer resource.
|
|
9
|
+
|
|
10
|
+
#### Added input parameters:
|
|
11
|
+
* billing_month has been added to the customers#change_billing_date API.
|
|
12
|
+
* line_items[subscription_id] has been added to the invoices#import_invoice API.
|
|
13
|
+
* layout has been added to hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items and hosted_pages#checkout_existing_for_items APIs.
|
|
14
|
+
* discounts[apply_on], discounts[percentage], discounts[amount] and discounts[item_price_id] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_onetime_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, invoices#create_for_charge_items_and_charges, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, quotes#create_for_charge_items_and_charges, quotes#edit_for_charge_items_and_charges, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
|
15
|
+
* discounts[duration_type], discounts[period], discounts[period_unit] and discounts[included_in_mrr] have been added to estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, hosted_pages#checkout_new_for_items, hosted_pages#checkout_existing_for_items, quotes#create_subscription_for_items, quotes#edit_create_subscription_quote_for_items, quotes#update_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
|
16
|
+
* discounts[operation_type] and discounts[id] have been added to estimates#update_subscription_for_items, quotes#update_subscription_quote_for_items, hosted_pages#checkout_existing_for_items, quotes#edit_update_subscription_quote_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items APIs.
|
|
17
|
+
|
|
18
|
+
#### New Enum values:
|
|
19
|
+
* global_payments has been added to gateway enum.
|
|
20
|
+
* layout enum has been added.
|
|
21
|
+
|
|
22
|
+
### v2.18.0 (2022-08-22)
|
|
23
|
+
* * *
|
|
24
|
+
|
|
25
|
+
#### Fixes:
|
|
26
|
+
* Added github action and gemlock files.
|
|
27
|
+
|
|
28
|
+
#### New endpoints:
|
|
29
|
+
* Purchase#Retrieve has been added to the Purchase resource.
|
|
30
|
+
|
|
31
|
+
#### New attributes:
|
|
32
|
+
* ResourceVersion has been added to the Token resource.
|
|
33
|
+
* UpdatedAt has been added to the Token and UnbilledCharge resources.
|
|
34
|
+
* ReferenceLineItemId has been added to the CreditNote#LineItem, CreditNoteEstimate#LineItem, Quote#LineItem, QuoteLineGroup#LineItem, InvoiceEstimate#LineItem and Invoice#LineItem subResources.
|
|
35
|
+
* Index has been added to the Order#ShippingAddress, Invoice#ShippingAddress, Quote#ShippingAddress, QuotedCharge#ItemTier, QuotedSubscription#ItemTier, Subscription#ItemTier, Subscription#ShippingAddress and SubscriptionEstimate#ShippingAddress subResources.
|
|
36
|
+
* VoidWithCreditNote has been added to the Invoice#VoidInvoiceRequest subresources.
|
|
37
|
+
* PaymentMethodDetails has been added to the Transaction resource.
|
|
38
|
+
|
|
39
|
+
#### New Resource:
|
|
40
|
+
* InAppSubscription have been added.
|
|
41
|
+
|
|
42
|
+
#### Removed input parameters:
|
|
43
|
+
* BusinessEntityId has been removed from Purchase#CreateRequest and Purchase#EstimateRequest.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### v2.17.0 (2022-07-08)
|
|
2
47
|
* * *
|
|
3
48
|
|
|
4
49
|
### Fixes:
|
data/Gemfile
ADDED
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.
|
|
8
|
-
s.date = '2022-
|
|
7
|
+
s.version = '2.19.0'
|
|
8
|
+
s.date = '2022-09-20'
|
|
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
|
|
@@ -40,7 +40,7 @@ module ChargeBee
|
|
|
40
40
|
attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
|
|
41
41
|
:offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
|
|
42
42
|
:is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
|
|
43
|
-
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
|
|
43
|
+
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_month, :billing_date_mode,
|
|
44
44
|
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :channel,
|
|
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,
|
|
@@ -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
|
|
@@ -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
|
|
@@ -41,6 +41,10 @@ module ChargeBee
|
|
|
41
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
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
class Discount < Model
|
|
45
|
+
attr_accessor :id, :invoice_name, :percentage, :amount, :currency_code, :period, :period_unit, :included_in_mrr, :item_price_id, :created_at, :apply_till, :applied_count, :coupon_id, :index
|
|
46
|
+
end
|
|
47
|
+
|
|
44
48
|
attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
|
|
45
49
|
:billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
|
|
46
50
|
:plan_quantity_in_decimal, :plan_unit_price_in_decimal, :customer_id, :plan_amount, :plan_free_quantity,
|
|
@@ -53,7 +57,8 @@ module ChargeBee
|
|
|
53
57
|
:due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
|
|
54
58
|
:event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
|
|
55
59
|
:invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term, :cancel_reason_code,
|
|
56
|
-
:free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :
|
|
60
|
+
:free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :discounts,
|
|
61
|
+
:business_entity_id
|
|
57
62
|
|
|
58
63
|
# OPERATIONS
|
|
59
64
|
#-----------
|
|
@@ -82,6 +87,10 @@ module ChargeBee
|
|
|
82
87
|
Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
|
|
83
88
|
end
|
|
84
89
|
|
|
90
|
+
def self.list_discounts(id, params={}, env=nil, headers={})
|
|
91
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers)
|
|
92
|
+
end
|
|
93
|
+
|
|
85
94
|
def self.retrieve(id, env=nil, headers={})
|
|
86
95
|
Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
|
|
87
96
|
end
|
|
@@ -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, :
|
|
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
|
#-----------
|
data/lib/chargebee/result.rb
CHANGED
|
@@ -7,7 +7,7 @@ module ChargeBee
|
|
|
7
7
|
|
|
8
8
|
def subscription()
|
|
9
9
|
subscription = get(:subscription, Subscription,
|
|
10
|
-
{:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :contract_term => Subscription::ContractTerm});
|
|
10
|
+
{:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount});
|
|
11
11
|
return subscription;
|
|
12
12
|
end
|
|
13
13
|
|
|
@@ -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
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.
|
|
4
|
+
version: 2.19.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-
|
|
12
|
+
date: 2022-09-20 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
|