def update(loss_reason)
      validate_type!(loss_reason)
      params = extract_params!(loss_reason, :id)
      id = params[:id]

      attributes = sanitize(loss_reason)
      _, _, root = @client.put("/loss_reasons/#{id}", attributes)

      LossReason.new(root[:data])
    end
def update(loss_reason)
      validate_type!(loss_reason)
      params = extract_params!(loss_reason, :id)
      id = params[:id]

      attributes = sanitize(loss_reason)
      _, _, root = @client.put("/loss_reasons/#{id}", attributes)

      LossReason.new(root[:data])
    end
Update a loss reason

 put '/loss_reasons/{id}'

 Updates a loss reason information
 If the specified loss reason does not exist, the request will return an error
 <figure class="notice">
 If you want to update loss reason you **must** make sure name of the reason is unique
 </figure>

 @param loss_reason [LossReason, Hash] Either object of the LossReason type or Hash. This object's attributes describe the object to be updated.
 @return [LossReason] The resulting object represting updated resource.