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
-
#city ⇒ String?
readonly
City or town.
-
#country ⇒ String
readonly
Country value recorded for the address.
-
#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.
Instance Attribute Details
#city ⇒ String? (readonly)
City or town
Optional in the API payload; omitted values default to nil. Wire name: city.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#country ⇒ String (readonly)
Country value recorded for the address.
Required in the API payload. Wire name: country.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#line1 ⇒ String? (readonly)
Street address line 1
Optional in the API payload; omitted values default to nil. Wire name: line1.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, 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.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#name ⇒ String? (readonly)
Recipient name
Optional in the API payload; omitted values default to nil. Wire name: name.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |
#phone_number ⇒ String? (readonly)
Contact phone number
Optional in the API payload; omitted values default to nil. Wire name: phone_number.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, 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.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, 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.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/inttegro/shared/address.rb', line 65 class Address < T::Struct const :name, T.nilable(String), default: nil const :phone_number, T.nilable(String), default: nil const :line1, T.nilable(String), default: nil const :line2, T.nilable(String), default: nil const :city, T.nilable(String), default: nil const :region, T.nilable(String), default: nil const :country, String const :post_code, T.nilable(String), default: nil end |