Class: MethodRuby::Resources::Accounts::VerificationSessions
- Inherits:
-
Object
- Object
- MethodRuby::Resources::Accounts::VerificationSessions
- Defined in:
- lib/method_ruby/resources/accounts/verification_sessions.rb,
lib/method_ruby/resources/accounts/verification_sessions/amounts.rb
Overview
Verification sessions for accounts
Defined Under Namespace
Classes: Amounts
Instance Attribute Summary collapse
-
#amounts ⇒ MethodRuby::Resources::Accounts::VerificationSessions::Amounts
readonly
Verification sessions for accounts.
Instance Method Summary collapse
-
#create(account_id, type:, method_version:, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionCreateResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionCreateParams for more details.
-
#initialize(client:) ⇒ VerificationSessions
constructor
private
A new instance of VerificationSessions.
-
#list(account_id, method_version:, page: nil, page_cursor: nil, page_limit: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionListResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionListParams for more details.
-
#retrieve(avf_id, account_id:, method_version:, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionRetrieveResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionRetrieveParams for more details.
-
#update(avf_id, account_id:, method_version:, instant: nil, micro_deposits: nil, mx: nil, network: nil, plaid: nil, pre_auth: nil, standard: nil, teller: nil, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionUpdateResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ VerificationSessions
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 VerificationSessions.
178 179 180 181 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 178 def initialize(client:) @client = client @amounts = MethodRuby::Resources::Accounts::VerificationSessions::Amounts.new(client: client) end |
Instance Attribute Details
#amounts ⇒ MethodRuby::Resources::Accounts::VerificationSessions::Amounts (readonly)
Verification sessions for accounts
10 11 12 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 10 def amounts @amounts end |
Instance Method Details
#create(account_id, type:, method_version:, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionCreateResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionCreateParams for more details.
Creates a new verification session for the specified account.
33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 33 def create(account_id, params) parsed, = MethodRuby::Accounts::VerificationSessionCreateParams.dump_request(params) header_params = {method_version: "method-version", idempotency_key: "idempotency-key"} @client.request( method: :post, path: ["accounts/%1$s/verification_sessions", account_id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: MethodRuby::Models::Accounts::VerificationSessionCreateResponse, security: {secret_key: true}, options: ) end |
#list(account_id, method_version:, page: nil, page_cursor: nil, page_limit: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionListResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionListParams for more details.
Returns a list of verification sessions for the specified account.
160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 160 def list(account_id, params) query_params = [:page, :page_cursor, :page_limit] parsed, = MethodRuby::Accounts::VerificationSessionListParams.dump_request(params) query = MethodRuby::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["accounts/%1$s/verification_sessions", account_id], query: query, headers: parsed.except(*query_params).transform_keys(method_version: "method-version"), model: MethodRuby::Models::Accounts::VerificationSessionListResponse, security: {secret_key: true}, options: ) end |
#retrieve(avf_id, account_id:, method_version:, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionRetrieveResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionRetrieveParams for more details.
Retrieves an account verification session by its unique identifier.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 66 def retrieve(avf_id, params) parsed, = MethodRuby::Accounts::VerificationSessionRetrieveParams.dump_request(params) account_id = parsed.delete(:account_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["accounts/%1$s/verification_sessions/%2$s", account_id, avf_id], headers: parsed.transform_keys(method_version: "method-version"), model: MethodRuby::Models::Accounts::VerificationSessionRetrieveResponse, security: {secret_key: true}, options: ) end |
#update(avf_id, account_id:, method_version:, instant: nil, micro_deposits: nil, mx: nil, network: nil, plaid: nil, pre_auth: nil, standard: nil, teller: nil, idempotency_key: nil, request_options: {}) ⇒ MethodRuby::Models::Accounts::VerificationSessionUpdateResponse
Some parameter documentations has been truncated, see Models::Accounts::VerificationSessionUpdateParams for more details.
Updates an account verification session, typically to submit micro deposit amounts for verification.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/method_ruby/resources/accounts/verification_sessions.rb', line 120 def update(avf_id, params) parsed, = MethodRuby::Accounts::VerificationSessionUpdateParams.dump_request(params) account_id = parsed.delete(:account_id) do raise ArgumentError.new("missing required path argument #{_1}") end header_params = {method_version: "method-version", idempotency_key: "idempotency-key"} @client.request( method: :put, path: ["accounts/%1$s/verification_sessions/%2$s", account_id, avf_id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: MethodRuby::Models::Accounts::VerificationSessionUpdateResponse, security: {secret_key: true}, options: ) end |