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



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

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

#addressObject



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

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



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

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



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

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

#alert_statusObject



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

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



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

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

#attributeObject



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

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

#billing_configurationObject



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

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

#brandObject



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

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

#business_entityObject



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

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



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

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

#commentObject



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

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

#configurationObject



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

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

#configurationsObject



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

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



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

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

#coupon_codeObject



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

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

#coupon_setObject



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

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

#cpq_quote_signatureObject



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

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

#credit_noteObject



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

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



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

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

#credit_unitObject



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

def credit_unit() 
    credit_unit = get(:credit_unit, CreditUnit);
    return credit_unit;
end

#currencyObject



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

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



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

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

#differential_priceObject



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

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



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

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

#downloadsObject



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

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

#einvoiceObject



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

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

#entitlementObject



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

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

#entitlement_overrideObject



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

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

#estimateObject



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/chargebee/result.rb', line 193

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



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

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

#exportObject



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

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

#featureObject



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

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

#filter_conditionObject



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

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

#gateway_error_detailObject



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

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

#gateway_payment_method_tokenObject



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

def gateway_payment_method_token() 
    gateway_payment_method_token = get(:gateway_payment_method_token, GatewayPaymentMethodToken);
    return gateway_payment_method_token;
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



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

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

#grant_blockObject



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

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

#grant_blocksObject



764
765
766
767
768
# File 'lib/chargebee/result.rb', line 764

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

#hierarchiesObject



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

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



188
189
190
191
# File 'lib/chargebee/result.rb', line 188

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

#impacted_customerObject



682
683
684
685
686
# File 'lib/chargebee/result.rb', line 682

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

#impacted_itemObject



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

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

#impacted_item_priceObject



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

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

#impacted_subscriptionObject



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

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

#in_app_subscriptionObject



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

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

#in_app_subscriptionsObject



746
747
748
749
750
# File 'lib/chargebee/result.rb', line 746

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

#invoiceObject



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

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



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

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



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

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

#item_entitlementObject



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

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

#item_familyObject



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

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

#item_priceObject



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

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



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

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

#ledger_entriesObject



770
771
772
773
774
# File 'lib/chargebee/result.rb', line 770

def ledger_entries() 
    ledger_entries = get_list(:ledger_entries, LedgerEntry,
    {});
    return ledger_entries;
end

#ledger_entryObject



672
673
674
675
# File 'lib/chargebee/result.rb', line 672

def ledger_entry() 
    ledger_entry = get(:ledger_entry, LedgerEntry);
    return ledger_entry;
end

#ledger_operationObject



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

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

#ledger_operationsObject



758
759
760
761
762
# File 'lib/chargebee/result.rb', line 758

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

#metadataObject



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

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

#meterObject



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

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



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

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



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

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

#offer_eventObject



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

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

#offer_fulfillmentObject



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

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

#omnichannel_one_time_orderObject



552
553
554
555
556
557
558
559
560
# File 'lib/chargebee/result.rb', line 552

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



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

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



522
523
524
525
526
527
528
529
530
# File 'lib/chargebee/result.rb', line 522

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



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

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_metricObject



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

def omnichannel_subscription_item_metric() 
    omnichannel_subscription_item_metric = get(:omnichannel_subscription_item_metric, OmnichannelSubscriptionItemMetric);
    return omnichannel_subscription_item_metric;
end

#omnichannel_subscription_item_scheduled_changeObject



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

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



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

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



170
171
172
173
174
# File 'lib/chargebee/result.rb', line 170

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



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

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

#payment_reference_numberObject



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

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

#payment_scheduleObject



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

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

#payment_schedule_schemeObject



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

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

#payment_schedulesObject



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

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



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

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

#personalized_offerObject



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

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

#personalized_offersObject



752
753
754
755
756
# File 'lib/chargebee/result.rb', line 752

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

#planObject



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

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



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

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

#price_variantObject



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

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

#pricing_page_sessionObject



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

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

#promotional_creditObject



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

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

#promotional_grantObject



677
678
679
680
# File 'lib/chargebee/result.rb', line 677

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

#purchaseObject



478
479
480
481
# File 'lib/chargebee/result.rb', line 478

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

#quoteObject



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

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_entitlementObject



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

def quote_entitlement() 
    quote_entitlement = get(:quote_entitlement, QuoteEntitlement);
    return quote_entitlement;
end

#quote_line_groupObject



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

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



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

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



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

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

#quoted_rampObject



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

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



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

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



494
495
496
497
498
# File 'lib/chargebee/result.rb', line 494

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



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

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



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

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

#ruleObject



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

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

#site_migration_detailObject



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

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



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

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

#subscription_entitlements_created_detailObject



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

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



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

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

#tax_withheldObject



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

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

#third_party_payment_methodObject



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

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

#time_machineObject



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

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

#to_s(*args) ⇒ Object



777
778
779
# File 'lib/chargebee/result.rb', line 777

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



182
183
184
185
186
# File 'lib/chargebee/result.rb', line 182

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



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

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

#unbilled_chargesObject



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

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

#usageObject



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

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

#usage_chargeObject



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

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

#usage_eventObject



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

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

#usage_fileObject



597
598
599
600
601
# File 'lib/chargebee/result.rb', line 597

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

#usage_summaryObject



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

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

#vaulted_payment_methodObject



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

def vaulted_payment_method() 
    vaulted_payment_method = get(:vaulted_payment_method, VaultedPaymentMethod);
    return vaulted_payment_method;
end

#virtual_bank_accountObject



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

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

#webhook_endpointObject



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

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