Class: EwayRapid::DirectPaymentRequest
- Inherits:
-
Object
- Object
- EwayRapid::DirectPaymentRequest
- Defined in:
- lib/eway_rapid/entities/direct_payment_request.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#customer_ip ⇒ Object
Returns the value of attribute customer_ip.
-
#device_id ⇒ Object
Returns the value of attribute device_id.
-
#items ⇒ Object
Returns the value of attribute items.
-
#method ⇒ Object
Returns the value of attribute method.
-
#options ⇒ Object
Returns the value of attribute options.
-
#partner_id ⇒ Object
Returns the value of attribute partner_id.
-
#payment ⇒ Object
Returns the value of attribute payment.
-
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
Instance Method Summary collapse
Instance Attribute Details
#customer ⇒ Object
Returns the value of attribute customer.
3 4 5 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 3 def customer @customer end |
#customer_ip ⇒ Object
Returns the value of attribute customer_ip.
10 11 12 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 10 def customer_ip @customer_ip end |
#device_id ⇒ Object
Returns the value of attribute device_id.
11 12 13 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 11 def device_id @device_id end |
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 5 def items @items end |
#method ⇒ Object
Returns the value of attribute method.
8 9 10 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 8 def method @method end |
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 6 def @options end |
#partner_id ⇒ Object
Returns the value of attribute partner_id.
12 13 14 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 12 def partner_id @partner_id end |
#payment ⇒ Object
Returns the value of attribute payment.
7 8 9 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 7 def payment @payment end |
#redirect_url ⇒ Object
Returns the value of attribute redirect_url.
13 14 15 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 13 def redirect_url @redirect_url end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
4 5 6 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 4 def shipping_address @shipping_address end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
9 10 11 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 9 def transaction_type @transaction_type end |
Instance Method Details
#to_json(opts = {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/eway_rapid/entities/direct_payment_request.rb', line 15 def to_json(opts={}) {Constants::CUSTOMER => InternalModels::Customer.to_hash(customer), Constants::SHIPPING_ADDRESS => InternalModels::ShippingAddress.to_hash(shipping_address), Constants::ITEMS => Models::LineItem.to_array(items), Constants::OPTIONS => InternalModels::Option.to_array(), Constants::PAYMENT => InternalModels::Payment.to_hash(payment), Constants::METHOD => method, Constants::TRANSACTION_TYPE => transaction_type, Constants::CUSTOMER_DEVICE_IP => customer_ip, Constants::DEVICE_ID => device_id, Constants::PARTNER_ID => partner_id, Constants::REDIRECT_URL => redirect_url}.to_json end |