chargebee 2.8.5 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: b333712c66ffa98e25335aa2dd0d257a14dd084f597b394f0e80d0bdeee39c1c
4
- data.tar.gz: 6ced89dbe2cc28abf11298f454889528a4a56a3f1f634d494a3265382521ae64
2
+ SHA1:
3
+ metadata.gz: bf9aaa36c10321606b365e9cb898878374d8bdeb
4
+ data.tar.gz: ef4145817cbe7bfc3c19be0b6ab6340549ad4eca
5
5
  SHA512:
6
- metadata.gz: fa308ee3a14f85bea5e343e4ddaee714359d69967cc774a1d1a308f36b6eaab08b6900015489e8bbc832c441174ebe20852beb31bfec5b4b21bdd955c0608b8f
7
- data.tar.gz: ff63da2192c8229791bb0beb50c9fedb7a573670eb5ce280e9d02d62040c100146f787b47999c0a494568ac7930b0dc61c0999d8c308fff0b458d218b7b7b787
6
+ metadata.gz: d013ed6f9e917fb6a0636e16d4d169cd6647a4c39cc6bae4c93b341e3ca033062039e2413a3a8d0755a0263ab1c67e36522a55aa31de9b5b58fcfa7082320977
7
+ data.tar.gz: 88a6561ac1a31be5c1f9b3e03be5a8a28ff02c02130578148cb633dd68634e08e9222b9e7521b22f65f22c3eb96a683d3cea3768c95376db022e63f0ce7305d5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,115 @@
1
+ ### v2.9.0 (2021-08-16)
2
+ * * *
3
+ #### New Attributes:
4
+ * generated_at has been added in credit_note and invoice resources.
5
+ * change_option have been added in quoted_subscription resource.
6
+ * changes_scheduled_at has been added in subscription and quoted_subscription resources.
7
+ * iin and last4 have been added in transaction resource.
8
+
9
+ #### New Resource:
10
+ * quoted_charge has been added.
11
+
12
+ #### New Input parameters:
13
+ * 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.
14
+ * 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.
15
+ * 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.
16
+ * invoice_date, create_pending_invoices and first_invoice_pending have been added in quotes#convert_a_quote endpoint.
17
+ * subscription[auto_close_invoices] has been added in quotes#convert_a_quote endpoint.
18
+
19
+ #### New Enum values:
20
+ * subscription_cancel has been added to charge_event enum in quote_line_groups resource.
21
+ * 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
22
+ * change_option enum has been added.
23
+
24
+ #### Deprecated parameters:
25
+ * coupon has been deprecated in invoices#create_invoice_for_a_one-time_charge and invoices#create_invoice_for_a_non-recurring_addon endpoints.
26
+
27
+
28
+ ### v2.8.8 (2021-07-22)
29
+ * * *
30
+ #### New endpoints:
31
+ * hosted_pages#checkout_one_time_for_items and hosted_pages#checkout_gift_for_items have been added in hosted_pages resource.
32
+ * orders#resend_an_order has been added in orders resource.
33
+ * 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.
34
+
35
+ #### New attributes:
36
+ * accounting_category3 and accounting_category4 have been added to addon, item_price and plan resources.
37
+ * quantity_in_decimal has been added to attached_item resource.
38
+ * period and period_unit have been added to coupon resource.
39
+ * 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.
40
+ * vat_number_prefix has been added to credit_note, customer, invoice and quote resources.
41
+ * price_in_decimal has been added to differential_price and item_price resources.
42
+ * exchange_rate and new_sales_amount have been added to invoice resource.
43
+ * archived_at has been added to item and item_price resources.
44
+ * trial_end_action has been added to item_price, plan, subscription and subscription_estimate resources.
45
+ * resent_orders, tracking_url, resent_status, is_resent, original_order_id and resend_reasons have been added to order resource.
46
+ * line_item_tiers have been added to quote resource.
47
+ * 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.
48
+ * contract_term_billing_cycle_on_renewal and quoted_contract_term have been added to quoted_subscription resource.
49
+ * 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.
50
+ * starting_unit_in_decimal, ending_unit_in_decimal and price_in_decimal have been added to item_tiers object in quoted_subscription resources.
51
+ * cancel_schedule_created_at has been added to subscription resource.
52
+ * exchange_rate and merchant_reference_id have been added to transaction resource.
53
+
54
+ #### New parameters:
55
+ * 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.
56
+ * 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.
57
+ * 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.
58
+ * 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.
59
+ * 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.
60
+ * 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.
61
+ * 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.
62
+ * price_in_decimal has been added in differential_prices#create_a_differential_price and differential_prices#update_a_differential_price endpoints.
63
+ * 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.
64
+ * 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.
65
+ * 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.
66
+ * 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.
67
+ * 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.
68
+ * 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.
69
+ * 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.
70
+ * 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.
71
+ * 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.
72
+ * invoice_note has been added in hosted_pages#checkout_one-time_payments endpoint.
73
+ * 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.
74
+ * 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.
75
+ * tracking_url has been added in orders#create_an_order, orders#update_an_order and orders#import_an_order endpoints.
76
+ * additional_information has been added in payment_sources#create_using_gateway_temporary_token and payment_sources#create_using_permanent_token endpoints.
77
+
78
+ #### New enum values:
79
+ * bancontact has been added to card_type enum.
80
+ * card and latam_local_card have been added to powered_by enum.
81
+ * 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.
82
+ * item_level_discount and document_level_discount have been added to discount_type enum.
83
+ * add_usages_reminder and order_resent have been added to event_type enum.
84
+ * ingenico_direct and exact have been added to gateway enum.
85
+ * max_usage has been added to usage_calculation enum.
86
+ * trial_end_action enum has been added.
87
+ * order_resent has been added to cancellation_reason enum.
88
+ * resent_status enum has been added.
89
+ * custom_discount has been added in discount_type enum of order_line_item_discount.
90
+
91
+ #### New filter parameters:
92
+ * resent_status, is_resent and original_order_id filter parameters have been added in exports#orders and orders#list_orders enpoints.
93
+ * updated_at filter parameter has been added in exports#item_families and item_families#list_item_families endpoints.
94
+
95
+ #### New sort parameters:
96
+ * name, id and updated_at sort parameters are added to items#list_items and item_prices#list_item_prices endpoints.
97
+ * created_at and updated_at sort parameters are added to payment_sources#list_payment_sources endpoint.
98
+ * usage_date sort parameter has been added to usages#list_usages endpoint.
99
+
100
+ #### Deprecated parameters:
101
+ * duration_month parameter has been deprecated in coupon resource.
102
+
103
+
104
+ ### v2.8.7 (2021-06-22)
105
+ * * *
106
+ * With fix regarding auto update of rest-client gem from 2.0.2 to 2.1.0
107
+
108
+
109
+ ### v2.8.6 (2021-05-31)
110
+ * * *
111
+ * Added support for Ruby 3.0
112
+
1
113
  ### v2.8.5 (2021-02-04)
