chargebee 2.33.0 → 2.34.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: a9d00c2ae092a9ccc5996c25f956cfaaaac6c8a7
4
+ data.tar.gz: 6af6f3abac87f00eb33d61b2937cab19e3539044
5
5
  SHA512:
6
- metadata.gz: b7ccc0f75bbecb3992f4632372051a40222068ebf053dc481f1a6b20f92651a7d1bea19e6e34c02edeb343c3a4caf66165cc5db1da2aeaa5d924a5546e610140
7
- data.tar.gz: a2be218a7df4f31f91369d3b7c97d3e4ff7c7ccc3201ea182d06e26a152d9b60b4dc3630fa7a8b418254e102bac6790d3136b5df2c2c329ae3f85ec47d14c48d
6
+ metadata.gz: 073fd0f9ade0b3be5c6c226043f49e131931b6ef425d922e07f4cf92364b218ff51d024fe39ca9f9b5f021962637cc6de652e2e8ce98f61d4c3b13cff3bf4edd
7
+ data.tar.gz: d664d62985edda6843dfacb1ac5c1998ac8a2e6fd50ff0798710659962c3d75b256465a36157454fb5695947ae314a2dcc65699be6571e3de028b222eabd54fc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,61 @@
1
+ ### v2.34.0 (2024-01-04)
2
+ * * *
3
+
4
+ #### Fixes:
5
+ * Fixed Custom fields names with spaces issue.
6
+
7
+ #### New resources:
8
+ * Entitlements has been added.
9
+
10
+ #### New attributes:
11
+ * date_to, date_from, prorated_taxable_amount has been added to quote_line_group.
12
+ * date_to, date_from, prorated_taxable_amount has been added to quote.
13
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note_estimate.
14
+ * date_to, date_from, prorated_taxable_amount has been added to credit_note.
15
+ * date_to, date_from, prorated_taxable_amount has been added to invoice_estimate.
16
+ * date_to, date_from, prorated_taxable_amount has been added to order.
17
+ * date_to, date_from, prorated_taxable_amount has been added to invoice.
18
+ * active_id has been added to customers.
19
+ * active_id has been added to subscriptions.
20
+ * reference_id has been made optional for payment_sources/create_using_permanent_token
21
+ * payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to payment_sources.
22
+ * custom_payment_method_id has been added to transactions.
23
+ * custom_payment_method_name has been added to transactions.
24
+ * error_detail has been added to transactions.
25
+
26
+
27
+ #### New Enum values:
28
+ * CMR_FALABELLA, TARJETA_NARANJA, NATIVA, CENCOSUD, CABAL, ARGENCARD, ELO, HIPERCARD, CARNET, RUPAY, MAESTRO has been added to Card#CardTypeEnum
29
+ * Transferred has been added to Subscription#StatusEnum.
30
+ * Transferred has been added to SubscriptionEstimate#StatusEnum.
31
+ * proration_type has been added to Subscription#UpdateForItemsRequest.
32
+ * proration_type has been added to ItemPrice.
33
+ * payment_initiator has been added to Invoice.
34
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
35
+ * UsAutomatedBankTransfer, GbAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer has been added to VirtualBankAccount#SchemeEnum.
36
+ * CustomerBusinessEntityChanged, SubscriptionBusinessEntityChanged has been added to EventTypeEnum.
37
+ * Dlocal has been added to GatewayEnum.
38
+ * UsAutomatedBankTransfer, UkAutomatedBankTransfer, EuAutomatedBankTransfer, JpAutomatedBankTransfer, MxAutomatedBankTransfer, Custom has been added to OfflinePaymentMethodEnum.
39
+ * AutomatedBankTransfer has been added to PaymentMethodEnum.
40
+ * AutomatedBankTransfer has been added to PaymentMethodTypeEnum.
41
+
42
+ #### New Input parameters:
43
+ * custom_payment_method_name has been added to Transactions#RecordRefundRequest.
44
+ * proration_type has been added to Subscription#UpdateForItemsRequest.
45
+ * payment_method_token, customer_profile_token, network_transaction_id, mandate_id, skip_retrieval, card, billing_address has been added to PaymentSource#CreateUsingPermanentTokenRequest.
46
+ * date_to, date_from, prorated_taxable_amount has been added to QuoteLineGroup#LineItemTax.
47
+ * date_to, date_from, prorated_taxable_amount has been added to Quote#LineItemTax.
48
+ * date_to, date_from, prorated_taxable_amount has been added to CreditNoteEstimate#LineItemTax.
49
+ * date_to, date_from, prorated_taxable_amount has been added to CreditNote#LineItemTax.
50
+ * date_to, date_from, prorated_taxable_amount has been added to InvoiceEstimate#LineItemTax.
51
+ * date_to, date_from, prorated_taxable_amount has been added to Order#LineItemTax.
52
+ * date_to, date_from, prorated_taxable_amount has been added to Invoice#LineItemTax.
53
+ * active_id has been added to Customer.
54
+ * active_id has been added to Subscription.
55
+ * subscription_items[proration_type] has been added to Estimate#UpdateSubscriptionForItemsRequest.
56
+ * transaction[custom_payment_method_id] has been added to Customer#RecordExcessPaymentRequest.
57
+ * transaction[custom_payment_method_id] has been added to CreditNote#RecordRefundRequest.
58
+
1
59
  ### v2.33.0 (2023-11-30)
2
60
  * * *
3
61
 
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.34.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.34.0'
8
+ s.date = '2024-01-04'
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
@@ -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.34.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.34.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-04 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