Class: ChargeBee::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/chargebee/result.rb

Direct Known Subclasses

Event::Content, HostedPage::Content

Constant Summary collapse

IDEMPOTENCY_REPLAYED_HEADER =
:chargebee_idempotency_replayed

Instance Method Summary collapse

Constructor Details

#initialize(response, rheaders = nil, http_status_code = nil) ⇒ Result

Returns a new instance of Result.



6
7
8
9
10
# File 'lib/chargebee/result.rb', line 6

def initialize(response, rheaders = nil, http_status_code=nil)
  @response = response
    @rheaders = rheaders
    @http_status_code = http_status_code
end

Instance Method Details

#addonObject



239
240
241
242
243
# File 'lib/chargebee/result.rb', line 239

def addon() 
    addon = get(:addon, Addon,
    {:tiers => Addon::Tier, :tax_providers_fields => Addon::TaxProvidersField});
    return addon;
end

#addressObject



261
262
263
264
# File 'lib/chargebee/result.rb', line 261

def address() 
    address = get(:address, Address);
    return address;
end

#advance_invoice_scheduleObject



49
50
51
52
53
# File 'lib/chargebee/result.rb', line 49

def advance_invoice_schedule() 
    advance_invoice_schedule = get(:advance_invoice_schedule, AdvanceInvoiceSchedule,
    {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
    return advance_invoice_schedule;
end

#advance_invoice_schedulesObject



582
583
584
585
586
# File 'lib/chargebee/result.rb', line 582

def advance_invoice_schedules() 
    advance_invoice_schedules = get_list(:advance_invoice_schedules, AdvanceInvoiceSchedule,
    {:fixed_interval_schedule => AdvanceInvoiceSchedule::FixedIntervalSchedule, :specific_dates_schedule => AdvanceInvoiceSchedule::SpecificDatesSchedule});
    return advance_invoice_schedules;
end

#attached_itemObject



353
354
355
356
# File 'lib/chargebee/result.rb', line 353

def attached_item() 
    attached_item = get(:attached_item, AttachedItem);
    return attached_item;
end

#attributeObject



342
343
344
345
# File 'lib/chargebee/result.rb', line 342

def attribute() 
    attribute = get(:attribute, Attribute);
    return attribute;
end

#billing_configurationObject



221
222
223
224
225
# File 'lib/chargebee/result.rb', line 221

def billing_configuration() 
    billing_configuration = get(:billing_configuration, BillingConfiguration,
    {:billing_dates => BillingConfiguration::BillingDate});
    return billing_configuration;
end

#brandObject



545
546
547
548
# File 'lib/chargebee/result.rb', line 545

def brand() 
    brand = get(:brand, Brand);
    return brand;
end

#business_entityObject



434
435
436
437
# File 'lib/chargebee/result.rb', line 434

def business_entity() 
    business_entity = get(:business_entity, BusinessEntity);
    return business_entity;
end

#business_entity_transferObject



71
72
73
74
# File 'lib/chargebee/result.rb', line 71

def business_entity_transfer() 
    business_entity_transfer = get(:business_entity_transfer, BusinessEntityTransfer);
    return business_entity_transfer;
end

#cardObject



97
98
99
100
# File 'lib/chargebee/result.rb', line 97

def card() 
    card = get(:card, Card);
    return card;
end

#commentObject



277
278
279
280
# File 'lib/chargebee/result.rb', line 277

def comment() 
    comment = get(:comment, Comment);
    return comment;
end

#configurationObject



364
365
366
367
# File 'lib/chargebee/result.rb', line 364

def configuration() 
    configuration = get(:configuration, Configuration);
    return configuration;
end

#configurationsObject



624
625
626
627
628
# File 'lib/chargebee/result.rb', line 624

def configurations() 
    configurations = get_list(:configurations, Configuration,
    {});
    return configurations;
end

#contactObject



66
67
68
69
# File 'lib/chargebee/result.rb', line 66

def contact() 
    contact = get(:contact, Contact);
    return contact;
end

#contract_termObject



39
40
41
42
# File 'lib/chargebee/result.rb', line 39

def contract_term() 
    contract_term = get(:contract_term, ContractTerm);
    return contract_term;
end

#couponObject



245
246
247
248
249
# File 'lib/chargebee/result.rb', line 245

def coupon() 
    coupon = get(:coupon, Coupon,
    {:item_constraints => Coupon::ItemConstraint, :item_constraint_criteria => Coupon::ItemConstraintCriteria, :coupon_constraints => Coupon::CouponConstraint});
    return coupon;
end

#coupon_codeObject



256
257
258
259
# File 'lib/chargebee/result.rb', line 256

def coupon_code() 
    coupon_code = get(:coupon_code, CouponCode);
    return coupon_code;
end

#coupon_setObject



251
252
253
254
# File 'lib/chargebee/result.rb', line 251

def coupon_set() 
    coupon_set = get(:coupon_set, CouponSet);
    return coupon_set;
end

#credit_noteObject



134
135
136
137
138
# File 'lib/chargebee/result.rb', line 134

def credit_note() 
    credit_note = get(:credit_note, CreditNote,
    {: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});
    return credit_note;
end

#credit_notesObject



606
607
608
609
610
# File 'lib/chargebee/result.rb', line 606

def credit_notes() 
    credit_notes = get_list(:credit_notes, CreditNote,
    {: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});
    return credit_notes;
end

#currencyObject



450
451
452
453
# File 'lib/chargebee/result.rb', line 450

def currency() 
    currency = get(:currency, Currency);
    return currency;
end

#customerObject



55
56
57
58
59
# File 'lib/chargebee/result.rb', line 55

def customer() 
    customer = get(:customer, Customer,
    {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance, :entity_identifiers => Customer::EntityIdentifier, :tax_providers_fields => Customer::TaxProvidersField, :relationship => Customer::Relationship, :parent_account_access => Customer::ParentAccountAccess, :child_account_access => Customer::ChildAccountAccess});
    return customer;
end

#customer_entitlementObject



404
405
406
407
# File 'lib/chargebee/result.rb', line 404

def customer_entitlement() 
    customer_entitlement = get(:customer_entitlement, CustomerEntitlement);
    return customer_entitlement;
end

#differential_priceObject



358
359
360
361
362
# File 'lib/chargebee/result.rb', line 358

def differential_price() 
    differential_price = get(:differential_price, DifferentialPrice,
    {:tiers => DifferentialPrice::Tier, :parent_periods => DifferentialPrice::ParentPeriod});
    return differential_price;
end

#discountObject



44
45
46
47
# File 'lib/chargebee/result.rb', line 44

def discount() 
    discount = get(:discount, Discount);
    return discount;
end

#downloadObject



282
283
284
285
# File 'lib/chargebee/result.rb', line 282

def download() 
    download = get(:download, Download);
    return download;
end

#downloadsObject



618
619
620
621
622
# File 'lib/chargebee/result.rb', line 618

def downloads() 
    downloads = get_list(:downloads, Download,
    {});
    return downloads;
end

#einvoiceObject



124
125
126
127
# File 'lib/chargebee/result.rb', line 124

def einvoice() 
    einvoice = get(:einvoice, Einvoice);
    return einvoice;
end

#entitlementObject



414
415
416
417
# File 'lib/chargebee/result.rb', line 414

def entitlement() 
    entitlement = get(:entitlement, Entitlement);
    return entitlement;
end

#entitlement_overrideObject



429
430
431
432
# File 'lib/chargebee/result.rb', line 429

def entitlement_override() 
    entitlement_override = get(:entitlement_override, EntitlementOverride);
    return entitlement_override;
end

#estimateObject



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# File 'lib/chargebee/result.rb', line 169

def estimate() 
    estimate = get(:estimate, Estimate, {},
    {:subscription_estimate => SubscriptionEstimate, :subscription_estimates => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :payment_schedule_estimates => PaymentScheduleEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
    estimate.init_dependant(@response[:estimate], :subscription_estimate,
    {:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
    estimate.init_dependant(@response[:estimate], :invoice_estimate,
    {: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});
    estimate.init_dependant(@response[:estimate], :next_invoice_estimate,
    {: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});
    estimate.init_dependant_list(@response[:estimate], :subscription_estimates,
    {:shipping_address => SubscriptionEstimate::ShippingAddress, :contract_term => SubscriptionEstimate::ContractTerm});
    estimate.init_dependant_list(@response[:estimate], :invoice_estimates,
    {: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});
    estimate.init_dependant_list(@response[:estimate], :payment_schedule_estimates,
    {:schedule_entries => PaymentScheduleEstimate::ScheduleEntry});
    estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
    {: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});
    estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates,
    {:tiers => UnbilledCharge::Tier});
    return estimate;
end

#eventObject



271
272
273
274
275
# File 'lib/chargebee/result.rb', line 271

def event() 
    event = get(:event, Event,
    {:webhooks => Event::Webhook});
    return event;
end

#exportObject



308
309
310
311
312
# File 'lib/chargebee/result.rb', line 308

def export() 
    export = get(:export, Export,
    {:download => Export::Download});
    return export;
end

#featureObject



369
370
371
372
373
# File 'lib/chargebee/result.rb', line 369

def feature() 
    feature = get(:feature, Feature,
    {:levels => Feature::Level});
    return feature;
end

#gateway_error_detailObject



320
321
322
323
# File 'lib/chargebee/result.rb', line 320

def gateway_error_detail() 
    gateway_error_detail = get(:gateway_error_detail, GatewayErrorDetail);
    return gateway_error_detail;
end

#get_http_status_codeObject



20
21
22
# File 'lib/chargebee/result.rb', line 20

def get_http_status_code()
    @http_status_code
end

#get_raw_responseObject



16
17
18
# File 'lib/chargebee/result.rb', line 16

def get_raw_response()
    @response
end

#get_response_headersObject



12
13
14
# File 'lib/chargebee/result.rb', line 12

def get_response_headers()
    @rheaders
end

#giftObject



152
153
154
155
156
# File 'lib/chargebee/result.rb', line 152

def gift() 
    gift = get(:gift, Gift,
    {:gifter => Gift::Gifter, :gift_receiver => Gift::GiftReceiver, :gift_timelines => Gift::GiftTimeline});
    return gift;
end

#hierarchiesObject



588
589
590
591
592
# File 'lib/chargebee/result.rb', line 588

def hierarchies() 
    hierarchies = get_list(:hierarchies, Hierarchy,
    {});
    return hierarchies;
end

#hierarchyObject



61
62
63
64
# File 'lib/chargebee/result.rb', line 61

def hierarchy() 
    hierarchy = get(:hierarchy, Hierarchy);
    return hierarchy;
end

#hosted_pageObject



164
165
166
167
# File 'lib/chargebee/result.rb', line 164

def hosted_page() 
    hosted_page = get(:hosted_page, HostedPage);
    return hosted_page;
end

#impacted_customerObject



566
567
568
569
570
# File 'lib/chargebee/result.rb', line 566

def impacted_customer() 
    impacted_customer = get(:impacted_customer, ImpactedCustomer,
    {:download => ImpactedCustomer::Download});
    return impacted_customer;
end

#impacted_itemObject



381
382
383
384
385
# File 'lib/chargebee/result.rb', line 381

def impacted_item() 
    impacted_item = get(:impacted_item, ImpactedItem,
    {:download => ImpactedItem::Download});
    return impacted_item;
end

#impacted_item_priceObject



387
388
389
390
391
# File 'lib/chargebee/result.rb', line 387

def impacted_item_price() 
    impacted_item_price = get(:impacted_item_price, ImpactedItemPrice,
    {:download => ImpactedItemPrice::Download});
    return impacted_item_price;
end

#impacted_subscriptionObject



375
376
377
378
379
# File 'lib/chargebee/result.rb', line 375

def impacted_subscription() 
    impacted_subscription = get(:impacted_subscription, ImpactedSubscription,
    {:download => ImpactedSubscription::Download});
    return impacted_subscription;
end

#in_app_subscriptionObject



419
420
421
422
# File 'lib/chargebee/result.rb', line 419

def in_app_subscription() 
    in_app_subscription = get(:in_app_subscription, InAppSubscription);
    return in_app_subscription;
end

#in_app_subscriptionsObject



630
631
632
633
634
# File 'lib/chargebee/result.rb', line 630

def in_app_subscriptions() 
    in_app_subscriptions = get_list(:in_app_subscriptions, InAppSubscription,
    {});
    return in_app_subscriptions;
end

#invoiceObject



107
108
109
110
111
# File 'lib/chargebee/result.rb', line 107

def invoice() 
    invoice = get(:invoice, Invoice,
    {: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});
    return invoice;
end

#invoicesObject



594
595
596
597
598
# File 'lib/chargebee/result.rb', line 594

def invoices() 
    invoices = get_list(:invoices, Invoice,
    {: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});
    return invoices;
end

#is_idempotency_replayedObject



24
25
26
27
28
29
30
31
# File 'lib/chargebee/result.rb', line 24

def is_idempotency_replayed()
    replayed_header = get_response_headers[IDEMPOTENCY_REPLAYED_HEADER]
    if replayed_header != nil
       return !!replayed_header
    else
       return false
    end
end

#itemObject



330
331
332
333
334
# File 'lib/chargebee/result.rb', line 330

def item() 
    item = get(:item, Item,
    {:applicable_items => Item::ApplicableItem, :bundle_items => Item::BundleItem, :bundle_configuration => Item::BundleConfiguration});
    return item;
end

#item_entitlementObject



409
410
411
412
# File 'lib/chargebee/result.rb', line 409

def item_entitlement() 
    item_entitlement = get(:item_entitlement, ItemEntitlement);
    return item_entitlement;
end

#item_familyObject



325
326
327
328
# File 'lib/chargebee/result.rb', line 325

def item_family() 
    item_family = get(:item_family, ItemFamily);
    return item_family;
end

#item_priceObject



347
348
349
350
351
# File 'lib/chargebee/result.rb', line 347

def item_price() 
    item_price = get(:item_price, ItemPrice,
    {:tiers => ItemPrice::Tier, :tax_detail => ItemPrice::TaxDetail, :tax_providers_fields => ItemPrice::TaxProvidersField, :accounting_detail => ItemPrice::AccountingDetail});
    return item_price;
end

#metadataObject



393
394
395
396
# File 'lib/chargebee/result.rb', line 393

def () 
     = get(:metadata, Metadata);
    return ;
end

#non_subscriptionObject



424
425
426
427
# File 'lib/chargebee/result.rb', line 424

def non_subscription() 
    non_subscription = get(:non_subscription, NonSubscription);
    return non_subscription;
end

#offer_eventObject



556
557
558
559
# File 'lib/chargebee/result.rb', line 556

def offer_event() 
    offer_event = get(:offer_event, OfferEvent);
    return offer_event;
end

#offer_fulfillmentObject



550
551
552
553
554
# File 'lib/chargebee/result.rb', line 550

def offer_fulfillment() 
    offer_fulfillment = get(:offer_fulfillment, OfferFulfillment,
    {:error => OfferFulfillment::Error});
    return offer_fulfillment;
end

#omnichannel_one_time_orderObject



502
503
504
505
506
507
508
509
510
# File 'lib/chargebee/result.rb', line 502

def omnichannel_one_time_order() 
    omnichannel_one_time_order = get(:omnichannel_one_time_order, OmnichannelOneTimeOrder, {},
    {:omnichannel_one_time_order_items => OmnichannelOneTimeOrderItem, :purchase_transaction => OmnichannelTransaction});
    omnichannel_one_time_order.init_dependant(@response[:omnichannel_one_time_order], :purchase_transaction,
    {:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
    omnichannel_one_time_order.init_dependant_list(@response[:omnichannel_one_time_order], :omnichannel_one_time_order_items,
    {});
    return omnichannel_one_time_order;
end

#omnichannel_one_time_order_itemObject



512
513
514
515
# File 'lib/chargebee/result.rb', line 512

def omnichannel_one_time_order_item() 
    omnichannel_one_time_order_item = get(:omnichannel_one_time_order_item, OmnichannelOneTimeOrderItem);
    return omnichannel_one_time_order_item;
end

#omnichannel_subscriptionObject



472
473
474
475
476
477
478
479
480
# File 'lib/chargebee/result.rb', line 472

def omnichannel_subscription() 
    omnichannel_subscription = get(:omnichannel_subscription, OmnichannelSubscription, {},
    {:omnichannel_subscription_items => OmnichannelSubscriptionItem, :initial_purchase_transaction => OmnichannelTransaction});
    omnichannel_subscription.init_dependant(@response[:omnichannel_subscription], :initial_purchase_transaction,
    {:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
    omnichannel_subscription.init_dependant_list(@response[:omnichannel_subscription], :omnichannel_subscription_items,
    {:upcoming_renewal => OmnichannelSubscriptionItem::UpcomingRenewal, :linked_item => OmnichannelSubscriptionItem::LinkedItem});
    return omnichannel_subscription;
end

#omnichannel_subscription_itemObject



488
489
490
491
492
493
494
# File 'lib/chargebee/result.rb', line 488

def omnichannel_subscription_item() 
    omnichannel_subscription_item = get(:omnichannel_subscription_item, OmnichannelSubscriptionItem, {},
    {:omnichannel_subscription_item_offers => OmnichannelSubscriptionItemOffer});
    omnichannel_subscription_item.init_dependant_list(@response[:omnichannel_subscription_item], :omnichannel_subscription_item_offers,
    {});
    return omnichannel_subscription_item;
end

#omnichannel_subscription_item_scheduled_changeObject



527
528
529
530
531
# File 'lib/chargebee/result.rb', line 527

def omnichannel_subscription_item_scheduled_change() 
    omnichannel_subscription_item_scheduled_change = get(:omnichannel_subscription_item_scheduled_change, OmnichannelSubscriptionItemScheduledChange,
    {:current_state => OmnichannelSubscriptionItemScheduledChange::CurrentState, :scheduled_state => OmnichannelSubscriptionItemScheduledChange::ScheduledState});
    return omnichannel_subscription_item_scheduled_change;
end

#omnichannel_transactionObject



482
483
484
485
486
# File 'lib/chargebee/result.rb', line 482

def omnichannel_transaction() 
    omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction,
    {:linked_omnichannel_subscriptions => OmnichannelTransaction::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => OmnichannelTransaction::LinkedOmnichannelOneTimeOrder});
    return omnichannel_transaction;
end

#orderObject



146
147
148
149
150
# File 'lib/chargebee/result.rb', line 146

def order() 
    order = get(:order, Order,
    {:order_line_items => Order::OrderLineItem, :shipping_address => Order::ShippingAddress, :billing_address => Order::BillingAddress, :line_item_taxes => Order::LineItemTax, :line_item_discounts => Order::LineItemDiscount, :linked_credit_notes => Order::LinkedCreditNote, :resent_orders => Order::ResentOrder});
    return order;
end

#payment_intentObject



314
315
316
317
318
# File 'lib/chargebee/result.rb', line 314

def payment_intent() 
    payment_intent = get(:payment_intent, PaymentIntent,
    {:payment_attempt => PaymentIntent::PaymentAttempt, :payment_attempts => PaymentIntent::PaymentAttempt});
    return payment_intent;
end

#payment_reference_numberObject



113
114
115
116
# File 'lib/chargebee/result.rb', line 113

def payment_reference_number() 
    payment_reference_number = get(:payment_reference_number, PaymentReferenceNumber);
    return payment_reference_number;
end

#payment_scheduleObject



118
119
120
121
122
# File 'lib/chargebee/result.rb', line 118

def payment_schedule() 
    payment_schedule = get(:payment_schedule, PaymentSchedule,
    {:schedule_entries => PaymentSchedule::ScheduleEntry});
    return payment_schedule;
end

#payment_schedule_schemeObject



461
462
463
464
465
# File 'lib/chargebee/result.rb', line 461

def payment_schedule_scheme() 
    payment_schedule_scheme = get(:payment_schedule_scheme, PaymentScheduleScheme,
    {:preferred_schedules => PaymentScheduleScheme::PreferredSchedule});
    return payment_schedule_scheme;
end

#payment_schedulesObject



600
601
602
603
604
# File 'lib/chargebee/result.rb', line 600

def payment_schedules() 
    payment_schedules = get_list(:payment_schedules, PaymentSchedule,
    {:schedule_entries => PaymentSchedule::ScheduleEntry});
    return payment_schedules;
end

#payment_sourceObject



81
82
83
84
85
# File 'lib/chargebee/result.rb', line 81

def payment_source() 
    payment_source = get(:payment_source, PaymentSource,
    {:card => PaymentSource::Card, :bank_account => PaymentSource::BankAccount, :cust_voucher_source => PaymentSource::CustVoucherSource, :billing_address => PaymentSource::BillingAddress, :amazon_payment => PaymentSource::AmazonPayment, :upi => PaymentSource::Upi, :paypal => PaymentSource::Paypal, :venmo => PaymentSource::Venmo, :klarna_pay_now => PaymentSource::KlarnaPayNow, :mandates => PaymentSource::Mandate});
    return payment_source;
end

#payment_voucherObject



444
445
446
447
448
# File 'lib/chargebee/result.rb', line 444

def payment_voucher() 
    payment_voucher = get(:payment_voucher, PaymentVoucher,
    {:linked_invoices => PaymentVoucher::LinkedInvoice});
    return payment_voucher;
end

#personalized_offerObject



539
540
541
542
543
# File 'lib/chargebee/result.rb', line 539

def personalized_offer() 
    personalized_offer = get(:personalized_offer, PersonalizedOffer,
    {:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
    return personalized_offer;
end

#personalized_offersObject



636
637
638
639
640
# File 'lib/chargebee/result.rb', line 636

def personalized_offers() 
    personalized_offers = get_list(:personalized_offers, PersonalizedOffer,
    {:content => PersonalizedOffer::Content, :options => PersonalizedOffer::Option});
    return personalized_offers;
end

#planObject



233
234
235
236
237
# File 'lib/chargebee/result.rb', line 233

def plan() 
    plan = get(:plan, Plan,
    {:tiers => Plan::Tier, :tax_providers_fields => Plan::TaxProvidersField, :applicable_addons => Plan::ApplicableAddon, :attached_addons => Plan::AttachedAddon, :event_based_addons => Plan::EventBasedAddon});
    return plan;
end

#portal_sessionObject



287
288
289
290
291
# File 'lib/chargebee/result.rb', line 287

def portal_session() 
    portal_session = get(:portal_session, PortalSession,
    {:linked_customers => PortalSession::LinkedCustomer});
    return portal_session;
end

#price_variantObject



336
337
338
339
340
# File 'lib/chargebee/result.rb', line 336

def price_variant() 
    price_variant = get(:price_variant, PriceVariant,
    {:attributes => PriceVariant::Attribute});
    return price_variant;
end

#pricing_page_sessionObject



467
468
469
470
# File 'lib/chargebee/result.rb', line 467

def pricing_page_session() 
    pricing_page_session = get(:pricing_page_session, PricingPageSession);
    return pricing_page_session;
end

#promotional_creditObject



102
103
104
105
# File 'lib/chargebee/result.rb', line 102

def promotional_credit() 
    promotional_credit = get(:promotional_credit, PromotionalCredit);
    return promotional_credit;
end

#purchaseObject



439
440
441
442
# File 'lib/chargebee/result.rb', line 439

def purchase() 
    purchase = get(:purchase, Purchase);
    return purchase;
end

#quoteObject



191
192
193
194
195
# File 'lib/chargebee/result.rb', line 191

def quote() 
    quote = get(:quote, Quote,
    {: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});
    return quote;
end

#quote_line_groupObject



227
228
229
230
231
# File 'lib/chargebee/result.rb', line 227

def quote_line_group() 
    quote_line_group = get(:quote_line_group, QuoteLineGroup,
    {:line_items => QuoteLineGroup::LineItem, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :line_item_taxes => QuoteLineGroup::LineItemTax, :discounts => QuoteLineGroup::Discount, :taxes => QuoteLineGroup::Tax});
    return quote_line_group;
end

#quoted_chargeObject



203
204
205
206
207
# File 'lib/chargebee/result.rb', line 203

def quoted_charge() 
    quoted_charge = get(:quoted_charge, QuotedCharge,
    {:charges => QuotedCharge::Charge, :addons => QuotedCharge::Addon, :invoice_items => QuotedCharge::InvoiceItem, :item_tiers => QuotedCharge::ItemTier, :coupons => QuotedCharge::Coupon, :coupon_applicability_mappings => QuotedCharge::CouponApplicabilityMapping});
    return quoted_charge;
end

#quoted_delta_rampObject



215
216
217
218
219
# File 'lib/chargebee/result.rb', line 215

def quoted_delta_ramp() 
    quoted_delta_ramp = get(:quoted_delta_ramp, QuotedDeltaRamp,
    {:line_items => QuotedDeltaRamp::LineItem});
    return quoted_delta_ramp;
end

#quoted_rampObject



209
210
211
212
213
# File 'lib/chargebee/result.rb', line 209

def quoted_ramp() 
    quoted_ramp = get(:quoted_ramp, QuotedRamp,
    {:line_items => QuotedRamp::LineItem, :discounts => QuotedRamp::Discount, :item_tiers => QuotedRamp::ItemTier, :coupon_applicability_mappings => QuotedRamp::CouponApplicabilityMapping});
    return quoted_ramp;
end

#quoted_subscriptionObject



197
198
199
200
201
# File 'lib/chargebee/result.rb', line 197

def quoted_subscription() 
    quoted_subscription = get(:quoted_subscription, QuotedSubscription,
    {:addons => QuotedSubscription::Addon, :event_based_addons => QuotedSubscription::EventBasedAddon, :coupons => QuotedSubscription::Coupon, :subscription_items => QuotedSubscription::SubscriptionItem, :item_tiers => QuotedSubscription::ItemTier, :quoted_contract_term => QuotedSubscription::QuotedContractTerm});
    return quoted_subscription;
end

#rampObject



455
456
457
458
459
# File 'lib/chargebee/result.rb', line 455

def ramp() 
    ramp = get(:ramp, Ramp,
    {: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});
    return ramp;
end

#recorded_purchaseObject



496
497
498
499
500
# File 'lib/chargebee/result.rb', line 496

def recorded_purchase() 
    recorded_purchase = get(:recorded_purchase, RecordedPurchase,
    {:linked_omnichannel_subscriptions => RecordedPurchase::LinkedOmnichannelSubscription, :linked_omnichannel_one_time_orders => RecordedPurchase::LinkedOmnichannelOneTimeOrder, :error_detail => RecordedPurchase::ErrorDetail});
    return recorded_purchase;
end

#resource_migrationObject



298
299
300
301
# File 'lib/chargebee/result.rb', line 298

def resource_migration() 
    resource_migration = get(:resource_migration, ResourceMigration);
    return resource_migration;
end

#ruleObject



517
518
519
520
# File 'lib/chargebee/result.rb', line 517

def rule() 
    rule = get(:rule, Rule);
    return rule;
end

#site_migration_detailObject



293
294
295
296
# File 'lib/chargebee/result.rb', line 293

def site_migration_detail() 
    site_migration_detail = get(:site_migration_detail, SiteMigrationDetail);
    return site_migration_detail;
end

#subscriptionObject



33
34
35
36
37
# File 'lib/chargebee/result.rb', line 33

def subscription() 
    subscription = get(:subscription, Subscription,
    {:subscription_items => Subscription::SubscriptionItem, :item_tiers => Subscription::ItemTier, :charged_items => Subscription::ChargedItem, :addons => Subscription::Addon, :event_based_addons => Subscription::EventBasedAddon, :charged_event_based_addons => Subscription::ChargedEventBasedAddon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo, :billing_override => Subscription::BillingOverride, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount});
    return subscription;
end

#subscription_entitlementObject



398
399
400
401
402
# File 'lib/chargebee/result.rb', line 398

def subscription_entitlement() 
    subscription_entitlement = get(:subscription_entitlement, SubscriptionEntitlement,
    {:component => SubscriptionEntitlement::Component});
    return subscription_entitlement;
end

#subscription_entitlements_created_detailObject



577
578
579
580
# File 'lib/chargebee/result.rb', line 577

def subscription_entitlements_created_detail() 
    subscription_entitlements_created_detail = get(:subscription_entitlements_created_detail, SubscriptionEntitlementsCreatedDetail);
    return subscription_entitlements_created_detail;
end

#subscription_entitlements_updated_detailObject



572
573
574
575
# File 'lib/chargebee/result.rb', line 572

def subscription_entitlements_updated_detail() 
    subscription_entitlements_updated_detail = get(:subscription_entitlements_updated_detail, SubscriptionEntitlementsUpdatedDetail);
    return subscription_entitlements_updated_detail;
end

#tax_withheldObject



129
130
131
132
# File 'lib/chargebee/result.rb', line 129

def tax_withheld() 
    tax_withheld = get(:tax_withheld, TaxWithheld);
    return tax_withheld;
end

#third_party_payment_methodObject



87
88
89
90
# File 'lib/chargebee/result.rb', line 87

def third_party_payment_method() 
    third_party_payment_method = get(:third_party_payment_method, ThirdPartyPaymentMethod);
    return third_party_payment_method;
end

#time_machineObject



303
304
305
306
# File 'lib/chargebee/result.rb', line 303

def time_machine() 
    time_machine = get(:time_machine, TimeMachine);
    return time_machine;
end

#to_s(*args) ⇒ Object



643
644
645
# File 'lib/chargebee/result.rb', line 643

def to_s(*args)
    JSON.pretty_generate(@response)
end

#tokenObject



76
77
78
79
# File 'lib/chargebee/result.rb', line 76

def token() 
    token = get(:token, Token);
    return token;
end

#transactionObject



158
159
160
161
162
# File 'lib/chargebee/result.rb', line 158

def transaction() 
    transaction = get(:transaction, Transaction,
    {:linked_invoices => Transaction::LinkedInvoice, :linked_credit_notes => Transaction::LinkedCreditNote, :linked_refunds => Transaction::LinkedRefund, :linked_payments => Transaction::LinkedPayment, :gateway_error_detail => Transaction::GatewayErrorDetail});
    return transaction;
end

#unbilled_chargeObject



140
141
142
143
144
# File 'lib/chargebee/result.rb', line 140

def unbilled_charge() 
    unbilled_charge = get(:unbilled_charge, UnbilledCharge,
    {:tiers => UnbilledCharge::Tier});
    return unbilled_charge;
end

#unbilled_chargesObject



612
613
614
615
616
# File 'lib/chargebee/result.rb', line 612

def unbilled_charges() 
    unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
    {:tiers => UnbilledCharge::Tier});
    return unbilled_charges;
end

#usageObject



266
267
268
269
# File 'lib/chargebee/result.rb', line 266

def usage() 
    usage = get(:usage, Usage);
    return usage;
end

#usage_eventObject



522
523
524
525
# File 'lib/chargebee/result.rb', line 522

def usage_event() 
    usage_event = get(:usage_event, UsageEvent);
    return usage_event;
end

#usage_fileObject



533
534
535
536
537
# File 'lib/chargebee/result.rb', line 533

def usage_file() 
    usage_file = get(:usage_file, UsageFile,
    {:upload_detail => UsageFile::UploadDetail});
    return usage_file;
end

#virtual_bank_accountObject



92
93
94
95
# File 'lib/chargebee/result.rb', line 92

def () 
     = get(:virtual_bank_account, VirtualBankAccount);
    return ;
end

#webhook_endpointObject



561
562
563
564
# File 'lib/chargebee/result.rb', line 561

def webhook_endpoint() 
    webhook_endpoint = get(:webhook_endpoint, WebhookEndpoint);
    return webhook_endpoint;
end