Class: PaysonAPI::V2::Requests::CreateCheckout
- Inherits:
-
Object
- Object
- PaysonAPI::V2::Requests::CreateCheckout
- Defined in:
- lib/payson_api/v2/requests/create_checkout.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#description ⇒ Object
Returns the value of attribute description.
-
#expiration_time ⇒ Object
Returns the value of attribute expiration_time.
-
#gui ⇒ Object
Returns the value of attribute gui.
-
#merchant ⇒ Object
Returns the value of attribute merchant.
-
#order ⇒ Object
Returns the value of attribute order.
Instance Method Summary collapse
-
#initialize ⇒ CreateCheckout
constructor
A new instance of CreateCheckout.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ CreateCheckout
Returns a new instance of CreateCheckout.
9 10 11 12 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 9 def initialize @order = PaysonAPI::V2::Requests::Order.new @merchant = PaysonAPI::V2::Requests::Merchant.new end |
Instance Attribute Details
#customer ⇒ Object
Returns the value of attribute customer.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def customer @customer end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def description @description end |
#expiration_time ⇒ Object
Returns the value of attribute expiration_time.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def expiration_time @expiration_time end |
#gui ⇒ Object
Returns the value of attribute gui.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def gui @gui end |
#merchant ⇒ Object
Returns the value of attribute merchant.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def merchant @merchant end |
#order ⇒ Object
Returns the value of attribute order.
7 8 9 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 7 def order @order end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/payson_api/v2/requests/create_checkout.rb', line 14 def to_hash {}.tap do |hash| hash['order'] = @order.to_hash hash['merchant'] = @merchant.to_hash hash['description'] = @description unless @description.nil? hash['expirationTime'] = @expiration_time unless @expiration_time.nil? hash['customer'] = @customer.to_hash unless @customer.nil? end end |