chargebee 2.8.7 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 708ccc4e7bc700bd4fe39eefba6194170221aa54fd8e029a12b01313783209dd
4
- data.tar.gz: e68922b6b0a16343f332b1639b2b6a24cafc5cb17329e45a5092008955bd15dd
2
+ SHA1:
3
+ metadata.gz: d054b2c2fc96feb20123a34ddecfb22755ca7199
4
+ data.tar.gz: e99cac8fff284ecafe4d87e7e101da9a0aaba5bc
5
5
  SHA512:
6
- metadata.gz: 1534fdfb2fdc43de9782b2d5546613ca56d48415d0e075ad2775215c69e02ae85e26788e091478a1a45f9831a1e75ece9fee82ea1d1eaec76fd7ce788e4cfc6d
7
- data.tar.gz: 82e0d80208ce8cba5c262f57e2c6d2cfe72053f2d7e923e1125e0c160a4b695d11fe3a779c7d2a2b6a88544b4d09f2c3134fe70abb58965ef1c3a40c4518bc5f
6
+ metadata.gz: 5128dd03245d6757af401303a1e402835267c31b3e1ea50ebf2b8acfe7e7887e5465da71a8ead5fa0715d6e80019646707c8640fc48a65346ec9f29b30cf6de1
7
+ data.tar.gz: aacdac0929c47d29d457e9be27814aa00c5149c9968ab0072f2887a2b1cfe1f0b011131ad113bd79d9a9da8231fcc701bf73503be1caf498a50a8c686b7d47da
data/CHANGELOG.md CHANGED
@@ -1,3 +1,132 @@
1
+ ### v2.10.1 (2021-10-18)
2
+ * * *
3
+
4
+ ### Fixes:
5
+ * Fixed .DS_Store file generation issue
6
+
7
+ ### v2.10.0 (2021-10-14)
8
+
9
+ #### New Attributes:
10
+ * entity_id has been added in order_line_item_discounts resource.
11
+
12
+ #### New Input parameters:
13
+ * line_items[tax5_name], line_items[tax5_amount], line_items[tax6_name], line_items[tax6_amount], line_items[tax7_name], line_items[tax7_amount], line_items[tax8_name], line_items[tax8_amount], line_items[tax9_name], line_items[tax9_amount], line_items[tax10_name], line_items[tax10_amount] have been added in import_invoice api.
14
+ * replace_primary_payment_source has been added in create_subscription_for_customer and create_subscription_for_items apis.
15
+
16
+ #### New Enum values:
17
+ * coupon_expired has been added to event_type enum.
18
+ * mollie has been added to gateway enum.
19
+ * item_level_discount and document_level_discount has been added to discount_type.
20
+
21
+ ### v2.9.0 (2021-08-16)
22
+ * * *
23
+
24
+ #### New Attributes:
25
+ * generated_at has been added in credit_note and invoice resources.
26
+ * change_option have been added in quoted_subscription resource.
27
+ * changes_scheduled_at has been added in subscription and quoted_subscription resources.
28
+ * iin and last4 have been added in transaction resource.
29
+
30
+ #### New Resource:
31
+ * quoted_charge has been added.
32
+
33
+ #### New Input parameters:
34
+ * invoice_date has been added in estimates##create_subscription_estimate, estimates#estimate_for_creating_a_customer_and_subscription, estimates#estimate_for_creating_a_subscription, estimates#create_subscription_for_a_customer_estimate, estimates#update_subscription_estimate, estimates#estimate_for_updating_a_subscription, estimates#cancel_subscription_estimate, estimates#cancel_subscription_for_items_estimate, estimates#create_invoice_for_items_estimate, estimates#create_invoice_estimate, hosted_pages#checkout_existing_subscription, hosted_pages#create_checkout_to_update_a_subscription, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, subscriptions#create_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items, subscriptions#reactivate_a_subscription, subscriptions#cancel_subscription_for_items and subscriptions#cancel_a_subscription endpoints.
35
+ * coupon_ids has been added to invoices#create_invoice_for_a_one-time_charge, invoice#create_invoice_for_a_non-recurring_addon, quotes#create_quote_for_one-time_charges, quotes#edit_quote_for_one-time_charges, quotes#create_a_quote_for_charge_and_charge_items, quotes#edit_quote_for_charge_items_and_charges endpoints.
36
+ * change_option and changes_scheduled_at have been added in quotes#create_quote_for_updating_a_subscription, quotes#edit_quote_for_updating_a_subscription, quotes#create_a_quote_for_update_subscription_items, quotes#edit_update_subscription_quote_for_items, subscriptions#update_a_subscription and subscriptions#create_subscription_for_items endpoints.
37
+ * invoice_date, create_pending_invoices and first_invoice_pending have been added in quotes#convert_a_quote endpoint.
38
+ * subscription[auto_close_invoices] has been added in quotes#convert_a_quote endpoint.
39
+
40
+ #### New Enum values:
41
+ * subscription_cancel has been added to charge_event enum in quote_line_groups resource.
42
+ * subscription_created_with_backdating, subscription_changed_with_backdating, subscription_canceled_with_backdating, subscription_reactivated_with_backdating, invoice_generated_with_backdating and credit_note_created_with_backdating have been added to event_type enum
43
+ * change_option enum has been added.
44
+
45
+ #### Deprecated parameters:
46
+ * coupon has been deprecated in invoices#create_invoice_for_a_one-time_charge and invoices#create_invoice_for_a_non-recurring_addon endpoints.
47
+
48
+
49
+ ### v2.8.8 (2021-07-22)
50
+ * * *
51
+ #### New endpoints:
52
+ * hosted_pages#checkout_one_time_for_items and hosted_pages#checkout_gift_for_items have been added in hosted_pages resource.
53
+ * orders#resend_an_order has been added in orders resource.
54
+ * quotes#edit_create_subscription_quote_for_items, quotes#edit_update_subscription_quote_for_items and quotes#edit_quote_for_charge_items_and_charges have been added in quotes resource. Applicable only for Product Catalog V2.
55
+
56
+ #### New attributes:
57
+ * accounting_category3 and accounting_category4 have been added to addon, item_price and plan resources.
58
+ * quantity_in_decimal has been added to attached_item resource.
59
+ * period and period_unit have been added to coupon resource.
60
+ * entity_id has been added to line_item_discounts object of credit_note, credit_note_estimate, invoice, invoice_estimate, quote and quote_line_group resources.
61
+ * vat_number_prefix has been added to credit_note, customer, invoice and quote resources.
62
+ * price_in_decimal has been added to differential_price and item_price resources.
63
+ * exchange_rate and new_sales_amount have been added to invoice resource.
64
+ * archived_at has been added to item and item_price resources.
65
+ * trial_end_action has been added to item_price, plan, subscription and subscription_estimate resources.
66
+ * resent_orders, tracking_url, resent_status, is_resent, original_order_id and resend_reasons have been added to order resource.
67
+ * line_item_tiers have been added to quote resource.
68
+ * plan_quantity_in_decimal and plan_unit_price_in_decimal have been added to quoted_subscription and subscription resources. Applicable only for Product Catalog V1.
69
+ * contract_term_billing_cycle_on_renewal and quoted_contract_term have been added to quoted_subscription resource.
70
+ * quantity_in_decimal, metered_quantity, last_calculated_at, unit_price_in_decimal, amount_in_decimal and free_quantity_in_decimal have been added to subscription_items object of quoted_subscription and subscription resources.
71
+ * starting_unit_in_decimal, ending_unit_in_decimal and price_in_decimal have been added to item_tiers object in quoted_subscription resources.
72
+ * cancel_schedule_created_at has been added to subscription resource.
73
+ * exchange_rate and merchant_reference_id have been added to transaction resource.
74
+
75
+ #### New parameters:
76
+ * accounting_category3 and accounting_category4 have been added in addons#create_an_addon, addons#update_an_addon, plans#create_a_plan and plans#update_a_plan endpoints.
77
+ * quantity_in_decimal has been added in attached_items#create_an_attached_item, attached_items#update_an_attached_item and gifts#create_a_gift_subscription_for_items endpoints.
78
+ * period and period_unit have been added in coupons#create_a_coupon, coupons#update_a_coupon, coupons#create_a_coupon_for_items and coupons#update_a_coupon_for_items endpoints.
79
+ * vat_number_prefix has been added in customers#create_a_customer, customers#update_billing_info_for_a_customer, estimates#create_subscription, estimates#create_subscription_estimate, estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, hosted_pages#checkout_new_subscription, hosted_pages#checkout_one-time_payments, hosted_pages#create_checkout_for_a_new_subscription hosted_pages#checkout_existing_subscription, hosted_pages#create_checkout_to_update_a_subscription, invoices#import_invoice, invoices#update_invoice_details, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
80
+ * payment_method[additional_information] has been added in customers#create_a_customer, customers#update_payment_method_for_a_customer, customers#collect_payment_for_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
81
+ * card[additional_information] has been added in customers#create_a_customer, customers#collect_payment_for_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, payment_sources#create_a_card_payment_source, subscriptions#create_a_subscription, subscriptions#update_a_subscription, subscriptions#update_subscription_for_items and subscriptions#import_a_subscription endpoints.
82
+ * bank_account[billing_address] has been added in customers#create_a_customer, invoices#create_an_invoice, invoices#create_invoice_for_items_and_one-time_charges, payment_sources#create_a_bank_account_payment_source and subscriptions#create_a_subscription endpoints.
83
+ * price_in_decimal has been added in differential_prices#create_a_differential_price and differential_prices#update_a_differential_price endpoints.
84
+ * tiers[starting_unit_in_decimal][0..N], tiers[ending_unit_in_decimal][0..N] and tiers[price_in_decimal][0..N] have been added in differential_prices#create_a_differential_price, differential_prices#update_a_differential_price, item_prices#create_an_item_price and item_prices#update_an_item_price endpoints.
85
+ * remove_general_note and notes_to_remove been added in estimates#create_invoice_estimate, estimates#create_invoice_for_items_estimate and invoices#create_invoice_for_items_and_one-time_charges endpoints.
86
+ * trial_end_action has been added in estimates#create_subscription, estimates#create_subscription_estimate, estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, plans#create_a_plan, plans#update_a_plan, item_prices#create_an_item_price, item_prices#update_an_item_price, subscriptions#create_a_subscription, subscriptions#create_subscription_for_customer, subscriptions#create_subscription_for_items, subscriptions#update_a_subscription and subscriptions#update_subscription_for_items endpoints.
87
+ * subscription_items[unit_price_in_decimal][0..N], item_tiers[starting_unit][0..N], item_tiers[ending_unit][0..N] and item_tiers[price_in_decimal][0..N] have been added in estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, estimates#cancel_subscription_for_items_estimate, hosted_pages#create_checkout_for_a_new_subscription, hosted_pages#create_checkout_to_update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items and subscriptions#import_subscription_for_items endpoints.
88
+ * subscription_items[quantity_in_decimal][0..N] has been added in estimates#create_subscription_for_items, estimates#create_subscription_for_items_estimate, estimates#cancel_subscription_for_items_estimate, estimates#update_subscription_for_items, estimates#update_subscription, estimates#gift_subscription_for_items, estimates#cancel_subscription_for_items_estimate, gifts#create_a_gift_subscription_for_items, hosted_pages#create_checkout_for_a_new_subscription, hosted_pages#create_checkout_to_update_a_subscription, subscriptions#create_subscription_for_items, subscriptions#update_subscription_for_items, subscriptions#import_subscription_for_items and subscriptions#cancel_subscription_for_items endpoints.
89
+ * notes_to_remove[entity_type][0..N] and notes_to_remove[entity_id][0..N] have been added in estimates#create_invoice, estimates#create_invoice_for_items and invoices#create_invoice_for_items_and_one-time_charges endpoints.
90
+ * item_prices[quantity_in_decimal][0..N] and item_prices[unit_price_in_decimal][0..N] have been added in estimates#create_invoice_for_items, invoices#create_invoice_for_items_and_one-time_charges and unbilled_charges#create_unbilled_charges_for_a_subscription endpoints.
91
+ * item_tiers[starting_unit_in_decimal][0..N], item_tiers[ending_unit_in_decimal][0..N] and item_tiers[price_in_decimal][0..N] have been added in estimates#create_invoice_for_items, invoices#create_invoice_for_items_and_one-time_charges and unbilled_charges#create_unbilled_charges_for_a_subscription endpoints.
92
+ * payment_intent[additional_information] has been added in customers#create_a_customer, customers#collect_payment_for_customer, gifts#create_a_gift_subscription_for_items, gifts#create_a_gif and payment_sources#create_using_payment_intent endpoints.
93
+ * invoice_note has been added in hosted_pages#checkout_one-time_payments endpoint.
94
+ * allow_offline_payment_methods has been added in hosted_pages#create_checkout_for_a_new_subscription and hosted_pages#create_checkout_to_update_a_subscription endpoints.
95
+ * free_quantity_in_decimal, price_in_decimal and trial_end_action have been added in item_prices#create_an_item_price and item_prices#update_an_item_price endpoints.
96
+ * tracking_url has been added in orders#create_an_order, orders#update_an_order and orders#import_an_order endpoints.
97
+ * additional_information has been added in payment_sources#create_using_gateway_temporary_token and payment_sources#create_using_permanent_token endpoints.
98
+
99
+ #### New enum values:
100
+ * bancontact has been added to card_type enum.
101
+ * card and latam_local_card have been added to powered_by enum.
102
+ * item_level_discount and document_level_discount have been added to entity_type enum of credit_note_discount, credit_note_estimate_discount, invoice_discount, line_item_discount and invoice_estimate_discount resources.
103
+ * item_level_discount and document_level_discount have been added to discount_type enum.
104
+ * add_usages_reminder and order_resent have been added to event_type enum.
105
+ * ingenico_direct and exact have been added to gateway enum.
106
+ * max_usage has been added to usage_calculation enum.
107
+ * trial_end_action enum has been added.
108
+ * order_resent has been added to cancellation_reason enum.
109
+ * resent_status enum has been added.
110
+ * custom_discount has been added in discount_type enum of order_line_item_discount.
111
+
112
+ #### New filter parameters:
113
+ * resent_status, is_resent and original_order_id filter parameters have been added in exports#orders and orders#list_orders enpoints.
114
+ * updated_at filter parameter has been added in exports#item_families and item_families#list_item_families endpoints.
115
+
116
+ #### New sort parameters:
117
+ * name, id and updated_at sort parameters are added to items#list_items and item_prices#list_item_prices endpoints.
118
+ * created_at and updated_at sort parameters are added to payment_sources#list_payment_sources endpoint.
119
+ * usage_date sort parameter has been added to usages#list_usages endpoint.
120
+
121
+ #### Deprecated parameters:
122
+ * duration_month parameter has been deprecated in coupon resource.
123
+
124
+
125
+ ### v2.8.7 (2021-06-22)
126
+ * * *
127
+ * With fix regarding auto update of rest-client gem from 2.0.2 to 2.1.0
128
+
129
+
1
130
  ### v2.8.6 (2021-05-31)
