Class: Anthropic::Models::UserProfiles::UserProfileActionURL

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/user_profiles/user_profile_action_url.rb,
sig/anthropic/models/user_profiles/user_profile_action_url.rbs

Overview

See Also:

  • Anthropic::Resources::UserProfiles::ActionURLs#create

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 ⇒ UserProfileActionURL

Returns a new instance of UserProfileActionURL.

Parameters:

  • expires_at: (Time)
  • url: (String)
  • type: (:user_profile_action_url)


16
17
18
19
20
# File 'sig/anthropic/models/user_profiles/user_profile_action_url.rbs', line 16

def initialize: (
  expires_at: Time,
  url: String,
  ?type: :user_profile_action_url
) -> void

Instance Attribute Details

#expires_at ⇒ Time

When the URL stops working, in RFC 3339 format.

Parameters:

  • value (Time)

Returns:

  • (Time)


12
# File 'lib/anthropic/models/user_profiles/user_profile_action_url.rb', line 12

required :expires_at, Time

#type ⇒ Symbol, :user_profile_action_url

Object type. Always user_profile_action_url.

Parameters:

  • value (:user_profile_action_url)

Returns:

  • (Symbol, :user_profile_action_url)


18
# File 'lib/anthropic/models/user_profiles/user_profile_action_url.rb', line 18

required :type, const: :user_profile_action_url

#url ⇒ String

The URL to give to the person who takes the action. Anyone who holds it can open it until expires_at.

Parameters:

  • value (String)

Returns:

  • (String)


25
# File 'lib/anthropic/models/user_profiles/user_profile_action_url.rb', line 25

required :url, String

Instance Method Details

#to_hash ⇒ { expires_at: Time, type: :user_profile_action_url, url: String }

Returns:

  • ({ expires_at: Time, type: :user_profile_action_url, url: String })


22
23
24
25
26
# File 'sig/anthropic/models/user_profiles/user_profile_action_url.rbs', line 22

def to_hash: -> {
  expires_at: Time,
  type: :user_profile_action_url,
  url: String
}