chargebee 2.7.4 → 2.7.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +108 -2
- data/LICENSE +1 -1
- data/chargebee.gemspec +6 -2
- data/lib/chargebee.rb +1 -1
- data/lib/chargebee/models/addon.rb +2 -2
- data/lib/chargebee/models/advance_invoice_schedule.rb +18 -0
- data/lib/chargebee/models/card.rb +2 -1
- data/lib/chargebee/models/contract_term.rb +11 -0
- data/lib/chargebee/models/coupon.rb +2 -1
- data/lib/chargebee/models/credit_note.rb +7 -3
- data/lib/chargebee/models/credit_note_estimate.rb +1 -1
- data/lib/chargebee/models/customer.rb +18 -5
- data/lib/chargebee/models/estimate.rb +1 -1
- data/lib/chargebee/models/hierarchy.rb +1 -1
- data/lib/chargebee/models/invoice.rb +6 -6
- data/lib/chargebee/models/invoice_estimate.rb +1 -1
- data/lib/chargebee/models/model.rb +14 -14
- data/lib/chargebee/models/order.rb +8 -0
- data/lib/chargebee/models/payment_intent.rb +3 -2
- data/lib/chargebee/models/plan.rb +2 -1
- data/lib/chargebee/models/quote.rb +25 -5
- data/lib/chargebee/models/quote_line_group.rb +32 -0
- data/lib/chargebee/models/quoted_subscription.rb +24 -0
- data/lib/chargebee/models/subscription.rb +26 -13
- data/lib/chargebee/models/subscription_estimate.rb +6 -1
- data/lib/chargebee/models/transaction.rb +1 -1
- data/lib/chargebee/models/virtual_bank_account.rb +4 -0
- data/lib/chargebee/result.rb +36 -6
- metadata +20 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4041dbcecf712a30107e02008a15058fbb216a1b55e72ca0895884425f35b3aa
|
4
|
+
data.tar.gz: e404af8c615df22447e965ec441eede1d2fd08029e7af66775c98e9fa93f18a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70fcad861242d1d23e0a14d0eede0b7f9d28294bd2041b4c4e5197f18acfb4c0673e222408e441d9de95cca1877faa7cd4bac89fc1e3db75a712c9c15c24531b
|
7
|
+
data.tar.gz: 700576f43bc37317bc3abd1dbc4e690e8e8cc20c8de8e56bd07084cbbd2469422e51ad02ce1b76e83b771343b7197b9711881f9b904586fad8498d2ad34a8707
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,110 @@
|
|
1
|
+
### v2.7.9 (2020-10-19)
|
2
|
+
* * *
|
3
|
+
* New optional attribute quoted_subscriptions has been added to the resource quote
|
4
|
+
* New optional attributes resource_version and updated_at are added to the resource payment_intent
|
5
|
+
### v2.7.8 (2020-09-29)
|
6
|
+
* * *
|
7
|
+
|
8
|
+
* New attribute included_in_mrr has been added in addon and coupon resource
|
9
|
+
* New attribute offline_payment_method has been added in subscription and customer resource
|
10
|
+
* New input parameter included_in_mrr has been added in create_an_addon, update_an_addon, create_a_coupon and update_a_coupon apis.
|
11
|
+
* New input parameter offline_payment_method has been added in create_a_customer, list_customers, update_a_customer, create_a_subscription, create_subscription_for_customer and list_subscriptions apis
|
12
|
+
* New input parameter auto_collection has been added in update_a_subscription
|
13
|
+
* New input parameter subscription[offline_payment_method] has been added in create_subscription_estimate, create_subscription_for_a_customer_estimate, update_subscription_estimate, export_revenue_recognition_reports, export_deferred_revenue_reports, export_subscriptions, checkout_new_subscription and checkout_existing_subscription apis
|
14
|
+
* New input parameter subscription[auto_collection] has been added in checkout_existing_subscription and update_subscription_estimate apis
|
15
|
+
* New input parameter customer[offline_payment_method] has been added in export_revenue_recognition_reports, export_deferred_revenue_reports, export_customers and create_a_subscription
|
16
|
+
|
17
|
+
### v2.7.7 (2020-09-09)
|
18
|
+
* * *
|
19
|
+
|
20
|
+
* New input parameter currency_code is added in list_addons, list_coupons, list_plans, export_plans, export_addons, export_coupons apis
|
21
|
+
* New attributes powered_by has been added in card resource
|
22
|
+
* New input parameters subscription[free_period], subscription[free_period_unit] have been added in create_subscription_estimate, create_subscription_for_a_customer_estimate, update_subscription_estimate apis
|
23
|
+
* Input parameter invoice[customer_id] is made optional in create_invoice_estimate api
|
24
|
+
* Input parameter customer_id is made optional in create_an_invoice
|
25
|
+
* Attribute created_at in dunning_attempts is made optional in the invoice resource
|
26
|
+
* New attributes free_period and free_period_unit have been added in the Subscription resource
|
27
|
+
* New enum type free_period_unit has been added with the values:
|
28
|
+
DAY,
|
29
|
+
WEEK,
|
30
|
+
MONTH,
|
31
|
+
YEAR
|
32
|
+
* New enum type powered_by has been added in card resource with the values:
|
33
|
+
IDEAL,
|
34
|
+
SOFORT,
|
35
|
+
BANCONTACT,
|
36
|
+
GIROPAY,
|
37
|
+
NOT_APPLICABLE
|
38
|
+
* New endpoint import_contract_term has been added to the subscription resource
|
39
|
+
* Attributes status, amount and date inside the linked_payment are made optional in the transaction resource
|
40
|
+
* New endpoint delete has been added to the virtual_bank_account resource
|
41
|
+
* New values GIROPAY and DOTPAY have been added to the payment_method_types enum
|
42
|
+
* New values PAYMENT_SOURCE_EXPIRING and PAYMENT_SOURCE_EXPIRED have been added to the event_type enums
|
43
|
+
* New value PAYPAL has been added to the gateway enum
|
44
|
+
|
45
|
+
### v2.7.6 (2020-07-15)
|
46
|
+
* * *
|
47
|
+
|
48
|
+
* New attributes show_description_in_invoices, show_description_in_quotes have been added in Addon, Plan resource
|
49
|
+
* New input parameters show_description_in_invoices, show_description_in_quotes have been added for create_an_addon, update_an_addon, create_a_plan, update_a_plan apis
|
50
|
+
* New attribute create_reason_code has been added in Credit notes resource
|
51
|
+
* Attribute reason_code is made optional in the Credit notes resource
|
52
|
+
* New filter parameter create_reason_code is added in list_credit_notes api
|
53
|
+
* New input parameter refund_reason_code has been added in Credit notes' Refund, Record a refund apis
|
54
|
+
* Sub-resources parent_account_access and child_account_access have been added in Customer resource
|
55
|
+
* New attribute use_default_hierarchy_settings has been added in Customer resource
|
56
|
+
* New endpoint update_hierarchy_settings has been added in Customer resource
|
57
|
+
* New input parameters use_default_hierarchy_settings, parent_account_access, child_account_access have been added in link_a_customer api
|
58
|
+
* New input parameter invoice_notes, coupon_ids, invoice[subscription_id], charges[taxable], charges[tax_profile_id], charges[avalara_tax_code], charges[taxjar_product_code] has been added to create_invoice_estimate api
|
59
|
+
* New input param cancel_reason_code has been added to export_revenue_recognition_reports, export_deferred_revenue_reports, export_subscriptions, export_credit_notes apis
|
60
|
+
* New input param coupon_ids has been added to checkout_new_subscription, checkout_existing_subscription apis
|
61
|
+
* Input param subscription_coupon has been deprecated in checkout_new_subscription, checkout_existing_subscription apis
|
62
|
+
* New attribute void_reason_code has been added to the Invoice resource
|
63
|
+
* Attribute cn_reason_code has been made optional in applied_credits, adjustment_credit_notes, issued_credit_notes, linked_credit_note sub-resources
|
64
|
+
* New attribute cn_create_reason_code has been added in applied_credits, adjustment_credit_notes, issued_credit_notes, linked_credit_note sub-resources
|
65
|
+
* New input parameter subscription_id, invoice_note, remove_general_note, coupon_ids, charges[taxable], charges[tax_profile_id], charges[avalara_tax_code], charges[taxjar_product_code] have been added to create_an_invoice api
|
66
|
+
* Input parameter coupon is deprecated from create_an_invoice api
|
67
|
+
* New filter parameter void_reason_code has been added to list_invoices api
|
68
|
+
* New input parameter invoice_note, remove_general_note, notes_to_remove[entity_type], notes_to_remove[entity_id] have been added to close_a_pending_invoice api
|
69
|
+
* New input parameter void_reason_code has been added to void_an_invoice api
|
70
|
+
* New input parameter credit_note[create_reason_code] has been added to refund_an_invoice, record_refund_for_an_invoice api
|
71
|
+
* New endpoints import_an_order and delete_an_imported_order have been added to Order resource
|
72
|
+
* New filter parameter exclude_deleted_credit_notes has been added to list_orders api
|
73
|
+
* New attribute payment_method_type has been added to payment_intent resource and active_payment_attempt sub-resource
|
74
|
+
* New input parameter payment_method_type has been added to create_a_payment_intent, update_a_payment_intent api
|
75
|
+
* New attributes version, contract_term_start, contract_term_end, contract_term_termination_fee have been added to Quotes resource
|
76
|
+
* New endpoints edit_create_subscription_quote, edit_update_subscription_quote, edit_one_time_quote, extend_expiry_date have beed added to Quotes resource
|
77
|
+
* New input parameters contract_term[action_at_term_end], contract_term[cancellation_cutoff_period], subscription[contract_term_billing_cycle_on_renewal] have been added to create_a_quote_for_a_new_subscription, create_a_quote_for_update_subscription apis
|
78
|
+
* New attribute version has been added to quote_line_group sub-resource
|
79
|
+
* New attribute cancel_reason_code has been added to Subscriptions resource
|
80
|
+
* New filter parameter cancel_reason_code has been added to list_subscriptions, cancel_a_subscription apis
|
81
|
+
* New input parameter contract_term_billing_cycle_on_renewal has been added to import_a_subscription, import_subscription_for_customer apis
|
82
|
+
* New input parameter event_based_addon has been added to cancel_a_subscription api
|
83
|
+
* New filter parameter is_voided has been added to list_unbilled_charges api
|
84
|
+
* New event_types MRR_UPDATED, ORDER_DELETED have been added
|
85
|
+
* New values SOFORT, BANCONTACT have been added to the payment_method_types enum
|
86
|
+
* New attributes entity_type_description has been added to the line_items sub-resource
|
87
|
+
|
88
|
+
### v2.7.5 (2020-04-03)
|
89
|
+
* * *
|
90
|
+
|
91
|
+
* A subresource contract_term has been added in Subscription resource
|
92
|
+
* New endpoint refund_a_credit_note has been added in Credit notes resource
|
93
|
+
* New endpoint list_quote_line_groups has been added in Quotes resource
|
94
|
+
* New endpoint list_contract_terms_for_a_subscription has been added in Subscriptions resource
|
95
|
+
* New input parameter contract_term_billing_cycle_on_renewal, contract_term[action_at_term_end], contract_term[cancellation_cutoff_period] has been added in create_a_subscription, create_subscription_for_customer, update_a_subscription and reactivate_a_subscription apis
|
96
|
+
* New input parameter contract_term_cancel_option has been added in cancel_a_subscription api
|
97
|
+
* New input parameter contract_term[action_at_term_end], contract_term[cancellation_cutoff_period], subscription[contract_term_billing_cycle_on_renewal] has been added in create_subscription_estimate, create_subscription_for_a_customer_estimate, checkout_new_subscription, checkout_existing_subscription apis
|
98
|
+
* New input parameter business_customer_without_vat_number has been added in create_a_customer and update_billing_info_for_a_customer apis
|
99
|
+
* New input parameter addons[service_period] replaces the parameter addons[date_from] and addons[date_to] in create_a_quote_for_one-time_charges api
|
100
|
+
* New input parameter charges[service_period] replaces the parameter charges[date_from] and charges[date_to] in create_a_quote_for_one-time_charges api
|
101
|
+
* New input parameter consolidated_view has been added in retrieve_quote_as_pdf api
|
102
|
+
* New input parameter customer[business_customer_without_vat_number] has been added in create_a_subscription, update_a_subscription apis
|
103
|
+
* New value CHECKOUT_COM has been added in gateway enum
|
104
|
+
* New value CONTRACT_TERMINATION has been added to eventBasedAddons onEvent enum
|
105
|
+
* New values IDEAL, GOOGLE_PAY has been added to payment types enum
|
106
|
+
* New event types CONTRACT_TERM_CREATED, CONTRACT_TERM_RENEWED, CONTRACT_TERM_TERMINATED, CONTRACT_TERM_COMPLETED, CONTRACT_TERM_CANCELLED have been added
|
107
|
+
|
1
108
|
### v2.7.4(2020-02-06)
|
2
109
|
* * *
|
3
110
|
|
@@ -1595,5 +1702,4 @@ Support for creating plans & addons on the fly via API.
|
|
1595
1702
|
|
1596
1703
|
* API to fetch multiple subscriptions of a customer.
|
1597
1704
|
|
1598
|
-
* Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
|
1599
|
-
|
1705
|
+
* Added support to get the list of events filtered by event type. Events can be fetched based on the event type eg., payment_succeeded.
|
data/LICENSE
CHANGED
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.7.
|
8
|
-
s.date = '2020-
|
7
|
+
s.version = '2.7.9'
|
8
|
+
s.date = '2020-10-19'
|
9
9
|
|
10
10
|
s.summary = "Ruby client for Chargebee API."
|
11
11
|
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
|
@@ -40,9 +40,11 @@ Gem::Specification.new do |s|
|
|
40
40
|
lib/chargebee/list_result.rb
|
41
41
|
lib/chargebee/models/addon.rb
|
42
42
|
lib/chargebee/models/address.rb
|
43
|
+
lib/chargebee/models/advance_invoice_schedule.rb
|
43
44
|
lib/chargebee/models/card.rb
|
44
45
|
lib/chargebee/models/comment.rb
|
45
46
|
lib/chargebee/models/contact.rb
|
47
|
+
lib/chargebee/models/contract_term.rb
|
46
48
|
lib/chargebee/models/coupon.rb
|
47
49
|
lib/chargebee/models/coupon_code.rb
|
48
50
|
lib/chargebee/models/coupon_set.rb
|
@@ -66,6 +68,8 @@ Gem::Specification.new do |s|
|
|
66
68
|
lib/chargebee/models/portal_session.rb
|
67
69
|
lib/chargebee/models/promotional_credit.rb
|
68
70
|
lib/chargebee/models/quote.rb
|
71
|
+
lib/chargebee/models/quote_line_group.rb
|
72
|
+
lib/chargebee/models/quoted_subscription.rb
|
69
73
|
lib/chargebee/models/resource_migration.rb
|
70
74
|
lib/chargebee/models/site_migration_detail.rb
|
71
75
|
lib/chargebee/models/subscription.rb
|
data/lib/chargebee.rb
CHANGED
@@ -9,8 +9,8 @@ module ChargeBee
|
|
9
9
|
:price, :currency_code, :period, :period_unit, :unit, :status, :archived_at, :enabled_in_portal,
|
10
10
|
:tax_code, :taxjar_product_code, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type,
|
11
11
|
:sku, :accounting_code, :accounting_category1, :accounting_category2, :is_shippable, :shipping_frequency_period,
|
12
|
-
:shipping_frequency_period_unit, :resource_version, :updated_at, :
|
13
|
-
:meta_data, :tiers
|
12
|
+
:shipping_frequency_period_unit, :resource_version, :updated_at, :included_in_mrr, :invoice_notes,
|
13
|
+
:taxable, :tax_profile_id, :meta_data, :tiers, :show_description_in_invoices, :show_description_in_quotes
|
14
14
|
|
15
15
|
# OPERATIONS
|
16
16
|
#-----------
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class AdvanceInvoiceSchedule < Model
|
3
|
+
|
4
|
+
class FixedIntervalSchedule < Model
|
5
|
+
attr_accessor :end_schedule_on, :number_of_occurrences, :days_before_renewal, :end_date, :created_at, :terms_to_charge
|
6
|
+
end
|
7
|
+
|
8
|
+
class SpecificDatesSchedule < Model
|
9
|
+
attr_accessor :terms_to_charge, :date, :created_at
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :id, :schedule_type, :fixed_interval_schedule, :specific_dates_schedule
|
13
|
+
|
14
|
+
# OPERATIONS
|
15
|
+
#-----------
|
16
|
+
|
17
|
+
end # ~AdvanceInvoiceSchedule
|
18
|
+
end # ~ChargeBee
|
@@ -4,7 +4,8 @@ module ChargeBee
|
|
4
4
|
attr_accessor :payment_source_id, :status, :gateway, :gateway_account_id, :ref_tx_id, :first_name,
|
5
5
|
:last_name, :iin, :last4, :card_type, :funding_type, :expiry_month, :expiry_year, :issuing_country,
|
6
6
|
:billing_addr1, :billing_addr2, :billing_city, :billing_state_code, :billing_state, :billing_country,
|
7
|
-
:billing_zip, :created_at, :resource_version, :updated_at, :ip_address, :
|
7
|
+
:billing_zip, :created_at, :resource_version, :updated_at, :ip_address, :powered_by, :customer_id,
|
8
|
+
:masked_number
|
8
9
|
|
9
10
|
# OPERATIONS
|
10
11
|
#-----------
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class ContractTerm < Model
|
3
|
+
|
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
|
6
|
+
|
7
|
+
# OPERATIONS
|
8
|
+
#-----------
|
9
|
+
|
10
|
+
end # ~ContractTerm
|
11
|
+
end # ~ChargeBee
|
@@ -4,7 +4,8 @@ module ChargeBee
|
|
4
4
|
attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
|
5
5
|
:discount_quantity, :currency_code, :duration_type, :duration_month, :valid_till, :max_redemptions,
|
6
6
|
:status, :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
|
7
|
-
:resource_version, :updated_at, :plan_ids, :addon_ids, :redemptions, :invoice_notes,
|
7
|
+
:resource_version, :updated_at, :included_in_mrr, :plan_ids, :addon_ids, :redemptions, :invoice_notes,
|
8
|
+
:meta_data
|
8
9
|
|
9
10
|
# OPERATIONS
|
10
11
|
#-----------
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class CreditNote < 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, :discount_amount, :item_level_discount_amount, :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, :discount_amount, :item_level_discount_amount, :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 LinkedRefund < Model
|
29
|
-
attr_accessor :txn_id, :applied_amount, :applied_at, :txn_status, :txn_date, :txn_amount
|
29
|
+
attr_accessor :txn_id, :applied_amount, :applied_at, :txn_status, :txn_date, :txn_amount, :refund_reason_code
|
30
30
|
end
|
31
31
|
|
32
32
|
class Allocation < Model
|
@@ -38,7 +38,7 @@ module ChargeBee
|
|
38
38
|
:amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
|
39
39
|
:total_in_local_currency, :local_currency_code, :round_off_amount, :fractional_correction, :line_items,
|
40
40
|
:discounts, :line_item_discounts, :line_item_tiers, :taxes, :line_item_taxes, :linked_refunds,
|
41
|
-
:allocations, :deleted
|
41
|
+
:allocations, :deleted, :create_reason_code
|
42
42
|
|
43
43
|
# OPERATIONS
|
44
44
|
#-----------
|
@@ -55,6 +55,10 @@ module ChargeBee
|
|
55
55
|
Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers)
|
56
56
|
end
|
57
57
|
|
58
|
+
def self.refund(id, params={}, env=nil, headers={})
|
59
|
+
Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers)
|
60
|
+
end
|
61
|
+
|
58
62
|
def self.record_refund(id, params, env=nil, headers={})
|
59
63
|
Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers)
|
60
64
|
end
|
@@ -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, :discount_amount, :item_level_discount_amount, :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, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -25,15 +25,24 @@ module ChargeBee
|
|
25
25
|
attr_accessor :parent_id, :payment_owner_id, :invoice_owner_id
|
26
26
|
end
|
27
27
|
|
28
|
+
class ParentAccountAccess < Model
|
29
|
+
attr_accessor :portal_edit_child_subscriptions, :portal_download_child_invoices, :send_subscription_emails, :send_invoice_emails, :send_payment_emails
|
30
|
+
end
|
31
|
+
|
32
|
+
class ChildAccountAccess < Model
|
33
|
+
attr_accessor :portal_edit_subscriptions, :portal_download_invoices, :send_subscription_emails, :send_invoice_emails, :send_payment_emails
|
34
|
+
end
|
35
|
+
|
28
36
|
attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
|
29
|
-
:net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
|
30
|
-
:created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
|
31
|
-
:resource_version, :updated_at, :locale, :
|
37
|
+
:offline_payment_method, :net_term_days, :vat_number_validated_time, :vat_number_status, :allow_direct_debit,
|
38
|
+
:is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
|
39
|
+
:exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_date_mode,
|
32
40
|
:billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :card_status, :fraud_flag, :primary_payment_source_id,
|
33
41
|
:backup_payment_source_id, :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes,
|
34
42
|
:preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
|
35
|
-
:balances, :meta_data, :deleted, :registered_for_gst, :
|
36
|
-
:
|
43
|
+
:balances, :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing, :customer_type,
|
44
|
+
:business_customer_without_vat_number, :client_profile_id, :relationship, :use_default_hierarchy_settings,
|
45
|
+
:parent_account_access, :child_account_access
|
37
46
|
|
38
47
|
# OPERATIONS
|
39
48
|
#-----------
|
@@ -134,5 +143,9 @@ module ChargeBee
|
|
134
143
|
Request.send('get', uri_path("customers",id.to_s,"hierarchy"), params, env, headers)
|
135
144
|
end
|
136
145
|
|
146
|
+
def self.update_hierarchy_settings(id, params={}, env=nil, headers={})
|
147
|
+
Request.send('post', uri_path("customers",id.to_s,"update_hierarchy_settings"), params, env, headers)
|
148
|
+
end
|
149
|
+
|
137
150
|
end # ~Customer
|
138
151
|
end # ~ChargeBee
|
@@ -47,7 +47,7 @@ module ChargeBee
|
|
47
47
|
Request.send('post', uri_path("estimates","gift_subscription"), params, env, headers)
|
48
48
|
end
|
49
49
|
|
50
|
-
def self.create_invoice(params, env=nil, headers={})
|
50
|
+
def self.create_invoice(params={}, env=nil, headers={})
|
51
51
|
Request.send('post', uri_path("estimates","create_invoice"), params, env, headers)
|
52
52
|
end
|
53
53
|
|
@@ -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, :discount_amount, :item_level_discount_amount, :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, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -34,15 +34,15 @@ module ChargeBee
|
|
34
34
|
end
|
35
35
|
|
36
36
|
class AppliedCredit < Model
|
37
|
-
attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_date, :cn_status
|
37
|
+
attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_create_reason_code, :cn_date, :cn_status
|
38
38
|
end
|
39
39
|
|
40
40
|
class AdjustmentCreditNote < Model
|
41
|
-
attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
|
41
|
+
attr_accessor :cn_id, :cn_reason_code, :cn_create_reason_code, :cn_date, :cn_total, :cn_status
|
42
42
|
end
|
43
43
|
|
44
44
|
class IssuedCreditNote < Model
|
45
|
-
attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
|
45
|
+
attr_accessor :cn_id, :cn_reason_code, :cn_create_reason_code, :cn_date, :cn_total, :cn_status
|
46
46
|
end
|
47
47
|
|
48
48
|
class LinkedOrder < Model
|
@@ -69,12 +69,12 @@ module ChargeBee
|
|
69
69
|
:expected_payment_date, :amount_to_collect, :round_off_amount, :line_items, :discounts, :line_item_discounts,
|
70
70
|
:taxes, :line_item_taxes, :line_item_tiers, :linked_payments, :dunning_attempts, :applied_credits,
|
71
71
|
:adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
|
72
|
-
:payment_owner, :deleted
|
72
|
+
:payment_owner, :void_reason_code, :deleted
|
73
73
|
|
74
74
|
# OPERATIONS
|
75
75
|
#-----------
|
76
76
|
|
77
|
-
def self.create(params, env=nil, headers={})
|
77
|
+
def self.create(params={}, env=nil, headers={})
|
78
78
|
Request.send('post', uri_path("invoices"), params, env, headers)
|
79
79
|
end
|
80
80
|
|
@@ -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, :discount_amount, :item_level_discount_amount, :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, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -21,20 +21,20 @@ module ChargeBee
|
|
21
21
|
instance_eval do
|
22
22
|
values.each do |k, v|
|
23
23
|
set_val = nil
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
24
|
+
next if v.is_a?(Hash) && @dependant_types[k] != nil
|
25
|
+
|
26
|
+
set_val = if v.is_a?(Hash)
|
27
|
+
(@sub_types[k] != nil) ? @sub_types[k].construct(v) : v
|
28
|
+
elsif v.is_a?(Array)
|
29
|
+
if @sub_types[k] != nil
|
30
|
+
v.map { |item| @sub_types[k].construct(item)}
|
31
|
+
else
|
32
|
+
v
|
33
|
+
end
|
34
|
+
else
|
35
|
+
v
|
36
|
+
end
|
37
|
+
|
38
38
|
instance_variable_set("@#{k}", set_val)
|
39
39
|
end
|
40
40
|
end
|
@@ -45,6 +45,10 @@ module ChargeBee
|
|
45
45
|
Request.send('post', uri_path("orders",id.to_s), params, env, headers)
|
46
46
|
end
|
47
47
|
|
48
|
+
def self.import_order(params, env=nil, headers={})
|
49
|
+
Request.send('post', uri_path("orders","import_order"), params, env, headers)
|
50
|
+
end
|
51
|
+
|
48
52
|
def self.assign_order_number(id, env=nil, headers={})
|
49
53
|
Request.send('post', uri_path("orders",id.to_s,"assign_order_number"), {}, env, headers)
|
50
54
|
end
|
@@ -65,6 +69,10 @@ module ChargeBee
|
|
65
69
|
Request.send('get', uri_path("orders",id.to_s), {}, env, headers)
|
66
70
|
end
|
67
71
|
|
72
|
+
def self.delete(id, env=nil, headers={})
|
73
|
+
Request.send('post', uri_path("orders",id.to_s,"delete"), {}, env, headers)
|
74
|
+
end
|
75
|
+
|
68
76
|
def self.list(params={}, env=nil, headers={})
|
69
77
|
Request.send_list_request('get', uri_path("orders"), params, env, headers)
|
70
78
|
end
|
@@ -2,11 +2,12 @@ module ChargeBee
|
|
2
2
|
class PaymentIntent < Model
|
3
3
|
|
4
4
|
class PaymentAttempt < Model
|
5
|
-
attr_accessor :id, :status, :id_at_gateway, :error_code, :error_text, :created_at, :modified_at
|
5
|
+
attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :created_at, :modified_at
|
6
6
|
end
|
7
7
|
|
8
8
|
attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
|
9
|
-
:created_at, :modified_at, :
|
9
|
+
:payment_method_type, :created_at, :modified_at, :resource_version, :updated_at, :customer_id,
|
10
|
+
:gateway, :active_payment_attempt
|
10
11
|
|
11
12
|
# OPERATIONS
|
12
13
|
#-----------
|
@@ -24,7 +24,8 @@ module ChargeBee
|
|
24
24
|
:avalara_transaction_type, :avalara_service_type, :sku, :accounting_code, :accounting_category1,
|
25
25
|
:accounting_category2, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
|
26
26
|
:resource_version, :updated_at, :giftable, :claim_url, :invoice_notes, :taxable, :tax_profile_id,
|
27
|
-
:meta_data, :tiers, :applicable_addons, :attached_addons, :event_based_addons
|
27
|
+
:meta_data, :tiers, :applicable_addons, :attached_addons, :event_based_addons, :show_description_in_invoices,
|
28
|
+
:show_description_in_quotes
|
28
29
|
|
29
30
|
# OPERATIONS
|
30
31
|
#-----------
|
@@ -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, :discount_amount, :item_level_discount_amount, :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, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
8
|
class Discount < Model
|
@@ -30,10 +30,10 @@ module ChargeBee
|
|
30
30
|
end
|
31
31
|
|
32
32
|
attr_accessor :id, :name, :po_number, :customer_id, :subscription_id, :invoice_id, :status,
|
33
|
-
:operation_type, :vat_number, :price_type, :valid_till, :date, :
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:shipping_address, :billing_address
|
33
|
+
:operation_type, :vat_number, :price_type, :valid_till, :date, :total_payable, :charge_on_acceptance,
|
34
|
+
:sub_total, :total, :credits_applied, :amount_paid, :amount_due, :version, :resource_version,
|
35
|
+
:updated_at, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :currency_code,
|
36
|
+
:notes, :shipping_address, :billing_address, :contract_term_start, :contract_term_end, :contract_term_termination_fee
|
37
37
|
|
38
38
|
# OPERATIONS
|
39
39
|
#-----------
|
@@ -46,18 +46,34 @@ module ChargeBee
|
|
46
46
|
Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote"), params, env, headers)
|
47
47
|
end
|
48
48
|
|
49
|
+
def self.edit_create_sub_for_customer_quote(id, params, env=nil, headers={})
|
50
|
+
Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote"), params, env, headers)
|
51
|
+
end
|
52
|
+
|
49
53
|
def self.update_subscription_quote(params, env=nil, headers={})
|
50
54
|
Request.send('post', uri_path("quotes","update_subscription_quote"), params, env, headers)
|
51
55
|
end
|
52
56
|
|
57
|
+
def self.edit_update_subscription_quote(id, params={}, env=nil, headers={})
|
58
|
+
Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote"), params, env, headers)
|
59
|
+
end
|
60
|
+
|
53
61
|
def self.create_for_onetime_charges(params, env=nil, headers={})
|
54
62
|
Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers)
|
55
63
|
end
|
56
64
|
|
65
|
+
def self.edit_one_time_quote(id, params={}, env=nil, headers={})
|
66
|
+
Request.send('post', uri_path("quotes",id.to_s,"edit_one_time_quote"), params, env, headers)
|
67
|
+
end
|
68
|
+
|
57
69
|
def self.list(params={}, env=nil, headers={})
|
58
70
|
Request.send_list_request('get', uri_path("quotes"), params, env, headers)
|
59
71
|
end
|
60
72
|
|
73
|
+
def self.quote_line_groups_for_quote(id, params={}, env=nil, headers={})
|
74
|
+
Request.send('get', uri_path("quotes",id.to_s,"quote_line_groups"), params, env, headers)
|
75
|
+
end
|
76
|
+
|
61
77
|
def self.convert(id, params={}, env=nil, headers={})
|
62
78
|
Request.send('post', uri_path("quotes",id.to_s,"convert"), params, env, headers)
|
63
79
|
end
|
@@ -66,6 +82,10 @@ module ChargeBee
|
|
66
82
|
Request.send('post', uri_path("quotes",id.to_s,"update_status"), params, env, headers)
|
67
83
|
end
|
68
84
|
|
85
|
+
def self.extend_expiry_date(id, params, env=nil, headers={})
|
86
|
+
Request.send('post', uri_path("quotes",id.to_s,"extend_expiry_date"), params, env, headers)
|
87
|
+
end
|
88
|
+
|
69
89
|
def self.delete(id, params={}, env=nil, headers={})
|
70
90
|
Request.send('post', uri_path("quotes",id.to_s,"delete"), params, env, headers)
|
71
91
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class QuoteLineGroup < Model
|
3
|
+
|
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, :discount_amount, :item_level_discount_amount, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
|
+
end
|
7
|
+
|
8
|
+
class Discount < Model
|
9
|
+
attr_accessor :amount, :description, :entity_type, :entity_id
|
10
|
+
end
|
11
|
+
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
|
14
|
+
end
|
15
|
+
|
16
|
+
class Tax < Model
|
17
|
+
attr_accessor :name, :amount, :description
|
18
|
+
end
|
19
|
+
|
20
|
+
class LineItemTax < Model
|
21
|
+
attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
|
22
|
+
end
|
23
|
+
|
24
|
+
attr_accessor :version, :id, :sub_total, :total, :credits_applied, :amount_paid, :amount_due,
|
25
|
+
:charge_event, :billing_cycle_number, :line_items, :discounts, :line_item_discounts, :taxes,
|
26
|
+
:line_item_taxes
|
27
|
+
|
28
|
+
# OPERATIONS
|
29
|
+
#-----------
|
30
|
+
|
31
|
+
end # ~QuoteLineGroup
|
32
|
+
end # ~ChargeBee
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class QuotedSubscription < Model
|
3
|
+
|
4
|
+
class Addon < Model
|
5
|
+
attr_accessor :id, :quantity, :unit_price, :amount, :trial_end, :remaining_billing_cycles
|
6
|
+
end
|
7
|
+
|
8
|
+
class EventBasedAddon < Model
|
9
|
+
attr_accessor :id, :quantity, :unit_price, :service_period_in_days, :on_event, :charge_once
|
10
|
+
end
|
11
|
+
|
12
|
+
class Coupon < Model
|
13
|
+
attr_accessor :coupon_id, :apply_till, :applied_count, :coupon_code
|
14
|
+
end
|
15
|
+
|
16
|
+
attr_accessor :id, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
|
17
|
+
:billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
|
18
|
+
:addons, :event_based_addons, :coupons
|
19
|
+
|
20
|
+
# OPERATIONS
|
21
|
+
#-----------
|
22
|
+
|
23
|
+
end # ~QuotedSubscription
|
24
|
+
end # ~ChargeBee
|
@@ -25,15 +25,20 @@ module ChargeBee
|
|
25
25
|
attr_accessor :referral_code, :coupon_code, :referrer_id, :external_reference_id, :reward_status, :referral_system, :account_id, :campaign_id, :external_campaign_id, :friend_offer_type, :referrer_reward_type, :notify_referral_system, :destination_url, :post_purchase_widget_enabled
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
:
|
33
|
-
:
|
34
|
-
:
|
35
|
-
:
|
36
|
-
:
|
28
|
+
class ContractTerm < Model
|
29
|
+
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
|
30
|
+
end
|
31
|
+
|
32
|
+
attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
|
33
|
+
:billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
|
34
|
+
:customer_id, :plan_amount, :plan_free_quantity, :status, :trial_start, :current_term_start,
|
35
|
+
:current_term_end, :next_billing_at, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
|
36
|
+
:override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
|
37
|
+
:created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
|
38
|
+
:offline_payment_method, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate,
|
39
|
+
:base_currency_code, :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons,
|
40
|
+
:shipping_address, :referral_info, :invoice_notes, :meta_data, :deleted, :contract_term, :cancel_reason_code,
|
41
|
+
:free_period, :free_period_unit
|
37
42
|
|
38
43
|
# OPERATIONS
|
39
44
|
#-----------
|
@@ -54,6 +59,10 @@ module ChargeBee
|
|
54
59
|
Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers)
|
55
60
|
end
|
56
61
|
|
62
|
+
def self.contract_terms_for_subscription(id, params={}, env=nil, headers={})
|
63
|
+
Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
|
64
|
+
end
|
65
|
+
|
57
66
|
def self.retrieve(id, env=nil, headers={})
|
58
67
|
Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
|
59
68
|
end
|
@@ -82,10 +91,6 @@ module ChargeBee
|
|
82
91
|
Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end"), params, env, headers)
|
83
92
|
end
|
84
93
|
|
85
|
-
def self.cancel(id, params={}, env=nil, headers={})
|
86
|
-
Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers)
|
87
|
-
end
|
88
|
-
|
89
94
|
def self.reactivate(id, params={}, env=nil, headers={})
|
90
95
|
Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env, headers)
|
91
96
|
end
|
@@ -110,6 +115,10 @@ module ChargeBee
|
|
110
115
|
Request.send('post', uri_path("customers",id.to_s,"import_subscription"), params, env, headers)
|
111
116
|
end
|
112
117
|
|
118
|
+
def self.import_contract_term(id, params={}, env=nil, headers={})
|
119
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"import_contract_term"), params, env, headers)
|
120
|
+
end
|
121
|
+
|
113
122
|
def self.override_billing_profile(id, params={}, env=nil, headers={})
|
114
123
|
Request.send('post', uri_path("subscriptions",id.to_s,"override_billing_profile"), params, env, headers)
|
115
124
|
end
|
@@ -122,6 +131,10 @@ module ChargeBee
|
|
122
131
|
Request.send('post', uri_path("subscriptions",id.to_s,"pause"), params, env, headers)
|
123
132
|
end
|
124
133
|
|
134
|
+
def self.cancel(id, params={}, env=nil, headers={})
|
135
|
+
Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers)
|
136
|
+
end
|
137
|
+
|
125
138
|
def self.resume(id, params={}, env=nil, headers={})
|
126
139
|
Request.send('post', uri_path("subscriptions",id.to_s,"resume"), params, env, headers)
|
127
140
|
end
|
@@ -5,7 +5,12 @@ module ChargeBee
|
|
5
5
|
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
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
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :id, :currency_code, :status, :next_billing_at, :pause_date, :resume_date, :shipping_address,
|
13
|
+
:contract_term
|
9
14
|
|
10
15
|
# OPERATIONS
|
11
16
|
#-----------
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class LinkedCreditNote < Model
|
9
|
-
attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_date, :cn_total, :cn_status, :cn_reference_invoice_id
|
9
|
+
attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_create_reason_code, :cn_date, :cn_total, :cn_status, :cn_reference_invoice_id
|
10
10
|
end
|
11
11
|
|
12
12
|
class LinkedRefund < Model
|
@@ -24,6 +24,10 @@ module ChargeBee
|
|
24
24
|
Request.send_list_request('get', uri_path("virtual_bank_accounts"), params, env, headers)
|
25
25
|
end
|
26
26
|
|
27
|
+
def self.delete(id, env=nil, headers={})
|
28
|
+
Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete"), {}, env, headers)
|
29
|
+
end
|
30
|
+
|
27
31
|
def self.delete_local(id, env=nil, headers={})
|
28
32
|
Request.send('post', uri_path("virtual_bank_accounts",id.to_s,"delete_local"), {}, env, headers)
|
29
33
|
end
|
data/lib/chargebee/result.rb
CHANGED
@@ -7,13 +7,24 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
def subscription()
|
9
9
|
subscription = get(:subscription, Subscription,
|
10
|
-
{: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});
|
10
|
+
{: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});
|
11
11
|
return subscription;
|
12
12
|
end
|
13
13
|
|
14
|
+
def contract_term()
|
15
|
+
contract_term = get(:contract_term, ContractTerm);
|
16
|
+
return contract_term;
|
17
|
+
end
|
18
|
+
|
19
|
+
def advance_invoice_schedule()
|
20
|
+
advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
|
21
|
+
{:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
|
22
|
+
return advance_invoice_schedule;
|
23
|
+
end
|
24
|
+
|
14
25
|
def customer()
|
15
26
|
customer = get(:customer, Customer,
|
16
|
-
{:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :relationship => Customer::Relationship});
|
27
|
+
{:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :relationship => Customer::Relationship, :parent_account_access => Customer::ParentAccountAccess, :child_account_access => Customer::ChildAccountAccess});
|
17
28
|
return customer;
|
18
29
|
end
|
19
30
|
|
@@ -103,7 +114,7 @@ module ChargeBee
|
|
103
114
|
estimate = get(:estimate, Estimate, {},
|
104
115
|
{:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
|
105
116
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
106
|
-
{:shipping_address => SubscriptionEstimate::ShippingAddress});
|
117
|
+
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
107
118
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
108
119
|
{: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});
|
109
120
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
@@ -123,6 +134,18 @@ module ChargeBee
|
|
123
134
|
return quote;
|
124
135
|
end
|
125
136
|
|
137
|
+
def quoted_subscription()
|
138
|
+
quoted_subscription = get(:quoted_subscription, QuotedSubscription,
|
139
|
+
{:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon});
|
140
|
+
return quoted_subscription;
|
141
|
+
end
|
142
|
+
|
143
|
+
def quote_line_group()
|
144
|
+
quote_line_group = get(:quote_line_group, QuoteLineGroup,
|
145
|
+
{:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
|
146
|
+
return quote_line_group;
|
147
|
+
end
|
148
|
+
|
126
149
|
def plan()
|
127
150
|
plan = get(:plan, Plan,
|
128
151
|
{:tiers => Plan::Tier, :applicable_addons => Plan::ApplicableAddon, :attached_addons => Plan::AttachedAddon, :event_based_addons => Plan::EventBasedAddon});
|
@@ -217,6 +240,12 @@ module ChargeBee
|
|
217
240
|
return credit_notes;
|
218
241
|
end
|
219
242
|
|
243
|
+
def advance_invoice_schedules()
|
244
|
+
advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
|
245
|
+
{:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
|
246
|
+
return advance_invoice_schedules;
|
247
|
+
end
|
248
|
+
|
220
249
|
def hierarchies()
|
221
250
|
hierarchies = get_list(:hierarchies, Hierarchy,
|
222
251
|
{});
|
@@ -229,8 +258,9 @@ module ChargeBee
|
|
229
258
|
return invoices;
|
230
259
|
end
|
231
260
|
|
232
|
-
|
233
|
-
|
261
|
+
|
262
|
+
def to_s(*args)
|
263
|
+
JSON.pretty_generate(@response)
|
234
264
|
end
|
235
265
|
|
236
266
|
private
|
@@ -244,7 +274,7 @@ module ChargeBee
|
|
244
274
|
when Hash
|
245
275
|
model = klass.construct(obj, sub_types, dependant_types)
|
246
276
|
dependant_sub_types.each do |k,v|
|
247
|
-
|
277
|
+
model.init_dependant(obj, k, v);
|
248
278
|
end
|
249
279
|
set_val.push(model)
|
250
280
|
end
|
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.7.
|
4
|
+
version: 2.7.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajaraman S
|
@@ -9,68 +9,68 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-10-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '2.1'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '2.1'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rest-client
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.8'
|
35
|
-
- - <
|
35
|
+
- - "<"
|
36
36
|
- !ruby/object:Gem::Version
|
37
37
|
version: '3.0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- -
|
42
|
+
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
44
|
version: '1.8'
|
45
|
-
- - <
|
45
|
+
- - "<"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 3.0.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.0.0
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: mocha
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
type: :development
|
70
70
|
prerelease: false
|
71
71
|
version_requirements: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
description: Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com.
|
@@ -95,9 +95,11 @@ files:
|
|
95
95
|
- lib/chargebee/list_result.rb
|
96
96
|
- lib/chargebee/models/addon.rb
|
97
97
|
- lib/chargebee/models/address.rb
|
98
|
+
- lib/chargebee/models/advance_invoice_schedule.rb
|
98
99
|
- lib/chargebee/models/card.rb
|
99
100
|
- lib/chargebee/models/comment.rb
|
100
101
|
- lib/chargebee/models/contact.rb
|
102
|
+
- lib/chargebee/models/contract_term.rb
|
101
103
|
- lib/chargebee/models/coupon.rb
|
102
104
|
- lib/chargebee/models/coupon_code.rb
|
103
105
|
- lib/chargebee/models/coupon_set.rb
|
@@ -121,6 +123,8 @@ files:
|
|
121
123
|
- lib/chargebee/models/portal_session.rb
|
122
124
|
- lib/chargebee/models/promotional_credit.rb
|
123
125
|
- lib/chargebee/models/quote.rb
|
126
|
+
- lib/chargebee/models/quote_line_group.rb
|
127
|
+
- lib/chargebee/models/quoted_subscription.rb
|
124
128
|
- lib/chargebee/models/resource_migration.rb
|
125
129
|
- lib/chargebee/models/site_migration_detail.rb
|
126
130
|
- lib/chargebee/models/subscription.rb
|
@@ -147,22 +151,21 @@ licenses:
|
|
147
151
|
metadata: {}
|
148
152
|
post_install_message:
|
149
153
|
rdoc_options:
|
150
|
-
- --charset=UTF-8
|
154
|
+
- "--charset=UTF-8"
|
151
155
|
require_paths:
|
152
156
|
- lib
|
153
157
|
required_ruby_version: !ruby/object:Gem::Requirement
|
154
158
|
requirements:
|
155
|
-
- -
|
159
|
+
- - ">="
|
156
160
|
- !ruby/object:Gem::Version
|
157
161
|
version: 1.9.3
|
158
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
163
|
requirements:
|
160
|
-
- -
|
164
|
+
- - ">="
|
161
165
|
- !ruby/object:Gem::Version
|
162
166
|
version: '0'
|
163
167
|
requirements: []
|
164
|
-
|
165
|
-
rubygems_version: 2.4.5
|
168
|
+
rubygems_version: 3.0.3
|
166
169
|
signing_key:
|
167
170
|
specification_version: 2
|
168
171
|
summary: Ruby client for Chargebee API.
|