chargebee 2.58.0 → 2.69.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 +314 -0
- data/Gemfile +4 -3
- data/Gemfile.lock +18 -14
- data/Makefile +112 -0
- data/README.md +6 -0
- data/VERSION +1 -0
- data/chargebee.gemspec +17 -3
- data/lib/chargebee/errors.rb +12 -3
- data/lib/chargebee/models/comment.rb +1 -1
- data/lib/chargebee/models/coupon_code.rb +1 -0
- data/lib/chargebee/models/credit_note.rb +25 -24
- data/lib/chargebee/models/credit_note_estimate.rb +10 -10
- data/lib/chargebee/models/currency.rb +2 -2
- data/lib/chargebee/models/customer.rb +4 -1
- data/lib/chargebee/models/discount.rb +1 -1
- data/lib/chargebee/models/einvoice.rb +10 -0
- data/lib/chargebee/models/entitlement_override.rb +2 -2
- data/lib/chargebee/models/gateway_error_detail.rb +1 -1
- data/lib/chargebee/models/gift.rb +1 -0
- data/lib/chargebee/models/hosted_page.rb +1 -0
- data/lib/chargebee/models/impacted_customer.rb +14 -0
- data/lib/chargebee/models/invoice.rb +40 -33
- 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 +25 -0
- data/lib/chargebee/models/omnichannel_one_time_order_item.rb +11 -0
- 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 +2 -1
- data/lib/chargebee/models/payment_intent.rb +6 -2
- data/lib/chargebee/models/personalized_offer.rb +26 -0
- data/lib/chargebee/models/pricing_page_session.rb +2 -0
- data/lib/chargebee/models/promotional_credit.rb +1 -1
- data/lib/chargebee/models/quote.rb +11 -11
- data/lib/chargebee/models/quote_line_group.rb +10 -10
- data/lib/chargebee/models/quoted_charge.rb +5 -1
- data/lib/chargebee/models/quoted_delta_ramp.rb +14 -0
- data/lib/chargebee/models/quoted_ramp.rb +1 -1
- data/lib/chargebee/models/quoted_subscription.rb +2 -2
- data/lib/chargebee/models/ramp.rb +7 -3
- data/lib/chargebee/models/recorded_purchase.rb +5 -1
- data/lib/chargebee/models/subscription.rb +4 -3
- data/lib/chargebee/models/subscription_entitlements_created_detail.rb +10 -0
- data/lib/chargebee/models/subscription_entitlements_updated_detail.rb +10 -0
- data/lib/chargebee/models/subscription_estimate.rb +1 -1
- data/lib/chargebee/models/transaction.rb +3 -1
- data/lib/chargebee/models/usage_file.rb +5 -5
- data/lib/chargebee/models/webhook_endpoint.rb +52 -0
- data/lib/chargebee/{nativeRequest.rb → native_request.rb} +17 -9
- data/lib/chargebee/request.rb +2 -2
- data/lib/chargebee/result.rb +103 -18
- data/lib/chargebee.rb +10 -2
- data/lib/ssl/ca-certs.crt +50 -0
- data/spec/chargebee/native_request_spec.rb +13 -0
- metadata +22 -5
data/lib/chargebee/result.rb
CHANGED
|
@@ -106,7 +106,7 @@ module ChargeBee
|
|
|
106
106
|
|
|
107
107
|
def invoice()
|
|
108
108
|
invoice = get(:invoice, Invoice,
|
|
109
|
-
{:line_items => Invoice::LineItem, :
|
|
109
|
+
{:line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :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, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation});
|
|
110
110
|
return invoice;
|
|
111
111
|
end
|
|
112
112
|
|
|
@@ -121,6 +121,11 @@ module ChargeBee
|
|
|
121
121
|
return payment_schedule;
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
def einvoice()
|
|
125
|
+
einvoice = get(:einvoice, Einvoice);
|
|
126
|
+
return einvoice;
|
|
127
|
+
end
|
|
128
|
+
|
|
124
129
|
def tax_withheld()
|
|
125
130
|
tax_withheld = get(:tax_withheld, TaxWithheld);
|
|
126
131
|
return tax_withheld;
|
|
@@ -128,7 +133,7 @@ module ChargeBee
|
|
|
128
133
|
|
|
129
134
|
def credit_note()
|
|
130
135
|
credit_note = get(:credit_note, CreditNote,
|
|
131
|
-
{:
|
|
136
|
+
{:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation});
|
|
132
137
|
return credit_note;
|
|
133
138
|
end
|
|
134
139
|
|
|
@@ -167,17 +172,17 @@ module ChargeBee
|
|
|
167
172
|
estimate.init_dependant(@response[:estimate], :subscription_estimate,
|
|
168
173
|
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
|
169
174
|
estimate.init_dependant(@response[:estimate], :invoice_estimate,
|
|
170
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
|
175
|
+
{: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
176
|
estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
|
|
172
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
|
177
|
+
{: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
178
|
estimate.init_dependant_list(@response[:estimate], :subscription_estimates,
|
|
174
179
|
{:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
|
|
175
180
|
estimate.init_dependant_list(@response[:estimate], :invoice_estimates,
|
|
176
|
-
{:line_items => InvoiceEstimate::LineItem, :
|
|
181
|
+
{: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
182
|
estimate.init_dependant_list(@response[:estimate], :payment_schedule_estimates,
|
|
178
183
|
{:schedule_entries => PaymentScheduleEstimate::ScheduleEntry});
|
|
179
184
|
estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
|
|
180
|
-
{:line_items => CreditNoteEstimate::LineItem, :
|
|
185
|
+
{: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
186
|
estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates,
|
|
182
187
|
{:tiers => UnbilledCharge::Tier});
|
|
183
188
|
return estimate;
|
|
@@ -185,7 +190,7 @@ module ChargeBee
|
|
|
185
190
|
|
|
186
191
|
def quote()
|
|
187
192
|
quote = get(:quote, Quote,
|
|
188
|
-
{:line_items => Quote::LineItem, :
|
|
193
|
+
{: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
194
|
return quote;
|
|
190
195
|
end
|
|
191
196
|
|
|
@@ -197,7 +202,7 @@ module ChargeBee
|
|
|
197
202
|
|
|
198
203
|
def quoted_charge()
|
|
199
204
|
quoted_charge = get(:quoted_charge, QuotedCharge,
|
|
200
|
-
{:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon});
|
|
205
|
+
{:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon, :coupon_applicability_mappings => QuotedCharge::CouponApplicabilityMapping});
|
|
201
206
|
return quoted_charge;
|
|
202
207
|
end
|
|
203
208
|
|
|
@@ -207,6 +212,12 @@ module ChargeBee
|
|
|
207
212
|
return quoted_ramp;
|
|
208
213
|
end
|
|
209
214
|
|
|
215
|
+
def quoted_delta_ramp()
|
|
216
|
+
quoted_delta_ramp = get(:quoted_delta_ramp, QuotedDeltaRamp,
|
|
217
|
+
{:line_items => QuotedDeltaRamp::LineItem});
|
|
218
|
+
return quoted_delta_ramp;
|
|
219
|
+
end
|
|
220
|
+
|
|
210
221
|
def billing_configuration()
|
|
211
222
|
billing_configuration = get(:billing_configuration, BillingConfiguration,
|
|
212
223
|
{:billing_dates => BillingConfiguration::BillingDate});
|
|
@@ -215,7 +226,7 @@ module ChargeBee
|
|
|
215
226
|
|
|
216
227
|
def quote_line_group()
|
|
217
228
|
quote_line_group = get(:quote_line_group, QuoteLineGroup,
|
|
218
|
-
{:line_items => QuoteLineGroup::LineItem, :
|
|
229
|
+
{:line_items => QuoteLineGroup::LineItem, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :line_item_taxes => QuoteLineGroup::LineItemTax, :discounts => QuoteLineGroup::Discount, :taxes => QuoteLineGroup::Tax});
|
|
219
230
|
return quote_line_group;
|
|
220
231
|
end
|
|
221
232
|
|
|
@@ -302,7 +313,7 @@ module ChargeBee
|
|
|
302
313
|
|
|
303
314
|
def payment_intent()
|
|
304
315
|
payment_intent = get(:payment_intent, PaymentIntent,
|
|
305
|
-
{:payment_attempt => PaymentIntent::PaymentAttempt});
|
|
316
|
+
{:payment_attempt => PaymentIntent::PaymentAttempt, :payment_attempts => PaymentIntent::PaymentAttempt});
|
|
306
317
|
return payment_intent;
|
|
307
318
|
end
|
|
308
319
|
|
|
@@ -443,7 +454,7 @@ module ChargeBee
|
|
|
443
454
|
|
|
444
455
|
def ramp()
|
|
445
456
|
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});
|
|
457
|
+
{: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
458
|
return ramp;
|
|
448
459
|
end
|
|
449
460
|
|
|
@@ -460,29 +471,49 @@ module ChargeBee
|
|
|
460
471
|
|
|
461
472
|
def omnichannel_subscription()
|
|
462
473
|
omnichannel_subscription = get(:omnichannel_subscription, OmnichannelSubscription, {},
|
|
463
|
-
{:omnichannel_subscription_items => OmnichannelSubscriptionItem});
|
|
474
|
+
{:omnichannel_subscription_items => OmnichannelSubscriptionItem, :initial_purchase_transaction => OmnichannelTransaction});
|
|
475
|
+
omnichannel_subscription.init_dependant(@response[:omnichannel_subscription], :initial_purchase_transaction,
|
|
476
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
|
464
477
|
omnichannel_subscription.init_dependant_list(@response[:omnichannel_subscription], :omnichannel_subscription_items,
|
|
465
478
|
{:upcoming_renewal => OmnichannelSubscriptionItem::UpcomingRenewal, :linked_item => OmnichannelSubscriptionItem::LinkedItem});
|
|
466
479
|
return omnichannel_subscription;
|
|
467
480
|
end
|
|
468
481
|
|
|
469
482
|
def omnichannel_transaction()
|
|
470
|
-
omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction
|
|
483
|
+
omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction,
|
|
484
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
|
471
485
|
return omnichannel_transaction;
|
|
472
486
|
end
|
|
473
487
|
|
|
474
488
|
def omnichannel_subscription_item()
|
|
475
|
-
omnichannel_subscription_item = get(:omnichannel_subscription_item, OmnichannelSubscriptionItem,
|
|
476
|
-
{:
|
|
489
|
+
omnichannel_subscription_item = get(:omnichannel_subscription_item, OmnichannelSubscriptionItem, {},
|
|
490
|
+
{:omnichannel_subscription_item_offers => OmnichannelSubscriptionItemOffer});
|
|
491
|
+
omnichannel_subscription_item.init_dependant_list(@response[:omnichannel_subscription_item], :omnichannel_subscription_item_offers,
|
|
492
|
+
{});
|
|
477
493
|
return omnichannel_subscription_item;
|
|
478
494
|
end
|
|
479
495
|
|
|
480
496
|
def recorded_purchase()
|
|
481
497
|
recorded_purchase = get(:recorded_purchase, RecordedPurchase,
|
|
482
|
-
{:linked_omnichannel_subscriptions => RecordedPurchase::LinkedOmnichannelSubscription, :error_detail => RecordedPurchase::ErrorDetail});
|
|
498
|
+
{:linked_omnichannel_subscriptions => RecordedPurchase::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => RecordedPurchase::LinkedOmnichannelOneTimeOrder, :error_detail => RecordedPurchase::ErrorDetail});
|
|
483
499
|
return recorded_purchase;
|
|
484
500
|
end
|
|
485
501
|
|
|
502
|
+
def omnichannel_one_time_order()
|
|
503
|
+
omnichannel_one_time_order = get(:omnichannel_one_time_order, OmnichannelOneTimeOrder, {},
|
|
504
|
+
{:omnichannel_one_time_order_items => OmnichannelOneTimeOrderItem, :purchase_transaction => OmnichannelTransaction});
|
|
505
|
+
omnichannel_one_time_order.init_dependant(@response[:omnichannel_one_time_order], :purchase_transaction,
|
|
506
|
+
{:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
|
|
507
|
+
omnichannel_one_time_order.init_dependant_list(@response[:omnichannel_one_time_order], :omnichannel_one_time_order_items,
|
|
508
|
+
{});
|
|
509
|
+
return omnichannel_one_time_order;
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
def omnichannel_one_time_order_item()
|
|
513
|
+
omnichannel_one_time_order_item = get(:omnichannel_one_time_order_item, OmnichannelOneTimeOrderItem);
|
|
514
|
+
return omnichannel_one_time_order_item;
|
|
515
|
+
end
|
|
516
|
+
|
|
486
517
|
def rule()
|
|
487
518
|
rule = get(:rule, Rule);
|
|
488
519
|
return rule;
|
|
@@ -505,11 +536,59 @@ module ChargeBee
|
|
|
505
536
|
return usage_file;
|
|
506
537
|
end
|
|
507
538
|
|
|
539
|
+
def personalized_offer()
|
|
540
|
+
personalized_offer = get(:personalized_offer, PersonalizedOffer,
|
|
541
|
+
{:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
|
|
542
|
+
return personalized_offer;
|
|
543
|
+
end
|
|
544
|
+
|
|
508
545
|
def brand()
|
|
509
546
|
brand = get(:brand, Brand);
|
|
510
547
|
return brand;
|
|
511
548
|
end
|
|
512
549
|
|
|
550
|
+
def offer_fulfillment()
|
|
551
|
+
offer_fulfillment = get(:offer_fulfillment, OfferFulfillment,
|
|
552
|
+
{:error => OfferFulfillment::Error});
|
|
553
|
+
return offer_fulfillment;
|
|
554
|
+
end
|
|
555
|
+
|
|
556
|
+
def offer_event()
|
|
557
|
+
offer_event = get(:offer_event, OfferEvent);
|
|
558
|
+
return offer_event;
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
def webhook_endpoint()
|
|
562
|
+
webhook_endpoint = get(:webhook_endpoint, WebhookEndpoint);
|
|
563
|
+
return webhook_endpoint;
|
|
564
|
+
end
|
|
565
|
+
|
|
566
|
+
def usage_summary()
|
|
567
|
+
usage_summary = get(:usage_summary, UsageSummary);
|
|
568
|
+
return usage_summary;
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
def usage_charge()
|
|
572
|
+
usage_charge = get(:usage_charge, UsageCharge);
|
|
573
|
+
return usage_charge;
|
|
574
|
+
end
|
|
575
|
+
|
|
576
|
+
def impacted_customer()
|
|
577
|
+
impacted_customer = get(:impacted_customer, ImpactedCustomer,
|
|
578
|
+
{:download => ImpactedCustomer::Download});
|
|
579
|
+
return impacted_customer;
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
def subscription_entitlements_updated_detail()
|
|
583
|
+
subscription_entitlements_updated_detail = get(:subscription_entitlements_updated_detail, SubscriptionEntitlementsUpdatedDetail);
|
|
584
|
+
return subscription_entitlements_updated_detail;
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
def subscription_entitlements_created_detail()
|
|
588
|
+
subscription_entitlements_created_detail = get(:subscription_entitlements_created_detail, SubscriptionEntitlementsCreatedDetail);
|
|
589
|
+
return subscription_entitlements_created_detail;
|
|
590
|
+
end
|
|
591
|
+
|
|
513
592
|
def advance_invoice_schedules()
|
|
514
593
|
advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
|
|
515
594
|
{:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
|
|
@@ -524,7 +603,7 @@ module ChargeBee
|
|
|
524
603
|
|
|
525
604
|
def invoices()
|
|
526
605
|
invoices = get_list(:invoices, Invoice,
|
|
527
|
-
{:line_items => Invoice::LineItem, :
|
|
606
|
+
{:line_items => Invoice::LineItem, :line_item_tiers => Invoice::LineItemTier, :line_item_discounts => Invoice::LineItemDiscount, :line_item_taxes => Invoice::LineItemTax, :line_item_credits => Invoice::LineItemCredit, :line_item_addresses => Invoice::LineItemAddress, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :tax_origin => Invoice::TaxOrigin, :linked_payments => Invoice::LinkedPayment, :reference_transactions => Invoice::ReferenceTransaction, :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, :billing_address => Invoice::BillingAddress, :statement_descriptor => Invoice::StatementDescriptor, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation});
|
|
528
607
|
return invoices;
|
|
529
608
|
end
|
|
530
609
|
|
|
@@ -536,7 +615,7 @@ module ChargeBee
|
|
|
536
615
|
|
|
537
616
|
def credit_notes()
|
|
538
617
|
credit_notes = get_list(:credit_notes, CreditNote,
|
|
539
|
-
{:
|
|
618
|
+
{:line_items => CreditNote::LineItem, :line_item_tiers => CreditNote::LineItemTier, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_taxes => CreditNote::LineItemTax, :line_item_addresses => CreditNote::LineItemAddress, :discounts => CreditNote::Discount, :taxes => CreditNote::Tax, :tax_origin => CreditNote::TaxOrigin, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation});
|
|
540
619
|
return credit_notes;
|
|
541
620
|
end
|
|
542
621
|
|
|
@@ -564,6 +643,12 @@ module ChargeBee
|
|
|
564
643
|
return in_app_subscriptions;
|
|
565
644
|
end
|
|
566
645
|
|
|
646
|
+
def personalized_offers()
|
|
647
|
+
personalized_offers = get_list(:personalized_offers, PersonalizedOffer,
|
|
648
|
+
{:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
|
|
649
|
+
return personalized_offers;
|
|
650
|
+
end
|
|
651
|
+
|
|
567
652
|
|
|
568
653
|
def to_s(*args)
|
|
569
654
|
JSON.pretty_generate(@response)
|
data/lib/chargebee.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require File.dirname(__FILE__) + '/chargebee/environment'
|
|
2
|
-
require File.dirname(__FILE__) + '/chargebee/
|
|
2
|
+
require File.dirname(__FILE__) + '/chargebee/native_request'
|
|
3
3
|
require File.dirname(__FILE__) + '/chargebee/util'
|
|
4
4
|
require File.dirname(__FILE__) + '/chargebee/request'
|
|
5
5
|
require File.dirname(__FILE__) + '/chargebee/result'
|
|
@@ -88,11 +88,19 @@ require File.dirname(__FILE__) + '/chargebee/models/rule'
|
|
|
88
88
|
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_subscription_item_scheduled_change'
|
|
89
89
|
require File.dirname(__FILE__) + '/chargebee/models/usage_file'
|
|
90
90
|
require File.dirname(__FILE__) + '/chargebee/models/quoted_ramp'
|
|
91
|
+
require File.dirname(__FILE__) + '/chargebee/models/webhook_endpoint'
|
|
92
|
+
require File.dirname(__FILE__) + '/chargebee/models/omnichannel_one_time_order'
|
|
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
|
+
require File.dirname(__FILE__) + '/chargebee/models/quoted_delta_ramp'
|
|
98
|
+
require File.dirname(__FILE__) + '/chargebee/models/einvoice'
|
|
91
99
|
|
|
92
100
|
|
|
93
101
|
module ChargeBee
|
|
94
102
|
|
|
95
|
-
VERSION = '2.
|
|
103
|
+
VERSION = '2.69.0'
|
|
96
104
|
|
|
97
105
|
@@default_env = nil
|
|
98
106
|
@@verify_ca_certs = true
|
data/lib/ssl/ca-certs.crt
CHANGED
|
@@ -3383,3 +3383,53 @@ A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
|
|
|
3383
3383
|
7qj/WsjTVbJmcVfewCHrPSqnI0kBBIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh
|
|
3384
3384
|
1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee9570+sB3c4
|
|
3385
3385
|
-----END CERTIFICATE-----
|
|
3386
|
+
-----BEGIN CERTIFICATE-----
|
|
3387
|
+
MIIEyDCCA7CgAwIBAgIQDPW9BitWAvR6uFAsI8zwZjANBgkqhkiG9w0BAQsFADBh
|
|
3388
|
+
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7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91
|
|
3432
|
+
8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe
|
|
3433
|
+
pLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
|
|
3434
|
+
MrY=
|
|
3435
|
+
-----END CERTIFICATE-----
|
|
@@ -141,6 +141,19 @@ module ChargeBee
|
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
+
it "raises ForbiddenError for 403 status code" do
|
|
145
|
+
stub_request(:get, "https://dummy.chargebee.com/test").to_return(
|
|
146
|
+
body: "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n",
|
|
147
|
+
status: 403
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
expect {
|
|
151
|
+
NativeRequest.request(:get, "/test", env)
|
|
152
|
+
}.to raise_error(ForbiddenError) do |err|
|
|
153
|
+
expect(err.message).to eq("Access forbidden. You do not have permission to access this resource.")
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
144
157
|
it "retries once on HTTP 503 and succeeds on second attempt" do
|
|
145
158
|
stub_request(:get, "https://dummy.chargebee.com/test")
|
|
146
159
|
.to_return({ status: 503, body: "temporary error" },
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chargebee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.69.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rajaraman S
|
|
8
8
|
- Thiyagarajan T
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2026-03-02 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: cgi
|
|
@@ -65,16 +66,18 @@ email:
|
|
|
65
66
|
executables: []
|
|
66
67
|
extensions: []
|
|
67
68
|
extra_rdoc_files:
|
|
68
|
-
- LICENSE
|
|
69
69
|
- README.md
|
|
70
|
+
- LICENSE
|
|
70
71
|
files:
|
|
71
72
|
- CHANGELOG.md
|
|
72
73
|
- Gemfile
|
|
73
74
|
- Gemfile.lock
|
|
74
75
|
- LICENSE
|
|
76
|
+
- Makefile
|
|
75
77
|
- README.md
|
|
76
78
|
- README.rdoc
|
|
77
79
|
- Rakefile
|
|
80
|
+
- VERSION
|
|
78
81
|
- chargebee.gemspec
|
|
79
82
|
- lib/chargebee.rb
|
|
80
83
|
- lib/chargebee/environment.rb
|
|
@@ -106,6 +109,7 @@ files:
|
|
|
106
109
|
- lib/chargebee/models/differential_price.rb
|
|
107
110
|
- lib/chargebee/models/discount.rb
|
|
108
111
|
- lib/chargebee/models/download.rb
|
|
112
|
+
- lib/chargebee/models/einvoice.rb
|
|
109
113
|
- lib/chargebee/models/entitlement.rb
|
|
110
114
|
- lib/chargebee/models/entitlement_override.rb
|
|
111
115
|
- lib/chargebee/models/estimate.rb
|
|
@@ -116,6 +120,7 @@ files:
|
|
|
116
120
|
- lib/chargebee/models/gift.rb
|
|
117
121
|
- lib/chargebee/models/hierarchy.rb
|
|
118
122
|
- lib/chargebee/models/hosted_page.rb
|
|
123
|
+
- lib/chargebee/models/impacted_customer.rb
|
|
119
124
|
- lib/chargebee/models/impacted_item.rb
|
|
120
125
|
- lib/chargebee/models/impacted_item_price.rb
|
|
121
126
|
- lib/chargebee/models/impacted_subscription.rb
|
|
@@ -129,8 +134,13 @@ files:
|
|
|
129
134
|
- lib/chargebee/models/metadata.rb
|
|
130
135
|
- lib/chargebee/models/model.rb
|
|
131
136
|
- lib/chargebee/models/non_subscription.rb
|
|
137
|
+
- lib/chargebee/models/offer_event.rb
|
|
138
|
+
- lib/chargebee/models/offer_fulfillment.rb
|
|
139
|
+
- lib/chargebee/models/omnichannel_one_time_order.rb
|
|
140
|
+
- lib/chargebee/models/omnichannel_one_time_order_item.rb
|
|
132
141
|
- lib/chargebee/models/omnichannel_subscription.rb
|
|
133
142
|
- lib/chargebee/models/omnichannel_subscription_item.rb
|
|
143
|
+
- lib/chargebee/models/omnichannel_subscription_item_offer.rb
|
|
134
144
|
- lib/chargebee/models/omnichannel_subscription_item_scheduled_change.rb
|
|
135
145
|
- lib/chargebee/models/omnichannel_transaction.rb
|
|
136
146
|
- lib/chargebee/models/order.rb
|
|
@@ -141,6 +151,7 @@ files:
|
|
|
141
151
|
- lib/chargebee/models/payment_schedule_scheme.rb
|
|
142
152
|
- lib/chargebee/models/payment_source.rb
|
|
143
153
|
- lib/chargebee/models/payment_voucher.rb
|
|
154
|
+
- lib/chargebee/models/personalized_offer.rb
|
|
144
155
|
- lib/chargebee/models/plan.rb
|
|
145
156
|
- lib/chargebee/models/portal_session.rb
|
|
146
157
|
- lib/chargebee/models/price_variant.rb
|
|
@@ -150,6 +161,7 @@ files:
|
|
|
150
161
|
- lib/chargebee/models/quote.rb
|
|
151
162
|
- lib/chargebee/models/quote_line_group.rb
|
|
152
163
|
- lib/chargebee/models/quoted_charge.rb
|
|
164
|
+
- lib/chargebee/models/quoted_delta_ramp.rb
|
|
153
165
|
- lib/chargebee/models/quoted_ramp.rb
|
|
154
166
|
- lib/chargebee/models/quoted_subscription.rb
|
|
155
167
|
- lib/chargebee/models/ramp.rb
|
|
@@ -159,6 +171,8 @@ files:
|
|
|
159
171
|
- lib/chargebee/models/site_migration_detail.rb
|
|
160
172
|
- lib/chargebee/models/subscription.rb
|
|
161
173
|
- lib/chargebee/models/subscription_entitlement.rb
|
|
174
|
+
- lib/chargebee/models/subscription_entitlements_created_detail.rb
|
|
175
|
+
- lib/chargebee/models/subscription_entitlements_updated_detail.rb
|
|
162
176
|
- lib/chargebee/models/subscription_estimate.rb
|
|
163
177
|
- lib/chargebee/models/tax_withheld.rb
|
|
164
178
|
- lib/chargebee/models/third_party_payment_method.rb
|
|
@@ -170,7 +184,8 @@ files:
|
|
|
170
184
|
- lib/chargebee/models/usage_event.rb
|
|
171
185
|
- lib/chargebee/models/usage_file.rb
|
|
172
186
|
- lib/chargebee/models/virtual_bank_account.rb
|
|
173
|
-
- lib/chargebee/
|
|
187
|
+
- lib/chargebee/models/webhook_endpoint.rb
|
|
188
|
+
- lib/chargebee/native_request.rb
|
|
174
189
|
- lib/chargebee/request.rb
|
|
175
190
|
- lib/chargebee/rest.rb
|
|
176
191
|
- lib/chargebee/result.rb
|
|
@@ -187,6 +202,7 @@ licenses:
|
|
|
187
202
|
- MIT
|
|
188
203
|
metadata:
|
|
189
204
|
changelog_uri: https://github.com/chargebee/chargebee-ruby/blob/master/CHANGELOG.md
|
|
205
|
+
post_install_message:
|
|
190
206
|
rdoc_options:
|
|
191
207
|
- "--charset=UTF-8"
|
|
192
208
|
require_paths:
|
|
@@ -202,7 +218,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
202
218
|
- !ruby/object:Gem::Version
|
|
203
219
|
version: '0'
|
|
204
220
|
requirements: []
|
|
205
|
-
rubygems_version: 3.
|
|
221
|
+
rubygems_version: 3.2.33
|
|
222
|
+
signing_key:
|
|
206
223
|
specification_version: 2
|
|
207
224
|
summary: Ruby client for Chargebee API.
|
|
208
225
|
test_files:
|