Class: Yardi::Validator::FaultResponse
- Defined in:
- lib/yardi/validator/fault_response.rb
Overview
Ensure that the response has no Fault nodes
Instance Method Summary collapse
-
#initialize(action:, parsed_response:, params:) ⇒ FaultResponse
constructor
A new instance of FaultResponse.
- #validate! ⇒ Object
Methods inherited from Base
#import_resident_id, #parse_date, #pms_prospect_request_params, #pms_resident_request_params, #remote_id, #send_pms_prospect_event, #send_pms_resident_event
Constructor Details
#initialize(action:, parsed_response:, params:) ⇒ FaultResponse
Returns a new instance of FaultResponse.
10 11 12 13 14 |
# File 'lib/yardi/validator/fault_response.rb', line 10 def initialize(action:, parsed_response:, params:) @action = action @response = parsed_response @params = params end |
Instance Method Details
#validate! ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/yardi/validator/fault_response.rb', line 17 def validate! return unless error? case action when 'GetResidents' send_pms_resident_event(lease: nil, resident_type: 'PRIMARY', params: params, error_message: ) when 'GetYardiGuestActivity_Search' send_pms_prospect_event(params: params, error_message: ) end raise Error::FaultResponse, end |