Class: Sink::Models::Address
- Defined in:
- lib/sink/models/address.rb
Instance Attribute Summary collapse
-
#address1 ⇒ String
Valid deliverable address (no PO boxes).
-
#address2 ⇒ String
Unit or apartment number (if applicable).
-
#city ⇒ String
Name of city.
-
#country ⇒ String
Valid country code.
-
#postal_code ⇒ String
Valid postal code.
-
#state ⇒ String
Valid state code.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Address
constructor
Create a new instance of Address from a Hash of raw data.
Methods inherited from BaseModel
#[], #deconstruct_keys, #inspect, #to_h, #to_s
Constructor Details
#initialize(data = {}) ⇒ Address
Create a new instance of Address from a Hash of raw data.
13 |
# File 'lib/sink/models/address.rb', line 13 def initialize(data = {}) = super |
Instance Attribute Details
#address1 ⇒ String
Valid deliverable address (no PO boxes).
9 |
# File 'lib/sink/models/address.rb', line 9 required :address1, String |
#address2 ⇒ String
Unit or apartment number (if applicable).
37 |
# File 'lib/sink/models/address.rb', line 37 optional :address2, String |
#city ⇒ String
Name of city.
14 |
# File 'lib/sink/models/address.rb', line 14 required :city, String |
#country ⇒ String
Valid country code. Only USA is currently supported, entered in uppercase ISO 3166-1 alpha-3 three-character format.
20 |
# File 'lib/sink/models/address.rb', line 20 required :country, String |
#postal_code ⇒ String
Valid postal code. Only USA ZIP codes are currently supported, entered as a five-digit ZIP or nine-digit ZIP+4.
26 |
# File 'lib/sink/models/address.rb', line 26 required :postal_code, String |
#state ⇒ String
Valid state code. Only USA state codes are currently supported, entered in uppercase ISO 3166-2 two-character format.
32 |
# File 'lib/sink/models/address.rb', line 32 required :state, String |