Class: PreludeSDK::Resources::Verification::Phone::History
- Inherits:
-
Object
- Object
- PreludeSDK::Resources::Verification::Phone::History
- Defined in:
- lib/prelude_sdk/resources/verification/phone/history.rb,
sig/prelude_sdk/resources/verification/phone/history.rbs
Overview
Verify phone numbers.
Instance Method Summary collapse
-
#initialize(client:) ⇒ History
constructor
private
A new instance of History.
-
#list(channels: nil, cursor: nil, device_platform: nil, from: nil, limit: nil, max_attempts: nil, min_attempts: nil, phone_number: nil, region: nil, status: nil, template_id: nil, to: nil, request_options: {}) ⇒ PreludeSDK::Models::Verification::Phone::HistoryListResponse
Some parameter documentations has been truncated, see Models::Verification::Phone::HistoryListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse
Retrieve everything Prelude recorded for one phone verification: its outcome and the device, network and anti-fraud context it was created in, the chronological timeline of every message attempt and code check, and the anti-fraud signals you forwarded.
Constructor Details
#initialize(client:) ⇒ History
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 History.
97 98 99 |
# File 'lib/prelude_sdk/resources/verification/phone/history.rb', line 97 def initialize(client:) @client = client end |
Instance Method Details
#list(channels: nil, cursor: nil, device_platform: nil, from: nil, limit: nil, max_attempts: nil, min_attempts: nil, phone_number: nil, region: nil, status: nil, template_id: nil, to: nil, request_options: {}) ⇒ PreludeSDK::Models::Verification::Phone::HistoryListResponse
Some parameter documentations has been truncated, see Models::Verification::Phone::HistoryListParams for more details.
List your phone verifications, most recent first, one entry per verification with its outcome, channels, attempts and cost. Every filter is optional and they combine with AND.
Use it to find every verification a phone number went through from your support
tooling, then
Get a phone verification
for the full timeline of one of them. A cursor is bound to the filters that
produced it: pass next_cursor back with the exact same query parameters.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/prelude_sdk/resources/verification/phone/history.rb', line 82 def list(params = {}) parsed, = PreludeSDK::Verification::Phone::HistoryListParams.dump_request(params) query = PreludeSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "v2/verification/phone/history", query: query, model: PreludeSDK::Models::Verification::Phone::HistoryListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse
Retrieve everything Prelude recorded for one phone verification: its outcome and the device, network and anti-fraud context it was created in, the chronological timeline of every message attempt and code check, and the anti-fraud signals you forwarded.
The identifier is the id returned by
Create or retry a verification
or the verification_id of the verification webhooks. Both lifecycle and
signals are optional: a verification can resolve with its top-level fields
alone.
29 30 31 32 33 34 35 36 |
# File 'lib/prelude_sdk/resources/verification/phone/history.rb', line 29 def retrieve(id, params = {}) @client.request( method: :get, path: ["v2/verification/phone/history/%1$s", id], model: PreludeSDK::Models::Verification::Phone::HistoryRetrieveResponse, options: params[:request_options] ) end |