2
114
  * * *
3
115
  * fixed: missing requires for Product Catalog V2 resources.
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.5'
8
- s.date = '2021-02-04'
7
+ s.version = '2.9.0'
8
+ s.date = '2021-08-16'
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."
@@ -21,7 +21,8 @@ Gem::Specification.new do |s|
21
21
  s.extra_rdoc_files = %w[README.rdoc LICENSE]
22
22
 
23
23
  s.add_dependency('json_pure', '~> 2.1')
24
- s.add_dependency('rest-client', '>= 1.8', '< 3.0')
24
+ s.add_dependency('rest-client', '>=1.8', '<=2.0.2')
25
+ s.add_dependency('cgi', '<=0.1.0')
25
26
 
26
27
  s.add_development_dependency('rspec', '~> 3.0.0')
27
28
  s.add_development_dependency('mocha')
@@ -74,6 +75,7 @@ Gem::Specification.new do |s|
74
75
  lib/chargebee/models/promotional_credit.rb
75
76
  lib/chargebee/models/quote.rb
76
77
  lib/chargebee/models/quote_line_group.rb
78
+ lib/chargebee/models/quoted_charge.rb
77
79
  lib/chargebee/models/quoted_subscription.rb
78
80
  lib/chargebee/models/resource_migration.rb
79
81
  lib/chargebee/models/site_migration_detail.rb
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.5'
56
+ VERSION = '2.9.0'
57
57
 
58
58
  @@default_env = nil
59
59
  @@verify_ca_certs = true
@@ -25,4 +25,4 @@ module ChargeBee
25
25
  url = @api_endpoint + url
26
26
  end
