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.
44281 44282 44283 44284 44285 44286 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44281 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.
44279 44280 44281 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44279 def @messages end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
44292 44293 44294 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44292 def copy(incoming={}) GenericReservationError.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
44296 44297 44298 44299 44300 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44296 def subtype_to_hash { :messages => } end |
#to_json ⇒ Object
44288 44289 44290 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 44288 def to_json JSON.dump(to_hash) end |