Class: PreludeSDK::Resources::VerificationManagement

Inherits:
Object
  • Object
show all
Defined in:
lib/prelude_sdk/resources/verification_management.rb

Overview

Verify phone numbers.

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:



136
137
138
# File 'lib/prelude_sdk/resources/verification_management.rb', line 136

def initialize(client:)
  @client = client
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:



26
27
28
29
30
31
32
33
34
35
# File 'lib/prelude_sdk/resources/verification_management.rb', line 26

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:



50
51
52
53
54
55
56
57
# File 'lib/prelude_sdk/resources/verification_management.rb', line 50

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.



70
71
72
73
74
75
76
77
# File 'lib/prelude_sdk/resources/verification_management.rb', line 70

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:



98
99
100
101
102
103
104
105
106
107
# File 'lib/prelude_sdk/resources/verification_management.rb', line 98

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:



122
123
124
125
126
127
128
129
130
131
# File 'lib/prelude_sdk/resources/verification_management.rb', line 122

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