Class: Io::Flow::V0::Models::ExternalApiTimeoutReservationError

Inherits:
ReservationError
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from ReservationError

#code

Instance Method Summary collapse

Methods inherited from ReservationError

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ ExternalApiTimeoutReservationError



30325
30326
30327
30328
30329
30330
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30325

def initialize(incoming={})
  super(:code => ReservationError::Types::EXTERNAL_API_TIMEOUT_RESERVATION_ERROR)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:messages], 'ExternalApiTimeoutReservationError')
  @messages = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) }
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages.



30323
30324
30325
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30323

def messages
  @messages
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30336
30337
30338
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30336

def copy(incoming={})
  ExternalApiTimeoutReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



30340
30341
30342
30343
30344
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30340

def subtype_to_hash
  {
    :messages => messages
  }
end

#to_jsonObject



30332
30333
30334
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30332

def to_json
  JSON.dump(to_hash)
end