chargebee 2.35.0 → 2.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 706ca84b567482469d3f7016ad9e195f5b940c9b
4
- data.tar.gz: f24e923b78fe0091bf2a70c3336d7a9b2cb6f613
3
+ metadata.gz: 0491239e871f3384d9417c37d92253b04788e691
4
+ data.tar.gz: d4909e49612b5589b2776df6052bd7cf22449252
5
5
  SHA512:
6
- metadata.gz: 92e90b41e6590edf6ca1fa77c67b0e339ff6b83f7f3d7a90a555bc03753117388fdf5765e299a58dff546c909d82fb99f2fa2f4b1c1c8c4c7d73fcbadcecb368
7
- data.tar.gz: be11ca3fb36d2a55c0c75cc5eb6e634b94374f0021569bc9d6f9f49ee7d00385a04875933c6665ee8cb8e4fb67ae7d1cb7c8b5aec96be11bcbcb2f5d0a7f1435
6
+ metadata.gz: 7357be5542a2edb1e6520d152c75838ba59e15e7e87ffdc97ebc626762bf70a487c92e39b9fe1ed9622eb39a9ec5b7610d7e904e0b2b2886f2533f2718b2cea3
7
+ data.tar.gz: d580cd7bb01d2a2e8b9644688ee8d2938c6525889a24b238123c81f45da561aec773a558ae2f9a68fc9f2020f6f5d52d7bff772962be8bc09c14aebe1a7ff91e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ ### v2.36.1 (2024-03-06)
2
+ * * *
3
+ * NonSubscription has been added.
4
+
5
+ ### v2.36.0 (2024-02-29)
6
+ * * *
7
+
8
+ #### New attributes:
9
+ * usage_percentage has been added to QuoteLineGroup resource.
10
+ * usage_percentage has been added to Quote resource.
11
+ * usage_percentage has been added to CreditNoteEstimate resource.
12
+ * usage_percentage has been added to CreditNote resource.
13
+ * usage_percentage has been added to InvoiceEstimate resource.
14
+ * usage_percentage has been added to Invoice resource.
15
+ * error_detail of type GatewayErrorDetail has been added to PaymentIntent#PaymentAttempt subResource.
16
+ * origin_user has been added to Event resource.
17
+ * proration_type has been added to QuotedSubscription#SubscriptionItem and Subscription#SubscriptionItem subResources
18
+ * network_error_message, recommendation_message, processor_error_code, processor_error_message has been added to Transaction#GatewayErrorDetail subResource.
19
+
20
+ #### New Enum values:
21
+ * TAX_NOT_CONFIGURED_EXTERNAL_PROVIDER has been added to TaxExemptReasonEnum.
22
+
23
+ #### New Input parameters:
24
+ * billing_address has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
25
+ * transactions[amount] has been added to Invoice#ApplyPaymentsRequest.
26
+
1
27
  ### v2.35.0 (2024-01-31)
2
28
  * * *
