Class: Anthropic::Resources::Beta::UserProfiles
- Inherits:
-
Object
- Object
- Anthropic::Resources::Beta::UserProfiles
- Defined in:
- lib/anthropic/resources/beta/user_profiles.rb,
sig/anthropic/resources/beta/user_profiles.rbs
Instance Method Summary collapse
-
#create(access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, metadata: nil, name: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Create User Profile.
-
#create_enrollment_url(user_profile_id, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfileEnrollmentURL
Create Enrollment URL.
-
#initialize(client:) ⇒ UserProfiles
constructor
private
A new instance of UserProfiles.
-
#list(limit: nil, order: nil, order_by: nil, page: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaUserProfile>
List User Profiles.
-
#retrieve(user_profile_id, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Get User Profile.
-
#update(user_profile_id, access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, metadata: nil, name: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Update User Profile.
Constructor Details
#initialize(client:) ⇒ UserProfiles
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of UserProfiles.
195 196 197 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 195 def initialize(client:) @client = client end |
Instance Method Details
#create(access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, metadata: nil, name: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Create User Profile
Some parameter documentations has been truncated, see Models::Beta::UserProfileCreateParams for more details.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 35 def create(params = {}) parsed, = Anthropic::Beta::UserProfileCreateParams.dump_request(params) header_params = {betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"} @client.request( method: :post, path: "v1/user_profiles?beta=true", headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Anthropic::Beta::BetaUserProfile, options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **} ) end |
#create_enrollment_url(user_profile_id, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfileEnrollmentURL
Create Enrollment URL
Some parameter documentations has been truncated, see Models::Beta::UserProfileCreateEnrollmentURLParams for more details.
181 182 183 184 185 186 187 188 189 190 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 181 def create_enrollment_url(user_profile_id, params = {}) parsed, = Anthropic::Beta::UserProfileCreateEnrollmentURLParams.dump_request(params) @client.request( method: :post, path: ["v1/user_profiles/%1$s/enrollment_url?beta=true", user_profile_id], headers: parsed.transform_keys(betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"), model: Anthropic::Beta::BetaUserProfileEnrollmentURL, options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **} ) end |
#list(limit: nil, order: nil, order_by: nil, page: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaUserProfile>
List User Profiles
Some parameter documentations has been truncated, see Models::Beta::UserProfileListParams for more details.
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 144 def list(params = {}) query_params = [:limit, :order, :order_by, :page] parsed, = Anthropic::Beta::UserProfileListParams.dump_request(params) query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: "v1/user_profiles?beta=true", query: query, headers: parsed.except(*query_params).transform_keys( betas: "anthropic-beta", workspace_id: "anthropic-workspace-id" ), page: Anthropic::Internal::PageCursor, model: Anthropic::Beta::BetaUserProfile, options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **} ) end |
#retrieve(user_profile_id, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Get User Profile
Some parameter documentations has been truncated, see Models::Beta::UserProfileRetrieveParams for more details.
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 66 def retrieve(user_profile_id, params = {}) parsed, = Anthropic::Beta::UserProfileRetrieveParams.dump_request(params) @client.request( method: :get, path: ["v1/user_profiles/%1$s?beta=true", user_profile_id], headers: parsed.transform_keys(betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"), model: Anthropic::Beta::BetaUserProfile, options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **} ) end |
#update(user_profile_id, access_type: nil, external_id: nil, external_user_details: nil, external_user_onboarded_at: nil, metadata: nil, name: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaUserProfile
Update User Profile
Some parameter documentations has been truncated, see Models::Beta::UserProfileUpdateParams for more details.
107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/anthropic/resources/beta/user_profiles.rb', line 107 def update(user_profile_id, params = {}) parsed, = Anthropic::Beta::UserProfileUpdateParams.dump_request(params) header_params = {betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"} @client.request( method: :post, path: ["v1/user_profiles/%1$s?beta=true", user_profile_id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Anthropic::Beta::BetaUserProfile, options: {extra_headers: {"anthropic-beta" => "user-profiles-2026-08-18"}, **} ) end |