Class: ChargeBee::Result
- Inherits:
 - 
      Object
      
        
- Object
 - ChargeBee::Result
 
 
- Defined in:
 - lib/chargebee/result.rb
 
Direct Known Subclasses
Constant Summary collapse
- IDEMPOTENCY_REPLAYED_HEADER =
 :chargebee_idempotency_replayed
Instance Method Summary collapse
- #addon ⇒ Object
 - #address ⇒ Object
 - #advance_invoice_schedule ⇒ Object
 - #advance_invoice_schedules ⇒ Object
 - #attached_item ⇒ Object
 - #attribute ⇒ Object
 - #business_entity ⇒ Object
 - #business_entity_transfer ⇒ Object
 - #card ⇒ Object
 - #comment ⇒ Object
 - #contact ⇒ Object
 - #contract_term ⇒ Object
 - #coupon ⇒ Object
 - #coupon_code ⇒ Object
 - #coupon_set ⇒ Object
 - #credit_note ⇒ Object
 - #credit_notes ⇒ Object
 - #currency ⇒ Object
 - #customer ⇒ Object
 - #customer_entitlement ⇒ Object
 - #differential_price ⇒ Object
 - #discount ⇒ Object
 - #download ⇒ Object
 - #downloads ⇒ Object
 - #entitlement ⇒ Object
 - #entitlement_override ⇒ Object
 - #estimate ⇒ Object
 - #event ⇒ Object
 - #export ⇒ Object
 - #feature ⇒ Object
 - #gateway_error_detail ⇒ Object
 - #get_response_headers ⇒ Object
 - #gift ⇒ Object
 - #hierarchies ⇒ Object
 - #hierarchy ⇒ Object
 - #hosted_page ⇒ Object
 - #impacted_item ⇒ Object
 - #impacted_item_price ⇒ Object
 - #impacted_subscription ⇒ Object
 - #in_app_subscription ⇒ Object
 - #in_app_subscriptions ⇒ Object
 - 
  
    
      #initialize(response, rheaders = nil)  ⇒ Result 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Result.
 - #invoice ⇒ Object
 - #invoices ⇒ Object
 - #is_idempotency_replayed ⇒ Object
 - #item ⇒ Object
 - #item_entitlement ⇒ Object
 - #item_family ⇒ Object
 - #item_price ⇒ Object
 - #metadata ⇒ Object
 - #non_subscription ⇒ Object
 - #order ⇒ Object
 - #payment_intent ⇒ Object
 - #payment_reference_number ⇒ Object
 - #payment_schedule ⇒ Object
 - #payment_schedule_scheme ⇒ Object
 - #payment_schedules ⇒ Object
 - #payment_source ⇒ Object
 - #payment_voucher ⇒ Object
 - #plan ⇒ Object
 - #portal_session ⇒ Object
 - #price_variant ⇒ Object
 - #pricing_page_session ⇒ Object
 - #promotional_credit ⇒ Object
 - #purchase ⇒ Object
 - #quote ⇒ Object
 - #quote_line_group ⇒ Object
 - #quoted_charge ⇒ Object
 - #quoted_subscription ⇒ Object
 - #ramp ⇒ Object
 - #resource_migration ⇒ Object
 - #site_migration_detail ⇒ Object
 - #subscription ⇒ Object
 - #subscription_entitlement ⇒ Object
 - #tax_withheld ⇒ Object
 - #third_party_payment_method ⇒ Object
 - #time_machine ⇒ Object
 - #to_s(*args) ⇒ Object
 - #token ⇒ Object
 - #transaction ⇒ Object
 - #unbilled_charge ⇒ Object
 - #unbilled_charges ⇒ Object
 - #usage ⇒ Object
 - #virtual_bank_account ⇒ Object
 
Constructor Details
#initialize(response, rheaders = nil) ⇒ Result
Returns a new instance of Result.
      6 7 8 9  | 
    
      # File 'lib/chargebee/result.rb', line 6 def initialize(response, rheaders = nil) @response = response @rheaders = rheaders end  | 
  
Instance Method Details
#addon ⇒ Object
      205 206 207 208 209  | 
    
      # File 'lib/chargebee/result.rb', line 205 def addon() addon = get(:addon, Addon, {:tiers => Addon::Tier, :tax_providers_fields => Addon::TaxProvidersField}); return addon; end  | 
  
