Class: ChargeBee::Result
- Inherits:
-
Object
show all
- Defined in:
- lib/chargebee/result.rb
Instance Method Summary
collapse
Constructor Details
#initialize(response) ⇒ Result
Returns a new instance of Result.
4
5
6
|
# File 'lib/chargebee/result.rb', line 4
def initialize(response)
@response = response
end
|
Instance Method Details
#addon ⇒ Object
49
50
51
|
# File 'lib/chargebee/result.rb', line 49
def addon()
get(:addon, Addon);
end
|
#address ⇒ Object
61
62
63
|
# File 'lib/chargebee/result.rb', line 61
def address()
get(:address, Address);
end
|
#card ⇒ Object
18
19
20
|
# File 'lib/chargebee/result.rb', line 18
def card()
get(:card, Card);
end
|
70
71
72
|
# File 'lib/chargebee/result.rb', line 70
def ()
get(:comment, Comment);
end
|
#coupon ⇒ Object
53
54
55
|
# File 'lib/chargebee/result.rb', line 53
def coupon()
get(:coupon, Coupon);
end
|
#coupon_code ⇒ Object
57
58
59
|
# File 'lib/chargebee/result.rb', line 57
def coupon_code()
get(:coupon_code, CouponCode);
end
|
#download ⇒ Object
74
75
76
|
# File 'lib/chargebee/result.rb', line 74
def download()
get(:download, Download);
end
|
#event ⇒ Object
65
66
67
68
|
# File 'lib/chargebee/result.rb', line 65
def event()
get(:event, Event,
{:webhooks => Event::Webhook});
end
|
#hosted_page ⇒ Object
36
37
38
|
# File 'lib/chargebee/result.rb', line 36
def hosted_page()
get(:hosted_page, HostedPage);
end
|
#invoice ⇒ Object
22
23
24
25
|
# File 'lib/chargebee/result.rb', line 22
def invoice()
get(:invoice, Invoice,
{:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :invoice_transactions => Invoice::LinkedTransaction, :orders => Invoice::LinkedOrder, :invoice_notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
end
|
#order ⇒ Object
27
28
29
|
# File 'lib/chargebee/result.rb', line 27
def order()
get(:order, Order);
end
|
#plan ⇒ Object
45
46
47
|
# File 'lib/chargebee/result.rb', line 45
def plan()
get(:plan, Plan);
end
|
#to_s(*args) ⇒ Object
84
85
86
|
# File 'lib/chargebee/result.rb', line 84
def to_s(*args)
JSON.pretty_generate(@response)
end
|