chargebee 2.60.0 → 2.62.0
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 +4 -4
- data/CHANGELOG.md +62 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/chargebee.gemspec +6 -2
- data/lib/chargebee/errors.rb +10 -3
- data/lib/chargebee/models/credit_note.rb +1 -1
- data/lib/chargebee/models/credit_note_estimate.rb +10 -10
- data/lib/chargebee/models/currency.rb +2 -2
- data/lib/chargebee/models/customer.rb +1 -1
- data/lib/chargebee/models/gateway_error_detail.rb +1 -1
- data/lib/chargebee/models/invoice.rb +1 -1
- data/lib/chargebee/models/invoice_estimate.rb +14 -14
- data/lib/chargebee/models/offer_event.rb +16 -0
- data/lib/chargebee/models/offer_fulfillment.rb +36 -0
- data/lib/chargebee/models/omnichannel_one_time_order.rb +0 -4
- data/lib/chargebee/models/omnichannel_subscription.rb +9 -4
- data/lib/chargebee/models/omnichannel_subscription_item.rb +2 -2
- data/lib/chargebee/models/omnichannel_subscription_item_offer.rb +12 -0
- data/lib/chargebee/models/omnichannel_transaction.rb +9 -1
- data/lib/chargebee/models/order.rb +1 -1
- data/lib/chargebee/models/personalized_offer.rb +26 -0
- data/lib/chargebee/models/quote.rb +11 -11
- data/lib/chargebee/models/quote_line_group.rb +10 -10
- data/lib/chargebee/models/ramp.rb +7 -3
- data/lib/chargebee/models/subscription.rb +1 -1
- data/lib/chargebee/models/subscription_estimate.rb +1 -1
- data/lib/chargebee/models/transaction.rb +1 -1
- data/lib/chargebee/models/usage_file.rb +1 -1
- data/lib/chargebee/nativeRequest.rb +3 -2
- data/lib/chargebee/request.rb +2 -2
- data/lib/chargebee/result.rb +42 -12
- data/lib/chargebee.rb +5 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7a17d81ecf4007b81e194edf0ec10af8faff50b39f1773b65db699958b3285
|
4
|
+
data.tar.gz: 24ffe480a8a4d1d7035d1ecc4f61c5bf4dffb5b788a52738ab622df27e3dc15d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3400c6d3c123c1893e8e9e25468984ac08d8224c1af84983f96d8e25f60f57afea0c6124ed7f85cb98d875e912ac6cd9af26a503b2324d02944b1a3f4641d426
|
7
|
+
data.tar.gz: '09d289c3b9df185e11b87a79ff76df2a06426ae9f4b0baa2187378b33af04cd78c4212a009b0f96d0f7bf47761a148d4bb228f093e35551b883f5b0ab4a6e4fe'
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,65 @@
|
|
1
|
+
### v2.62.0 ( 2025-09-23)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
### Release Bug fix:
|
5
|
+
* Ruby build issue, few new resources were not imported resulting the resources one found error.
|
6
|
+
|
7
|
+
### v2.61.0 ( 2025-09-23)
|
8
|
+
* * *
|
9
|
+
|
10
|
+
### New Resources:
|
11
|
+
* PersonalizedOffer has been added.
|
12
|
+
* OfferFulfillment has been added.
|
13
|
+
* OfferEvent has been added.
|
14
|
+
* OmnichannelSubscriptionItemOffer has been added.
|
15
|
+
|
16
|
+
### New Attributes:
|
17
|
+
* business_entity_id has been added to Customer#Balance.
|
18
|
+
* processor_advice_code has been added to GatewayErrorDetail.
|
19
|
+
* processor_advice_code has been added to Transaction#GatewayErrorDetail.
|
20
|
+
* omnichannel_subscription_item_offers has been added to OmnichannelSubscriptionItem.
|
21
|
+
* linked_omnichannel_subscriptions has been added to OmnichannelTransaction.
|
22
|
+
* linked_omnichannel_one_time_orders has been added to OmnichannelTransaction.
|
23
|
+
* contract_term has been added to Ramp.
|
24
|
+
* charge_once has been added to Ramp#ItemsToAdd.
|
25
|
+
* charge_on_option has been added to Ramp#ItemsToAdd.
|
26
|
+
* charge_on_event has been added to Ramp#ItemsToAdd.
|
27
|
+
* charge_once has been added to Ramp#ItemsToUpdate.
|
28
|
+
* charge_on_option has been added to Ramp#ItemsToUpdate.
|
29
|
+
* charge_on_event has been added to Ramp#ItemsToUpdate.
|
30
|
+
* error_file_path has been added to UsageFile.
|
31
|
+
* error_file_url has been added to UsageFile.
|
32
|
+
|
33
|
+
### New Endpoint:
|
34
|
+
* move has been added to OmnichannelSubscription.
|
35
|
+
|
36
|
+
### New Parameters:
|
37
|
+
* offline_payment_method has been added to Estimate#CreateSubItemEstimateRequest.
|
38
|
+
* offline_payment_method has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
|
39
|
+
* offline_payment_method has been added to HostedPage#CheckoutNewForItemsRequest.
|
40
|
+
* offline_payment_method has been added to Quote#SubscriptionCreateSubItemsForCustomerQuoteRequest.
|
41
|
+
* offline_payment_method has been added to Quote#SubscriptionEditCreateSubCustomerQuoteForItemsRequest.
|
42
|
+
* contract_term has been added to Ramp#CreateForSubscriptionRequest.
|
43
|
+
* items_to_add has been added to Ramp#CreateForSubscriptionRequest.
|
44
|
+
* items_to_update has been added to Ramp#CreateForSubscriptionRequest.
|
45
|
+
* contract_term has been added to Ramp#UpdateRequest.
|
46
|
+
* items_to_add has been added to Ramp#UpdateRequest.
|
47
|
+
* items_to_update has been added to Ramp#UpdateRequest.
|
48
|
+
|
49
|
+
### New Enums:
|
50
|
+
* DUNNING_UPDATED has been added EventType.
|
51
|
+
* OMNICHANNEL_SUBSCRIPTION_MOVED_IN has been added to EventType.
|
52
|
+
|
53
|
+
|
54
|
+
### Bug Fixes:
|
55
|
+
* currency list action has been marked as ListRequest.
|
56
|
+
* index has been removed from CreditNote#ShippingAddress.
|
57
|
+
* index has been removed from Invoice#ShippingAddress
|
58
|
+
* index has been removed from Order#ShippingAddress.
|
59
|
+
* index has been removed from Quote#ShippingAddress.
|
60
|
+
* index has been removed from SubscriptionEstimate#ShippingAddress.
|
61
|
+
* index has been removed from Subscription#ShippingAddress.
|
62
|
+
|
1
63
|
### v2.60.0 (2025-08-25)
|
2
64
|
* * *
|
3
65
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -3,6 +3,12 @@
|
|
3
3
|
[](https://rubygems.org/gems/chargebee)
|
4
4
|
[](https://rubygems.org/gems/chargebee)
|
5
5
|
|
6
|
+
> [!NOTE]
|
7
|
+
> [](https://discord.gg/S3SXDzXHAg)
|
8
|
+
>
|
9
|
+
> We are trialing a Discord server for developers building with Chargebee. Limited spots are open on a first-come basis. Join [here](https://discord.gg/S3SXDzXHAg) if interested.
|
10
|
+
|
11
|
+
|
6
12
|
This is the official Ruby library for integrating with Chargebee.
|
7
13
|
|
8
14
|
- 📘 For a complete reference of available APIs, check out our [API Documentation](https://apidocs.chargebee.com/docs/api/?lang=ruby).
|
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
|
-
s.date = '2025-
|
7
|
+
s.version = '2.62.0'
|
8
|
+
s.date = '2025-09-23'
|
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 = {
|
@@ -90,10 +90,13 @@ Gem::Specification.new do |s|
|
|
90
90
|
lib/chargebee/models/metadata.rb
|
91
91
|
lib/chargebee/models/model.rb
|
92
92
|
lib/chargebee/models/non_subscription.rb
|
93
|
+
lib/chargebee/models/offer_event.rb
|
94
|
+
lib/chargebee/models/offer_fulfillment.rb
|
93
95
|
lib/chargebee/models/omnichannel_one_time_order.rb
|
94
96
|
lib/chargebee/models/omnichannel_one_time_order_item.rb
|
95
97
|
lib/chargebee/models/omnichannel_subscription.rb
|
96
98
|
lib/chargebee/models/omnichannel_subscription_item.rb
|
99
|
+
lib/chargebee/models/omnichannel_subscription_item_offer.rb
|
97
100
|
lib/chargebee/models/omnichannel_subscription_item_scheduled_change.rb
|
98
101
|
lib/chargebee/models/omnichannel_transaction.rb
|
99
102
|
lib/chargebee/models/order.rb
|
@@ -104,6 +107,7 @@ Gem::Specification.new do |s|
|
|
104
107
|
lib/chargebee/models/payment_schedule_scheme.rb
|
105
108
|
lib/chargebee/models/payment_source.rb
|
106
109
|
lib/chargebee/models/payment_voucher.rb
|
110
|
+
lib/chargebee/models/personalized_offer.rb
|
107
111
|
lib/chargebee/models/plan.rb
|
108
112
|
lib/chargebee/models/portal_session.rb
|
109
113
|
lib/chargebee/models/price_variant.rb
|
data/lib/chargebee/errors.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
module ChargeBee
|
2
|
-
|
3
2
|
class Error < StandardError
|
4
3
|
attr_reader :original_error
|
5
4
|
|
@@ -16,7 +15,7 @@ module ChargeBee
|
|
16
15
|
attr_reader :http_status_code, :type, :api_error_code, :param, :json_obj, :error_cause_id,
|
17
16
|
#Deprecated attributes
|
18
17
|
:http_code, :http_body, :error_code
|
19
|
-
|
18
|
+
|
20
19
|
def initialize(http_code=nil, json_obj = nil)
|
21
20
|
super json_obj[:message]
|
22
21
|
@json_obj = json_obj
|
@@ -31,7 +30,7 @@ module ChargeBee
|
|
31
30
|
@http_code = http_code
|
32
31
|
@http_body = json_obj.to_s
|
33
32
|
end
|
34
|
-
|
33
|
+
|
35
34
|
end
|
36
35
|
|
37
36
|
|
@@ -41,4 +40,12 @@ module ChargeBee
|
|
41
40
|
|
42
41
|
class PaymentError < APIError; end
|
43
42
|
|
43
|
+
class UbbBatchIngestionInvalidRequestError < APIError
|
44
|
+
attr_reader :batch_id, :failed_events
|
45
|
+
def initialize(http_code=nil, json_obj=nil)
|
46
|
+
super(http_code, json_obj)
|
47
|
+
@batch_id=json_obj[:batch_id]
|
48
|
+
@failed_events=json_obj[:failed_events]
|
49
|
+
end
|
50
|
+
end
|
44
51
|
end
|
@@ -42,7 +42,7 @@ module ChargeBee
|
|
42
42
|
end
|
43
43
|
|
44
44
|
class ShippingAddress < Model
|
45
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
45
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
46
46
|
end
|
47
47
|
|
48
48
|
class BillingAddress < Model
|
@@ -5,29 +5,29 @@ module ChargeBee
|
|
5
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, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
|
-
class
|
9
|
-
attr_accessor :
|
8
|
+
class LineItemTier < Model
|
9
|
+
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, :pricing_type, :package_size
|
10
10
|
end
|
11
11
|
|
12
|
-
class
|
13
|
-
attr_accessor :
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
|
14
14
|
end
|
15
15
|
|
16
16
|
class LineItemTax < Model
|
17
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
|
-
class
|
21
|
-
attr_accessor :
|
20
|
+
class Discount < Model
|
21
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
22
22
|
end
|
23
23
|
|
24
|
-
class
|
25
|
-
attr_accessor :
|
24
|
+
class Tax < Model
|
25
|
+
attr_accessor :name, :amount, :description
|
26
26
|
end
|
27
27
|
|
28
28
|
attr_accessor :reference_invoice_id, :type, :price_type, :currency_code, :sub_total, :total,
|
29
|
-
:amount_allocated, :amount_available, :line_items, :
|
30
|
-
:
|
29
|
+
:amount_allocated, :amount_available, :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes,
|
30
|
+
:discounts, :taxes, :round_off_amount, :customer_id
|
31
31
|
|
32
32
|
# OPERATIONS
|
33
33
|
#-----------
|
@@ -6,11 +6,11 @@ module ChargeBee
|
|
6
6
|
# OPERATIONS
|
7
7
|
#-----------
|
8
8
|
|
9
|
-
def self.list(env=nil, headers={})
|
9
|
+
def self.list(params={}, env=nil, headers={})
|
10
10
|
jsonKeys = {
|
11
11
|
}
|
12
12
|
options = {}
|
13
|
-
Request.send_list_request('get', uri_path("currencies","list"),
|
13
|
+
Request.send_list_request('get', uri_path("currencies","list"), params, env, headers,nil, false, jsonKeys, options)
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.retrieve(id, env=nil, headers={})
|
@@ -18,7 +18,7 @@ module ChargeBee
|
|
18
18
|
end
|
19
19
|
|
20
20
|
class Balance < Model
|
21
|
-
attr_accessor :promotional_credits, :excess_payments, :refundable_credits, :unbilled_charges, :currency_code, :balance_currency_code
|
21
|
+
attr_accessor :promotional_credits, :excess_payments, :refundable_credits, :unbilled_charges, :currency_code, :balance_currency_code, :business_entity_id
|
22
22
|
end
|
23
23
|
|
24
24
|
class EntityIdentifier < Model
|
@@ -3,7 +3,7 @@ module ChargeBee
|
|
3
3
|
|
4
4
|
attr_accessor :request_id, :error_category, :error_code, :error_message, :decline_code, :decline_message,
|
5
5
|
:network_error_code, :network_error_message, :error_field, :recommendation_code, :recommendation_message,
|
6
|
-
:processor_error_code, :processor_error_message, :error_cause_id
|
6
|
+
:processor_error_code, :processor_error_message, :error_cause_id, :processor_advice_code
|
7
7
|
|
8
8
|
# OPERATIONS
|
9
9
|
#-----------
|
@@ -66,7 +66,7 @@ module ChargeBee
|
|
66
66
|
end
|
67
67
|
|
68
68
|
class ShippingAddress < Model
|
69
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
69
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
70
70
|
end
|
71
71
|
|
72
72
|
class BillingAddress < Model
|
@@ -5,37 +5,37 @@ module ChargeBee
|
|
5
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, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
|
-
class
|
9
|
-
attr_accessor :
|
8
|
+
class LineItemTier < Model
|
9
|
+
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, :pricing_type, :package_size
|
10
10
|
end
|
11
11
|
|
12
|
-
class
|
13
|
-
attr_accessor :
|
12
|
+
class LineItemDiscount < Model
|
13
|
+
attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
|
14
14
|
end
|
15
15
|
|
16
16
|
class LineItemTax < Model
|
17
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
|
-
class LineItemTier < Model
|
21
|
-
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, :pricing_type, :package_size
|
22
|
-
end
|
23
|
-
|
24
20
|
class LineItemCredit < Model
|
25
21
|
attr_accessor :cn_id, :applied_amount, :line_item_id
|
26
22
|
end
|
27
23
|
|
28
|
-
class LineItemDiscount < Model
|
29
|
-
attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
|
30
|
-
end
|
31
|
-
|
32
24
|
class LineItemAddress < Model
|
33
25
|
attr_accessor :line_item_id, :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
34
26
|
end
|
35
27
|
|
28
|
+
class Discount < Model
|
29
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
30
|
+
end
|
31
|
+
|
32
|
+
class Tax < Model
|
33
|
+
attr_accessor :name, :amount, :description
|
34
|
+
end
|
35
|
+
|
36
36
|
attr_accessor :recurring, :price_type, :currency_code, :sub_total, :total, :credits_applied,
|
37
|
-
:amount_paid, :amount_due, :line_items, :
|
38
|
-
:line_item_credits, :
|
37
|
+
:amount_paid, :amount_due, :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes,
|
38
|
+
:line_item_credits, :line_item_addresses, :discounts, :taxes, :round_off_amount, :customer_id
|
39
39
|
|
40
40
|
# OPERATIONS
|
41
41
|
#-----------
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class OfferEvent < Model
|
3
|
+
|
4
|
+
|
5
|
+
# OPERATIONS
|
6
|
+
#-----------
|
7
|
+
|
8
|
+
def self.offer_events(params, env=nil, headers={})
|
9
|
+
jsonKeys = {
|
10
|
+
}
|
11
|
+
options = {}
|
12
|
+
Request.send('post', uri_path("offer_events"), params, env, headers, "grow", true, jsonKeys, options)
|
13
|
+
end
|
14
|
+
|
15
|
+
end # ~OfferEvent
|
16
|
+
end # ~ChargeBee
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class OfferFulfillment < Model
|
3
|
+
|
4
|
+
class Error < Model
|
5
|
+
attr_accessor :code, :message
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :personalized_offer_id, :option_id, :processing_type, :status, :redirect_url,
|
9
|
+
:failed_at, :created_at, :completed_at, :error
|
10
|
+
|
11
|
+
# OPERATIONS
|
12
|
+
#-----------
|
13
|
+
|
14
|
+
def self.offer_fulfillments(params, env=nil, headers={})
|
15
|
+
jsonKeys = {
|
16
|
+
}
|
17
|
+
options = {}
|
18
|
+
Request.send('post', uri_path("offer_fulfillments"), params, env, headers, "grow", true, jsonKeys, options)
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.offer_fulfillments_get(id, env=nil, headers={})
|
22
|
+
jsonKeys = {
|
23
|
+
}
|
24
|
+
options = {}
|
25
|
+
Request.send('get', uri_path("offer_fulfillments",id.to_s), {}, env, headers, "grow", true, jsonKeys, options)
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.offer_fulfillments_update(id, params, env=nil, headers={})
|
29
|
+
jsonKeys = {
|
30
|
+
}
|
31
|
+
options = {}
|
32
|
+
Request.send('post', uri_path("offer_fulfillments",id.to_s), params, env, headers, "grow", true, jsonKeys, options)
|
33
|
+
end
|
34
|
+
|
35
|
+
end # ~OfferFulfillment
|
36
|
+
end # ~ChargeBee
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class OmnichannelOneTimeOrder < Model
|
3
3
|
|
4
|
-
class OmnichannelTransaction < Model
|
5
|
-
attr_accessor :id, :id_at_source, :app_id, :price_currency, :price_units, :price_nanos, :type, :transacted_at, :created_at, :resource_version
|
6
|
-
end
|
7
|
-
|
8
4
|
attr_accessor :id, :app_id, :customer_id, :id_at_source, :origin, :source, :created_at, :resource_version,
|
9
5
|
:omnichannel_one_time_order_items, :purchase_transaction
|
10
6
|
|
@@ -1,10 +1,6 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class OmnichannelSubscription < Model
|
3
3
|
|
4
|
-
class OmnichannelTransaction < Model
|
5
|
-
attr_accessor :id, :id_at_source, :app_id, :price_currency, :price_units, :price_nanos, :type, :transacted_at, :created_at, :resource_version
|
6
|
-
end
|
7
|
-
|
8
4
|
attr_accessor :id, :id_at_source, :app_id, :source, :customer_id, :created_at, :resource_version,
|
9
5
|
:omnichannel_subscription_items, :initial_purchase_transaction
|
10
6
|
|
@@ -32,5 +28,14 @@ module ChargeBee
|
|
32
28
|
Request.send('get', uri_path("omnichannel_subscriptions",id.to_s,"omnichannel_transactions"), params, env, headers,nil, false, jsonKeys, options)
|
33
29
|
end
|
34
30
|
|
31
|
+
def self.move(id, params, env=nil, headers={})
|
32
|
+
jsonKeys = {
|
33
|
+
}
|
34
|
+
options = {
|
35
|
+
:isIdempotent => true
|
36
|
+
}
|
37
|
+
Request.send('post', uri_path("omnichannel_subscriptions",id.to_s,"move"), params, env, headers,nil, false, jsonKeys, options)
|
38
|
+
end
|
39
|
+
|
35
40
|
end # ~OmnichannelSubscription
|
36
41
|
end # ~ChargeBee
|
@@ -11,8 +11,8 @@ module ChargeBee
|
|
11
11
|
|
12
12
|
attr_accessor :id, :item_id_at_source, :item_parent_id_at_source, :status, :auto_renew_status,
|
13
13
|
:current_term_start, :current_term_end, :expired_at, :expiration_reason, :cancelled_at, :cancellation_reason,
|
14
|
-
:grace_period_expires_at, :resumes_at, :has_scheduled_changes, :resource_version, :
|
15
|
-
:linked_item
|
14
|
+
:grace_period_expires_at, :resumes_at, :has_scheduled_changes, :resource_version, :omnichannel_subscription_item_offers,
|
15
|
+
:upcoming_renewal, :linked_item
|
16
16
|
|
17
17
|
# OPERATIONS
|
18
18
|
#-----------
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class OmnichannelSubscriptionItemOffer < Model
|
3
|
+
|
4
|
+
attr_accessor :id, :offer_id_at_source, :category, :category_at_source, :type, :type_at_source,
|
5
|
+
:discount_type, :duration, :percentage, :price_currency, :price_units, :price_nanos, :offer_term_start,
|
6
|
+
:offer_term_end, :resource_version
|
7
|
+
|
8
|
+
# OPERATIONS
|
9
|
+
#-----------
|
10
|
+
|
11
|
+
end # ~OmnichannelSubscriptionItemOffer
|
12
|
+
end # ~ChargeBee
|
@@ -1,8 +1,16 @@
|
|
1
1
|
module ChargeBee
|
2
2
|
class OmnichannelTransaction < Model
|
3
3
|
|
4
|
+
class LinkedOmnichannelSubscription < Model
|
5
|
+
attr_accessor :omnichannel_subscription_id
|
6
|
+
end
|
7
|
+
|
8
|
+
class LinkedOmnichannelOneTimeOrder < Model
|
9
|
+
attr_accessor :omnichannel_one_time_order_id
|
10
|
+
end
|
11
|
+
|
4
12
|
attr_accessor :id, :id_at_source, :app_id, :price_currency, :price_units, :price_nanos, :type,
|
5
|
-
:transacted_at, :created_at, :resource_version
|
13
|
+
:transacted_at, :created_at, :resource_version, :linked_omnichannel_subscriptions, :linked_omnichannel_one_time_orders
|
6
14
|
|
7
15
|
# OPERATIONS
|
8
16
|
#-----------
|
@@ -6,7 +6,7 @@ module ChargeBee
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class ShippingAddress < Model
|
9
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
9
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
10
10
|
end
|
11
11
|
|
12
12
|
class BillingAddress < Model
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class PersonalizedOffer < Model
|
3
|
+
|
4
|
+
class Content < Model
|
5
|
+
attr_accessor :title, :description
|
6
|
+
end
|
7
|
+
|
8
|
+
class Option < Model
|
9
|
+
attr_accessor :id, :label, :processing_type, :processing_layout, :redirect_url
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_accessor :id, :offer_id, :content, :options
|
13
|
+
|
14
|
+
# OPERATIONS
|
15
|
+
#-----------
|
16
|
+
|
17
|
+
def self.personalized_offers(params, env=nil, headers={})
|
18
|
+
jsonKeys = {
|
19
|
+
:custom => 0,
|
20
|
+
}
|
21
|
+
options = {}
|
22
|
+
Request.send('post', uri_path("personalized_offers"), params, env, headers, "grow", true, jsonKeys, options)
|
23
|
+
end
|
24
|
+
|
25
|
+
end # ~PersonalizedOffer
|
26
|
+
end # ~ChargeBee
|
@@ -5,28 +5,28 @@ module ChargeBee
|
|
5
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, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
|
-
class
|
9
|
-
attr_accessor :
|
8
|
+
class LineItemTier < Model
|
9
|
+
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, :pricing_type, :package_size
|
10
10
|
end
|
11
11
|
|
12
12
|
class LineItemDiscount < Model
|
13
13
|
attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
|
14
14
|
end
|
15
15
|
|
16
|
-
class Tax < Model
|
17
|
-
attr_accessor :name, :amount, :description
|
18
|
-
end
|
19
|
-
|
20
16
|
class LineItemTax < Model
|
21
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
|
22
18
|
end
|
23
19
|
|
24
|
-
class
|
25
|
-
attr_accessor :
|
20
|
+
class Discount < Model
|
21
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
22
|
+
end
|
23
|
+
|
24
|
+
class Tax < Model
|
25
|
+
attr_accessor :name, :amount, :description
|
26
26
|
end
|
27
27
|
|
28
28
|
class ShippingAddress < Model
|
29
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
29
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
30
30
|
end
|
31
31
|
|
32
32
|
class BillingAddress < Model
|
@@ -36,8 +36,8 @@ module ChargeBee
|
|
36
36
|
attr_accessor :id, :name, :po_number, :customer_id, :subscription_id, :invoice_id, :status,
|
37
37
|
:operation_type, :vat_number, :price_type, :valid_till, :date, :total_payable, :charge_on_acceptance,
|
38
38
|
:sub_total, :total, :credits_applied, :amount_paid, :amount_due, :version, :resource_version,
|
39
|
-
:updated_at, :vat_number_prefix, :line_items, :
|
40
|
-
:
|
39
|
+
:updated_at, :vat_number_prefix, :line_items, :line_item_tiers, :line_item_discounts, :line_item_taxes,
|
40
|
+
:discounts, :taxes, :tax_category, :currency_code, :notes, :shipping_address, :billing_address,
|
41
41
|
:contract_term_start, :contract_term_end, :contract_term_termination_fee, :business_entity_id,
|
42
42
|
:deleted, :total_contract_value, :total_discount
|
43
43
|
|
@@ -5,25 +5,25 @@ module ChargeBee
|
|
5
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, :metered, :is_percentage_pricing, :reference_line_item_id, :description, :entity_description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
|
6
6
|
end
|
7
7
|
|
8
|
-
class Discount < Model
|
9
|
-
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
10
|
-
end
|
11
|
-
|
12
8
|
class LineItemDiscount < Model
|
13
9
|
attr_accessor :line_item_id, :discount_type, :coupon_id, :entity_id, :discount_amount
|
14
10
|
end
|
15
11
|
|
16
|
-
class Tax < Model
|
17
|
-
attr_accessor :name, :amount, :description
|
18
|
-
end
|
19
|
-
|
20
12
|
class LineItemTax < Model
|
21
13
|
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
14
|
end
|
23
15
|
|
16
|
+
class Discount < Model
|
17
|
+
attr_accessor :amount, :description, :entity_type, :discount_type, :entity_id, :coupon_set_code
|
18
|
+
end
|
19
|
+
|
20
|
+
class Tax < Model
|
21
|
+
attr_accessor :name, :amount, :description
|
22
|
+
end
|
23
|
+
|
24
24
|
attr_accessor :version, :id, :sub_total, :total, :credits_applied, :amount_paid, :amount_due,
|
25
|
-
:charge_event, :billing_cycle_number, :line_items, :
|
26
|
-
:
|
25
|
+
:charge_event, :billing_cycle_number, :line_items, :line_item_discounts, :line_item_taxes, :discounts,
|
26
|
+
:taxes
|
27
27
|
|
28
28
|
# OPERATIONS
|
29
29
|
#-----------
|
@@ -2,11 +2,11 @@ module ChargeBee
|
|
2
2
|
class Ramp < Model
|
3
3
|
|
4
4
|
class ItemsToAdd < Model
|
5
|
-
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :metered_quantity
|
5
|
+
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :metered_quantity, :charge_once, :charge_on_option, :charge_on_event
|
6
6
|
end
|
7
7
|
|
8
8
|
class ItemsToUpdate < Model
|
9
|
-
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :metered_quantity
|
9
|
+
attr_accessor :item_price_id, :item_type, :quantity, :quantity_in_decimal, :unit_price, :unit_price_in_decimal, :amount, :amount_in_decimal, :free_quantity, :free_quantity_in_decimal, :billing_cycles, :service_period_days, :metered_quantity, :charge_once, :charge_on_option, :charge_on_event
|
10
10
|
end
|
11
11
|
|
12
12
|
class CouponsToAdd < Model
|
@@ -21,13 +21,17 @@ module ChargeBee
|
|
21
21
|
attr_accessor :item_price_id, :starting_unit, :ending_unit, :price, :starting_unit_in_decimal, :ending_unit_in_decimal, :price_in_decimal, :pricing_type, :package_size, :index
|
22
22
|
end
|
23
23
|
|
24
|
+
class ContractTerm < Model
|
25
|
+
attr_accessor :cancellation_cutoff_period, :renewal_billing_cycles, :action_at_term_end
|
26
|
+
end
|
27
|
+
|
24
28
|
class StatusTransitionReason < Model
|
25
29
|
attr_accessor :code, :message
|
26
30
|
end
|
27
31
|
|
28
32
|
attr_accessor :id, :description, :subscription_id, :effective_from, :status, :created_at, :resource_version,
|
29
33
|
:updated_at, :items_to_add, :items_to_update, :coupons_to_add, :discounts_to_add, :item_tiers,
|
30
|
-
:items_to_remove, :coupons_to_remove, :discounts_to_remove, :deleted, :status_transition_reason
|
34
|
+
:items_to_remove, :coupons_to_remove, :discounts_to_remove, :contract_term, :deleted, :status_transition_reason
|
31
35
|
|
32
36
|
# OPERATIONS
|
33
37
|
#-----------
|
@@ -30,7 +30,7 @@ module ChargeBee
|
|
30
30
|
end
|
31
31
|
|
32
32
|
class ShippingAddress < Model
|
33
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
33
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
34
34
|
end
|
35
35
|
|
36
36
|
class ReferralInfo < Model
|
@@ -2,7 +2,7 @@ module ChargeBee
|
|
2
2
|
class SubscriptionEstimate < Model
|
3
3
|
|
4
4
|
class ShippingAddress < Model
|
5
|
-
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
5
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
6
6
|
end
|
7
7
|
|
8
8
|
class ContractTerm < Model
|
@@ -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, :network_error_message, :error_field, :recommendation_code, :recommendation_message, :processor_error_code, :processor_error_message, :error_cause_id
|
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, :error_cause_id, :processor_advice_code
|
22
22
|
end
|
23
23
|
|
24
24
|
attr_accessor :id, :customer_id, :subscription_id, :gateway_account_id, :payment_source_id,
|
@@ -7,7 +7,7 @@ module ChargeBee
|
|
7
7
|
|
8
8
|
attr_accessor :id, :name, :mime_type, :error_code, :error_reason, :status, :total_records_count,
|
9
9
|
:processed_records_count, :failed_records_count, :file_size_in_bytes, :processing_started_at,
|
10
|
-
:processing_completed_at, :uploaded_by, :uploaded_at, :upload_details
|
10
|
+
:processing_completed_at, :uploaded_by, :uploaded_at, :error_file_path, :error_file_url, :upload_details
|
11
11
|
|
12
12
|
# OPERATIONS
|
13
13
|
#-----------
|
@@ -17,7 +17,6 @@ module ChargeBee
|
|
17
17
|
request = build_http_request(method, uri, headers, isJsonRequest)
|
18
18
|
request.body = payload if payload
|
19
19
|
request.basic_auth(api_key, nil)
|
20
|
-
|
21
20
|
http = configure_http_client(uri, env)
|
22
21
|
|
23
22
|
retry_config = env.retry_config || {}
|
@@ -139,7 +138,7 @@ module ChargeBee
|
|
139
138
|
|
140
139
|
if rcode >= 200 && rcode < 300
|
141
140
|
begin
|
142
|
-
resp = JSON.parse(rbody)
|
141
|
+
resp = rcode == 204 ? rbody : JSON.parse(rbody)
|
143
142
|
rescue JSON::ParserError => e
|
144
143
|
raise handle_json_error(rbody, e)
|
145
144
|
end
|
@@ -184,6 +183,8 @@ module ChargeBee
|
|
184
183
|
raise OperationFailedError.new(rcode, error_obj)
|
185
184
|
when "invalid_request"
|
186
185
|
raise InvalidRequestError.new(rcode, error_obj)
|
186
|
+
when "ubb_batch_ingestion_invalid_request"
|
187
|
+
raise UbbBatchIngestionInvalidRequestError.new(rcode, error_obj)
|
187
188
|
else
|
188
189
|
raise APIError.new(rcode, error_obj)
|
189
190
|
end
|
data/lib/chargebee/request.rb
CHANGED
@@ -14,9 +14,9 @@ module ChargeBee
|
|
14
14
|
|
15
15
|
def self.send(method, url, params={}, env=nil, headers={}, sub_domain=nil, isJsonRequest=nil, jsonKeys={}, options={})
|
16
16
|
env ||= ChargeBee.default_env
|
17
|
-
ser_params = isJsonRequest ? params
|
17
|
+
ser_params = isJsonRequest ? params : Util.serialize(params, nil, nil, jsonKeys)
|
18
18
|
resp, rheaders, rcode = NativeRequest.request(method, url, env, ser_params||={}, headers, sub_domain, isJsonRequest, options)
|
19
|
-
if resp
|
19
|
+
if resp&.has_key?(:list)
|
20
20
|
ListResult.new(resp[:list], resp[:next_offset], rheaders, rcode)
|
21
21
|
else
|
22
22
|
Result.new(resp, rheaders, rcode)
|
data/lib/chargebee/result.rb
CHANGED
@@ -167,17 +167,17 @@ module ChargeBee
|
|
167
167
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
168
168
|
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
169
169
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
170
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
170
|
+
{:line_items => InvoiceEstimate::LineItem, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_credits => InvoiceEstimate::LineItemCredit, :line_item_addresses => InvoiceEstimate::LineItemAddress, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax});
|
171
171
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
172
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
172
|
+
{:line_items => InvoiceEstimate::LineItem, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_credits => InvoiceEstimate::LineItemCredit, :line_item_addresses => InvoiceEstimate::LineItemAddress, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax});
|
173
173
|
estimate.init_dependant_list(@response[:estimate], :subscription_estimates,
|
174
174
|
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
175
175
|
estimate.init_dependant_list(@response[:estimate], :invoice_estimates,
|
176
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
176
|
+
{:line_items => InvoiceEstimate::LineItem, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_credits => InvoiceEstimate::LineItemCredit, :line_item_addresses => InvoiceEstimate::LineItemAddress, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax});
|
177
177
|
estimate.init_dependant_list(@response[:estimate], :payment_schedule_estimates,
|
178
178
|
{:schedule_entries => PaymentScheduleEstimate::ScheduleEntry});
|
179
179
|
estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
|
180
|
-
{:line_items => CreditNoteEstimate::LineItem, :
|
180
|
+
{:line_items => CreditNoteEstimate::LineItem, :line_item_tiers => CreditNoteEstimate::LineItemTier, :line_item_discounts => CreditNoteEstimate::LineItemDiscount, :line_item_taxes => CreditNoteEstimate::LineItemTax, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax});
|
181
181
|
estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates,
|
182
182
|
{:tiers => UnbilledCharge::Tier});
|
183
183
|
return estimate;
|
@@ -185,7 +185,7 @@ module ChargeBee
|
|
185
185
|
|
186
186
|
def quote()
|
187
187
|
quote = get(:quote, Quote,
|
188
|
-
{:line_items => Quote::LineItem, :
|
188
|
+
{:line_items => Quote::LineItem, :line_item_tiers => Quote::LineItemTier, :line_item_discounts => Quote::LineItemDiscount, :line_item_taxes => Quote::LineItemTax, :discounts => Quote::Discount, :taxes => Quote::Tax, :shipping_address => Quote::ShippingAddress, :billing_address => Quote::BillingAddress});
|
189
189
|
return quote;
|
190
190
|
end
|
191
191
|
|
@@ -215,7 +215,7 @@ module ChargeBee
|
|
215
215
|
|
216
216
|
def quote_line_group()
|
217
217
|
quote_line_group = get(:quote_line_group, QuoteLineGroup,
|
218
|
-
{:line_items => QuoteLineGroup::LineItem, :
|
218
|
+
{:line_items => QuoteLineGroup::LineItem, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :line_item_taxes => QuoteLineGroup::LineItemTax, :discounts => QuoteLineGroup::Discount, :taxes => QuoteLineGroup::Tax});
|
219
219
|
return quote_line_group;
|
220
220
|
end
|
221
221
|
|
@@ -443,7 +443,7 @@ module ChargeBee
|
|
443
443
|
|
444
444
|
def ramp()
|
445
445
|
ramp = get(:ramp, Ramp,
|
446
|
-
{:items_to_add => Ramp::ItemsToAdd, :items_to_update => Ramp::ItemsToUpdate, :coupons_to_add => Ramp::CouponsToAdd, :discounts_to_add => Ramp::DiscountsToAdd, :item_tiers => Ramp::ItemTier, :status_transition_reason => Ramp::StatusTransitionReason});
|
446
|
+
{:items_to_add => Ramp::ItemsToAdd, :items_to_update => Ramp::ItemsToUpdate, :coupons_to_add => Ramp::CouponsToAdd, :discounts_to_add => Ramp::DiscountsToAdd, :item_tiers => Ramp::ItemTier, :contract_term => Ramp::ContractTerm, :status_transition_reason => Ramp::StatusTransitionReason});
|
447
447
|
return ramp;
|
448
448
|
end
|
449
449
|
|
@@ -460,20 +460,25 @@ module ChargeBee
|
|
460
460
|
|
461
461
|
def omnichannel_subscription()
|
462
462
|
omnichannel_subscription = get(:omnichannel_subscription, OmnichannelSubscription, {},
|
463
|
-
{:omnichannel_subscription_items => OmnichannelSubscriptionItem});
|
463
|
+
{:omnichannel_subscription_items => OmnichannelSubscriptionItem, :initial_purchase_transaction => OmnichannelTransaction});
|
464
|
+
omnichannel_subscription.init_dependant(@response[:omnichannel_subscription], :initial_purchase_transaction,
|
465
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
464
466
|
omnichannel_subscription.init_dependant_list(@response[:omnichannel_subscription], :omnichannel_subscription_items,
|
465
467
|
{:upcoming_renewal => OmnichannelSubscriptionItem::UpcomingRenewal, :linked_item => OmnichannelSubscriptionItem::LinkedItem});
|
466
468
|
return omnichannel_subscription;
|
467
469
|
end
|
468
470
|
|
469
471
|
def omnichannel_transaction()
|
470
|
-
omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction
|
472
|
+
omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction,
|
473
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
471
474
|
return omnichannel_transaction;
|
472
475
|
end
|
473
476
|
|
474
477
|
def omnichannel_subscription_item()
|
475
|
-
omnichannel_subscription_item = get(:omnichannel_subscription_item, OmnichannelSubscriptionItem,
|
476
|
-
{:
|
478
|
+
omnichannel_subscription_item = get(:omnichannel_subscription_item, OmnichannelSubscriptionItem, {},
|
479
|
+
{:omnichannel_subscription_item_offers => OmnichannelSubscriptionItemOffer});
|
480
|
+
omnichannel_subscription_item.init_dependant_list(@response[:omnichannel_subscription_item], :omnichannel_subscription_item_offers,
|
481
|
+
{});
|
477
482
|
return omnichannel_subscription_item;
|
478
483
|
end
|
479
484
|
|
@@ -485,7 +490,9 @@ module ChargeBee
|
|
485
490
|
|
486
491
|
def omnichannel_one_time_order()
|
487
492
|
omnichannel_one_time_order = get(:omnichannel_one_time_order, OmnichannelOneTimeOrder, {},
|
488
|
-
{:omnichannel_one_time_order_items => OmnichannelOneTimeOrderItem});
|
493
|
+
{:omnichannel_one_time_order_items => OmnichannelOneTimeOrderItem, :purchase_transaction => OmnichannelTransaction});
|
494
|
+
omnichannel_one_time_order.init_dependant(@response[:omnichannel_one_time_order], :purchase_transaction,
|
495
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
489
496
|
omnichannel_one_time_order.init_dependant_list(@response[:omnichannel_one_time_order], :omnichannel_one_time_order_items,
|
490
497
|
{});
|
491
498
|
return omnichannel_one_time_order;
|
@@ -518,11 +525,28 @@ module ChargeBee
|
|
518
525
|
return usage_file;
|
519
526
|
end
|
520
527
|
|
528
|
+
def personalized_offer()
|
529
|
+
personalized_offer = get(:personalized_offer, PersonalizedOffer,
|
530
|
+
{:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
|
531
|
+
return personalized_offer;
|
532
|
+
end
|
533
|
+
|
521
534
|
def brand()
|
522
535
|
brand = get(:brand, Brand);
|
523
536
|
return brand;
|
524
537
|
end
|
525
538
|
|
539
|
+
def offer_fulfillment()
|
540
|
+
offer_fulfillment = get(:offer_fulfillment, OfferFulfillment,
|
541
|
+
{:error => OfferFulfillment::Error});
|
542
|
+
return offer_fulfillment;
|
543
|
+
end
|
544
|
+
|
545
|
+
def offer_event()
|
546
|
+
offer_event = get(:offer_event, OfferEvent);
|
547
|
+
return offer_event;
|
548
|
+
end
|
549
|
+
|
526
550
|
def webhook_endpoint()
|
527
551
|
webhook_endpoint = get(:webhook_endpoint, WebhookEndpoint);
|
528
552
|
return webhook_endpoint;
|
@@ -598,6 +622,12 @@ module ChargeBee
|
|
598
622
|
return in_app_subscriptions;
|
599
623
|
end
|
600
624
|
|
625
|
+
def personalized_offers()
|
626
|
+
personalized_offers = get_list(:personalized_offers, PersonalizedOffer,
|
627
|
+
{:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
|
628
|
+
return personalized_offers;
|
629
|
+
end
|
630
|
+
|
601
631
|
|
602
632
|
def to_s(*args)
|
603
633
|
JSON.pretty_generate(@response)
|
data/lib/chargebee.rb
CHANGED
@@ -91,10 +91,14 @@ require File.dirname(__FILE__) + '/chargebee/models/quoted_ramp'
|
|
91
91
|
require File.dirname(__FILE__) + '/chargebee/models/webhook_endpoint'
|
92
92
|
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_one_time_order'
|
93
93
|
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_one_time_order_item'
|
94
|
+
require File.dirname(__FILE__) + '/chargebee/models/personalized_offer'
|
95
|
+
require File.dirname(__FILE__) + '/chargebee/models/offer_event'
|
96
|
+
require File.dirname(__FILE__) + '/chargebee/models/offer_fulfillment'
|
97
|
+
|
94
98
|
|
95
99
|
module ChargeBee
|
96
100
|
|
97
|
-
VERSION = '2.
|
101
|
+
VERSION = '2.62.0'
|
98
102
|
|
99
103
|
@@default_env = nil
|
100
104
|
@@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.
|
4
|
+
version: 2.62.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: 2025-
|
12
|
+
date: 2025-09-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cgi
|
@@ -131,10 +131,13 @@ files:
|
|
131
131
|
- lib/chargebee/models/metadata.rb
|
132
132
|
- lib/chargebee/models/model.rb
|
133
133
|
- lib/chargebee/models/non_subscription.rb
|
134
|
+
- lib/chargebee/models/offer_event.rb
|
135
|
+
- lib/chargebee/models/offer_fulfillment.rb
|
134
136
|
- lib/chargebee/models/omnichannel_one_time_order.rb
|
135
137
|
- lib/chargebee/models/omnichannel_one_time_order_item.rb
|
136
138
|
- lib/chargebee/models/omnichannel_subscription.rb
|
137
139
|
- lib/chargebee/models/omnichannel_subscription_item.rb
|
140
|
+
- lib/chargebee/models/omnichannel_subscription_item_offer.rb
|
138
141
|
- lib/chargebee/models/omnichannel_subscription_item_scheduled_change.rb
|
139
142
|
- lib/chargebee/models/omnichannel_transaction.rb
|
140
143
|
- lib/chargebee/models/order.rb
|
@@ -145,6 +148,7 @@ files:
|
|
145
148
|
- lib/chargebee/models/payment_schedule_scheme.rb
|
146
149
|
- lib/chargebee/models/payment_source.rb
|
147
150
|
- lib/chargebee/models/payment_voucher.rb
|
151
|
+
- lib/chargebee/models/personalized_offer.rb
|
148
152
|
- lib/chargebee/models/plan.rb
|
149
153
|
- lib/chargebee/models/portal_session.rb
|
150
154
|
- lib/chargebee/models/price_variant.rb
|