Class: Courier::Models::UserProfile::Address

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

Overview

See Also:

  • Courier::Models::UserProfile#address

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(country:, formatted:, locality:, postal_code:, region:, street_address:) ⇒ Address

Returns a new instance of Address.

Parameters:

  • country (String)
  • formatted (String)
  • locality (String)
  • postal_code (String)
  • region (String)
  • street_address (String)
  • country: (String)
  • formatted: (String)
  • locality: (String)
  • postal_code: (String)
  • region: (String)
  • street_address: (String)


# File 'lib/courier/models/user_profile.rb', line 273

Instance Attribute Details

#country ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


246
# File 'lib/courier/models/user_profile.rb', line 246

required :country, String

#formatted ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


251
# File 'lib/courier/models/user_profile.rb', line 251

required :formatted, String

#locality ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


256
# File 'lib/courier/models/user_profile.rb', line 256

required :locality, String

#postal_code ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


261
# File 'lib/courier/models/user_profile.rb', line 261

required :postal_code, String

#region ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


266
# File 'lib/courier/models/user_profile.rb', line 266

required :region, String

#street_address ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


271
# File 'lib/courier/models/user_profile.rb', line 271

required :street_address, String

Instance Method Details

#to_hash ⇒ { country: String, formatted: String, locality: String, postal_code: String, region: String, street_address: String }

Returns:

  • ({ country: String, formatted: String, locality: String, postal_code: String, region: String, street_address: String })


201
202
203
204
205
206
207
208
# File 'sig/courier/models/user_profile.rbs', line 201

def to_hash: -> {
  country: String,
  formatted: String,
  locality: String,
  postal_code: String,
  region: String,
  street_address: String
}