Class: Inttegro::Shared::Address
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::Shared::Address
- Defined in:
- lib/inttegro/shared/address.rb
Overview
Typed representation of the address object in the Inttegro API.
This generated model is immutable. Construct it with .new, or decode a string-keyed API
payload with .from_hash. #serialize produces a string-keyed hash using the original wire
field names and serialized enum values.
Instance Attribute Summary collapse
-
#country ⇒ String
readonly
Country name.
-
#district ⇒ String?
readonly
District or area.
-
#line1 ⇒ String
readonly
Street address line 1.
-
#line2 ⇒ String?
readonly
Street address line 2 (optional).
-
#name ⇒ String
readonly
Recipient name.
-
#phone_number ⇒ String
readonly
Contact phone number.
-
#post_code ⇒ String?
readonly
Postal/ZIP code.
-
#region ⇒ String?
readonly
State, province, or region.
-
#town ⇒ String
readonly
City or town.
Instance Attribute Details
#country ⇒ String (readonly)
Country name
Required in the API payload. Wire name: country.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#district ⇒ String? (readonly)
District or area
Optional in the API payload; omitted values default to nil. Wire name: district.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#line1 ⇒ String (readonly)
Street address line 1
Required in the API payload. Wire name: line1.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#line2 ⇒ String? (readonly)
Street address line 2 (optional)
Optional in the API payload; omitted values default to nil. Wire name: line2.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#name ⇒ String (readonly)
Recipient name
Required in the API payload. Wire name: name.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#phone_number ⇒ String (readonly)
Contact phone number
Required in the API payload. Wire name: phone_number.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#post_code ⇒ String? (readonly)
Postal/ZIP code
Optional in the API payload; omitted values default to nil. Wire name: post_code.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#region ⇒ String? (readonly)
State, province, or region
Optional in the API payload; omitted values default to nil. Wire name: region.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#town ⇒ String (readonly)
City or town
Required in the API payload. Wire name: town.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/inttegro/shared/address.rb', line 71 class Address < T::Struct const :name, String const :phone_number, String const :line1, String const :line2, T.nilable(String), default: nil const :town, String const :region, T.nilable(String), default: nil const :district, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |