chargebee 2.33.0 → 2.35.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
2
  SHA1:
3
- metadata.gz: c6db0cf1fa6d27d9811bf9f1bc349f881472d714
4
- data.tar.gz: 5847634a85f9c1c1425f7030c14e1a87d624d6b1
3
+ metadata.gz: 706ca84b567482469d3f7016ad9e195f5b940c9b
4
+ data.tar.gz: f24e923b78fe0091bf2a70c3336d7a9b2cb6f613
5
5
  SHA512:
6
- metadata.gz: b7ccc0f75bbecb3992f4632372051a40222068ebf053dc481f1a6b20f92651a7d1bea19e6e34c02edeb343c3a4caf66165cc5db1da2aeaa5d924a5546e610140
7
- data.tar.gz: a2be218a7df4f31f91369d3b7c97d3e4ff7c7ccc3201ea182d06e26a152d9b60b4dc3630fa7a8b418254e102bac6790d3136b5df2c2c329ae3f85ec47d14c48d
6
+ metadata.gz: 92e90b41e6590edf6ca1fa77c67b0e339ff6b83f7f3d7a90a555bc03753117388fdf5765e299a58dff546c909d82fb99f2fa2f4b1c1c8c4c7d73fcbadcecb368
7
+ data.tar.gz: be11ca3fb36d2a55c0c75cc5eb6e634b94374f0021569bc9d6f9f49ee7d00385a04875933c6665ee8cb8e4fb67ae7d1cb7c8b5aec96be11bcbcb2f5d0a7f1435
data/CHANGELOG.md CHANGED
@@ -1,3 +1,60 @@
1
+ ### v2.35.0 (2024-01-31)
2
+ * * *
3
+
4
+ #### New Enum values:
5
+ * item_price_entitlements_updated has been added to EventTypeEnum.
6
+ * item_price_entitlements_removed has been added to EventTypeEnum.
7
+
8
+ #### New Input parameters:
9
+ * layout has been added to HostedPage#AcceptQuoteRequest in HostedPage resource.
10
+
11
+ ### v2.34.0 (2024-01-04)
12
+ * * *
13
+
14
+ #### Fixes:
15
+ * Fixed Custom fields names with spaces issue.
16
+
17
+ #### New resources:
18
+ * Entitlements has been added.
19
+
20
+ #### New attributes:
21
+ * date_to, date_from, prorated_taxable_amount has been added to quote_line_group.
22
+ * date_to, date_from, prorated_taxable_amount has been added to quote.
23
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note_estimate.
24
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note.
25
+ * date_to, date_from, prorated_taxable_amount has been added to invoice_estimate.
26
+ * date_to, date_from, prorated_taxable_amount has been added to order.
27
+ * date_to, date_from, prorated_taxable_amount has been added to invoice.
28
+ * active_id has been added to customers.
29
+ * active_id has been added to subscriptions.
30
+ * reference_id has been made optional for payment_sources/create_using_permanent_token
31
+ * custom_payment_method_id has been added to transactions.
32
+ * custom_payment_method_name has been added to transactions.
33
+ * error_detail has been added to transactions.
34
+
35
+
36
+ #### New Enum values:
37
+ * CMR_FALABELLA, TARJETA_NARANJA, NATIVA, CENCOSUD, CABAL, ARGENCARD, ELO, HIPERCARD, CARNET, RUPAY, MAESTRO has been added to Card#CardTypeEnum
38
+ * Transferred has been added to Subscription#StatusEnum.
39
+ * Transferred has been added to SubscriptionEstimate#StatusEnum.
40
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
41
+ * UsAutomatedBankTransfer, GbAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer has been added to VirtualBankAccount#SchemeEnum.
42
+ * CustomerBusinessEntityChanged, SubscriptionBusinessEntityChanged has been added to EventTypeEnum.
43
+ * Dlocal has been added to GatewayEnum.
44
+ * UsAutomatedBankTransfer, UkAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer, Custom has been added to OfflinePaymentMethodEnum.
45
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
46
+ * AutomatedBankTransfer has been added to PaymentMethodTypeEnum.
47
+
48
+ #### New Input parameters:
49
+ * custom_payment_method_name has been added to Transactions#RecordRefundRequest.
50
+ * proration_type has been added to Subscription#UpdateForItemsRequest.
51
+ * proration_type has been added to ItemPrice.
52
+ * payment_initiator has been added to Invoice.
53
+ * payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to PaymentSource#CreateUsingPermanentTokenRequest.
54
+ * subscription_items[proration_type] has been added to Estimate#UpdateSubscriptionForItemsRequest.
55
+ * transaction[custom_payment_method_id] has been added to Customer#RecordExcessPaymentRequest.
56
+ * transaction[custom_payment_method_id] has been added to CreditNote#RecordRefundRequest.
57
+
1
58
  ### v2.33.0 (2023-11-30)
