Class: PreludeSDK::Resources::Verification
- Inherits:
-
Object
- Object
- PreludeSDK::Resources::Verification
- Defined in:
- lib/prelude_sdk/resources/verification.rb
Overview
Verify phone numbers.
Instance Method Summary collapse
-
#check(code:, target:, request_options: {}) ⇒ PreludeSDK::Models::VerificationCheckResponse
Some parameter documentations has been truncated, see Models::VerificationCheckParams for more details.
-
#create(target:, dispatch_id: nil, metadata: nil, options: nil, signals: nil, request_options: {}) ⇒ PreludeSDK::Models::VerificationCreateResponse
Some parameter documentations has been truncated, see Models::VerificationCreateParams for more details.
-
#initialize(client:) ⇒ Verification
constructor
private
A new instance of Verification.
Constructor Details
#initialize(client:) ⇒ Verification
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 Verification.
72 73 74 |
# File 'lib/prelude_sdk/resources/verification.rb', line 72 def initialize(client:) @client = client end |
Instance Method Details
#check(code:, target:, request_options: {}) ⇒ PreludeSDK::Models::VerificationCheckResponse
Some parameter documentations has been truncated, see Models::VerificationCheckParams for more details.
Check the validity of a verification code.
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/prelude_sdk/resources/verification.rb', line 58 def check(params) parsed, = PreludeSDK::VerificationCheckParams.dump_request(params) @client.request( method: :post, path: "v2/verification/check", body: parsed, model: PreludeSDK::Models::VerificationCheckResponse, options: ) end |
#create(target:, dispatch_id: nil, metadata: nil, options: nil, signals: nil, request_options: {}) ⇒ PreludeSDK::Models::VerificationCreateResponse
Some parameter documentations has been truncated, see Models::VerificationCreateParams for more details.
Create a new verification for a specific phone number. If another non-expired verification exists (the request is performed within the verification window), this endpoint will perform a retry instead.
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/prelude_sdk/resources/verification.rb', line 31 def create(params) parsed, = PreludeSDK::VerificationCreateParams.dump_request(params) @client.request( method: :post, path: "v2/verification", body: parsed, model: PreludeSDK::Models::VerificationCreateResponse, options: ) end |