Class: EwayRapid::CreateAccessCodeRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/eway_rapid/entities/create_access_code_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#checkout_paymentObject

Returns the value of attribute checkout_payment.



13
14
15
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 13

def checkout_payment
  @checkout_payment
end

#checkout_urlObject

Returns the value of attribute checkout_url.



14
15
16
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 14

def checkout_url
  @checkout_url
end

#customerObject

Returns the value of attribute customer.



3
4
5
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 3

def customer
  @customer
end

#customer_ipObject

Returns the value of attribute customer_ip.



11
12
13
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 11

def customer_ip
  @customer_ip
end

#device_idObject

Returns the value of attribute device_id.



12
13
14
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 12

def device_id
  @device_id
end

#itemsObject

Returns the value of attribute items.



6
7
8
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 6

def items
  @items
end

#methodObject

Returns the value of attribute method.



10
11
12
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 10

def method
  @method
end

#optionsObject

Returns the value of attribute options.



7
8
9
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 7

def options
  @options
end

#partner_idObject

Returns the value of attribute partner_id.



16
17
18
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 16

def partner_id
  @partner_id
end

#paymentObject

Returns the value of attribute payment.



8
9
10
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 8

def payment
  @payment
end

#redirect_urlObject

Returns the value of attribute redirect_url.



9
10
11
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 9

def redirect_url
  @redirect_url
end

#shipping_addressObject

Returns the value of attribute shipping_address.



4
5
6
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 4

def shipping_address
  @shipping_address
end

#shipping_methodObject

Returns the value of attribute shipping_method.



5
6
7
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 5

def shipping_method
  @shipping_method
end

#transaction_typeObject

Returns the value of attribute transaction_type.



15
16
17
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 15

def transaction_type
  @transaction_type
end

Instance Method Details

#to_json(opts = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/eway_rapid/entities/create_access_code_request.rb', line 18

def to_json(opts={})
  {Constants::CUSTOMER            => InternalModels::Customer.to_hash(customer),
   Constants::SHIPPING_ADDRESS    => InternalModels::ShippingAddress.to_hash(shipping_address),
   Constants::SHIPPING_METHOD     => shipping_method,
   Constants::ITEMS               => Models::LineItem.to_array(items),
   Constants::OPTIONS             => InternalModels::Option.to_array(options),
   Constants::PAYMENT             => InternalModels::Payment.to_hash(payment),
   Constants::REDIRECT_URL        => redirect_url,
   Constants::METHOD              => method,
   Constants::CUSTOMER_DEVICE_IP  => customer_ip,
   Constants::DEVICE_ID           => device_id,
   Constants::CHECKOUT_PAYMENT    => checkout_payment,
   Constants::CHECKOUT_URL        => checkout_url,
   Constants::TRANSACTION_TYPE    => transaction_type,
   Constants::PARTNER_ID          => partner_id}.to_json
end