Class: Straddle::Models::AccountAddress

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/straddle/models/account_address.rb,
sig/straddle/models/account_address.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(city:, line1:, postal_code:, state:, country: nil, line2: nil) ⇒ Object

Some parameter documentations has been truncated, see Straddle::Models::AccountAddress for more details.

Optional business address. If provided, line1, city, state, and postal_code are required.

Parameters:

  • city (String, nil) —

    City, district, suburb, town, or village.

  • line1 (String, nil) —

    Primary address line, such as a street address or PO Box.

  • postal_code (String, nil) —

    Postal or ZIP code.

  • state (String, nil) —

    Two-letter state code.

  • country (String, nil) (defaults to: nil) —

    Two-letter ISO 3166-1 country code. If omitted, Straddle applies US address vali

  • line2 (String, nil) (defaults to: nil) —

    Secondary address line, such as an apartment, suite, unit, or building.



# File 'lib/straddle/models/account_address.rb', line 43

Instance Attribute Details

#city ⇒ String?

City, district, suburb, town, or village.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


10
# File 'lib/straddle/models/account_address.rb', line 10

required :city, String, nil?: true

#country ⇒ String?

Two-letter ISO 3166-1 country code. If omitted, Straddle applies US address validation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


35
# File 'lib/straddle/models/account_address.rb', line 35

optional :country, String, nil?: true

#line1 ⇒ String?

Primary address line, such as a street address or PO Box.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/straddle/models/account_address.rb', line 16

required :line1, String, nil?: true

#line2 ⇒ String?

Secondary address line, such as an apartment, suite, unit, or building.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


41
# File 'lib/straddle/models/account_address.rb', line 41

optional :line2, String, nil?: true

#postal_code ⇒ String?

Postal or ZIP code.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


22
# File 'lib/straddle/models/account_address.rb', line 22

required :postal_code, String, nil?: true

#state ⇒ String?

Two-letter state code.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


28
# File 'lib/straddle/models/account_address.rb', line 28

required :state, String, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


35
# File 'sig/straddle/models/account_address.rbs', line 35

def to_hash: -> {