Class: Anthropic::Models::Beta::BetaUserProfile
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::BetaUserProfile
- Defined in:
- lib/anthropic/models/beta/beta_user_profile.rb,
sig/anthropic/models/beta/beta_user_profile.rbs
Overview
Defined Under Namespace
Modules: AccessType
Instance Attribute Summary collapse
-
#access_type ⇒ Symbol, ...
How the platform uses the API for this entity:
application(default) orpassthrough. -
#created_at ⇒ Time
When this user profile was created, in RFC 3339 format.
-
#external_id ⇒ String?
Platform's own identifier for this user.
-
#external_user_details ⇒ Anthropic::Models::Beta::BetaUserProfileExternalUserDetails?
Details about the entity this profile represents, as the platform states them; not verified by Anthropic.
-
#external_user_onboarded_at ⇒ Time?
When the entity this profile represents opened its account with the platform, as stated by the platform, in RFC 3339 format (UTC).
-
#id ⇒ String
Unique identifier for this user profile, prefixed
uprof_. -
#metadata ⇒ Hash{Symbol=>String}
Arbitrary key-value metadata.
-
#name ⇒ String?
Real-world name of the entity this profile represents (company or individual).
-
#trust_grants ⇒ Hash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant}
Trust grants for this profile, keyed by grant name.
-
#type ⇒ Symbol, :user_profile
Object type.
-
#updated_at ⇒ Time
When this user profile was last modified, in RFC 3339 format.
Instance Method Summary collapse
-
#initialize(id:, created_at:, metadata:, name:, trust_grants:, updated_at:, access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, type: :user_profile) ⇒ BetaUserProfile
constructor
A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.
- #to_hash ⇒ { id: String, created_at: Time, metadata: ::Hash[Symbol, String], name: String?, trust_grants: ::Hash[Symbol, Anthropic::Beta::BetaUserProfileTrustGrant], type: :user_profile, updated_at: Time, access_type: Anthropic::Models::Beta::BetaUserProfile::access_type, external_id: String?, external_user_details: Anthropic::Beta::BetaUserProfileExternalUserDetails, external_user_onboarded_at: Time? }
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(id:, created_at:, metadata:, name:, trust_grants:, updated_at:, access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, type: :user_profile) ⇒ BetaUserProfile
A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.
A Messages, Message Batches or token counting request can send a profile's id
in the anthropic-user-profile-id header to attribute the request to that
entity.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaUserProfile for more details.
|
|
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 96
|
Instance Attribute Details
#access_type ⇒ Symbol, ...
How the platform uses the API for this entity: application (default) or
passthrough. Absent under the legacy user-profiles-2026-03-24 beta header.
64 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 64 optional :access_type, enum: -> { Anthropic::Beta::BetaUserProfile::AccessType } |
#created_at ⇒ Time
When this user profile was created, in RFC 3339 format.
18 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 18 required :created_at, Time |
#external_id ⇒ String?
Platform's own identifier for this user. Not enforced unique. Legacy field,
present only under the user-profiles-2026-03-24 and user-profiles-2026-08-18
beta headers; without one of them, the value is
external_user_details.reference_id.
73 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 73 optional :external_id, String, nil?: true |
#external_user_details ⇒ Anthropic::Models::Beta::BetaUserProfileExternalUserDetails?
Details about the entity this profile represents, as the platform states them;
not verified by Anthropic. Every field is present, null until the platform
supplies a value. Absent under the legacy user-profiles-2026-03-24 and
user-profiles-2026-08-18 beta headers, which serve reference_id as the
top-level external_id and, under user-profiles-2026-08-18, onboarded_at as
external_user_onboarded_at.
84 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 84 optional :external_user_details, -> { Anthropic::Beta::BetaUserProfileExternalUserDetails } |
#external_user_onboarded_at ⇒ Time?
When the entity this profile represents opened its account with the platform, as
stated by the platform, in RFC 3339 format (UTC). null until the platform
supplies one. Legacy field, present only under the user-profiles-2026-08-18
beta header; without a legacy header, the value is
external_user_details.onboarded_at.
94 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 94 optional :external_user_onboarded_at, Time, nil?: true |
#id ⇒ String
Unique identifier for this user profile, prefixed uprof_.
12 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 12 required :id, String |
#metadata ⇒ Hash{Symbol=>String}
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
25 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 25 required :metadata, Anthropic::Internal::Type::HashOf[String] |
#name ⇒ String?
Real-world name of the entity this profile represents (company or individual).
For a company the platform resells Claude access to (access_type
passthrough) this is that company's name. null until the platform supplies
one.
34 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 34 required :name, String, nil?: true |
#trust_grants ⇒ Hash{Symbol=>Anthropic::Models::Beta::BetaUserProfileTrustGrant}
Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
41 42 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 41 required :trust_grants, -> { Anthropic::Internal::Type::HashOf[Anthropic::Beta::BetaUserProfileTrustGrant] } |
#type ⇒ Symbol, :user_profile
Object type. Always user_profile.
48 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 48 required :type, const: :user_profile |
#updated_at ⇒ Time
When this user profile was last modified, in RFC 3339 format. It normally also updates shortly after Anthropic gives the profile an approval or withdraws one. Other changes to the statuses that Anthropic reports do not always update it, so read the status itself rather than watching this timestamp.
57 |
# File 'lib/anthropic/models/beta/beta_user_profile.rb', line 57 required :updated_at, Time |
Instance Method Details
#to_hash ⇒ { id: String, created_at: Time, metadata: ::Hash[Symbol, String], name: String?, trust_grants: ::Hash[Symbol, Anthropic::Beta::BetaUserProfileTrustGrant], type: :user_profile, updated_at: Time, access_type: Anthropic::Models::Beta::BetaUserProfile::access_type, external_id: String?, external_user_details: Anthropic::Beta::BetaUserProfileExternalUserDetails, external_user_onboarded_at: Time? }
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'sig/anthropic/models/beta/beta_user_profile.rbs', line 66
def to_hash: -> {
id: String,
created_at: Time,
metadata: ::Hash[Symbol, String],
name: String?,
trust_grants: ::Hash[Symbol, Anthropic::Beta::BetaUserProfileTrustGrant],
type: :user_profile,
updated_at: Time,
access_type: Anthropic::Models::Beta::BetaUserProfile::access_type,
external_id: String?,
external_user_details: Anthropic::Beta::BetaUserProfileExternalUserDetails,
external_user_onboarded_at: Time?
}
|