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

Returns a new instance of ExternalApiTimeoutReservationError.



24646
24647
24648
24649
24650
24651
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24646

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.



24644
24645
24646
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24644

def messages
  @messages
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



24657
24658
24659
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24657

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

#subtype_to_hashObject



24661
24662
24663
24664
24665
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24661

def subtype_to_hash
  {
    :messages => messages
  }
end

#to_jsonObject



24653
24654
24655
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24653

def to_json
  JSON.dump(to_hash)
end