2
131
  * * *
3
132
  * Added support for Ruby 3.0
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011-2020 ChargeBee, Inc.
3
+ Copyright (c) 2011-2021 ChargeBee, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person
6
6
  obtaining a copy of this software and associated documentation
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.7'
8
- s.date = '2021-06-22'
7
+ s.version = '2.10.1'
8
+ s.date = '2021-10-18'
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."
@@ -34,7 +34,6 @@ Gem::Specification.new do |s|
34
34
  README.rdoc
35
35
  Rakefile
36
36
  chargebee.gemspec
37
- lib/.DS_Store
38
37
  lib/chargebee.rb
39
38
  lib/chargebee/environment.rb
40
39
  lib/chargebee/errors.rb
@@ -75,6 +74,7 @@ Gem::Specification.new do |s|
75
74
  lib/chargebee/models/promotional_credit.rb
76
75
  lib/chargebee/models/quote.rb
77
76
  lib/chargebee/models/quote_line_group.rb
77
+ lib/chargebee/models/quoted_charge.rb
78
78
  lib/chargebee/models/quoted_subscription.rb
79
79
  lib/chargebee/models/resource_migration.rb
80
80
  lib/chargebee/models/site_migration_detail.rb
@@ -8,10 +8,10 @@ module ChargeBee
8
8
  attr_accessor :id, :name, :invoice_name, :description, :pricing_model, :type, :charge_type,
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
- :sku, :accounting_code, :accounting_category1, :accounting_category2, :is_shippable, :shipping_frequency_period,
12
- :shipping_frequency_period_unit, :resource_version, :updated_at, :price_in_decimal, :included_in_mrr,
13
- :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers, :show_description_in_invoices,
14
- :show_description_in_quotes
11
+ :sku, :accounting_code, :accounting_category1, :accounting_category2, :accounting_category3,
12
+ :accounting_category4, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
13
+ :resource_version, :updated_at, :price_in_decimal, :included_in_mrr, :invoice_notes, :taxable,
14
+ :tax_profile_id, :meta_data, :tiers, :show_description_in_invoices, :show_description_in_quotes
15
15
 
