def update(new_attributes)
      existing_attributes = { good_till_date: good_till_date, level: order_level, limit_distance: limit_distance,
                              stop_distance: stop_distance, time_in_force: time_in_force, type: order_type }

      model = WorkingOrderUpdateAttributes.new existing_attributes, new_attributes
      model.validate

      body = RequestBodyFormatter.format model

      @dealing_platform.session.put("workingorders/otc/#{deal_id}", body, API_V2).fetch(:deal_reference)
    end
def update(new_attributes)
      existing_attributes = { good_till_date: good_till_date, level: order_level, limit_distance: limit_distance,
                              stop_distance: stop_distance, time_in_force: time_in_force, type: order_type }

      model = WorkingOrderUpdateAttributes.new existing_attributes, new_attributes
      model.validate

      body = RequestBodyFormatter.format model

      @dealing_platform.session.put("workingorders/otc/#{deal_id}", body, API_V2).fetch(:deal_reference)
    end
Updates this working order. No attributes are mandatory, and any attributes not specified will be kept at their
 current values.

 @param [Hash] new_attributes The attributes of this working order to update. See
        {DealingPlatform::WorkingOrderMethods#create} for a description of the attributes.
 @option new_attributes [Time] :good_till_date
 @option new_attributes [Float] :level
 @option new_attributes [Integer] :limit_distance
 @option new_attributes [Float] :limit_level
 @option new_attributes [Integer] :stop_distance
 @option new_attributes [Float] :stop_level
 @option new_attributes [:limit, :stop] :type

 @return [String] The deal reference of the update operation. Use {DealingPlatform#deal_confirmation} to check
         the result of the working order update.