lib/amorail/entity/persistence.rb
# Update response can have status 200 and contain errors.
# In case of errors "update" key in a response is a Hash with "errors" key.
# If there are no errors "update" key is an Array with entities attributes.
Update response can have status 200 and contain errors.
In case of errors "update" key in a response is a Hash with "errors" key.
If there are no errors "update" key is an Array with entities attributes.
Update response can have status 200 and contain errors . In case of errors " update " key in a response is a Hash with " errors " key . If there are no errors " update " key is an Array with entities attributes .
def extract_data_update(response)
      case data = response.fetch('update')
      when Array
        data.first
      when Hash
        merge_errors(data)
        raise(InvalidRecord)
      end
    end
def extract_data_update ( response ) case data = response . fetch ( 'update' ) when Array data . first when Hash merge_errors ( data ) raise ( InvalidRecord ) end end
Update response can have status 200 and contain errors.
Update response can have status 200 and contain errors .
response
<not_specific>