Class: Io::Flow::V0::Models::GenericReservationError
- Inherits:
-
ReservationError
- Object
- ReservationError
- Io::Flow::V0::Models::GenericReservationError
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Attributes inherited from ReservationError
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ GenericReservationError
constructor
A new instance of GenericReservationError.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ReservationError
Constructor Details
#initialize(incoming = {}) ⇒ GenericReservationError
Returns a new instance of GenericReservationError.
32977 32978 32979 32980 32981 32982 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32977 def initialize(incoming={}) super(:code => ReservationError::Types::GENERIC_RESERVATION_ERROR) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericReservationError') = HttpClient::Preconditions.assert_class('messages', opts.delete(:messages), Array).map { |v| HttpClient::Preconditions.assert_class('messages', v, String) } end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
32975 32976 32977 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32975 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
32988 32989 32990 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32988 def copy(incoming={}) GenericReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
32992 32993 32994 32995 32996 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32992 def subtype_to_hash { :messages => } end |
#to_json ⇒ Object
32984 32985 32986 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 32984 def to_json JSON.dump(to_hash) end |