Class: Anthropic::Models::UserLocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/user_location.rb

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: nil, country: nil, region: nil, timezone: nil, type: :approximate) ⇒ void

Some parameter documentations has been truncated, see Anthropic::Models::UserLocation for more details.

Parameters:

  • city (String, nil) (defaults to: nil)

    The city of the user.

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

    The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha

  • region (String, nil) (defaults to: nil)

    The region of the user.

  • timezone (String, nil) (defaults to: nil)

    The IANA timezone of the user.

  • type (Symbol, :approximate) (defaults to: :approximate)


# File 'lib/anthropic/models/user_location.rb', line 37


Instance Attribute Details

#cityString?

The city of the user.

Returns:

  • (String, nil)


15
# File 'lib/anthropic/models/user_location.rb', line 15

optional :city, String, nil?: true

#countryString?

The two letter ISO country code of the user.

Returns:

  • (String, nil)


23
# File 'lib/anthropic/models/user_location.rb', line 23

optional :country, String, nil?: true

#regionString?

The region of the user.

Returns:

  • (String, nil)


29
# File 'lib/anthropic/models/user_location.rb', line 29

optional :region, String, nil?: true

#timezoneString?

The IANA timezone of the user.

Returns:

  • (String, nil)


35
# File 'lib/anthropic/models/user_location.rb', line 35

optional :timezone, String, nil?: true

#typeSymbol, :approximate

Returns:

  • (Symbol, :approximate)


9
# File 'lib/anthropic/models/user_location.rb', line 9

required :type, const: :approximate