Class: Messenger::Elements::Address

Inherits:
Object
  • Object
show all
Includes:
Components::Element
Defined in:
lib/messenger/components/elements/receipt/address.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Components::Element

#build, #build_elements

Constructor Details

#initialize(street_1:, street_2: nil, city:, postal_code:, state:, country:) ⇒ Address

Returns a new instance of Address.



10
11
12
13
14
15
16
17
# File 'lib/messenger/components/elements/receipt/address.rb', line 10

def initialize(street_1:, street_2: nil, city:, postal_code:, state:, country:)
  @street_1    = street_1
  @street_2    = street_2
  @city        = city
  @postal_code = postal_code
  @state       = state
  @country     = country
end

Instance Attribute Details

#cityObject

Returns the value of attribute city.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def city
  @city
end

#countryObject

Returns the value of attribute country.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def country
  @country
end

#postal_codeObject

Returns the value of attribute postal_code.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def postal_code
  @postal_code
end

#stateObject

Returns the value of attribute state.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def state
  @state
end

#street_1Object

Returns the value of attribute street_1.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def street_1
  @street_1
end

#street_2Object

Returns the value of attribute street_2.



8
9
10
# File 'lib/messenger/components/elements/receipt/address.rb', line 8

def street_2
  @street_2
end