Class: Workarea::FlowIo::BogusClient::Orders
- Inherits:
-
Object
- Object
- Workarea::FlowIo::BogusClient::Orders
- Defined in:
- lib/workarea/flow_io/bogus_client/orders.rb
Defined Under Namespace
Classes: OrderResponse
Instance Method Summary collapse
Instance Method Details
#put_by_number(_organization_id, number, order_put_form, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/workarea/flow_io/bogus_client/orders.rb', line 5 def put_by_number(_organization_id, number, order_put_form, = {}) if order_put_form.items.empty? raise ::Io::Flow::V0::HttpClient::ServerError.new( 422, "Unprocessable Entity", body: "{\"code\":\"generic_error\",\"messages\":[\"Must have at least 1 item to create an order\"]}" ) else OrderResponse.new(number, order_put_form, ).flow_model end end |