Class: VerifyVspClient::RedactedResponse
- Inherits:
-
Object
- Object
- VerifyVspClient::RedactedResponse
- Defined in:
- lib/verify_vsp_client/redacted_response.rb
Overview
Used to report a response from Verify without revealing any Personally Identifiable Information by replacing any string “values” with the “X” character. For example:
VerifyVspClient::RedactedResponse.new({"value" => "Secret"}).parameters
=> {"value" => "XXXXXX"}
Constant Summary collapse
- KEYS_TO_REDACT =
%w[value postCode from].freeze
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#initialize(parameters) ⇒ RedactedResponse
constructor
A new instance of RedactedResponse.
Constructor Details
#initialize(parameters) ⇒ RedactedResponse
Returns a new instance of RedactedResponse.
14 15 16 |
# File 'lib/verify_vsp_client/redacted_response.rb', line 14 def initialize(parameters) @parameters = redact_values(parameters.deep_dup) end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
12 13 14 |
# File 'lib/verify_vsp_client/redacted_response.rb', line 12 def parameters @parameters end |