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.
34307 34308 34309 34310 34311 34312 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34307 def initialize(incoming={}) super(:code => ReservationError::Types::GENERIC_RESERVATION_ERROR) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:messages], 'GenericReservationError') @messages = 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.
34305 34306 34307 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34305 def @messages end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
34318 34319 34320 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34318 def copy(incoming={}) GenericReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
34322 34323 34324 34325 34326 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34322 def subtype_to_hash { :messages => } end |
#to_json ⇒ Object
34314 34315 34316 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34314 def to_json JSON.dump(to_hash) end |