16
16
  # OPERATIONS
17
17
  #-----------
@@ -1,8 +1,8 @@
1
1
  module ChargeBee
2
2
  class AttachedItem < Model
3
3
 
4
- attr_accessor :id, :parent_item_id, :item_id, :type, :status, :quantity, :billing_cycles, :charge_on_event,
5
- :charge_once, :created_at, :resource_version, :updated_at
4
+ attr_accessor :id, :parent_item_id, :item_id, :type, :status, :quantity, :quantity_in_decimal,
5
+ :billing_cycles, :charge_on_event, :charge_once, :created_at, :resource_version, :updated_at
6
6
 
7
7
  # OPERATIONS
8
8
  #-----------
@@ -27,9 +27,5 @@ module ChargeBee
27
27
  Request.send_list_request('get', uri_path("items",id.to_s,"attached_items"), params, env, headers)
28
28
  end
29
29
 
30
- def self.list_internal(params={}, env=nil, headers={})
31
- Request.send('get', uri_path("attached_items","list_internal"), params, env, headers)
32
- end
33
-
34
30
  end # ~AttachedItem
35
31
  end # ~ChargeBee
@@ -12,8 +12,8 @@ module ChargeBee
12
12
  attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
13
13
  :discount_quantity, :currency_code, :duration_type, :duration_month, :valid_till, :max_redemptions,
