Class: WhopSDK::Resources::Verifications

Inherits:
Object
  • Object
show all
Defined in:
lib/whop_sdk/resources/verifications.rb,
sig/whop_sdk/resources/verifications.rbs

Overview

A Verification represents an identity review for a person or business. Accounts and users complete verification when Whop needs to confirm who they are before enabling payouts or compliance-sensitive workflows.

Use the Verifications API to start or resume a hosted verification session, check review status, and submit requested details or documents. If requested_information contains items, submit answers with Update Verification.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Verifications

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

Parameters:



132
133
134
# File 'lib/whop_sdk/resources/verifications.rb', line 132

def initialize(client:)
  @client = client
end

Instance Method Details

#create(account_id:, body:, request_options: {}) ⇒ WhopSDK::Models::VerificationCreateResponse

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

Starts a hosted verification session for an account or user, or returns the active session when one already exists. Any fields you include in the request body are used to prefill the session. Send documents (with document_type) to instead verify the person from identity documents included in this request — no hosted session involved. If the account already has an approved verification the request is rejected; unlink it first to start a new one.

Parameters:

Returns:

See Also:



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/whop_sdk/resources/verifications.rb', line 35

def create(params)
  parsed, options = WhopSDK::VerificationCreateParams.dump_request(params)
  query = WhopSDK::Internal::Util.encode_query_params(parsed.except(:body))
  @client.request(
    method: :post,
    path: "verifications",
    query: query,
    body: parsed[:body],
    model: WhopSDK::Models::VerificationCreateResponse,
    options: options
  )
end

#list(account_id:, direction: nil, order: nil, request_options: {}) ⇒ WhopSDK::Models::VerificationListResponse

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

Returns verifications for an account, including their status and any required actions.

Parameters:

Returns:

See Also:



117
118
119
120
121
122
123
124
125
126
127
# File 'lib/whop_sdk/resources/verifications.rb', line 117

def list(params)
  parsed, options = WhopSDK::VerificationListParams.dump_request(params)
  query = WhopSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "verifications",
    query: query,
    model: WhopSDK::Models::VerificationListResponse,
    options: options
  )
end

#retrieve(verification_id, request_options: {}) ⇒ WhopSDK::Models::VerificationRetrieveResponse

Returns verifications for an account, including their status and any required actions.

Parameters:

  • verification_id (String)

    Verification profile ID, prefixed idpf_.

  • request_options (WhopSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



60
61
62
63
64
65
66
67
# File 'lib/whop_sdk/resources/verifications.rb', line 60

def retrieve(verification_id, params = {})
  @client.request(
    method: :get,
    path: ["verifications/%1$s", verification_id],
    model: WhopSDK::Models::VerificationRetrieveResponse,
    options: params[:request_options]
  )
end

#update(verification_id, body:, request_options: {}) ⇒ WhopSDK::Models::VerificationUpdateResponse

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

Updates editable profile details or submits answers for items returned in requested_information. Once a verification is approved its profile details are locked and can no longer be edited.

Parameters:

Returns:

See Also:



87
88
89
90
91
92
93
94
95
96
# File 'lib/whop_sdk/resources/verifications.rb', line 87

def update(verification_id, params)
  parsed, options = WhopSDK::VerificationUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["verifications/%1$s", verification_id],
    body: parsed[:body],
    model: WhopSDK::Models::VerificationUpdateResponse,
    options: options
  )
end