Class: Inttegro::Shared::Address

Inherits:
T::Struct
  • Object
show all
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

Instance Attribute Details

#country ⇒ String (readonly)

Country name

Required in the API payload. Wire name: country.

Returns:

  • (String)


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.

Returns:

  • (String, nil)


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.

Returns:

  • (String)


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.

Returns:

  • (String, nil)


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.

Returns:

  • (String)


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.

Returns:

  • (String)


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.

Returns:

  • (String, nil)


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.

Returns:

  • (String, nil)


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.

Returns:

  • (String)


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