Class: PreludeSDK::Resources::VerificationManagement

Inherits:
Object
  • Object
show all
Defined in:
lib/prelude_sdk/resources/verification_management.rb,
lib/prelude_sdk/resources/verification_management/sandbox.rb,
sig/prelude_sdk/resources/verification_management.rbs,
sig/prelude_sdk/resources/verification_management/sandbox.rbs

Overview

Verify phone numbers.

Defined Under Namespace

Classes: Sandbox

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ VerificationManagement

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

Parameters:



140
141
142
143
# File 'lib/prelude_sdk/resources/verification_management.rb', line 140

def initialize(client:)
  @client = client
  @sandbox = PreludeSDK::Resources::VerificationManagement::Sandbox.new(client: client)
end

Instance Attribute Details

#sandbox ⇒ PreludeSDK::Resources::VerificationManagement::Sandbox (readonly)

Verify phone numbers.



9
10
11
# File 'lib/prelude_sdk/resources/verification_management.rb', line 9

def sandbox
  @sandbox
end

Instance Method Details

#delete_phone_number(action, phone_number:, request_options: {}) ⇒ PreludeSDK::Models::VerificationManagementDeletePhoneNumberResponse

Remove a phone number from the allow or block list.

This operation is idempotent - re-deleting the same phone number will not result in errors. If the phone number does not exist in the specified list, the operation will succeed without making any changes.

In order to get access to this endpoint, contact our support team.

Parameters:

Returns:

See Also:



30
31
32
33
34
35
36
37
38
39
# File 'lib/prelude_sdk/resources/verification_management.rb', line 30

def delete_phone_number(action, params)
  parsed, options = PreludeSDK::VerificationManagementDeletePhoneNumberParams.dump_request(params)
  @client.request(
    method: :delete,
    path: ["v2/verification/management/phone-numbers/%1$s", action],
    body: parsed,
    model: PreludeSDK::Models::VerificationManagementDeletePhoneNumberResponse,
    options: options
  )
end

#list_phone_numbers(action, request_options: {}) ⇒ PreludeSDK::Models::VerificationManagementListPhoneNumbersResponse

Retrieve the list of phone numbers in the allow or block list.

In order to get access to this endpoint, contact our support team.

Parameters:

Returns:

See Also:



54
55
56
57
58
59
60
61
# File 'lib/prelude_sdk/resources/verification_management.rb', line 54

def list_phone_numbers(action, params = {})
  @client.request(
    method: :get,
    path: ["v2/verification/management/phone-numbers/%1$s", action],
    model: PreludeSDK::Models::VerificationManagementListPhoneNumbersResponse,
    options: params[:request_options]
  )
end

#list_sender_ids(request_options: {}) ⇒ PreludeSDK::Models::VerificationManagementListSenderIDsResponse

Retrieve sender IDs list.

In order to get access to this endpoint, contact our support team.



74
75
76
77
78
79
80
81
# File 'lib/prelude_sdk/resources/verification_management.rb', line 74

def list_sender_ids(params = {})
  @client.request(
    method: :get,
    path: "v2/verification/management/sender-id",
    model: PreludeSDK::Models::VerificationManagementListSenderIDsResponse,
    options: params[:request_options]
  )
end

#set_phone_number(action, phone_number:, request_options: {}) ⇒ PreludeSDK::Models::VerificationManagementSetPhoneNumberResponse

Add a phone number to the allow or block list.

This operation is idempotent - re-adding the same phone number will not result in duplicate entries or errors. If the phone number already exists in the specified list, the operation will succeed without making any changes.

In order to get access to this endpoint, contact our support team.

Parameters:

Returns:

See Also:



102
103
104
105
106
107
108
109
110
111
# File 'lib/prelude_sdk/resources/verification_management.rb', line 102

def set_phone_number(action, params)
  parsed, options = PreludeSDK::VerificationManagementSetPhoneNumberParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["v2/verification/management/phone-numbers/%1$s", action],
    body: parsed,
    model: PreludeSDK::Models::VerificationManagementSetPhoneNumberResponse,
    options: options
  )
end

#submit_sender_id(sender_id:, request_options: {}) ⇒ PreludeSDK::Models::VerificationManagementSubmitSenderIDResponse

This endpoint allows you to submit a new sender ID for verification purposes.

In order to get access to this endpoint, contact our support team.

Parameters:

Returns:

See Also:



126
127
128
129
130
131
132
133
134
135
# File 'lib/prelude_sdk/resources/verification_management.rb', line 126

def submit_sender_id(params)
  parsed, options = PreludeSDK::VerificationManagementSubmitSenderIDParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v2/verification/management/sender-id",
    body: parsed,
    model: PreludeSDK::Models::VerificationManagementSubmitSenderIDResponse,
    options: options
  )
end