#address ⇒ Object
      227 228 229 230  | 
    
      # File 'lib/chargebee/result.rb', line 227 def address() address = get(:address, Address); return address; end  | 
  
#advance_invoice_schedule ⇒ Object
      40 41 42 43 44  | 
    
      # File 'lib/chargebee/result.rb', line 40 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_schedules ⇒ Object
      433 434 435 436 437  | 
    
      # File 'lib/chargebee/result.rb', line 433 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_item ⇒ Object
      319 320 321 322  | 
    
      # File 'lib/chargebee/result.rb', line 319 def attached_item() attached_item = get(:attached_item, AttachedItem); return attached_item; end  | 
  
#attribute ⇒ Object
      308 309 310 311  | 
    
      # File 'lib/chargebee/result.rb', line 308 def attribute() attribute = get(:attribute, Attribute); return attribute; end  | 
  
#business_entity ⇒ Object
      395 396 397 398  | 
    
      # File 'lib/chargebee/result.rb', line 395 def business_entity() business_entity = get(:business_entity, BusinessEntity); return business_entity; end  | 
  
#business_entity_transfer ⇒ Object
      62 63 64 65  | 
    
      # File 'lib/chargebee/result.rb', line 62 def business_entity_transfer() business_entity_transfer = get(:business_entity_transfer, BusinessEntityTransfer); return business_entity_transfer; end  | 
  
#card ⇒ Object
      88 89 90 91  | 
    
      # File 'lib/chargebee/result.rb', line 88 def card() card = get(:card, Card); return card; end  | 
  
#comment ⇒ Object
      243 244 245 246  | 
    
      # File 'lib/chargebee/result.rb', line 243 def comment() comment = get(:comment, Comment); return comment; end  | 
  
#contact ⇒ Object
      57 58 59 60  | 
    
      # File 'lib/chargebee/result.rb', line 57 def contact() contact = get(:contact, Contact); return contact; end  | 
  
#contract_term ⇒ Object
      30 31 32 33  | 
    
      # File 'lib/chargebee/result.rb', line 30 def contract_term() contract_term = get(:contract_term, ContractTerm); return contract_term; end  | 
  
#coupon ⇒ Object
      211 212 213 214 215  | 
    
      # File 'lib/chargebee/result.rb', line 211 def coupon() coupon = get(:coupon, Coupon, {:item_constraints => Coupon::ItemConstraint, :item_constraint_criteria => Coupon::ItemConstraintCriteria, :coupon_constraints => Coupon::CouponConstraint}); return coupon; end  | 
  
#coupon_code ⇒ Object
      222 223 224 225  | 
    
      # File 'lib/chargebee/result.rb', line 222 def coupon_code() coupon_code = get(:coupon_code, CouponCode); return coupon_code; end  | 
  
#coupon_set ⇒ Object
      217 218 219 220  | 
    
      # File 'lib/chargebee/result.rb', line 217 def coupon_set() coupon_set = get(:coupon_set, CouponSet); return coupon_set; end  | 
  
#credit_note ⇒ Object
      120 121 122 123 124  | 
    
      # File 'lib/chargebee/result.rb', line 120 def credit_note() credit_note = get(:credit_note, CreditNote, {:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :site_details_at_creation => CreditNote::SiteDetailsAtCreation, :tax_origin => CreditNote::TaxOrigin}); return credit_note; end  | 
  
#credit_notes ⇒ Object
      457 458 459 460 461  | 
    
      # File 'lib/chargebee/result.rb', line 457 def credit_notes() credit_notes = get_list(:credit_notes, CreditNote, {:einvoice => CreditNote::Einvoice, :line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :line_item_tiers => CreditNote::LineItemTier, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation, :shipping_address => CreditNote::ShippingAddress, :billing_address => CreditNote::BillingAddress, :site_details_at_creation => CreditNote::SiteDetailsAtCreation, :tax_origin => CreditNote::TaxOrigin}); return credit_notes; end  | 
  
#currency ⇒ Object
      411 412 413 414  | 
    
      # File 'lib/chargebee/result.rb', line 411 def currency() currency = get(:currency, Currency); return currency; end  | 
  
#customer ⇒ Object
      46 47 48 49 50  | 
    
      # File 'lib/chargebee/result.rb', line 46 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_entitlement ⇒ Object
      365 366 367 368  | 
    
      # File 'lib/chargebee/result.rb', line 365 def customer_entitlement() customer_entitlement = get(:customer_entitlement, CustomerEntitlement); return customer_entitlement; end  | 
  
