Class: Anthropic::Resources::UserProfiles::ActionURLs

Inherits:
Object
  • Object
show all
Defined in:
lib/anthropic/resources/user_profiles/action_urls.rb,
sig/anthropic/resources/user_profiles/action_urls.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ActionURLs

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 ActionURLs.

Parameters:



48
49
50
# File 'lib/anthropic/resources/user_profiles/action_urls.rb', line 48

def initialize(client:)
  @client = client
end

Instance Method Details

#create(user_profile_id, action:, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::UserProfiles::UserProfileActionURL

Create a link that sends the profile's end customer to the Verification Portal.

See Send an end customer a link to the Verification Portal for when to create the link and what the end customer sees.

Some parameter documentations has been truncated, see Models::UserProfiles::ActionURLCreateParams for more details.

Parameters:

  • user_profile_id (String) —

    Path param: The ID of the user profile the action is for (uprof_...).

  • action (Anthropic::Models::UserProfiles::UserProfileEnrollEndUserAction) —

    Body param: The action that the person who opens the URL takes.

  • workspace_id (String) —

    Header param: Optional header to select the Workspace for this request. The valu

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)
  • action: (Anthropic::UserProfiles::UserProfileEnrollEndUserAction)
  • workspace_id: (String)
  • request_options: (Anthropic::request_opts)

Returns:

See Also:



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/anthropic/resources/user_profiles/action_urls.rb', line 29

def create(, params)
  parsed, options = Anthropic::UserProfiles::ActionURLCreateParams.dump_request(params)
  header_params = {workspace_id: "anthropic-workspace-id"}
  @client.request(
    span_name: Anthropic::Internal::Tracing::SpanName::USER_PROFILES_ACTION_URLS_CREATE,
    span_attributes: {"anthropic.user_profile.id" => },
    span_route: "/v1/user_profiles/{user_profile_id}/action_urls",
    method: :post,
    path: ["v1/user_profiles/%1$s/action_urls", ],
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Anthropic::UserProfiles::UserProfileActionURL,
    options: options
  )
end