14
14
  :status, :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
15
- :resource_version, :updated_at, :included_in_mrr, :plan_ids, :addon_ids, :item_constraints,
16
- :item_constraint_criteria, :redemptions, :invoice_notes, :meta_data
15
+ :resource_version, :updated_at, :included_in_mrr, :period, :period_unit, :plan_ids, :addon_ids,
16
+ :item_constraints, :item_constraint_criteria, :redemptions, :invoice_notes, :meta_data
17
17
 
18
18
  # OPERATIONS
19
19
  #-----------
@@ -10,7 +10,7 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class LineItemDiscount < Model
13
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
14
14
  end
15
15
 
16
16
  class LineItemTier < Model
@@ -35,10 +35,10 @@ module ChargeBee
35
35
 
36
36
  attr_accessor :id, :customer_id, :subscription_id, :reference_invoice_id, :type, :reason_code,
37
37
  :status, :vat_number, :date, :price_type, :currency_code, :total, :amount_allocated, :amount_refunded,
38
- :amount_available, :refunded_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
39
- :total_in_local_currency, :local_currency_code, :round_off_amount, :fractional_correction, :line_items,
40
- :discounts, :line_item_discounts, :line_item_tiers, :taxes, :line_item_taxes, :linked_refunds,
41
- :allocations, :deleted, :create_reason_code
38
+ :amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
39
+ :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code, :round_off_amount,
40
+ :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers, :taxes,
41
+ :line_item_taxes, :linked_refunds, :allocations, :deleted, :create_reason_code, :vat_number_prefix
42
42
 
43
43
  # OPERATIONS
44
44
  #-----------
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
21
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
21
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
22
22
  end
23
23
 
24
24
  class LineItemTier < Model
@@ -42,7 +42,8 @@ module ChargeBee
42
42
  :contacts, :payment_method, :invoice_notes, :preferred_currency_code, :promotional_credits,
43
43
  :unbilled_charges, :refundable_credits, :excess_payments, :balances, :meta_data, :deleted, :registered_for_gst,
44
44
  :consolidated_invoicing, :customer_type, :business_customer_without_vat_number, :client_profile_id,
45
- :relationship, :use_default_hierarchy_settings, :parent_account_access, :child_account_access
45
+ :relationship, :use_default_hierarchy_settings, :parent_account_access, :child_account_access,
46
+ :vat_number_prefix
46
47
 
47
48
  # OPERATIONS
48
49
  #-----------
@@ -9,8 +9,8 @@ module ChargeBee
9
9
  attr_accessor :period_unit, :period
10
10
  end
11
11
 
12
- attr_accessor :id, :item_price_id, :parent_item_id, :price, :status, :resource_version, :updated_at,
13
- :created_at, :modified_at, :tiers, :currency_code, :parent_periods
12
+ attr_accessor :id, :item_price_id, :parent_item_id, :price, :price_in_decimal, :status, :resource_version,
13
+ :updated_at, :created_at, :modified_at, :tiers, :currency_code, :parent_periods
14
14
 
15
15
  # OPERATIONS
16
16
  #-----------
@@ -47,7 +47,7 @@ module ChargeBee
47
47
  Request.send('get', uri_path("customers",id.to_s,"upcoming_invoices_estimate"), {}, env, headers)
48
48
  end
49
49
 
50
- def self.change_term_end(id, params={}, env=nil, headers={})
50
+ def self.change_term_end(id, params, env=nil, headers={})
51
51
  Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end_estimate"), params, env, headers)
52
52
  end
53
53
 
@@ -26,6 +26,10 @@ 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={}, env=nil, headers={})
30
+ Request.send('post', uri_path("hosted_pages","checkout_one_time_for_items"), params, env, headers)
31
+ end
32
+
29
33
  def self.checkout_new_for_items(params, env=nil, headers={})
30
34
  Request.send('post', uri_path("hosted_pages","checkout_new_for_items"), params, env, headers)
31
35
  end
@@ -66,6 +70,10 @@ module ChargeBee
66
70
  Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers)
67
71
  end
68
72
 
73
+ def self.checkout_gift_for_items(params={}, env=nil, headers={})
74
+ Request.send('post', uri_path("hosted_pages","checkout_gift_for_items"), params, env, headers)
75
+ end
76
+
69
77
  def self.claim_gift(params, env=nil, headers={})
70
78
  Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers)
71
79
  end
@@ -10,7 +10,7 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class LineItemDiscount < Model
13
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
14
14
  end
15
15
 
16
16
  class Tax < Model
@@ -62,14 +62,14 @@ module ChargeBee
62
62
  end
63
63
 
64
64
  attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
65
- :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
66
- :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
67
- :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency, :total_in_local_currency,
68
- :local_currency_code, :tax, :first_invoice, :has_advance_charges, :term_finalized, :is_gifted,
69
- :expected_payment_date, :amount_to_collect, :round_off_amount, :line_items, :discounts, :line_item_discounts,
70
- :taxes, :line_item_taxes, :line_item_tiers, :linked_payments, :dunning_attempts, :applied_credits,
71
- :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address,
72
- :payment_owner, :void_reason_code, :deleted
65
+ :price_type, :date, :due_date, :net_term_days, :exchange_rate, :currency_code, :total, :amount_paid,
66
+ :amount_adjusted, :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status,
67
+ :next_retry_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
68
+ :total_in_local_currency, :local_currency_code, :tax, :first_invoice, :new_sales_amount, :has_advance_charges,
69
+ :term_finalized, :is_gifted, :generated_at, :expected_payment_date, :amount_to_collect, :round_off_amount,
70
+ :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
71
+ :dunning_attempts, :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders,
72
+ :notes, :shipping_address, :billing_address, :payment_owner, :void_reason_code, :deleted, :vat_number_prefix
73
73
 