#differential_price ⇒ Object
      324 325 326 327 328  | 
    
      # File 'lib/chargebee/result.rb', line 324 def differential_price() differential_price = get(:differential_price, DifferentialPrice, {:tiers => DifferentialPrice::Tier, :parent_periods => DifferentialPrice::ParentPeriod}); return differential_price; end  | 
  
#discount ⇒ Object
      35 36 37 38  | 
    
      # File 'lib/chargebee/result.rb', line 35 def discount() discount = get(:discount, Discount); return discount; end  | 
  
#download ⇒ Object
      248 249 250 251  | 
    
      # File 'lib/chargebee/result.rb', line 248 def download() download = get(:download, Download); return download; end  | 
  
#downloads ⇒ Object
      469 470 471 472 473  | 
    
      # File 'lib/chargebee/result.rb', line 469 def downloads() downloads = get_list(:downloads, Download, {}); return downloads; end  | 
  
#entitlement ⇒ Object
      375 376 377 378  | 
    
      # File 'lib/chargebee/result.rb', line 375 def entitlement() entitlement = get(:entitlement, Entitlement); return entitlement; end  | 
  
#entitlement_override ⇒ Object
      390 391 392 393  | 
    
      # File 'lib/chargebee/result.rb', line 390 def entitlement_override() entitlement_override = get(:entitlement_override, EntitlementOverride); return entitlement_override; end  | 
  
#estimate ⇒ Object
      155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173  | 
    
      # File 'lib/chargebee/result.rb', line 155 def estimate() estimate = get(:estimate, Estimate, {}, {:subscription_estimate => SubscriptionEstimate, :subscription_estimates => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :invoice_estimates => InvoiceEstimate, :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, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount}); estimate.init_dependant(@response[:estimate], :next_invoice_estimate, {:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount}); 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, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_tiers => InvoiceEstimate::LineItemTier, :line_item_discounts => InvoiceEstimate::LineItemDiscount}); estimate.init_dependant_list(@response[:estimate], :credit_note_estimates, {:line_items => CreditNoteEstimate::LineItem, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax, :line_item_taxes => CreditNoteEstimate::LineItemTax, :line_item_discounts => CreditNoteEstimate::LineItemDiscount, :line_item_tiers => CreditNoteEstimate::LineItemTier}); estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates, {:tiers => UnbilledCharge::Tier}); return estimate; end  | 
  
#event ⇒ Object
      237 238 239 240 241  | 
    
      # File 'lib/chargebee/result.rb', line 237 def event() event = get(:event, Event, {:webhooks => Event::Webhook}); return event; end  | 
  
#export ⇒ Object
      274 275 276 277 278  | 
    
      # File 'lib/chargebee/result.rb', line 274 def export() export = get(:export, Export, {:download => Export::Download}); return export; end  | 
  
#feature ⇒ Object
      330 331 332 333 334  | 
    
      # File 'lib/chargebee/result.rb', line 330 def feature() feature = get(:feature, Feature, {:levels => Feature::Level}); return feature; end  | 
  
#gateway_error_detail ⇒ Object
      286 287 288 289  | 
    
      # File 'lib/chargebee/result.rb', line 286 def gateway_error_detail() gateway_error_detail = get(:gateway_error_detail, GatewayErrorDetail); return gateway_error_detail; end  | 
  
#get_response_headers ⇒ Object
      11 12 13  | 
    
      # File 'lib/chargebee/result.rb', line 11 def get_response_headers() @rheaders end  | 
  
#gift ⇒ Object
      138 139 140 141 142  | 
    
      # File 'lib/chargebee/result.rb', line 138 def gift() gift = get(:gift, Gift, {:gifter => Gift::Gifter, :gift_receiver => Gift::GiftReceiver, :gift_timelines => Gift::GiftTimeline}); return gift; end  | 
  
#hierarchies ⇒ Object
      439 440 441 442 443  | 
    
      # File 'lib/chargebee/result.rb', line 439 def hierarchies() hierarchies = get_list(:hierarchies, Hierarchy, {}); return hierarchies; end  | 
  
#hierarchy ⇒ Object
      52 53 54 55  | 
    
      # File 'lib/chargebee/result.rb', line 52 def hierarchy() hierarchy = get(:hierarchy, Hierarchy); return hierarchy; end  | 
  
