lib/teachable_api/user.rb
# Destroys the given order so that it is no longer associated with this
# user.
#
# Requires authentication.
Destroys the given order so that it is no longer associated with this
user.

Requires authentication.
Destroys the given order so that it is no longer associated with this user . Requires authentication .
def remove_order(order)
      resp = API.connection.delete "api/orders/#{order.id}", {
        user_email: @email,
        user_token: @token
      }
      case resp.status
      when 204
        order
      when 401
        raise Teachable::AuthError, resp.body['error']
      when 404
        nil
      else
        raise Teachable::Error, 'Unknown response.'
      end
    end
def remove_order ( order ) resp = API . connection . delete "api/orders/#{order.id}" , { user_email : @email , user_token : @token } case resp . status when 204 order when 401 raise Teachable :: AuthError , resp . body [ 'error' ] when 404 nil else raise Teachable :: Error , 'Unknown response.' end end
Destroys the given order so that it is no longer associated with this
user.
Destroys the given order so that it is no longer associated with this user .
order
<not_specific>