Class: BayonetClient::BayonetResponse
- Inherits:
-
Object
- Object
- BayonetClient::BayonetResponse
- Defined in:
- lib/bayonet_client/response.rb
Instance Attribute Summary collapse
-
#bayonet_fingerprint ⇒ Object
Returns the value of attribute bayonet_fingerprint.
-
#bayonet_tracking_id ⇒ Object
Returns the value of attribute bayonet_tracking_id.
-
#decision ⇒ Object
Returns the value of attribute decision.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#reason_code ⇒ Object
Returns the value of attribute reason_code.
-
#reason_message ⇒ Object
Returns the value of attribute reason_message.
-
#request_body ⇒ Object
Returns the value of attribute request_body.
-
#rules_triggered ⇒ Object
Returns the value of attribute rules_triggered.
Instance Method Summary collapse
-
#initialize(parsed_response) ⇒ BayonetResponse
constructor
A new instance of BayonetResponse.
Constructor Details
#initialize(parsed_response) ⇒ BayonetResponse
Returns a new instance of BayonetResponse.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bayonet_client/response.rb', line 11 def initialize(parsed_response) if parsed_response.key?('rules_triggered') self.rules_triggered = parsed_response['rules_triggered'] end if parsed_response.key?('decision') self.decision = parsed_response['decision'] end if parsed_response.key?('bayonet_tracking_id') self.bayonet_tracking_id = parsed_response['bayonet_tracking_id'] end if parsed_response.key?('payload') self.payload = parsed_response['payload'] end if parsed_response.key?('reason_code') self.reason_code = parsed_response['reason_code'] end if parsed_response.key?('reason_message') self. = parsed_response['reason_message'] end if parsed_response.key?('request_body') self.request_body = parsed_response['request_body'] end if parsed_response.key?('bayonet_fingerprint') self.bayonet_fingerprint = parsed_response['bayonet_fingerprint'] end self.raw = parsed_response end |
Instance Attribute Details
#bayonet_fingerprint ⇒ Object
Returns the value of attribute bayonet_fingerprint.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def bayonet_fingerprint @bayonet_fingerprint end |
#bayonet_tracking_id ⇒ Object
Returns the value of attribute bayonet_tracking_id.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def bayonet_tracking_id @bayonet_tracking_id end |
#decision ⇒ Object
Returns the value of attribute decision.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def decision @decision end |
#payload ⇒ Object
Returns the value of attribute payload.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def payload @payload end |
#raw ⇒ Object
Returns the value of attribute raw.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def raw @raw end |
#reason_code ⇒ Object
Returns the value of attribute reason_code.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def reason_code @reason_code end |
#reason_message ⇒ Object
Returns the value of attribute reason_message.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def end |
#request_body ⇒ Object
Returns the value of attribute request_body.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def request_body @request_body end |
#rules_triggered ⇒ Object
Returns the value of attribute rules_triggered.
6 7 8 |
# File 'lib/bayonet_client/response.rb', line 6 def rules_triggered @rules_triggered end |