74
74
  # OPERATIONS
75
75
  #-----------
@@ -78,7 +78,7 @@ module ChargeBee
78
78
  Request.send('post', uri_path("invoices"), params, env, headers)
79
79
  end
80
80
 
81
- def self.create_for_charge_items_and_charges(params={}, env=nil, headers={})
81
+ def self.create_for_charge_items_and_charges(params, env=nil, headers={})
82
82
  Request.send('post', uri_path("invoices","create_for_charge_items_and_charges"), params, env, headers)
83
83
  end
84
84
 
@@ -22,7 +22,7 @@ module ChargeBee
22
22
  end
23
23
 
24
24
  class LineItemDiscount < Model
25
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
25
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
26
26
  end
27
27
 
28
28
  attr_accessor :recurring, :price_type, :currency_code, :sub_total, :total, :credits_applied,
@@ -8,7 +8,7 @@ module ChargeBee
8
8
  attr_accessor :id, :name, :description, :status, :resource_version, :updated_at, :item_family_id,
9
9
  :type, :is_shippable, :is_giftable, :redirect_url, :enabled_for_checkout, :enabled_in_portal,
10
10
  :included_in_mrr, :item_applicability, :gift_claim_redirect_url, :unit, :metered, :usage_calculation,
11
- :applicable_items, :metadata
11
+ :archived_at, :applicable_items, :metadata
12
12
 
13
13
  # OPERATIONS
14
14
  #-----------
@@ -10,15 +10,15 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class AccountingDetail < Model
13
- attr_accessor :sku, :accounting_code, :accounting_category1, :accounting_category2
13
+ attr_accessor :sku, :accounting_code, :accounting_category1, :accounting_category2, :accounting_category3, :accounting_category4
14
14
  end
15
15
 
16
16
  attr_accessor :id, :name, :item_family_id, :item_id, :description, :status, :external_name,
17
- :pricing_model, :price, :period, :currency_code, :period_unit, :trial_period, :trial_period_unit,
18
- :shipping_period, :shipping_period_unit, :billing_cycles, :free_quantity, :free_quantity_in_decimal,
19
- :price_in_decimal, :resource_version, :updated_at, :created_at, :invoice_notes, :tiers, :is_taxable,
20
- :tax_detail, :accounting_detail, :metadata, :item_type, :archivable, :parent_item_id, :show_description_in_invoices,
21
- :show_description_in_quotes
17
+ :pricing_model, :price, :price_in_decimal, :period, :currency_code, :period_unit, :trial_period,
18
+ :trial_period_unit, :trial_end_action, :shipping_period, :shipping_period_unit, :billing_cycles,
19
+ :free_quantity, :free_quantity_in_decimal, :resource_version, :updated_at, :created_at, :archived_at,
20
+ :invoice_notes, :tiers, :is_taxable, :tax_detail, :accounting_detail, :metadata, :item_type,
21
+ :archivable, :parent_item_id, :show_description_in_invoices, :show_description_in_quotes
22
22
 
23
23
  # OPERATIONS
24
24
  #-----------
@@ -18,21 +18,26 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
21
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
21
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
22
22
  end
23
23
 
24
24
  class LinkedCreditNote < Model
25
25
  attr_accessor :amount, :type, :id, :status, :amount_adjusted, :amount_refunded
26
26
  end
27
27
 
28
+ class ResentOrder < Model
29
+ attr_accessor :order_id, :reason, :amount
30
+ end
31
+
28
32
  attr_accessor :id, :document_number, :invoice_id, :subscription_id, :customer_id, :status, :cancellation_reason,
29
33
  :payment_status, :order_type, :price_type, :reference_id, :fulfillment_status, :order_date,
30
- :shipping_date, :note, :tracking_id, :batch_id, :created_by, :shipment_carrier, :invoice_round_off_amount,
31
- :tax, :amount_paid, :amount_adjusted, :refundable_credits_issued, :refundable_credits, :rounding_adjustement,
32
- :paid_on, :shipping_cut_off_date, :created_at, :status_update_at, :delivered_at, :shipped_at,
33
- :resource_version, :updated_at, :cancelled_at, :order_line_items, :shipping_address, :billing_address,
34
- :discount, :sub_total, :total, :line_item_taxes, :line_item_discounts, :linked_credit_notes,
35
- :deleted, :currency_code, :is_gifted, :gift_note, :gift_id
34
+ :shipping_date, :note, :tracking_id, :tracking_url, :batch_id, :created_by, :shipment_carrier,
35
+ :invoice_round_off_amount, :tax, :amount_paid, :amount_adjusted, :refundable_credits_issued,
36
+ :refundable_credits, :rounding_adjustement, :paid_on, :shipping_cut_off_date, :created_at, :status_update_at,
37
+ :delivered_at, :shipped_at, :resource_version, :updated_at, :cancelled_at, :resent_status, :is_resent,
38
+ :original_order_id, :order_line_items, :shipping_address, :billing_address, :discount, :sub_total,
39
+ :total, :line_item_taxes, :line_item_discounts, :linked_credit_notes, :deleted, :currency_code,
40
+ :is_gifted, :gift_note, :gift_id, :resend_reason, :resent_orders
36
41
 
37
42
  # OPERATIONS
38
43
  #-----------
@@ -81,5 +86,9 @@ module ChargeBee
81
86
  Request.send('get', uri_path("invoices",id.to_s,"orders"), params, env, headers)
82
87
  end
83
88
 
89
+ def self.resend(id, params={}, env=nil, headers={})
90
+ Request.send('post', uri_path("orders",id.to_s,"resend"), params, env, headers)
91
+ end
92
+
84
93
  end # ~Order
85
94
  end # ~ChargeBee