#hosted_page ⇒ Object
      150 151 152 153  | 
    
      # File 'lib/chargebee/result.rb', line 150 def hosted_page() hosted_page = get(:hosted_page, HostedPage); return hosted_page; end  | 
  
#impacted_item ⇒ Object
      342 343 344 345 346  | 
    
      # File 'lib/chargebee/result.rb', line 342 def impacted_item() impacted_item = get(:impacted_item, ImpactedItem, {:download => ImpactedItem::Download}); return impacted_item; end  | 
  
#impacted_item_price ⇒ Object
      348 349 350 351 352  | 
    
      # File 'lib/chargebee/result.rb', line 348 def impacted_item_price() impacted_item_price = get(:impacted_item_price, ImpactedItemPrice, {:download => ImpactedItemPrice::Download}); return impacted_item_price; end  | 
  
#impacted_subscription ⇒ Object
      336 337 338 339 340  | 
    
      # File 'lib/chargebee/result.rb', line 336 def impacted_subscription() impacted_subscription = get(:impacted_subscription, ImpactedSubscription, {:download => ImpactedSubscription::Download}); return impacted_subscription; end  | 
  
#in_app_subscription ⇒ Object
      380 381 382 383  | 
    
      # File 'lib/chargebee/result.rb', line 380 def in_app_subscription() in_app_subscription = get(:in_app_subscription, InAppSubscription); return in_app_subscription; end  | 
  
#in_app_subscriptions ⇒ Object
      475 476 477 478 479  | 
    
      # File 'lib/chargebee/result.rb', line 475 def in_app_subscriptions() in_app_subscriptions = get_list(:in_app_subscriptions, InAppSubscription, {}); return in_app_subscriptions; end  | 
  
#invoice ⇒ Object
      98 99 100 101 102  | 
    
      # File 'lib/chargebee/result.rb', line 98 def invoice() invoice = get(:invoice, Invoice, {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :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, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation, :tax_origin => Invoice::TaxOrigin}); return invoice; end  | 
  
#invoices ⇒ Object
      445 446 447 448 449  | 
    
      # File 'lib/chargebee/result.rb', line 445 def invoices() invoices = get_list(:invoices, Invoice, {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :line_item_tiers => Invoice::LineItemTier, :linked_payments => Invoice::LinkedPayment, :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, :statement_descriptor => Invoice::StatementDescriptor, :billing_address => Invoice::BillingAddress, :einvoice => Invoice::Einvoice, :site_details_at_creation => Invoice::SiteDetailsAtCreation, :tax_origin => Invoice::TaxOrigin}); return invoices; end  | 
  
#is_idempotency_replayed ⇒ Object
      15 16 17 18 19 20 21 22  | 
    
      # File 'lib/chargebee/result.rb', line 15 def is_idempotency_replayed() replayed_header = get_response_headers[IDEMPOTENCY_REPLAYED_HEADER] if replayed_header != nil return !!replayed_header else return false end end  | 
  
#item ⇒ Object
      296 297 298 299 300  | 
    
      # File 'lib/chargebee/result.rb', line 296 def item() item = get(:item, Item, {:applicable_items => Item::ApplicableItem, :bundle_items => Item::BundleItem, :bundle_configuration => Item::BundleConfiguration}); return item; end  | 
  
#item_entitlement ⇒ Object
      370 371 372 373  | 
    
      # File 'lib/chargebee/result.rb', line 370 def item_entitlement() item_entitlement = get(:item_entitlement, ItemEntitlement); return item_entitlement; end  | 
  
#item_family ⇒ Object
      291 292 293 294  | 
    
      # File 'lib/chargebee/result.rb', line 291 def item_family() item_family = get(:item_family, ItemFamily); return item_family; end  | 
  
#item_price ⇒ Object
      313 314 315 316 317  | 
    
      # File 'lib/chargebee/result.rb', line 313 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  | 
  
#metadata ⇒ Object
      354 355 356 357  | 
    
      # File 'lib/chargebee/result.rb', line 354 def () = get(:metadata, Metadata); return ; end  | 
  
#non_subscription ⇒ Object
      385 386 387 388  | 
    
      # File 'lib/chargebee/result.rb', line 385 def non_subscription() non_subscription = get(:non_subscription, NonSubscription); return non_subscription; end  | 
  