2
59
  * * *
3
60
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.33.0)
4
+ chargebee (2.35.0)
5
5
  cgi (>= 0.1.0, < 1.0.0)
6
6
  json_pure (~> 2.1)
7
7
  rest-client (>= 1.8, <= 2.0.2)
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011-2023 ChargeBee, Inc.
3
+ Copyright (c) 2011-2024 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.33.0'
8
- s.date = '2023-11-30'
7
+ s.version = '2.35.0'
8
+ s.date = '2024-01-31'
9
9
  s.summary = "Ruby client for Chargebee API."
10
10
  s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
11
11
  s.metadata = {
@@ -60,6 +60,7 @@ Gem::Specification.new do |s|
60
60
  lib/chargebee/models/differential_price.rb
61
61
  lib/chargebee/models/discount.rb
62
62
  lib/chargebee/models/download.rb
63
+ lib/chargebee/models/entitlement.rb
63
64
  lib/chargebee/models/entitlement_override.rb
64
65
  lib/chargebee/models/estimate.rb
65
66
  lib/chargebee/models/event.rb
@@ -26,7 +26,7 @@ module ChargeBee
26
26
  end
27
27
 
28
28
  class LineItemTax < Model
29
- 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
29
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
30
30
  end
31
31
 
32
32
  class LinkedRefund < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- 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
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
@@ -42,13 +42,13 @@ module ChargeBee
42
42
  :is_location_valid, :created_at, :created_from_ip, :exemption_details, :taxability, :entity_code,
43
43
  :exempt_number, :resource_version, :updated_at, :locale, :billing_date, :billing_month, :billing_date_mode,
44
44
  :billing_day_of_week, :billing_day_of_week_mode, :pii_cleared, :auto_close_invoices, :channel,
45
- :card_status, :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address,
46
- :referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id, :preferred_currency_code,
47
- :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments, :balances, :entity_identifiers,
48
- :is_einvoice_enabled, :einvoicing_method, :meta_data, :deleted, :registered_for_gst, :consolidated_invoicing,
49
- :customer_type, :business_customer_without_vat_number, :client_profile_id, :relationship, :use_default_hierarchy_settings,
50
- :parent_account_access, :child_account_access, :vat_number_prefix, :entity_identifier_scheme,
51
- :entity_identifier_standard
45
+ :active_id, :card_status, :fraud_flag, :primary_payment_source_id, :backup_payment_source_id,
46
+ :billing_address, :referral_urls, :contacts, :payment_method, :invoice_notes, :business_entity_id,
47
+ :preferred_currency_code, :promotional_credits, :unbilled_charges, :refundable_credits, :excess_payments,
48
+ :balances, :entity_identifiers, :is_einvoice_enabled, :einvoicing_method, :meta_data, :deleted,
49
+ :registered_for_gst, :consolidated_invoicing, :customer_type, :business_customer_without_vat_number,
50
+ :client_profile_id, :relationship, :use_default_hierarchy_settings, :parent_account_access,
51
+ :child_account_access, :vat_number_prefix, :entity_identifier_scheme, :entity_identifier_standard
52
52
 
53
53
  # OPERATIONS
54
54
  #-----------
@@ -0,0 +1,18 @@
1
+ module ChargeBee
2
+ class Entitlement < Model
3
+
4
+ attr_accessor :id, :entity_id, :entity_type, :feature_id, :feature_name, :value, :name
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ def self.list(params={}, env=nil, headers={})
10
+ Request.send_list_request('get', uri_path("entitlements"), params, env, headers)
11
+ end
12
+
13
+ def self.create(params, env=nil, headers={})
14
+ Request.send('post', uri_path("entitlements"), params, env, headers)
15
+ end
16
+
17
+ end # ~Entitlement
18
+ end # ~ChargeBee
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
24
  class LineItemTier < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- 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
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
18
18
  end
19
19
 
20
20
  class LineItemTier < Model
@@ -14,11 +14,11 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  attr_accessor :id, :name, :item_family_id, :product_id, :item_id, :description, :status, :external_name,
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, :channel, :resource_version, :updated_at, :created_at,
20
- :archived_at, :invoice_notes, :tiers, :is_taxable, :tax_detail, :accounting_detail, :metadata,
21
- :item_type, :archivable, :parent_item_id, :show_description_in_invoices, :show_description_in_quotes
17
+ :proration_type, :pricing_model, :price, :price_in_decimal, :period, :currency_code, :period_unit,
18
+ :trial_period, :trial_period_unit, :trial_end_action, :shipping_period, :shipping_period_unit,
19
+ :billing_cycles, :free_quantity, :free_quantity_in_decimal, :channel, :resource_version, :updated_at,
20
+ :created_at, :archived_at, :invoice_notes, :tiers, :is_taxable, :tax_detail, :accounting_detail,
21
+ :metadata, :item_type, :archivable, :parent_item_id, :show_description_in_invoices, :show_description_in_quotes
22
22
 
23
23
  # OPERATIONS
24
24
  #-----------
@@ -36,10 +36,14 @@ module ChargeBee
36
36
  v
37
37
  end
38
38
 
39
- instance_variable_set("@#{k}", set_val)
39
+ instance_variable_set("@#{replace_white_space_with_underscore(k)}", set_val)
40
40
  end
41
41
  end
42
42
  end
43
+
44
+ def replace_white_space_with_underscore(s)
45
+ s.to_s.tr(" ", "_")
46
+ end
43
47
 
44
48
  def method_missing(m, *args, &block)
45
49
  if(@values.has_key?(m))
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class LineItemTax < Model
17
- 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
17
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
18
18
  end
19
19
 
20
20
  class LineItemDiscount < Model
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
24
  class LineItemTier < Model
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
20
  class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code, :tax_amount_in_local_currency, :local_currency_code
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :date_to, :date_from, :prorated_taxable_amount, :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
24
  attr_accessor :version, :id, :sub_total, :total, :credits_applied, :amount_paid, :amount_due,
@@ -53,12 +53,12 @@ module ChargeBee
53
53
  :override_relationship, :pause_date, :resume_date, :cancelled_at, :cancel_reason, :affiliate_token,
54
54
  :created_from_ip, :resource_version, :updated_at, :has_scheduled_advance_invoices, :has_scheduled_changes,
55
55
  :payment_source_id, :plan_free_quantity_in_decimal, :plan_amount_in_decimal, :cancel_schedule_created_at,
56
- :offline_payment_method, :channel, :net_term_days, :subscription_items, :item_tiers, :charged_items,
57
- :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons,
58
- :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address, :referral_info,
59
- :invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term, :cancel_reason_code,
60
- :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices, :discounts,
61
- :business_entity_id
56
+ :offline_payment_method, :channel, :net_term_days, :active_id, :subscription_items, :item_tiers,
57
+ :charged_items, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
58
+ :addons, :event_based_addons, :charged_event_based_addons, :coupon, :coupons, :shipping_address,
59
+ :referral_info, :invoice_notes, :meta_data, :metadata, :deleted, :changes_scheduled_at, :contract_term,
60
+ :cancel_reason_code, :free_period, :free_period_unit, :create_pending_invoices, :auto_close_invoices,
61
+ :discounts, :business_entity_id
62
62
 
63
63
  # OPERATIONS
64
64
  #-----------
@@ -17,13 +17,18 @@ module ChargeBee
17
17
  attr_accessor :id, :status, :amount, :date
18
18
  end
19
19
 
20
+ class GatewayErrorDetail < Model
21
+ attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message, :network_error_code, :error_field, :recommendation_code
22
+ end
23
+
20
24
  attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
21
25
  :payment_method, :reference_number, :gateway, :type, :date, :settled_at, :exchange_rate, :currency_code,
22
26
  :amount, :id_at_gateway, :status, :fraud_flag, :initiator_type, :three_d_secure, :authorization_reason,
23
- :error_code, :error_text, :voided_at, :resource_version, :updated_at, :fraud_reason, :amount_unused,
24
- :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
27
+ :error_code, :error_text, :voided_at, :resource_version, :updated_at, :fraud_reason, :custom_payment_method_id,
28
+ :amount_unused, :masked_card_number, :reference_transaction_id, :refunded_txn_id, :reference_authorization_id,
25
29
  :amount_capturable, :reversal_transaction_id, :linked_invoices, :linked_credit_notes, :linked_refunds,
26
- :linked_payments, :deleted, :iin, :last4, :merchant_reference_id, :business_entity_id, :payment_method_details
30
+ :linked_payments, :deleted, :iin, :last4, :merchant_reference_id, :business_entity_id, :payment_method_details,
31
+ :error_detail, :custom_payment_method_name
27
32
 
28
33
  # OPERATIONS
29
34
  #-----------
@@ -4,7 +4,7 @@ module ChargeBee
4
4
  IDEMPOTENCY_REPLAYED_HEADER = :chargebee_idempotency_replayed
5
5
 
6
6
  def initialize(response, rheaders = nil)
7
- @response = response
7
+ @response = response
8
8
  @rheaders = rheaders
9
9
  end
10
10
 
@@ -132,7 +132,7 @@ module ChargeBee
132
132
 
133
133
  def transaction()
134
134
  transaction = get(:transaction, Transaction,
135
- {:linked_invoices => Transaction::LinkedInvoice, :linked_credit_notes => Transaction::LinkedCreditNote, :linked_refunds => Transaction::LinkedRefund, :linked_payments => Transaction::LinkedPayment});
135
+ {:linked_invoices => Transaction::LinkedInvoice, :linked_credit_notes => Transaction::LinkedCreditNote, :linked_refunds => Transaction::LinkedRefund, :linked_payments => Transaction::LinkedPayment, :gateway_error_detail => Transaction::GatewayErrorDetail});
136
136
  return transaction;
