Class: Straddle::Resources::Customers::Review
- Inherits:
-
Object
- Object
- Straddle::Resources::Customers::Review
- Defined in:
- lib/straddle/resources/customers/review.rb,
sig/straddle/resources/customers/review.rbs
Overview
Customers are individuals or businesses that send or receive payments through your integration.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Review
constructor
private
A new instance of Review.
-
#list(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {}) ⇒ Straddle::Models::Customers::CustomerReviewResponse
Returns the results of a customer's identity and fraud review.
-
#set_verification_decision(id, status:, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {}) ⇒ Straddle::Models::CustomerResponse
Some parameter documentations has been truncated, see Models::Customers::ReviewSetVerificationDecisionParams for more details.
Constructor Details
#initialize(client:) ⇒ Review
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 Review.
91 92 93 |
# File 'lib/straddle/resources/customers/review.rb', line 91 def initialize(client:) @client = client end |
Instance Method Details
#list(id, correlation_id: nil, request_id: nil, straddle_account_id: nil, request_options: {}) ⇒ Straddle::Models::Customers::CustomerReviewResponse
Returns the results of a customer's identity and fraud review. The response includes decisions, risk and correlation scores, reason codes, watchlist matches, and network alerts.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/straddle/resources/customers/review.rb', line 28 def list(id, params = {}) parsed, = Straddle::Customers::ReviewListParams.dump_request(params) @client.request( method: :get, path: ["v1/customers/%1$s/review", id], headers: parsed.transform_keys( correlation_id: "correlation-id", request_id: "request-id", straddle_account_id: "straddle-account-id" ), model: Straddle::Customers::CustomerReviewResponse, options: ) end |
#set_verification_decision(id, status:, correlation_id: nil, idempotency_key: nil, request_id: nil, straddle_account_id: nil, request_options: {}) ⇒ Straddle::Models::CustomerResponse
Some parameter documentations has been truncated, see Models::Customers::ReviewSetVerificationDecisionParams for more details.
Updates the verification decision for a customer. The customer's current
status must be review.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/straddle/resources/customers/review.rb', line 70 def set_verification_decision(id, params) parsed, = Straddle::Customers::ReviewSetVerificationDecisionParams.dump_request(params) header_params = { correlation_id: "correlation-id", idempotency_key: "idempotency-key", request_id: "request-id", straddle_account_id: "straddle-account-id" } @client.request( method: :patch, path: ["v1/customers/%1$s/review", id], headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Straddle::CustomerResponse, options: ) end |