3
29
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chargebee (2.35.0)
4
+ chargebee (2.36.1)
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/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.35.0'
8
- s.date = '2024-01-31'
7
+ s.version = '2.36.1'
8
+ s.date = '2024-03-06'
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 = {
@@ -66,6 +66,7 @@ Gem::Specification.new do |s|
66
66
  lib/chargebee/models/event.rb
67
67
  lib/chargebee/models/export.rb
68
68
  lib/chargebee/models/feature.rb
69
+ lib/chargebee/models/gateway_error_detail.rb
69
70
  lib/chargebee/models/gift.rb
70
71
  lib/chargebee/models/hierarchy.rb
71
72
  lib/chargebee/models/hosted_page.rb
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  class LineItem < Model
9
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
9
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
10
10
  end
11
11
 
12
12
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNoteEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -6,7 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  attr_accessor :id, :occurred_at, :source, :user, :webhook_status, :webhook_failure_reason, :webhooks,
9
- :event_type, :api_version
9
+ :event_type, :api_version, :origin_user
10
10
 
11
11
  class Content < Result
12
12
  end
@@ -6,6 +6,7 @@ module ChargeBee
6
6
  end
7
7
 
8
8
  attr_accessor :id, :operation_type, :mime_type, :status, :created_at, :download
9
+
9
10
  def wait_for_export_completion(env = nil, headers={})
10
11
  env = env || ChargeBee.default_env
11
12
  sleeptime = env.export_sleeptime
@@ -0,0 +1,12 @@
1
+ module ChargeBee
2
+ class GatewayErrorDetail < Model
3
+
4
+ attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message,
5
+ :network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message,
6
+ :processor_error_code, :processor_error_message
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ end # ~GatewayErrorDetail
12
+ end # ~ChargeBee
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Invoice < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class InvoiceEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class PaymentIntent < Model
3
3
 
4
4
  class PaymentAttempt < Model
5
- attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :created_at, :modified_at
5
+ attr_accessor :id, :status, :payment_method_type, :id_at_gateway, :error_code, :error_text, :created_at, :modified_at, :error_detail
6
6
  end
7
7
 
8
8
  attr_accessor :id, :status, :currency_code, :amount, :gateway_account_id, :expires_at, :reference_id,
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Quote < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class QuoteLineGroup < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :unit_amount_in_decimal, :quantity_in_decimal, :amount_in_decimal, :discount_amount, :item_level_discount_amount, :usage_percentage, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -14,7 +14,7 @@ module ChargeBee
14
14
  end
15
15
 
16
16
  class SubscriptionItem < Model
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
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, :proration_type
18
18
  end
19
19
 
20
20
  class ItemTier < Model
@@ -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, :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
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, :proration_type
6
6
  end
7
7
 
8
8
  class ItemTier < Model
@@ -3,6 +3,7 @@ module ChargeBee
3
3
 
4
4
  attr_accessor :name, :time_travel_status, :genesis_time, :destination_time, :failure_code, :failure_reason,
5
5
  :error_json
6
+
6
7
  def wait_for_time_travel_completion(env = nil)
7
8
  env = env || ChargeBee.default_env
8
9
  sleeptime = env.time_machine_sleeptime
@@ -28,6 +29,7 @@ module ChargeBee
28
29
  raise Error.new("Time travel status is in wrong state #{self.time_travel_status}")
29
30
  end
30
31
  end
32
+
31
33
  # OPERATIONS
32
34
  #-----------
33
35
 
@@ -18,7 +18,7 @@ module ChargeBee
18
18
  end
19
19
 
20
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
21
+ attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message, :network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message, :processor_error_code, :processor_error_message
22
22
  end
23
23
 
24
24
  attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
@@ -11,7 +11,7 @@ module ChargeBee
11
11
  def get_response_headers()
12
12
  @rheaders
13
13
  end
14
-
14
+
15
15
  def is_idempotency_replayed()
16
16
  replayed_header = get_response_headers[IDEMPOTENCY_REPLAYED_HEADER]
17
17
  if replayed_header != nil
@@ -272,6 +272,11 @@ module ChargeBee
272
272
  return payment_intent;
273
273
  end
274
274
 
275
+ def gateway_error_detail()
276
+ gateway_error_detail = get(:gateway_error_detail, GatewayErrorDetail);
277
+ return gateway_error_detail;
278
+ end
279
+
275
280
  def item_family()
276
281
  item_family = get(:item_family, ItemFamily);
277
282
  return item_family;
@@ -329,12 +334,12 @@ module ChargeBee
329
334
  return item_entitlement;
330
335
  end
331
336
 
332
- def entitlement()
337
+ def entitlement()
333
338
  entitlement = get(:entitlement, Entitlement);
334
339
  return entitlement;
335
340
  end
336
341
 
337
- def in_app_subscription()
342
+ def in_app_subscription()
338
343
  in_app_subscription = get(:in_app_subscription, InAppSubscription);
339
344
  return in_app_subscription;
340
345
  end
@@ -360,54 +365,53 @@ module ChargeBee
360
365
  return payment_voucher;
361
366
  end
362
367
 
363
- def unbilled_charges()
364
- unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
365
- {:tiers => UnbilledCharge::Tier});
366
- return unbilled_charges;
367
- end
368
-
369
- def credit_notes()
370
- credit_notes = get_list(:credit_notes, CreditNote,
371
- {:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress});
372
- return credit_notes;
373
- end
374
-
375
- def advance_invoice_schedules()
368
+ def advance_invoice_schedules()
376
369
  advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
377
370
  {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
378
371
  return advance_invoice_schedules;
379
372
  end
380
-
381
- def hierarchies()
373
+
374
+ def hierarchies()
382
375
  hierarchies = get_list(:hierarchies, Hierarchy,
383
376
  {});
384
377
  return hierarchies;
385
378
  end
386
-
387
- def downloads()
388
- downloads = get_list(:downloads, Download,
389
- {});
390
- return downloads;
391
- end
392
-
393
- def invoices()
379
+
380
+ def invoices()
394
381
  invoices = get_list(:invoices, Invoice,
395
382
  {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :dunning_attempts => Invoice::DunningAttempt, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice});
396
383
  return invoices;
397
384
  end
398
-
385
+
399
386
  def differential_prices()
400
387
  differential_prices = get_list(:differential_prices, DifferentialPrice,
401
388
  {:tiers => DifferentialPrice::Tier, :parent_periods => DifferentialPrice::ParentPeriod});
402
389
  return differential_prices;
403
390
  end
404
-
405
- def in_app_subscriptions()
391
+ def credit_notes()
392
+ credit_notes = get_list(:credit_notes, CreditNote,
393
+ {:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress});
394
+ return credit_notes;
395
+ end
396
+
397
+ def unbilled_charges()
398
+ unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
399
+ {:tiers => UnbilledCharge::Tier});
400
+ return unbilled_charges;
401
+ end
402
+
403
+ def downloads()
404
+ downloads = get_list(:downloads, Download,
405
+ {});
406
+ return downloads;
407
+ end
408
+
409
+ def in_app_subscriptions()
406
410
  in_app_subscriptions = get_list(:in_app_subscriptions, InAppSubscription,
407
411
  {});
408
412
  return in_app_subscriptions;
409
413
  end
410
-
414
+
411
415
 
412
416
  def to_s(*args)
413
417
  JSON.pretty_generate(@response)
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.35.0'
71
+ VERSION = '2.36.1'
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.35.0
4
+ version: 2.36.1
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: 2024-01-31 00:00:00.000000000 Z
12
+ date: 2024-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -139,6 +139,7 @@ files:
139
139
  - lib/chargebee/models/event.rb
140
140
  - lib/chargebee/models/export.rb
141
141
  - lib/chargebee/models/feature.rb
142
+ - lib/chargebee/models/gateway_error_detail.rb
142
143
  - lib/chargebee/models/gift.rb
143
144
  - lib/chargebee/models/hierarchy.rb
144
145
  - lib/chargebee/models/hosted_page.rb