137
137
  end
138
138
 
@@ -329,7 +329,12 @@ module ChargeBee
329
329
  return item_entitlement;
330
330
  end
331
331
 
332
- def in_app_subscription()
332
+ def entitlement()
333
+ entitlement = get(:entitlement, Entitlement);
334
+ return entitlement;
335
+ end
336
+
337
+ def in_app_subscription()
333
338
  in_app_subscription = get(:in_app_subscription, InAppSubscription);
334
339
  return in_app_subscription;
335
340
  end
data/lib/chargebee.rb CHANGED
@@ -68,7 +68,7 @@ require File.dirname(__FILE__) + '/chargebee/models/token.rb'
68
68
 
69
69
  module ChargeBee
70
70
 
71
- VERSION = '2.33.0'
71
+ VERSION = '2.35.0'
72
72
 
73
73
  @@default_env = nil
74
74
  @@verify_ca_certs = true
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.33.0
4
+ version: 2.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajaraman S
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-11-30 00:00:00.000000000 Z
12
+ date: 2024-01-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -133,6 +133,7 @@ files:
133
133
  - lib/chargebee/models/differential_price.rb
134
134
  - lib/chargebee/models/discount.rb
135
135
  - lib/chargebee/models/download.rb
136
+ - lib/chargebee/models/entitlement.rb
136
137
  - lib/chargebee/models/entitlement_override.rb
137
138
  - lib/chargebee/models/estimate.rb
138
139
  - lib/chargebee/models/event.rb