Class: EwayRapid::CreateAccessCodeSharedRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cancel_urlObject

Returns the value of attribute cancel_url.



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

def cancel_url
  @cancel_url
end

#checkout_paymentObject

Returns the value of attribute checkout_payment.



24
25
26
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 24

def checkout_payment
  @checkout_payment
end

#checkout_urlObject

Returns the value of attribute checkout_url.



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

def checkout_url
  @checkout_url
end

#custom_viewObject

Returns the value of attribute custom_view.



21
22
23
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 21

def custom_view
  @custom_view
end

#customerObject

Returns the value of attribute customer.



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

def customer
  @customer
end

#customer_ipObject

Returns the value of attribute customer_ip.



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

def customer_ip
  @customer_ip
end

#customer_read_onlyObject

Returns the value of attribute customer_read_only.



20
21
22
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 20

def customer_read_only
  @customer_read_only
end

#device_idObject

Returns the value of attribute device_id.



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

def device_id
  @device_id
end

#header_textObject

Returns the value of attribute header_text.



17
18
19
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 17

def header_text
  @header_text
end

#itemsObject

Returns the value of attribute items.



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

def items
  @items
end

#languageObject

Returns the value of attribute language.



19
20
21
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 19

def language
  @language
end

#logo_urlObject

Returns the value of attribute logo_url.



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

def logo_url
  @logo_url
end

#methodObject

Returns the value of attribute method.



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

def method
  @method
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#partner_idObject

Returns the value of attribute partner_id.



18
19
20
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 18

def partner_id
  @partner_id
end

#paymentObject

Returns the value of attribute payment.



8
9
10
# File 'lib/eway_rapid/entities/create_access_code_shared_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_shared_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_shared_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_shared_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_shared_request.rb', line 15

def transaction_type
  @transaction_type
end

#verify_customer_emailObject

Returns the value of attribute verify_customer_email.



23
24
25
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 23

def verify_customer_email
  @verify_customer_email
end

#verify_customer_phoneObject

Returns the value of attribute verify_customer_phone.



22
23
24
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 22

def verify_customer_phone
  @verify_customer_phone
end

Instance Method Details

#to_json(opts = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/eway_rapid/entities/create_access_code_shared_request.rb', line 26

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::CANCEL_URL             => cancel_url,
      Constants::CHECKOUT_URL           => checkout_url,
      Constants::METHOD                 => method,
      Constants::DEVICE_ID              => device_id,
      Constants::CUSTOMER_DEVICE_IP     => customer_ip,
      Constants::TRANSACTION_TYPE       => transaction_type,
      Constants::LOGO_URL               => logo_url,
      Constants::HEADER_TEXT            => header_text,
      Constants::PARTNER_ID             => partner_id,
      Constants::LANGUAGE               => language,
      Constants::CUSTOMER_READ_ONLY     => customer_read_only,
      Constants::CUSTOMER_VIEW          => custom_view,
      Constants::VERIFY_CUSTOMER_PHONE  => verify_customer_phone,
      Constants::VERIFY_CUSTOMER_EMAIL  => verify_customer_email,
      Constants::CHECKOUT_PAYMENT       => checkout_payment
  }.to_json
end