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



258
259
260
261
262
# File 'lib/chargebee/result.rb', line 258

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

#addressObject



280
281
282
283
# File 'lib/chargebee/result.rb', line 280

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

#advance_invoice_scheduleObject



63
64
65
66
67
# File 'lib/chargebee/result.rb', line 63

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



668
669
670
671
672
# File 'lib/chargebee/result.rb', line 668

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

#alertObject



615
616
617
618
619
# File 'lib/chargebee/result.rb', line 615

def alert() 
    alert = get(:alert, Alert,
    {:threshold => Alert::Threshold, :filter_conditions => Alert::FilterCondition});
    return alert;
end

#alert_statusObject



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

def alert_status() 
    alert_status = get(:alert_status, AlertStatus);
    return alert_status;
end

#async_responseObject



41
42
43
44
45
# File 'lib/chargebee/result.rb', line 41

def async_response() 
    async_response = get(:async_response, AsyncResponse,
    {:request_async_api => AsyncResponse::RequestAsyncApi, :error => AsyncResponse::Error});
    return async_response;
end

#async_response_listObject



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

def async_response_list() 
    async_response_list = get(:async_response_list, AsyncResponseList, {},
    {:list => AsyncResponse});
    async_response_list.init_dependant_list(@response[:async_response_list], :list,
    {:request => AsyncResponse::RequestAsyncApi, :error_detail => AsyncResponse::Error});
    return async_response_list;
end

#attached_itemObject



372
373
374
375
# File 'lib/chargebee/result.rb', line 372

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

#attributeObject



361
362
363
364
# File 'lib/chargebee/result.rb', line 361

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

#billing_configurationObject



235
236
237
238
239
# File 'lib/chargebee/result.rb', line 235

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

#brandObject



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

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

#business_entityObject



453
454
455
456
# File 'lib/chargebee/result.rb', line 453

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

#business_entity_transferObject



85
86
87
88
# File 'lib/chargebee/result.rb', line 85

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

#cardObject



111
112
113
114
# File 'lib/chargebee/result.rb', line 111

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

#commentObject



296
297
298
299
# File 'lib/chargebee/result.rb', line 296

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

#configurationObject



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

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

#configurationsObject



710
711
712
713
714
# File 'lib/chargebee/result.rb', line 710

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

#contactObject



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

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

#contract_termObject



53
54
55
56
# File 'lib/chargebee/result.rb', line 53

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

#couponObject



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

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

#coupon_codeObject



275
276
277
278
# File 'lib/chargebee/result.rb', line 275

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

#coupon_setObject



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

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

#cpq_quote_signatureObject



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

def cpq_quote_signature() 
    cpq_quote_signature = get(:cpq_quote_signature, CpqQuoteSignature);
    return cpq_quote_signature;
end

#credit_noteObject



148
149
150
151
152
# File 'lib/chargebee/result.rb', line 148

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, :exchange_rates => CreditNote::ExchangeRate, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation});
    return credit_note;
end

#credit_notesObject



692
693
694
695
696
# File 'lib/chargebee/result.rb', line 692

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, :exchange_rates => CreditNote::ExchangeRate, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :einvoice => CreditNote::Einvoice, :site_details_at_creation => CreditNote::SiteDetailsAtCreation});
    return credit_notes;
end

#currencyObject



469
470
471
472
# File 'lib/chargebee/result.rb', line 469

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

#customerObject



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

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



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

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

#differential_priceObject



377
378
379
380
381
# File 'lib/chargebee/result.rb', line 377

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

#discountObject



58
59
60
61
# File 'lib/chargebee/result.rb', line 58

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

#downloadObject



301
302
303
304
# File 'lib/chargebee/result.rb', line 301

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

#downloadsObject



704
705
706
707
708
# File 'lib/chargebee/result.rb', line 704

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

#einvoiceObject



138
139
140
141
# File 'lib/chargebee/result.rb', line 138

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

#entitlementObject



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

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

#entitlement_overrideObject



448
449
450
451
# File 'lib/chargebee/result.rb', line 448

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

#estimateObject



183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/chargebee/result.rb', line 183

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



290
291
292
293
294
# File 'lib/chargebee/result.rb', line 290

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

#exportObject



327
328
329
330
331
# File 'lib/chargebee/result.rb', line 327

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