@@ -18,14 +18,14 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  attr_accessor :id, :name, :invoice_name, :description, :price, :currency_code, :period, :period_unit,
21
- :trial_period, :trial_period_unit, :pricing_model, :charge_model, :free_quantity, :setup_cost,
22
- :downgrade_penalty, :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages,
21
+ :trial_period, :trial_period_unit, :trial_end_action, :pricing_model, :charge_model, :free_quantity,
22
+ :setup_cost, :downgrade_penalty, :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages,
23
23
  :enabled_in_portal, :addon_applicability, :tax_code, :taxjar_product_code, :avalara_sale_type,
24
24
  :avalara_transaction_type, :avalara_service_type, :sku, :accounting_code, :accounting_category1,
25
- :accounting_category2, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
26
- :resource_version, :updated_at, :giftable, :claim_url, :free_quantity_in_decimal, :price_in_decimal,
27
- :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers, :applicable_addons, :attached_addons,
28
- :event_based_addons, :show_description_in_invoices, :show_description_in_quotes
25
+ :accounting_category2, :accounting_category3, :accounting_category4, :is_shippable, :shipping_frequency_period,
26
+ :shipping_frequency_period_unit, :resource_version, :updated_at, :giftable, :claim_url, :free_quantity_in_decimal,
27
+ :price_in_decimal, :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers, :applicable_addons,
28
+ :attached_addons, :event_based_addons, :show_description_in_invoices, :show_description_in_quotes
29
29
 
30
30
  # OPERATIONS
31
31
  #-----------
@@ -10,7 +10,7 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class LineItemDiscount < Model
13
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
14
14
  end
15
15
 
16
16
  class Tax < Model
@@ -21,6 +21,10 @@ module ChargeBee
21
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
22
  end
23
23
 
24
+ class LineItemTier < Model
25
+ attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount, :starting_unit_in_decimal, :ending_unit_in_decimal, :quantity_used_in_decimal, :unit_amount_in_decimal
26
+ end
27
+
24
28
  class ShippingAddress < Model
25
29
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
26
30
  end
@@ -32,8 +36,9 @@ module ChargeBee
32
36
  attr_accessor :id, :name, :po_number, :customer_id, :subscription_id, :invoice_id, :status,
33
37
  :operation_type, :vat_number, :price_type, :valid_till, :date, :total_payable, :charge_on_acceptance,
34
38
  :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
39
+ :updated_at, :vat_number_prefix, :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes,
40
+ :line_item_tiers, :currency_code, :notes, :shipping_address, :billing_address, :contract_term_start,
41
+ :contract_term_end, :contract_term_termination_fee
37
42
 
38
43
  # OPERATIONS
39
44
  #-----------
@@ -50,10 +55,6 @@ module ChargeBee
50
55
  Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote"), params, env, headers)
51
56
  end
52
57
 
53
- def self.create_sub_items_for_customer_quote(id, params, env=nil, headers={})
54
- Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote_for_items"), params, env, headers)
55
- end
56
-
57
58
  def self.update_subscription_quote(params, env=nil, headers={})
58
59
  Request.send('post', uri_path("quotes","update_subscription_quote"), params, env, headers)
59
60
  end
@@ -62,20 +63,36 @@ module ChargeBee
62
63
  Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote"), params, env, headers)
63
64
  end
64
65
 
66
+ def self.create_for_onetime_charges(params, env=nil, headers={})
67
+ Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers)
68
+ end
69
+
70
+ def self.edit_one_time_quote(id, params={}, env=nil, headers={})
71
+ Request.send('post', uri_path("quotes",id.to_s,"edit_one_time_quote"), params, env, headers)
72
+ end
73
+
74
+ def self.create_sub_items_for_customer_quote(id, params, env=nil, headers={})
75
+ Request.send('post', uri_path("customers",id.to_s,"create_subscription_quote_for_items"), params, env, headers)
76
+ end
77
+
78
+ def self.edit_create_sub_customer_quote_for_items(id, params, env=nil, headers={})
79
+ Request.send('post', uri_path("quotes",id.to_s,"edit_create_subscription_quote_for_items"), params, env, headers)
80
+ end
81
+
65
82
  def self.update_subscription_quote_for_items(params, env=nil, headers={})
66
83
  Request.send('post', uri_path("quotes","update_subscription_quote_for_items"), params, env, headers)
67
84
  end
68
85
 
69
- def self.create_for_onetime_charges(params, env=nil, headers={})
70
- Request.send('post', uri_path("quotes","create_for_onetime_charges"), params, env, headers)
86
+ def self.edit_update_subscription_quote_for_items(id, params, env=nil, headers={})
87
+ Request.send('post', uri_path("quotes",id.to_s,"edit_update_subscription_quote_for_items"), params, env, headers)
71
88
  end
72
89
 
73
90
  def self.create_for_charge_items_and_charges(params, env=nil, headers={})
74
91
  Request.send('post', uri_path("quotes","create_for_charge_items_and_charges"), params, env, headers)
75
92
  end
76
93
 
77
- def self.edit_one_time_quote(id, params={}, env=nil, headers={})
78
- Request.send('post', uri_path("quotes",id.to_s,"edit_one_time_quote"), params, env, headers)
94
+ def self.edit_for_charge_items_and_charges(id, params, env=nil, headers={})
95
+ Request.send('post', uri_path("quotes",id.to_s,"edit_for_charge_items_and_charges"), params, env, headers)
79
96
  end
80
97
 
81
98
  def self.list(params={}, env=nil, headers={})
@@ -10,7 +10,7 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class LineItemDiscount < Model
13
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
14
14
  end
15
15
 
16
16
  class Tax < Model
@@ -0,0 +1,30 @@
1
+ module ChargeBee
2
+ class QuotedCharge < Model
3
+
4
+ class Charge < Model
5
+ attr_accessor :amount, :amount_in_decimal, :description, :service_period_in_days, :avalara_sale_type, :avalara_transaction_type, :avalara_service_type
6
+ end
7
+
8
+ class Addon < Model
9
+ attr_accessor :id, :quantity, :unit_price, :quantity_in_decimal, :unit_price_in_decimal, :service_period
10
+ end
11
+
12
+ class InvoiceItem < Model
13
+ attr_accessor :item_price_id, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :service_period_days
14
+ end
15
+
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
18
+ end
19
+
20
+ class Coupon < Model
21
+ attr_accessor :coupon_id
22
+ end
23
+
24
+ attr_accessor :charges, :addons, :invoice_items, :item_tiers, :coupons
25
+
26
+ # OPERATIONS
27
+ #-----------
28
+
29
+ end # ~QuotedCharge
30
+ end # ~ChargeBee
@@ -10,20 +10,26 @@ module ChargeBee
10
10
  end
