chargebee 2.15.0 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +72 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +55 -0
- data/chargebee.gemspec +12 -2
- data/lib/chargebee/models/addon.rb +1 -1
- data/lib/chargebee/models/credit_note.rb +8 -3
- data/lib/chargebee/models/credit_note_estimate.rb +2 -2
- data/lib/chargebee/models/customer.rb +6 -5
- data/lib/chargebee/models/entitlement_override.rb +18 -0
- data/lib/chargebee/models/estimate.rb +2 -2
- data/lib/chargebee/models/feature.rb +47 -0
- data/lib/chargebee/models/hosted_page.rb +6 -2
- data/lib/chargebee/models/impacted_item.rb +14 -0
- data/lib/chargebee/models/impacted_subscription.rb +14 -0
- data/lib/chargebee/models/in_app_subscription.rb +18 -0
- data/lib/chargebee/models/invoice.rb +12 -4
- data/lib/chargebee/models/invoice_estimate.rb +2 -2
- data/lib/chargebee/models/item_entitlement.rb +26 -0
- data/lib/chargebee/models/order.rb +1 -1
- data/lib/chargebee/models/payment_intent.rb +1 -1
- data/lib/chargebee/models/payment_source.rb +1 -1
- data/lib/chargebee/models/plan.rb +1 -1
- data/lib/chargebee/models/purchase.rb +22 -0
- data/lib/chargebee/models/quote.rb +4 -4
- data/lib/chargebee/models/quote_line_group.rb +2 -2
- data/lib/chargebee/models/quoted_charge.rb +1 -1
- data/lib/chargebee/models/quoted_subscription.rb +1 -1
- data/lib/chargebee/models/subscription.rb +3 -3
- data/lib/chargebee/models/subscription_entitlement.rb +23 -0
- 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 +53 -1
- data/lib/chargebee.rb +1 -1
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6994e13a91dc47bbf3f63735c34c9839f2eb1fcb
|
4
|
+
data.tar.gz: 6cb09f1f4aa27f72fe79dec482a8e52300061feb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c777678c1172b1c629af82a8594424c5ce06d247bb4e0e6bc2516433102a113012d8d647b107f683aa7991534f4165a0758f15126e606d072aa67d9ad6808d9
|
7
|
+
data.tar.gz: 7cde013c7dc67ef27afe0e9e2aa5e6412803798fa8f5f68a6bf7c8c45215650ce191b986e5f923933997246c16919c3f2ab589bcc3bc1aac9b0c5d631d7e4589
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,75 @@
|
|
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)
|
26
|
+
* * *
|
27
|
+
|
28
|
+
### Fixes:
|
29
|
+
* Fixed Status Enum related issues
|
30
|
+
* Fixed EmbeddedResource related issues
|
31
|
+
|
32
|
+
#### New endpoints:
|
33
|
+
* hostedpage#PreCancel has been added to the hostedpage resource.
|
34
|
+
|
35
|
+
#### New attributes:
|
36
|
+
* business_entity_id have been added to the CreditNote, Customer,HostedPage, Invoice, PaymentIntent, Quote, Subscription and Transaction resources.
|
37
|
+
* coupon_set_code have been added to the CreditNote, CreditNoteEstimate, Invoice, InvoiceEstimate, Quote and QuoteLineGroup resources.
|
38
|
+
* List of SubscriptionEstimate have been added to Estimate resource.
|
39
|
+
|
40
|
+
#### New Resource:
|
41
|
+
* ImpactedSubscription, ImpactedItem, Purchase have been added.
|
42
|
+
|
43
|
+
#### New Enum values:
|
44
|
+
* direct_debit has been added to payment_method_type enum.
|
45
|
+
* bancontact, not_applicable added to payment_source_card_brand enum.
|
46
|
+
* business_entity added to entity_type Enum
|
47
|
+
* business_entity_created, business_entity_updated, business_entity_deleted, purchase_created added to event_type Enum
|
48
|
+
* chargebee_payments added to gateway Enum
|
49
|
+
|
50
|
+
|
51
|
+
### v2.16.0 (2022-05-23)
|
52
|
+
* * *
|
53
|
+
|
54
|
+
#### New endpoints:
|
55
|
+
* invoice#sync_usages and invoice#resend_einvoice have been added to the invoice resource.
|
56
|
+
* credit_notes#resend_einvoice has been added to the credit_notes resource.
|
57
|
+
* features#list_features, features#create_a_feature, features#update_a_feature, features#retrieve_a_feature, features#delete_a_feature, features#activate_a_feature, features#archive_a_feature and features#reactivate_a_feature have been added to the features resource.
|
58
|
+
* subscription_entitlements#subscription_entitlements_for_subscription and subscription_entitlements#set_subscription_entitlement_availability have been added to the subscription_entitlements resource.
|
59
|
+
* item_entitlements#item_entitlements_for_an_item, item_entitlements#item_entitlements_for_a_feature, item_entitlements#add_an_item_entitlements and item_entitlements#upsert_or_remove_an_item_entitlements_for_item have been added to the item_entitlements resource.
|
60
|
+
* entitlement_overrides#add_entitlement_override_for_a_subscription and entitlement_overrides#list_entitlement_override_for_a_subscription have been added to the entitlement_overrides resource.
|
61
|
+
|
62
|
+
#### New Resource:
|
63
|
+
* features, subscription_entitlements, item_entitlements and entitlement_overrides have been added.
|
64
|
+
|
65
|
+
#### New filter parameters:
|
66
|
+
* einvoice[status] filter parameter has been added in credit_notes#list_credit_notes api.
|
67
|
+
|
68
|
+
#### New Enum values:
|
69
|
+
* paypal_express_checkout has been added to payment_method_type enum.
|
70
|
+
* feature_created, feature_updated, feature_deleted, feature_activated, feature_reactivated, feature_archived, item_entitlements_updated, entitlement_overrides_updated, entitlement_overrides_removed, item_entitlements_removed and entitlement_overrides_auto_removed have been added to the event_type enum.
|
71
|
+
* action enum has been added.
|
72
|
+
|
1
73
|
### v2.15.0 (2022-04-25)
|
2
74
|
* * *
|
3
75
|
|
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.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
|
@@ -52,15 +54,21 @@ Gem::Specification.new do |s|
|
|
52
54
|
lib/chargebee/models/customer.rb
|
53
55
|
lib/chargebee/models/differential_price.rb
|
54
56
|
lib/chargebee/models/download.rb
|
57
|
+
lib/chargebee/models/entitlement_override.rb
|
55
58
|
lib/chargebee/models/estimate.rb
|
56
59
|
lib/chargebee/models/event.rb
|
57
60
|
lib/chargebee/models/export.rb
|
61
|
+
lib/chargebee/models/feature.rb
|
58
62
|
lib/chargebee/models/gift.rb
|
59
63
|
lib/chargebee/models/hierarchy.rb
|
60
64
|
lib/chargebee/models/hosted_page.rb
|
65
|
+
lib/chargebee/models/impacted_item.rb
|
66
|
+
lib/chargebee/models/impacted_subscription.rb
|
67
|
+
lib/chargebee/models/in_app_subscription.rb
|
61
68
|
lib/chargebee/models/invoice.rb
|
62
69
|
lib/chargebee/models/invoice_estimate.rb
|
63
70
|
lib/chargebee/models/item.rb
|
71
|
+
lib/chargebee/models/item_entitlement.rb
|
64
72
|
lib/chargebee/models/item_family.rb
|
65
73
|
lib/chargebee/models/item_price.rb
|
66
74
|
lib/chargebee/models/model.rb
|
@@ -70,6 +78,7 @@ Gem::Specification.new do |s|
|
|
70
78
|
lib/chargebee/models/plan.rb
|
71
79
|
lib/chargebee/models/portal_session.rb
|
72
80
|
lib/chargebee/models/promotional_credit.rb
|
81
|
+
lib/chargebee/models/purchase.rb
|
73
82
|
lib/chargebee/models/quote.rb
|
74
83
|
lib/chargebee/models/quote_line_group.rb
|
75
84
|
lib/chargebee/models/quoted_charge.rb
|
@@ -77,6 +86,7 @@ Gem::Specification.new do |s|
|
|
77
86
|
lib/chargebee/models/resource_migration.rb
|
78
87
|
lib/chargebee/models/site_migration_detail.rb
|
79
88
|
lib/chargebee/models/subscription.rb
|
89
|
+
lib/chargebee/models/subscription_entitlement.rb
|
80
90
|
lib/chargebee/models/subscription_estimate.rb
|
81
91
|
lib/chargebee/models/tax_withheld.rb
|
82
92
|
lib/chargebee/models/third_party_payment_method.rb
|
@@ -20,7 +20,7 @@ module ChargeBee
|
|
20
20
|
Request.send('post', uri_path("addons"), params, env, headers)
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.update(id, params
|
23
|
+
def self.update(id, params, env=nil, headers={})
|
24
24
|
Request.send('post', uri_path("addons",id.to_s), params, env, headers)
|
25
25
|
end
|
26
26
|
|
@@ -6,11 +6,11 @@ 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
|
13
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
13
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
14
14
|
end
|
15
15
|
|
16
16
|
class LineItemDiscount < Model
|
@@ -42,7 +42,8 @@ module ChargeBee
|
|
42
42
|
:amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
|
43
43
|
:channel, :einvoice, :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code,
|
44
44
|
:round_off_amount, :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers,
|
45
|
-
:taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :create_reason_code, :vat_number_prefix
|
45
|
+
:taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :create_reason_code, :vat_number_prefix,
|
46
|
+
:business_entity_id
|
46
47
|
|
47
48
|
# OPERATIONS
|
48
49
|
#-----------
|
@@ -87,5 +88,9 @@ module ChargeBee
|
|
87
88
|
Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers)
|
88
89
|
end
|
89
90
|
|
91
|
+
def self.resend_einvoice(id, env=nil, headers={})
|
92
|
+
Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers)
|
93
|
+
end
|
94
|
+
|
90
95
|
end # ~CreditNote
|
91
96
|
end # ~ChargeBee
|
@@ -2,11 +2,11 @@ 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
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class Tax < Model
|
@@ -43,11 +43,12 @@ module ChargeBee
|
|
43
43
|
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :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
|
-
:referral_urls, :contacts, :payment_method, :invoice_notes, :
|
47
|
-
:unbilled_charges, :refundable_credits, :excess_payments, :balances, :entity_identifiers,
|
48
|
-
:meta_data, :deleted, :registered_for_gst, :consolidated_invoicing, :customer_type,
|
49
|
-
:client_profile_id, :relationship, :use_default_hierarchy_settings,
|
50
|
-
:child_account_access, :vat_number_prefix, :entity_identifier_scheme,
|
46
|
+
:referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id, :preferred_currency_code,
|
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,
|
50
|
+
:parent_account_access, :child_account_access, :vat_number_prefix, :entity_identifier_scheme,
|
51
|
+
:entity_identifier_standard
|
51
52
|
|
52
53
|
# OPERATIONS
|
53
54
|
#-----------
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class EntitlementOverride < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :entity_id, :entity_type, :feature_id, :feature_name, :value, :name, :expires_at
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.add_entitlement_override_for_subscription(id, params, env=nil, headers={})
|
10
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.list_entitlement_override_for_subscription(id, params={}, env=nil, headers={})
|
14
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"entitlement_overrides"), params, env, headers)
|
15
|
+
end
|
16
|
+
|
17
|
+
end # ~EntitlementOverride
|
18
|
+
end # ~ChargeBee
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class Estimate < Model
|
3
3
|
|
4
|
-
attr_accessor :created_at, :subscription_estimate, :
|
5
|
-
:credit_note_estimates, :unbilled_charge_estimates
|
4
|
+
attr_accessor :created_at, :subscription_estimate, :subscription_estimates, :invoice_estimate,
|
5
|
+
:invoice_estimates, :next_invoice_estimate, :credit_note_estimates, :unbilled_charge_estimates
|
6
6
|
|
7
7
|
# OPERATIONS
|
8
8
|
#-----------
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class Feature < Model
|
3
|
+
|
4
|
+
class Level < Model
|
5
|
+
attr_accessor :name, :value, :level, :is_unlimited
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :name, :description, :status, :type, :unit, :resource_version, :updated_at,
|
9
|
+
:created_at, :levels
|
10
|
+
|
11
|
+
# OPERATIONS
|
12
|
+
#-----------
|
13
|
+
|
14
|
+
def self.list(params={}, env=nil, headers={})
|
15
|
+
Request.send_list_request('get', uri_path("features"), params, env, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.create(params, env=nil, headers={})
|
19
|
+
Request.send('post', uri_path("features"), params, env, headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.update(id, params={}, env=nil, headers={})
|
23
|
+
Request.send('post', uri_path("features",id.to_s), params, env, headers)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.retrieve(id, env=nil, headers={})
|
27
|
+
Request.send('get', uri_path("features",id.to_s), {}, env, headers)
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.delete(id, env=nil, headers={})
|
31
|
+
Request.send('post', uri_path("features",id.to_s,"delete"), {}, env, headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.activate(id, env=nil, headers={})
|
35
|
+
Request.send('post', uri_path("features",id.to_s,"activate_command"), {}, env, headers)
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.archive(id, env=nil, headers={})
|
39
|
+
Request.send('post', uri_path("features",id.to_s,"archive_command"), {}, env, headers)
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.reactivate(id, env=nil, headers={})
|
43
|
+
Request.send('post', uri_path("features",id.to_s,"reactivate_command"), {}, env, headers)
|
44
|
+
end
|
45
|
+
|
46
|
+
end # ~Feature
|
47
|
+
end # ~ChargeBee
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class HostedPage < Model
|
3
3
|
|
4
4
|
attr_accessor :id, :type, :url, :state, :failure_reason, :pass_thru_content, :embed, :created_at,
|
5
|
-
:expires_at, :updated_at, :resource_version, :checkout_info
|
5
|
+
:expires_at, :updated_at, :resource_version, :checkout_info, :business_entity_id
|
6
6
|
|
7
7
|
class Content < Result
|
8
8
|
end
|
@@ -26,7 +26,7 @@ module ChargeBee
|
|
26
26
|
Request.send('post', uri_path("hosted_pages","checkout_one_time"), params, env, headers)
|
27
27
|
end
|
28
28
|
|
29
|
-
def self.checkout_one_time_for_items(params
|
29
|
+
def self.checkout_one_time_for_items(params, env=nil, headers={})
|
30
30
|
Request.send('post', uri_path("hosted_pages","checkout_one_time_for_items"), params, env, headers)
|
31
31
|
end
|
32
32
|
|
@@ -94,5 +94,9 @@ module ChargeBee
|
|
94
94
|
Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers)
|
95
95
|
end
|
96
96
|
|
97
|
+
def self.pre_cancel(params, env=nil, headers={})
|
98
|
+
Request.send('post', uri_path("hosted_pages","pre_cancel"), params, env, headers)
|
99
|
+
end
|
100
|
+
|
97
101
|
end # ~HostedPage
|
98
102
|
end # ~ChargeBee
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class ImpactedItem < Model
|
3
|
+
|
4
|
+
class Download < Model
|
5
|
+
attr_accessor :download_url, :valid_till, :mime_type
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :count, :download, :items
|
9
|
+
|
10
|
+
# OPERATIONS
|
11
|
+
#-----------
|
12
|
+
|
13
|
+
end # ~ImpactedItem
|
14
|
+
end # ~ChargeBee
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class ImpactedSubscription < Model
|
3
|
+
|
4
|
+
class Download < Model
|
5
|
+
attr_accessor :download_url, :valid_till, :mime_type
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :count, :download, :subscription_ids
|
9
|
+
|
10
|
+
# OPERATIONS
|
11
|
+
#-----------
|
12
|
+
|
13
|
+
end # ~ImpactedSubscription
|
14
|
+
end # ~ChargeBee
|
@@ -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,11 +2,11 @@ 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
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < 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
|
@@ -74,7 +74,7 @@ module ChargeBee
|
|
74
74
|
:line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
|
75
75
|
:dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders,
|
76
76
|
:notes, :shipping_address, :billing_address, :einvoice, :payment_owner, :void_reason_code, :deleted,
|
77
|
-
:vat_number_prefix, :channel
|
77
|
+
:vat_number_prefix, :channel, :business_entity_id
|
78
78
|
|
79
79
|
# OPERATIONS
|
80
80
|
#-----------
|
@@ -111,6 +111,10 @@ module ChargeBee
|
|
111
111
|
Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers)
|
112
112
|
end
|
113
113
|
|
114
|
+
def self.sync_usages(id, env=nil, headers={})
|
115
|
+
Request.send('post', uri_path("invoices",id.to_s,"sync_usages"), {}, env, headers)
|
116
|
+
end
|
117
|
+
|
114
118
|
def self.apply_credits(id, params={}, env=nil, headers={})
|
115
119
|
Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers)
|
116
120
|
end
|
@@ -195,5 +199,9 @@ module ChargeBee
|
|
195
199
|
Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
|
196
200
|
end
|
197
201
|
|
202
|
+
def self.resend_einvoice(id, env=nil, headers={})
|
203
|
+
Request.send('post', uri_path("invoices",id.to_s,"resend_einvoice"), {}, env, headers)
|
204
|
+
end
|
205
|
+
|
198
206
|
end # ~Invoice
|
199
207
|
end # ~ChargeBee
|
@@ -2,11 +2,11 @@ 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
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class Tax < Model
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class ItemEntitlement < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :item_id, :item_type, :feature_id, :feature_name, :value, :name
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.item_entitlements_for_item(id, params={}, env=nil, headers={})
|
10
|
+
Request.send('get', uri_path("items",id.to_s,"item_entitlements"), params, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.item_entitlements_for_feature(id, params={}, env=nil, headers={})
|
14
|
+
Request.send('get', uri_path("features",id.to_s,"item_entitlements"), params, env, headers)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.add_item_entitlements(id, params, env=nil, headers={})
|
18
|
+
Request.send('post', uri_path("features",id.to_s,"item_entitlements"), params, env, headers)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.upsert_or_remove_item_entitlements_for_item(id, params, env=nil, headers={})
|
22
|
+
Request.send('post', uri_path("items",id.to_s,"item_entitlements"), params, env, headers)
|
23
|
+
end
|
24
|
+
|
25
|
+
end # ~ItemEntitlement
|
26
|
+
end # ~ChargeBee
|
@@ -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
|
@@ -7,7 +7,7 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
|
9
9
|
:payment_method_type, :success_url, :failure_url, :created_at, :modified_at, :resource_version,
|
10
|
-
:updated_at, :customer_id, :gateway, :active_payment_attempt
|
10
|
+
:updated_at, :customer_id, :gateway, :active_payment_attempt, :business_entity_id
|
11
11
|
|
12
12
|
# OPERATIONS
|
13
13
|
#-----------
|
@@ -27,7 +27,7 @@ module ChargeBee
|
|
27
27
|
|
28
28
|
attr_accessor :id, :resource_version, :updated_at, :created_at, :customer_id, :type, :reference_id,
|
29
29
|
:status, :gateway, :gateway_account_id, :ip_address, :issuing_country, :card, :bank_account,
|
30
|
-
:amazon_payment, :upi, :paypal, :mandates, :deleted
|
30
|
+
:amazon_payment, :upi, :paypal, :mandates, :deleted, :business_entity_id
|
31
31
|
|
32
32
|
# OPERATIONS
|
33
33
|
#-----------
|
@@ -34,7 +34,7 @@ module ChargeBee
|
|
34
34
|
Request.send('post', uri_path("plans"), params, env, headers)
|
35
35
|
end
|
36
36
|
|
37
|
-
def self.update(id, params
|
37
|
+
def self.update(id, params, env=nil, headers={})
|
38
38
|
Request.send('post', uri_path("plans",id.to_s), params, env, headers)
|
39
39
|
end
|
40
40
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class Purchase < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :customer_id, :created_at, :modified_at, :subscription_ids, :invoice_ids
|
5
|
+
|
6
|
+
# OPERATIONS
|
7
|
+
#-----------
|
8
|
+
|
9
|
+
def self.create(params, env=nil, headers={})
|
10
|
+
Request.send('post', uri_path("purchases"), params, env, headers)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.retrieve(id, env=nil, headers={})
|
14
|
+
Request.send('get', uri_path("purchases",id.to_s), {}, env, headers)
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.estimate(params, env=nil, headers={})
|
18
|
+
Request.send('post', uri_path("purchases","estimate"), params, env, headers)
|
19
|
+
end
|
20
|
+
|
21
|
+
end # ~Purchase
|
22
|
+
end # ~ChargeBee
|
@@ -2,11 +2,11 @@ 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
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < 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
|
@@ -38,7 +38,7 @@ module ChargeBee
|
|
38
38
|
:sub_total, :total, :credits_applied, :amount_paid, :amount_due, :version, :resource_version,
|
39
39
|
:updated_at, :vat_number_prefix, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes,
|
40
40
|
:line_item_tiers, :currency_code, :notes, :shipping_address, :billing_address, :contract_term_start,
|
41
|
-
:contract_term_end, :contract_term_termination_fee
|
41
|
+
:contract_term_end, :contract_term_termination_fee, :business_entity_id
|
42
42
|
|
43
43
|
# OPERATIONS
|
44
44
|
#-----------
|
@@ -2,11 +2,11 @@ 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
|
9
|
-
attr_accessor :amount, :description, :entity_type, :entity_id
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id, :coupon_set_code
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < 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
|
@@ -53,7 +53,7 @@ module ChargeBee
|
|
53
53
|
:due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
|
54
54
|
:event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
|
55
55
|
: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
|
56
|
+
:free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :business_entity_id
|
57
57
|
|
58
58
|
# OPERATIONS
|
59
59
|
#-----------
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class SubscriptionEntitlement < Model
|
3
|
+
|
4
|
+
class Component < Model
|
5
|
+
attr_accessor :entitlement_overrides
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :subscription_id, :feature_id, :feature_name, :feature_unit, :value, :name,
|
9
|
+
:is_overridden, :is_enabled, :expires_at, :components
|
10
|
+
|
11
|
+
# OPERATIONS
|
12
|
+
#-----------
|
13
|
+
|
14
|
+
def self.subscription_entitlements_for_subscription(id, params={}, env=nil, headers={})
|
15
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"subscription_entitlements"), params, env, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.set_subscription_entitlement_availability(id, params, env=nil, headers={})
|
19
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"subscription_entitlements/set_availability"), params, env, headers)
|
20
|
+
end
|
21
|
+
|
22
|
+
end # ~SubscriptionEntitlement
|
23
|
+
end # ~ChargeBee
|
@@ -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
|
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
@@ -117,13 +117,15 @@ module ChargeBee
|
|
117
117
|
|
118
118
|
def estimate()
|
119
119
|
estimate = get(:estimate, Estimate, {},
|
120
|
-
{:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
120
|
+
{:subscription_estimate => SubscriptionEstimate, :subscription_estimates => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
121
121
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
122
122
|
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
123
123
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
124
124
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
125
125
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
126
126
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
127
|
+
estimate.init_dependant_list(@response[:estimate], :subscription_estimates,
|
128
|
+
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
127
129
|
estimate.init_dependant_list(@response[:estimate], :invoice_estimates,
|
128
130
|
{:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
|
129
131
|
estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
|
@@ -272,6 +274,50 @@ module ChargeBee
|
|
272
274
|
return differential_price;
|
273
275
|
end
|
274
276
|
|
277
|
+
def feature()
|
278
|
+
feature = get(:feature, Feature,
|
279
|
+
{:levels => Feature::Level});
|
280
|
+
return feature;
|
281
|
+
end
|
282
|
+
|
283
|
+
def impacted_subscription()
|
284
|
+
impacted_subscription = get(:impacted_subscription, ImpactedSubscription,
|
285
|
+
{:download => ImpactedSubscription::Download});
|
286
|
+
return impacted_subscription;
|
287
|
+
end
|
288
|
+
|
289
|
+
def impacted_item()
|
290
|
+
impacted_item = get(:impacted_item, ImpactedItem,
|
291
|
+
{:download => ImpactedItem::Download});
|
292
|
+
return impacted_item;
|
293
|
+
end
|
294
|
+
|
295
|
+
def subscription_entitlement()
|
296
|
+
subscription_entitlement = get(:subscription_entitlement, SubscriptionEntitlement,
|
297
|
+
{:component => SubscriptionEntitlement::Component});
|
298
|
+
return subscription_entitlement;
|
299
|
+
end
|
300
|
+
|
301
|
+
def item_entitlement()
|
302
|
+
item_entitlement = get(:item_entitlement, ItemEntitlement);
|
303
|
+
return item_entitlement;
|
304
|
+
end
|
305
|
+
|
306
|
+
def in_app_subscription()
|
307
|
+
in_app_subscription = get(:in_app_subscription, InAppSubscription);
|
308
|
+
return in_app_subscription;
|
309
|
+
end
|
310
|
+
|
311
|
+
def entitlement_override()
|
312
|
+
entitlement_override = get(:entitlement_override, EntitlementOverride);
|
313
|
+
return entitlement_override;
|
314
|
+
end
|
315
|
+
|
316
|
+
def purchase()
|
317
|
+
purchase = get(:purchase, Purchase);
|
318
|
+
return purchase;
|
319
|
+
end
|
320
|
+
|
275
321
|
|
276
322
|
def unbilled_charges()
|
277
323
|
unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
|
@@ -315,6 +361,12 @@ module ChargeBee
|
|
315
361
|
return differential_prices;
|
316
362
|
end
|
317
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
|
+
|
318
370
|
|
319
371
|
def to_s(*args)
|
320
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.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-
|
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
|
@@ -128,15 +130,21 @@ files:
|
|
128
130
|
- lib/chargebee/models/customer.rb
|
129
131
|
- lib/chargebee/models/differential_price.rb
|
130
132
|
- lib/chargebee/models/download.rb
|
133
|
+
- lib/chargebee/models/entitlement_override.rb
|
131
134
|
- lib/chargebee/models/estimate.rb
|
132
135
|
- lib/chargebee/models/event.rb
|
133
136
|
- lib/chargebee/models/export.rb
|
137
|
+
- lib/chargebee/models/feature.rb
|
134
138
|
- lib/chargebee/models/gift.rb
|
135
139
|
- lib/chargebee/models/hierarchy.rb
|
136
140
|
- lib/chargebee/models/hosted_page.rb
|
141
|
+
- lib/chargebee/models/impacted_item.rb
|
142
|
+
- lib/chargebee/models/impacted_subscription.rb
|
143
|
+
- lib/chargebee/models/in_app_subscription.rb
|
137
144
|
- lib/chargebee/models/invoice.rb
|
138
145
|
- lib/chargebee/models/invoice_estimate.rb
|
139
146
|
- lib/chargebee/models/item.rb
|
147
|
+
- lib/chargebee/models/item_entitlement.rb
|
140
148
|
- lib/chargebee/models/item_family.rb
|
141
149
|
- lib/chargebee/models/item_price.rb
|
142
150
|
- lib/chargebee/models/model.rb
|
@@ -146,6 +154,7 @@ files:
|
|
146
154
|
- lib/chargebee/models/plan.rb
|
147
155
|
- lib/chargebee/models/portal_session.rb
|
148
156
|
- lib/chargebee/models/promotional_credit.rb
|
157
|
+
- lib/chargebee/models/purchase.rb
|
149
158
|
- lib/chargebee/models/quote.rb
|
150
159
|
- lib/chargebee/models/quote_line_group.rb
|
151
160
|
- lib/chargebee/models/quoted_charge.rb
|
@@ -153,6 +162,7 @@ files:
|
|
153
162
|
- lib/chargebee/models/resource_migration.rb
|
154
163
|
- lib/chargebee/models/site_migration_detail.rb
|
155
164
|
- lib/chargebee/models/subscription.rb
|
165
|
+
- lib/chargebee/models/subscription_entitlement.rb
|
156
166
|
- lib/chargebee/models/subscription_estimate.rb
|
157
167
|
- lib/chargebee/models/tax_withheld.rb
|
158
168
|
- lib/chargebee/models/third_party_payment_method.rb
|