#featureObject



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

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

#filter_conditionObject



621
622
623
624
# File 'lib/chargebee/result.rb', line 621

def filter_condition() 
    filter_condition = get(:filter_condition, FilterCondition);
    return filter_condition;
end

#gateway_error_detailObject



339
340
341
342
# File 'lib/chargebee/result.rb', line 339

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



166
167
168
169
170
# File 'lib/chargebee/result.rb', line 166

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

#grant_blockObject



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

def grant_block() 
    grant_block = get(:grant_block, GrantBlock);
    return grant_block;
end

#grant_blocksObject



734
735
736
737
738
# File 'lib/chargebee/result.rb', line 734

def grant_blocks() 
    grant_blocks = get_list(:grant_blocks, GrantBlock,
    {});
    return grant_blocks;
end

#hierarchiesObject



674
675
676
677
678
# File 'lib/chargebee/result.rb', line 674

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

#hierarchyObject



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

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

#hosted_pageObject



178
179
180
181
# File 'lib/chargebee/result.rb', line 178

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

#impacted_customerObject



652
653
654
655
656
# File 'lib/chargebee/result.rb', line 652

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

#impacted_itemObject



400
401
402
403
404
# File 'lib/chargebee/result.rb', line 400

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

#impacted_item_priceObject



406
407
408
409
410
# File 'lib/chargebee/result.rb', line 406

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

#impacted_subscriptionObject



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

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

#in_app_subscriptionObject



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

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

#in_app_subscriptionsObject



716
717
718
719
720
# File 'lib/chargebee/result.rb', line 716

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

#invoiceObject



121
122
123
124
125
# File 'lib/chargebee/result.rb', line 121