11
11
 
12
12
  class Coupon < Model
13
- attr_accessor :coupon_id, :apply_till, :applied_count, :coupon_code
13
+ attr_accessor :coupon_id
14
14
  end
15
15
 
16
16
  class SubscriptionItem < Model
17
- attr_accessor :item_price_id, :item_type, :quantity, :unit_price, :amount, :free_quantity, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
17
+ attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
18
18
  end
19
19
 
20
20
  class ItemTier < Model
21
- attr_accessor :item_price_id, :starting_unit, :ending_unit, :price
21
+ attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal
22
+ end
23
+
24
+ class QuotedContractTerm < Model
25
+ attr_accessor :contract_start, :contract_end, :billing_cycle, :action_at_term_end, :total_contract_value, :cancellation_cutoff_period
22
26
  end
23
27
 
24
28
  attr_accessor :id, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
25
29
  :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
26
- :addons, :event_based_addons, :coupons, :subscription_items, :item_tiers
30
+ :plan_quantity_in_decimal, :plan_unit_price_in_decimal, :changes_scheduled_at, :change_option,
31
+ :contract_term_billing_cycle_on_renewal, :addons, :event_based_addons, :coupons, :subscription_items,
32
+ :item_tiers, :quoted_contract_term
27
33
 
28
34
  # OPERATIONS
29
35
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Subscription < Model
3
3
 
4
4
  class SubscriptionItem < Model
5
- attr_accessor :item_price_id, :item_type, :quantity, :metered_quantity, :last_calculated_at, :unit_price, :amount, :free_quantity, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
5
+ attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :metered_quantity, :last_calculated_at, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :trial_end, :billing_cycles, :service_period_days, :charge_on_event, :charge_once, :charge_on_option
6
6
  end
7
7
 
8
8
  class ItemTier < Model
@@ -43,16 +43,17 @@ module ChargeBee
43
43
 
44
44
  attr_accessor :id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price, :setup_fee, :billing_period,
45
45
  :billing_period_unit, :start_date, :trial_end, :remaining_billing_cycles, :po_number, :auto_collection,
46
- :customer_id, :plan_amount, :plan_free_quantity, :status, :trial_start, :current_term_start,
47
- :current_term_end, :next_billing_at, :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
46
+ :plan_quantity_in_decimal, :plan_unit_price_in_decimal, :customer_id, :plan_amount, :plan_free_quantity,
47
+ :status, :trial_start, :trial_end_action, :current_term_start, :current_term_end, :next_billing_at,
48
+ :created_at, :started_at, :activated_at, :gift_id, :contract_term_billing_cycle_on_renewal,
48
49
  :override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
49
50
  :created_from_ip, :resource_version, :updated_at, :has_scheduled_advance_invoices, :has_scheduled_changes,
50
- :payment_source_id, :plan_free_quantity_in_decimal, :plan_quantity_in_decimal, :plan_unit_price_in_decimal,
51
- :plan_amount_in_decimal, :offline_payment_method, :subscription_items, :item_tiers, :charged_items,
52
- :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
53
- :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
54
- :invoice_notes, :meta_data, :metadata, :deleted, :contract_term, :cancel_reason_code, :free_period,
55
- :free_period_unit, :create_pending_invoices, :auto_close_invoices
51
+ :payment_source_id, :plan_free_quantity_in_decimal, :plan_amount_in_decimal, :cancel_schedule_created_at,
52
+ :offline_payment_method, :channel, :subscription_items, :item_tiers, :charged_items, :due_invoices_count,
53
+ :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons, :event_based_addons,
54
+ :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info, :invoice_notes,
55
+ :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
57
 
57
58
  # OPERATIONS
58
59
  #-----------
@@ -9,8 +9,8 @@ module ChargeBee
9
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
10
  end
11
11
 
12
- attr_accessor :id, :currency_code, :status, :next_billing_at, :pause_date, :resume_date, :shipping_address,
13
- :contract_term
12
+ attr_accessor :id, :currency_code, :status, :trial_end_action, :next_billing_at, :pause_date,
13
+ :resume_date, :shipping_address, :contract_term
14
14
 
15
15
  # OPERATIONS
16
16
  #-----------
@@ -18,12 +18,12 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
21
- :payment_method, :reference_number, :gateway, :type, :date, :settled_at, :currency_code, :amount,
22
- :id_at_gateway, :status, :fraud_flag, :initiator_type, :three_d_secure, :authorization_reason,
21
+ :payment_method, :reference_number, :gateway, :type, :date, :settled_at, :exchange_rate, :currency_code,
22
+ :amount, :id_at_gateway, :status, :fraud_flag, :initiator_type, :three_d_secure, :authorization_reason,
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
26
+ :linked_payments, :deleted, :iin, :last4, :merchant_reference_id
27
27
 
28
28
  # OPERATIONS
29
29
  #-----------
@@ -12,7 +12,7 @@ module ChargeBee
12
12
  end
13
13
 
14
14
  def self.retrieve(id, params, env=nil, headers={})
15
- Request.send('get', uri_path("subscriptions",id.to_s,"usage"), params, env, headers)
15
+ Request.send('get', uri_path("subscriptions",id.to_s,"usages"), params, env, headers)
16
16
  end
17
17
 
18
18
  def self.delete(id, params, env=nil, headers={})
@@ -16,7 +16,7 @@ module ChargeBee
16
16
  return contract_term;
17
17
  end
18
18
 
19
- def advance_invoice_schedule()
19
+ def advance_invoice_schedule()
20
20
  advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
