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
- #omnichannel_subscription ⇒ Object
- #omnichannel_transaction ⇒ 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
- #recorded_purchase ⇒ 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
207 208 209 210 211 |
# File 'lib/chargebee/result.rb', line 207 def addon() addon = get(:addon, Addon, {:tiers => Addon::Tier, :tax_providers_fields => Addon::TaxProvidersField}); return addon; end |
#address ⇒ Object
229 230 231 232 |
# File 'lib/chargebee/result.rb', line 229 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
452 453 454 455 456 |
# File 'lib/chargebee/result.rb', line 452 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
321 322 323 324 |
# File 'lib/chargebee/result.rb', line 321 def attached_item() attached_item = get(:attached_item, AttachedItem); return attached_item; end |
#attribute ⇒ Object
310 311 312 313 |
# File 'lib/chargebee/result.rb', line 310 def attribute() attribute = get(:attribute, Attribute); return attribute; end |
#business_entity ⇒ Object
397 398 399 400 |
# File 'lib/chargebee/result.rb', line 397 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
245 246 247 248 |
# File 'lib/chargebee/result.rb', line 245 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
213 214 215 216 217 |
# File 'lib/chargebee/result.rb', line 213 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
224 225 226 227 |
# File 'lib/chargebee/result.rb', line 224 def coupon_code() coupon_code = get(:coupon_code, CouponCode); return coupon_code; end |
#coupon_set ⇒ Object
219 220 221 222 |
# File 'lib/chargebee/result.rb', line 219 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
476 477 478 479 480 |
# File 'lib/chargebee/result.rb', line 476 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
413 414 415 416 |
# File 'lib/chargebee/result.rb', line 413 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
367 368 369 370 |
# File 'lib/chargebee/result.rb', line 367 def customer_entitlement() customer_entitlement = get(:customer_entitlement, CustomerEntitlement); return customer_entitlement; end |
#differential_price ⇒ Object
326 327 328 329 330 |
# File 'lib/chargebee/result.rb', line 326 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
250 251 252 253 |
# File 'lib/chargebee/result.rb', line 250 def download() download = get(:download, Download); return download; end |
#downloads ⇒ Object
488 489 490 491 492 |
# File 'lib/chargebee/result.rb', line 488 def downloads() downloads = get_list(:downloads, Download, {}); return downloads; end |
#entitlement ⇒ Object
377 378 379 380 |
# File 'lib/chargebee/result.rb', line 377 def entitlement() entitlement = get(:entitlement, Entitlement); return entitlement; end |
#entitlement_override ⇒ Object
392 393 394 395 |
# File 'lib/chargebee/result.rb', line 392 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 174 175 |
# 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, :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, :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], :payment_schedule_estimates, {:schedule_entries => PaymentScheduleEstimate::ScheduleEntry}); 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
239 240 241 242 243 |
# File 'lib/chargebee/result.rb', line 239 def event() event = get(:event, Event, {:webhooks => Event::Webhook}); return event; end |
#export ⇒ Object
276 277 278 279 280 |
# File 'lib/chargebee/result.rb', line 276 def export() export = get(:export, Export, {:download => Export::Download}); return export; end |
#feature ⇒ Object
332 333 334 335 336 |
# File 'lib/chargebee/result.rb', line 332 def feature() feature = get(:feature, Feature, {:levels => Feature::Level}); return feature; end |
#gateway_error_detail ⇒ Object
288 289 290 291 |
# File 'lib/chargebee/result.rb', line 288 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
458 459 460 461 462 |
# File 'lib/chargebee/result.rb', line 458 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
344 345 346 347 348 |
# File 'lib/chargebee/result.rb', line 344 def impacted_item() impacted_item = get(:impacted_item, ImpactedItem, {:download => ImpactedItem::Download}); return impacted_item; end |
#impacted_item_price ⇒ Object
350 351 352 353 354 |
# File 'lib/chargebee/result.rb', line 350 def impacted_item_price() impacted_item_price = get(:impacted_item_price, ImpactedItemPrice, {:download => ImpactedItemPrice::Download}); return impacted_item_price; end |
#impacted_subscription ⇒ Object
338 339 340 341 342 |
# File 'lib/chargebee/result.rb', line 338 def impacted_subscription() impacted_subscription = get(:impacted_subscription, ImpactedSubscription, {:download => ImpactedSubscription::Download}); return impacted_subscription; end |
#in_app_subscription ⇒ Object
382 383 384 385 |
# File 'lib/chargebee/result.rb', line 382 def in_app_subscription() in_app_subscription = get(:in_app_subscription, InAppSubscription); return in_app_subscription; end |
#in_app_subscriptions ⇒ Object
494 495 496 497 498 |
# File 'lib/chargebee/result.rb', line 494 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
464 465 466 467 468 |
# File 'lib/chargebee/result.rb', line 464 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
298 299 300 301 302 |
# File 'lib/chargebee/result.rb', line 298 def item() item = get(:item, Item, {:applicable_items => Item::ApplicableItem, :bundle_items => Item::BundleItem, :bundle_configuration => Item::BundleConfiguration}); return item; end |
#item_entitlement ⇒ Object
372 373 374 375 |
# File 'lib/chargebee/result.rb', line 372 def item_entitlement() item_entitlement = get(:item_entitlement, ItemEntitlement); return item_entitlement; end |
#item_family ⇒ Object
293 294 295 296 |
# File 'lib/chargebee/result.rb', line 293 def item_family() item_family = get(:item_family, ItemFamily); return item_family; end |
#item_price ⇒ Object
315 316 317 318 319 |
# File 'lib/chargebee/result.rb', line 315 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
356 357 358 359 |
# File 'lib/chargebee/result.rb', line 356 def () = get(:metadata, Metadata); return ; end |
#non_subscription ⇒ Object
387 388 389 390 |
# File 'lib/chargebee/result.rb', line 387 def non_subscription() non_subscription = get(:non_subscription, NonSubscription); return non_subscription; end |
#omnichannel_subscription ⇒ Object
435 436 437 438 439 |
# File 'lib/chargebee/result.rb', line 435 def omnichannel_subscription() omnichannel_subscription = get(:omnichannel_subscription, OmnichannelSubscription, {:omnichannel_subscription_items => OmnichannelSubscription::OmnichannelSubscriptionItem}); return omnichannel_subscription; end |
#omnichannel_transaction ⇒ Object
441 442 443 444 |
# File 'lib/chargebee/result.rb', line 441 def omnichannel_transaction() omnichannel_transaction = get(:omnichannel_transaction, OmnichannelTransaction); return omnichannel_transaction; 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
282 283 284 285 286 |
# File 'lib/chargebee/result.rb', line 282 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
424 425 426 427 428 |
# File 'lib/chargebee/result.rb', line 424 def payment_schedule_scheme() payment_schedule_scheme = get(:payment_schedule_scheme, PaymentScheduleScheme, {:preferred_schedules => PaymentScheduleScheme::PreferredSchedule}); return payment_schedule_scheme; end |
#payment_schedules ⇒ Object
470 471 472 473 474 |
# File 'lib/chargebee/result.rb', line 470 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
407 408 409 410 411 |
# File 'lib/chargebee/result.rb', line 407 def payment_voucher() payment_voucher = get(:payment_voucher, PaymentVoucher, {:linked_invoices => PaymentVoucher::LinkedInvoice}); return payment_voucher; end |
#plan ⇒ Object
201 202 203 204 205 |
# File 'lib/chargebee/result.rb', line 201 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
255 256 257 258 259 |
# File 'lib/chargebee/result.rb', line 255 def portal_session() portal_session = get(:portal_session, PortalSession, {:linked_customers => PortalSession::LinkedCustomer}); return portal_session; end |
#price_variant ⇒ Object
304 305 306 307 308 |
# File 'lib/chargebee/result.rb', line 304 def price_variant() price_variant = get(:price_variant, PriceVariant, {:attributes => PriceVariant::Attribute}); return price_variant; end |
#pricing_page_session ⇒ Object
430 431 432 433 |
# File 'lib/chargebee/result.rb', line 430 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
402 403 404 405 |
# File 'lib/chargebee/result.rb', line 402 def purchase() purchase = get(:purchase, Purchase); return purchase; end |
#quote ⇒ Object
177 178 179 180 181 |
# File 'lib/chargebee/result.rb', line 177 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
195 196 197 198 199 |
# File 'lib/chargebee/result.rb', line 195 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
189 190 191 192 193 |
# File 'lib/chargebee/result.rb', line 189 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
183 184 185 186 187 |
# File 'lib/chargebee/result.rb', line 183 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
418 419 420 421 422 |
# File 'lib/chargebee/result.rb', line 418 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 |
#recorded_purchase ⇒ Object
446 447 448 449 450 |
# File 'lib/chargebee/result.rb', line 446 def recorded_purchase() recorded_purchase = get(:recorded_purchase, RecordedPurchase, {:linked_omnichannel_subscriptions => RecordedPurchase::LinkedOmnichannelSubscription, :error_detail => RecordedPurchase::ErrorDetail}); return recorded_purchase; end |
#resource_migration ⇒ Object
266 267 268 269 |
# File 'lib/chargebee/result.rb', line 266 def resource_migration() resource_migration = get(:resource_migration, ResourceMigration); return resource_migration; end |
#site_migration_detail ⇒ Object
261 262 263 264 |
# File 'lib/chargebee/result.rb', line 261 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
361 362 363 364 365 |
# File 'lib/chargebee/result.rb', line 361 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
271 272 273 274 |
# File 'lib/chargebee/result.rb', line 271 def time_machine() time_machine = get(:time_machine, TimeMachine); return time_machine; end |
#to_s(*args) ⇒ Object
501 502 503 |
# File 'lib/chargebee/result.rb', line 501 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
482 483 484 485 486 |
# File 'lib/chargebee/result.rb', line 482 def unbilled_charges() unbilled_charges = get_list(:unbilled_charges, UnbilledCharge, {:tiers => UnbilledCharge::Tier}); return unbilled_charges; end |
#usage ⇒ Object
234 235 236 237 |
# File 'lib/chargebee/result.rb', line 234 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 |