27
27
  end
28
- end
28
+ end
@@ -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
  #-----------
@@ -1,8 +1,9 @@
1
1
  require 'uri'
2
+ require 'cgi'
2
3
 
3
4
  module ChargeBee
4
5
  class Model
5
-
6
+
6
7
  def initialize(values, sub_types={}, dependant_types={})
7
8
  @values = values
8
9
  @sub_types = sub_types
@@ -56,7 +57,7 @@ module ChargeBee
56
57
  if(path.nil? || path.strip.length < 1)
57
58
  raise "Id is empty or nil"
58
59
  end
59
- url = "#{url}/#{URI.encode(path.strip)}"
60
+ url = "#{url}/#{CGI.escape(path.strip).gsub("+","%20").gsub("%21","!").gsub("%24","$").gsub("%26","&").gsub("%27","'").gsub("%28","(").gsub("%29", ")").gsub("%2A","*").gsub("%2B","+").gsub("%2C",",").gsub("%2F", "/").gsub("%3A",":").gsub("%3B",";").gsub("%3D","=").gsub("%3F","?").gsub("%40","@").gsub("%5B","[").gsub("%5D","]")}"
60
61
  end
61
62
  return url
62
63
  end
@@ -25,14 +25,19 @@ module ChargeBee
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={})
@@ -42,7 +42,7 @@ module ChargeBee
42
42
  :open_timeout => 50,
43
43
  :timeout => 100
44
44
  }.merge(ssl_opts)
45
-
45
+
46
46
  begin
47
47
  response = RestClient::Request.execute(opts)
48
48
  rescue RestClient::ExceptionWithResponse => e
@@ -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
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.8.5
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,68 +9,82 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-04 00:00:00.000000000 Z
12
+ date: 2021-08-16 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
- version: '3.0'
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
- version: '3.0'
47
+ version: 2.0.2
48
+ - !ruby/object:Gem::Dependency
49
+ name: cgi
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - <=
53
+ - !ruby/object:Gem::Version
54
+ version: 0.1.0
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - <=
60
+ - !ruby/object:Gem::Version
61
+ version: 0.1.0
48
62
  - !ruby/object:Gem::Dependency
49
63
  name: rspec
50
64
  requirement: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ~>
53
67
  - !ruby/object:Gem::Version
54
68
  version: 3.0.0
55
69
  type: :development
56
70
  prerelease: false
57
71
  version_requirements: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ~>
60
74
  - !ruby/object:Gem::Version
61
75
  version: 3.0.0
62
76
  - !ruby/object:Gem::Dependency
63
77
  name: mocha
64
78
  requirement: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ">="
80
+ - - '>='
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  type: :development
70
84
  prerelease: false
71
85
  version_requirements: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ">="
87
+ - - '>='
74
88
  - !ruby/object:Gem::Version
75
89
  version: '0'
76
90
  description: Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com.
@@ -129,6 +143,7 @@ files:
129
143
  - lib/chargebee/models/promotional_credit.rb
130
144
  - lib/chargebee/models/quote.rb
131
145
  - lib/chargebee/models/quote_line_group.rb
146
+ - lib/chargebee/models/quoted_charge.rb
132
147
  - lib/chargebee/models/quoted_subscription.rb
133
148
  - lib/chargebee/models/resource_migration.rb
134
149
  - lib/chargebee/models/site_migration_detail.rb
@@ -157,21 +172,22 @@ licenses:
157
172
  metadata: {}
158
173
  post_install_message:
159
174
  rdoc_options:
160
- - "--charset=UTF-8"
175
+ - --charset=UTF-8
161
176
  require_paths:
162
177
  - lib
163
178
  required_ruby_version: !ruby/object:Gem::Requirement
164
179
  requirements:
165
- - - ">="
180
+ - - '>='
166
181
  - !ruby/object:Gem::Version
167
182
  version: 1.9.3
168
183
  required_rubygems_version: !ruby/object:Gem::Requirement
169
184
  requirements:
170
- - - ">="
185
+ - - '>='
171
186
  - !ruby/object:Gem::Version
172
187
  version: '0'
173
188
  requirements: []
174
- rubygems_version: 3.0.3
189
+ rubyforge_project:
190
+ rubygems_version: 2.4.5
175
191
  signing_key:
176
192
  specification_version: 2
177
193
  summary: Ruby client for Chargebee API.