#order ⇒ Object
      132 133 134 135 136  | 
    
      # File 'lib/chargebee/result.rb', line 132 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_intent ⇒ Object
      280 281 282 283 284  | 
    
      # File 'lib/chargebee/result.rb', line 280 def payment_intent() payment_intent = get(:payment_intent, PaymentIntent, {:payment_attempt => PaymentIntent::PaymentAttempt}); return payment_intent; end  | 
  
#payment_reference_number ⇒ Object
      104 105 106 107  | 
    
      # File 'lib/chargebee/result.rb', line 104 def payment_reference_number() payment_reference_number = get(:payment_reference_number, PaymentReferenceNumber); return payment_reference_number; end  | 
  
#payment_schedule ⇒ Object
      109 110 111 112 113  | 
    
      # File 'lib/chargebee/result.rb', line 109 def payment_schedule() payment_schedule = get(:payment_schedule, PaymentSchedule, {:schedule_entries => PaymentSchedule::ScheduleEntry}); return payment_schedule; end  | 
  
#payment_schedule_scheme ⇒ Object
      422 423 424 425 426  | 
    
      # File 'lib/chargebee/result.rb', line 422 def payment_schedule_scheme() payment_schedule_scheme = get(:payment_schedule_scheme, PaymentScheduleScheme, {:preferred_schedules => PaymentScheduleScheme::PreferredSchedule}); return payment_schedule_scheme; end  | 
  
#payment_schedules ⇒ Object
      451 452 453 454 455  | 
    
      # File 'lib/chargebee/result.rb', line 451 def payment_schedules() payment_schedules = get_list(:payment_schedules, PaymentSchedule, {:schedule_entries => PaymentSchedule::ScheduleEntry}); return payment_schedules; end  | 
  
#payment_source ⇒ Object
      72 73 74 75 76  | 
    
      # File 'lib/chargebee/result.rb', line 72 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_voucher ⇒ Object
      405 406 407 408 409  | 
    
      # File 'lib/chargebee/result.rb', line 405 def payment_voucher() payment_voucher = get(:payment_voucher, PaymentVoucher, {:linked_invoices => PaymentVoucher::LinkedInvoice}); return payment_voucher; end  | 
  
#plan ⇒ Object
      199 200 201 202 203  | 
    
      # File 'lib/chargebee/result.rb', line 199 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_session ⇒ Object
      253 254 255 256 257  | 
    
      # File 'lib/chargebee/result.rb', line 253 def portal_session() portal_session = get(:portal_session, PortalSession, {:linked_customers => PortalSession::LinkedCustomer}); return portal_session; end  | 
  
#price_variant ⇒ Object
      302 303 304 305 306  | 
    
      # File 'lib/chargebee/result.rb', line 302 def price_variant() price_variant = get(:price_variant, PriceVariant, {:attributes => PriceVariant::Attribute}); return price_variant; end  | 
  
#pricing_page_session ⇒ Object
      428 429 430 431  | 
    
      # File 'lib/chargebee/result.rb', line 428 def pricing_page_session() pricing_page_session = get(:pricing_page_session, PricingPageSession); return pricing_page_session; end  | 
  
#promotional_credit ⇒ Object
      93 94 95 96  | 
    
      # File 'lib/chargebee/result.rb', line 93 def promotional_credit() promotional_credit = get(:promotional_credit, PromotionalCredit); return promotional_credit; end  | 
  
#purchase ⇒ Object
      400 401 402 403  | 
    
      # File 'lib/chargebee/result.rb', line 400 def purchase() purchase = get(:purchase, Purchase); return purchase; end  | 
  
#quote ⇒ Object
      175 176 177 178 179  | 
    
      # File 'lib/chargebee/result.rb', line 175 def quote() quote = get(:quote, Quote, {:line_items => Quote::LineItem, :discounts => Quote::Discount, :line_item_discounts => Quote::LineItemDiscount, :taxes => Quote::Tax, :line_item_taxes => Quote::LineItemTax, :line_item_tiers => Quote::LineItemTier, :shipping_address => Quote::ShippingAddress, :billing_address => Quote::BillingAddress}); return quote; end  | 
  
