Class: Anthropic::Models::Beta::BetaUserLocation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_user_location.rb,
sig/anthropic/models/beta/beta_user_location.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 ⇒ BetaUserLocation

Returns a new instance of BetaUserLocation.

Parameters:

  • city: (String, nil)
  • country: (String, nil)
  • region: (String, nil)
  • timezone: (String, nil)
  • type: (:approximate)


26
27
28
29
30
31
32
# File 'sig/anthropic/models/beta/beta_user_location.rbs', line 26

def initialize: (
  ?city: String?,
  ?country: String?,
  ?region: String?,
  ?timezone: String?,
  ?type: :approximate
) -> void

Instance Attribute Details

#city ⇒ String?

The city of the user.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


16
# File 'lib/anthropic/models/beta/beta_user_location.rb', line 16

optional :city, String, nil?: true

#country ⇒ String?

The two letter ISO country code of the user.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


24
# File 'lib/anthropic/models/beta/beta_user_location.rb', line 24

optional :country, String, nil?: true

#region ⇒ String?

The region of the user.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


30
# File 'lib/anthropic/models/beta/beta_user_location.rb', line 30

optional :region, String, nil?: true

#timezone ⇒ String?

The IANA timezone of the user.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


36
# File 'lib/anthropic/models/beta/beta_user_location.rb', line 36

optional :timezone, String, nil?: true

#type ⇒ Symbol, :approximate

Parameters:

  • value (:approximate)

Returns:

  • (Symbol, :approximate)


10
# File 'lib/anthropic/models/beta/beta_user_location.rb', line 10

required :type, const: :approximate

Instance Method Details

#to_hash ⇒ { type: :approximate, city: String?, country: String?, region: String?, timezone: String? }

Returns:

  • ({ type: :approximate, city: String?, country: String?, region: String?, timezone: String? })


34
35
36
37
38
39
40
# File 'sig/anthropic/models/beta/beta_user_location.rbs', line 34

def to_hash: -> {
  type: :approximate,
  city: String?,
  country: String?,
  region: String?,
  timezone: String?
}