class EwayRapid::DirectPaymentRequest

Attributes

customer[RW]
customer_ip[RW]
device_id[RW]
items[RW]
method[RW]
options[RW]
partner_id[RW]
payment[RW]
redirect_url[RW]
secured_card_data[RW]
shipping_address[RW]
transaction_type[RW]

Public Instance Methods

to_json(opts={}) click to toggle source
# File lib/eway_rapid/entities/direct_payment_request.rb, line 16
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(options),
   Constants::PAYMENT            => InternalModels::Payment.to_hash(payment),
   Constants::METHOD             => method,
   Constants::TRANSACTION_TYPE   => transaction_type,
   Constants::SECURED_CARD_DATA  => secured_card_data,
   Constants::CUSTOMER_DEVICE_IP => customer_ip,
   Constants::DEVICE_ID          => device_id,
   Constants::PARTNER_ID         => partner_id,
   Constants::REDIRECT_URL       => redirect_url}.to_json
end