21
21
  {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
22
22
  return advance_invoice_schedule;
@@ -89,7 +89,7 @@ module ChargeBee
89
89
 
90
90
  def order()
91
91
  order = get(:order, Order,
92
- {:order_line_items => Order::OrderLineItem, :shipping_address => Order::ShippingAddress, :billing_address => Order::BillingAddress, :line_item_taxes => Order::LineItemTax, :line_item_discounts => Order::LineItemDiscount, :linked_credit_notes => Order::LinkedCreditNote});
92
+ {:order_line_items => Order::OrderLineItem, :shipping_address => Order::ShippingAddress, :billing_address => Order::BillingAddress, :line_item_taxes => Order::LineItemTax, :line_item_discounts => Order::LineItemDiscount, :linked_credit_notes => Order::LinkedCreditNote, :resent_orders => Order::ResentOrder});
93
93
  return order;
94
94
  end
95
95
 
@@ -130,16 +130,22 @@ module ChargeBee
130
130
 
131
131
  def quote()
132
132
  quote = get(:quote, Quote,
133
- {:line_items => Quote::LineItem, :discounts => Quote::Discount, :line_item_discounts => Quote::LineItemDiscount, :taxes => Quote::Tax, :line_item_taxes => Quote::LineItemTax, :shipping_address => Quote::ShippingAddress, :billing_address => Quote::BillingAddress});
133
+ {:line_items => Quote::LineItem, :discounts => Quote::Discount, :line_item_discounts => Quote::LineItemDiscount, :taxes => Quote::Tax, :line_item_taxes => Quote::LineItemTax, :line_item_tiers => Quote::LineItemTier, :shipping_address => Quote::ShippingAddress, :billing_address => Quote::BillingAddress});
134
134
  return quote;
135
135
  end
136
136
 
137
137
  def quoted_subscription()
138
138
  quoted_subscription = get(:quoted_subscription, QuotedSubscription,
139
- {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon, :subscription_items => QuotedSubscription::SubscriptionItem, :item_tiers => QuotedSubscription::ItemTier});
139
+ {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon, :subscription_items => QuotedSubscription::SubscriptionItem, :item_tiers => QuotedSubscription::ItemTier, :quoted_contract_term => QuotedSubscription::QuotedContractTerm});
140
140
  return quoted_subscription;
141
141
  end
142
142
 
143
+ def quoted_charge()
144
+ quoted_charge = get(:quoted_charge, QuotedCharge,
145
+ {:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon});
146
+ return quoted_charge;
147
+ end
148
+
143
149
  def quote_line_group()
144
150
  quote_line_group = get(:quote_line_group, QuoteLineGroup,
145
151
  {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax});
@@ -233,7 +239,7 @@ module ChargeBee
233
239
  return payment_intent;
234
240
  end
235
241
 
236
- def item_family()
242
+ def item_family()
237
243
  item_family = get(:item_family, ItemFamily);
238
244
  return item_family;
239
245
  end
@@ -250,7 +256,7 @@ module ChargeBee
250
256
  return item_price;
251
257
  end
252
258
 
253
- def attached_item()
259
+ def attached_item()
254
260
  attached_item = get(:attached_item, AttachedItem);
255
261
  return attached_item;
256
262
  end
@@ -261,6 +267,7 @@ module ChargeBee
261
267
  return differential_price;
262
268
  end
263
269
 
270
+
264
271
  def unbilled_charges()
265
272
  unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
266
273
  {:tiers => UnbilledCharge::Tier});
@@ -299,7 +306,7 @@ module ChargeBee
299
306
 
300
307
 
301
308
  def to_s(*args)
302
- JSON.pretty_generate(@response)
309
+ JSON.pretty_generate(@response)
303
310
  end
304
311
 
305
312
  private
data/lib/chargebee.rb CHANGED
@@ -53,7 +53,7 @@ require File.dirname(__FILE__) + '/chargebee/models/usage.rb'
53
53
 
54
54
  module ChargeBee
55
55
 
56
- VERSION = '2.8.7'
56
+ VERSION = '2.10.1'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
metadata CHANGED
@@ -1,90 +1,90 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chargebee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.7
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
8
8
  - Thiyagarajan T
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-06-22 00:00:00.000000000 Z
12
+ date: 2021-10-18 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: 2.0.2
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: 2.0.2
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: cgi
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "<="
52
+ - - <=
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.1.0
55
55
  type: :runtime
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: 0.1.0
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rspec
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.0.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: 3.0.0
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: mocha
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  description: Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com.
@@ -102,7 +102,6 @@ files:
102
102
  - README.rdoc
103
103
  - Rakefile
104
104
  - chargebee.gemspec
105
- - lib/.DS_Store
106
105
  - lib/chargebee.rb
107
106
  - lib/chargebee/environment.rb
108
107
  - lib/chargebee/errors.rb
@@ -143,6 +142,7 @@ files:
143
142
  - lib/chargebee/models/promotional_credit.rb
144
143
  - lib/chargebee/models/quote.rb
145
144
  - lib/chargebee/models/quote_line_group.rb
145
+ - lib/chargebee/models/quoted_charge.rb
146
146
  - lib/chargebee/models/quoted_subscription.rb
147
147
  - lib/chargebee/models/resource_migration.rb
148
148
  - lib/chargebee/models/site_migration_detail.rb
@@ -169,24 +169,25 @@ homepage: https://apidocs.chargebee.com/api/docs?lang=ruby
169
169
  licenses:
170
170
  - MIT
171
171
  metadata: {}
172
- post_install_message:
172
+ post_install_message:
173
173
  rdoc_options:
174
- - "--charset=UTF-8"
174
+ - --charset=UTF-8
175
175
  require_paths:
176
176
  - lib
177
177
  required_ruby_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
- - - ">="
179
+ - - '>='
180
180
  - !ruby/object:Gem::Version
181
181
  version: 1.9.3
182
182
  required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - ">="
184
+ - - '>='
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.0.3
189
- signing_key:
188
+ rubyforge_project:
189
+ rubygems_version: 2.4.5
190
+ signing_key:
190
191
  specification_version: 2
191
192
  summary: Ruby client for Chargebee API.
192
193
  test_files:
data/lib/.DS_Store DELETED
Binary file