#quote_line_group ⇒ Object
      193 194 195 196 197  | 
    
      # File 'lib/chargebee/result.rb', line 193 def quote_line_group() quote_line_group = get(:quote_line_group, QuoteLineGroup, {:line_items => QuoteLineGroup::LineItem, :discounts => QuoteLineGroup::Discount, :line_item_discounts => QuoteLineGroup::LineItemDiscount, :taxes => QuoteLineGroup::Tax, :line_item_taxes => QuoteLineGroup::LineItemTax}); return quote_line_group; end  | 
  
#quoted_charge ⇒ Object
      187 188 189 190 191  | 
    
      # File 'lib/chargebee/result.rb', line 187 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}); return quoted_charge; end  | 
  
#quoted_subscription ⇒ Object
      181 182 183 184 185  | 
    
      # File 'lib/chargebee/result.rb', line 181 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  | 
  
#ramp ⇒ Object
      416 417 418 419 420  | 
    
      # File 'lib/chargebee/result.rb', line 416 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, :status_transition_reason => Ramp::StatusTransitionReason}); return ramp; end  | 
  
#resource_migration ⇒ Object
      264 265 266 267  | 
    
      # File 'lib/chargebee/result.rb', line 264 def resource_migration() resource_migration = get(:resource_migration, ResourceMigration); return resource_migration; end  | 
  
#site_migration_detail ⇒ Object
      259 260 261 262  | 
    
      # File 'lib/chargebee/result.rb', line 259 def site_migration_detail() site_migration_detail = get(:site_migration_detail, SiteMigrationDetail); return site_migration_detail; end  | 
  
#subscription ⇒ Object
      24 25 26 27 28  | 
    
      # File 'lib/chargebee/result.rb', line 24 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, :contract_term => Subscription::ContractTerm, :discounts => Subscription::Discount}); return subscription; end  | 
  
#subscription_entitlement ⇒ Object
      359 360 361 362 363  | 
    
      # File 'lib/chargebee/result.rb', line 359 def subscription_entitlement() subscription_entitlement = get(:subscription_entitlement, SubscriptionEntitlement, {:component => SubscriptionEntitlement::Component}); return subscription_entitlement; end  | 
  
#tax_withheld ⇒ Object
      115 116 117 118  | 
    
      # File 'lib/chargebee/result.rb', line 115 def tax_withheld() tax_withheld = get(:tax_withheld, TaxWithheld); return tax_withheld; end  | 
  
#third_party_payment_method ⇒ Object
      78 79 80 81  | 
    
      # File 'lib/chargebee/result.rb', line 78 def third_party_payment_method() third_party_payment_method = get(:third_party_payment_method, ThirdPartyPaymentMethod); return third_party_payment_method; end  | 
  
#time_machine ⇒ Object
      269 270 271 272  | 
    
      # File 'lib/chargebee/result.rb', line 269 def time_machine() time_machine = get(:time_machine, TimeMachine); return time_machine; end  | 
  
#to_s(*args) ⇒ Object
      482 483 484  | 
    
      # File 'lib/chargebee/result.rb', line 482 def to_s(*args) JSON.pretty_generate(@response) end  | 
  
#token ⇒ Object
      67 68 69 70  | 
    
      # File 'lib/chargebee/result.rb', line 67 def token() token = get(:token, Token); return token; end  | 
  
#transaction ⇒ Object
      144 145 146 147 148  | 
    
      # File 'lib/chargebee/result.rb', line 144 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_charge ⇒ Object
      126 127 128 129 130  | 
    
      # File 'lib/chargebee/result.rb', line 126 def unbilled_charge() unbilled_charge = get(:unbilled_charge, UnbilledCharge, {:tiers => UnbilledCharge::Tier}); return unbilled_charge; end  | 
  
#unbilled_charges ⇒ Object
      463 464 465 466 467  | 
    
      # File 'lib/chargebee/result.rb', line 463 def unbilled_charges() unbilled_charges = get_list(:unbilled_charges, UnbilledCharge, {:tiers => UnbilledCharge::Tier}); return unbilled_charges; end  | 
  
#usage ⇒ Object
      232 233 234 235  | 
    
      # File 'lib/chargebee/result.rb', line 232 def usage() usage = get(:usage, Usage); return usage; end  | 
  
#virtual_bank_account ⇒ Object
      83 84 85 86  | 
    
      # File 'lib/chargebee/result.rb', line 83 def virtual_bank_account() virtual_bank_account = get(:virtual_bank_account, VirtualBankAccount); return virtual_bank_account; end  |