def invoice() 
    invoice = get(:invoice, Invoice,
    {:exchange_rates => Invoice::ExchangeRate, :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



680
681
682
683
684
# File 'lib/chargebee/result.rb', line 680

def invoices() 
    invoices = get_list(:invoices, Invoice,
    {:exchange_rates => Invoice::ExchangeRate, :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



349
350
351
352
353
# File 'lib/chargebee/result.rb', line 349

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

#item_entitlementObject



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

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

#item_familyObject



344
345
346
347
# File 'lib/chargebee/result.rb', line 344

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

#item_priceObject



366
367
368
369
370
# File 'lib/chargebee/result.rb', line 366

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

#ledger_account_balanceObject



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

def () 
     = get(:ledger_account_balance, LedgerAccountBalance,
    {:provisioned_balance => LedgerAccountBalance::ProvisionedBalance, :overdraft_balance => LedgerAccountBalance::OverdraftBalance});
    return ;
end

#ledger_operationObject



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

def ledger_operation() 
    ledger_operation = get(:ledger_operation, LedgerOperation);
    return ledger_operation;
end

#ledger_operationsObject



728
729
730
731
732
# File 'lib/chargebee/result.rb', line 728

def ledger_operations() 
    ledger_operations = get_list(:ledger_operations, LedgerOperation,
    {});
    return ledger_operations;
end

#metadataObject



412
413
414
415
# File 'lib/chargebee/result.rb', line 412

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

#meterObject



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

def meter() 
    meter = get(:meter, Meter, {},
    {:column_definitions => ColumnDefinition, :features => Feature});
    meter.init_dependant_list(@response[:meter], :column_definitions,
    {});
    meter.init_dependant_list(@response[:meter], :features,
    {:levels => Feature::Level});
    return meter;
end

#metered_featureObject



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

def metered_feature() 
    metered_feature = get(:metered_feature, MeteredFeature, {},
    {:column_definitions => ColumnDefinition, :features => Feature});
    metered_feature.init_dependant_list(@response[:metered_feature], :column_definitions,
    {});
    metered_feature.init_dependant_list(@response[:metered_feature], :features,
    {:levels => Feature::Level});
    return metered_feature;
end

#non_subscriptionObject



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

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

#offer_eventObject



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

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

#offer_fulfillmentObject



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

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

#omnichannel_one_time_orderObject



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

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



537
538
539
540
# File 'lib/chargebee/result.rb', line 537

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



497
498
499
500
501
502
503
504
505
# File 'lib/chargebee/result.rb', line 497

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



513
514
515
516
517
518
519
# File 'lib/chargebee/result.rb', line 513

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



491
492
493
494
495
# File 'lib/chargebee/result.rb', line 491

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



507
508
509
510
511
# File 'lib/chargebee/result.rb', line 507

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



160
161
162
163
164
# File 'lib/chargebee/result.rb', line 160

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



333
334
335
336
337
# File 'lib/chargebee/result.rb', line 333

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

#payment_reference_numberObject



127
128
129
130
# File 'lib/chargebee/result.rb', line 127

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

#payment_scheduleObject



132
133
134
135
136
# File 'lib/chargebee/result.rb', line 132

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

#payment_schedule_schemeObject



480
481
482
483
484
# File 'lib/chargebee/result.rb', line 480

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

#payment_schedulesObject



686
687
688
689
690
# File 'lib/chargebee/result.rb', line 686

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

#payment_sourceObject



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

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



463
464
465
466
467
# File 'lib/chargebee/result.rb', line 463

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

#personalized_offerObject



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

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

#personalized_offersObject



722
723
724
725
726
# File 'lib/chargebee/result.rb', line 722

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

#planObject



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

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



306
307
308
309
310
# File 'lib/chargebee/result.rb', line 306

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

#price_variantObject



355
356
357
358
359
# File 'lib/chargebee/result.rb', line 355

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

#pricing_page_sessionObject



486
487
488
489
# File 'lib/chargebee/result.rb', line 486

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

#promotional_creditObject



116
117
118
119
# File 'lib/chargebee/result.rb', line 116

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

#promotional_grantObject



647
648
649
650
# File 'lib/chargebee/result.rb', line 647

def promotional_grant() 
    promotional_grant = get(:promotional_grant, PromotionalGrant);
    return promotional_grant;
end

#purchaseObject



458
459
460
461
# File 'lib/chargebee/result.rb', line 458

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

#quoteObject



205
206
207
208
209
# File 'lib/chargebee/result.rb', line 205

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



241
242
243
244
245
# File 'lib/chargebee/result.rb', line 241

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



217
218
219
220
221
# File 'lib/chargebee/result.rb', line 217

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



229
230
231
232
233
# File 'lib/chargebee/result.rb', line 229

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

#quoted_rampObject



223
224
225
226
227
# File 'lib/chargebee/result.rb', line 223

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



211
212
213
214
215
# File 'lib/chargebee/result.rb', line 211

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



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

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



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

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



317
318
319
320
# File 'lib/chargebee/result.rb', line 317

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

#ruleObject



542
543
544
545
# File 'lib/chargebee/result.rb', line 542

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

#site_migration_detailObject



312
313
314
315
# File 'lib/chargebee/result.rb', line 312

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

#subscriptionObject



47
48
49
50
51
# File 'lib/chargebee/result.rb', line 47

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



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

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

#subscription_entitlements_created_detailObject



663
664
665
666
# File 'lib/chargebee/result.rb', line 663

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



658
659
660
661
# File 'lib/chargebee/result.rb', line 658

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

#tax_withheldObject



143
144
145
146
# File 'lib/chargebee/result.rb', line 143

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

#third_party_payment_methodObject



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

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

#time_machineObject



322
323
324
325
# File 'lib/chargebee/result.rb', line 322

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

#to_s(*args) ⇒ Object



741
742
743
# File 'lib/chargebee/result.rb', line 741

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

#tokenObject



90
91
92
93
# File 'lib/chargebee/result.rb', line 90

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

#transactionObject



172
173
174
175
176
# File 'lib/chargebee/result.rb', line 172

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



154
155
156
157
158
# File 'lib/chargebee/result.rb', line 154

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

#unbilled_chargesObject



698
699
700
701
702
# File 'lib/chargebee/result.rb', line 698

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

#usageObject



285
286
287
288
# File 'lib/chargebee/result.rb', line 285

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

#usage_chargeObject



610
611
612
613
# File 'lib/chargebee/result.rb', line 610

def usage_charge() 
    usage_charge = get(:usage_charge, UsageCharge);
    return usage_charge;
end

#usage_eventObject



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

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

#usage_fileObject



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

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

#usage_summaryObject



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

def usage_summary() 
    usage_summary = get(:usage_summary, UsageSummary);
    return usage_summary;
end

#virtual_bank_accountObject



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

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

#webhook_endpointObject



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

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