Class: EVSS::PCIU::EmailAddressResponse
- Inherits:
-
Response
- Object
- Common::Base
- Response
- EVSS::PCIU::EmailAddressResponse
- Defined in:
- lib/evss/pciu/email_address_response.rb
Overview
Model for PCIU email address response
Constant Summary
Constants included from Common::Client::Concerns::ServiceStatus
Common::Client::Concerns::ServiceStatus::RESPONSE_STATUS
Instance Attribute Summary collapse
-
#effective_at ⇒ String
Date the email address was known to be valid.
-
#email ⇒ String
Email address returned by the service.
Attributes inherited from Common::Base
Instance Method Summary collapse
-
#initialize(status, response = nil) ⇒ EmailAddressResponse
constructor
A new instance of EmailAddressResponse.
Methods inherited from Response
#cache?, #metadata, #ok?, #response_status
Methods inherited from Common::Base
#changed, #changed?, #changes, default_sort, filterable_attributes, max_per_page, per_page, sortable_attributes
Constructor Details
#initialize(status, response = nil) ⇒ EmailAddressResponse
Returns a new instance of EmailAddressResponse.
22 23 24 25 26 27 28 29 |
# File 'lib/evss/pciu/email_address_response.rb', line 22 def initialize(status, response = nil) attributes = { email: response&.body&.dig('cnp_email_address', 'value'), effective_at: response&.body&.dig('cnp_email_address', 'effective_date') } super(status, attributes) end |
Instance Attribute Details
#effective_at ⇒ String
Returns Date the email address was known to be valid.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/evss/pciu/email_address_response.rb', line 18 class EmailAddressResponse < EVSS::Response attribute :email, String attribute :effective_at, String def initialize(status, response = nil) attributes = { email: response&.body&.dig('cnp_email_address', 'value'), effective_at: response&.body&.dig('cnp_email_address', 'effective_date') } super(status, attributes) end end |
#email ⇒ String
Returns Email address returned by the service.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/evss/pciu/email_address_response.rb', line 18 class EmailAddressResponse < EVSS::Response attribute :email, String attribute :effective_at, String def initialize(status, response = nil) attributes = { email: response&.body&.dig('cnp_email_address', 'value'), effective_at: response&.body&.dig('cnp_email_address', 'effective_date') } super(status, attributes) end end |