Class: VAProfile::ContactInformation::TelephoneTransactionResponse

Inherits:
TransactionResponse show all
Defined in:
lib/va_profile/contact_information/transaction_response.rb

Constant Summary

Constants inherited from TransactionResponse

VAProfile::ContactInformation::TransactionResponse::ERROR_STATUS

Constants included from Common::Client::Concerns::ServiceStatus

Common::Client::Concerns::ServiceStatus::RESPONSE_STATUS

Instance Attribute Summary

Attributes inherited from TransactionResponse

#response_body

Attributes inherited from Common::Base

#errors_hash, #metadata

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TransactionResponse

error?

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata

Methods inherited from Response

#cache?, #initialize, #metadata, #ok?, #response_status

Methods inherited from Common::Base

#changed, #changed?, #changes, default_sort, filterable_attributes, #initialize, max_per_page, per_page, sortable_attributes

Constructor Details

This class inherits a constructor from VAProfile::Response

Class Method Details

.from(*args) ⇒ Object



144
145
146
147
148
149
# File 'lib/va_profile/contact_information/transaction_response.rb', line 144

def self.from(*args)
  return_val = super

  return_val.response_body = @response_body
  return_val
end

Instance Method Details

#changed_fieldObject



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/va_profile/contact_information/transaction_response.rb', line 151

def changed_field
  return :phone unless response_body['tx_output']

  phone_type = response_body['tx_output'][0]['phone_type']

  case phone_type
  when 'MOBILE'
    :mobile_phone
  when 'HOME'
    :home_phone
  when 'WORK'
    :work_phone
  else
    :phone
  end
end