Class: Cookie::Models::OrderResponse::Order::PaymentAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/cookie/models/order_response.rb

Overview

Payment and shipping address details for an order

Examples:

address = order.payment_address
puts address.email # => "[email protected]"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ PaymentAddress

Returns a new instance of PaymentAddress.



49
50
51
52
53
54
55
56
57
58
59
# File 'lib/cookie/models/order_response.rb', line 49

def initialize(attributes)
  @address_line1 = attributes["addressLine1"]
  @address_line2 = attributes["addressLine2"]
  @address_line3 = attributes["addressLine3"]
  @email = attributes["email"]
  @first_name = attributes["firstName"]
  @last_name = attributes["lastName"]
  @phone_number = attributes["phoneNumber"]
  @town = attributes["town"]
  @zip_code = attributes["zipCode"]
end

Instance Attribute Details

#address_line1Object (readonly)

Returns the value of attribute address_line1.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def address_line1
  @address_line1
end

#address_line2Object (readonly)

Returns the value of attribute address_line2.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def address_line2
  @address_line2
end

#address_line3Object (readonly)

Returns the value of attribute address_line3.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def address_line3
  @address_line3
end

#emailObject (readonly)

Returns the value of attribute email.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def email
  @email
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def last_name
  @last_name
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def phone_number
  @phone_number
end

#townObject (readonly)

Returns the value of attribute town.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def town
  @town
end

#zip_codeObject (readonly)

Returns the value of attribute zip_code.



46
47
48
# File 'lib/cookie/models/order_response.rb', line 46

def zip_code
  @zip_code
end