Sha256: dee14be15e971f10735cfc9fd0b97e075b19058566c7f43d6cd49cacd11cbe9c

Contents?: true

Size: 853 Bytes

Versions: 1

Compression:

Stored size: 853 Bytes

Contents

class Apitool::Client::Vpn < Apitool::Client::ApitoolClient

  def index
    get('/vpns') do |response, request, result|
      if response.code == 200
        parse(response)
      else
        nil
      end
    end
  end

  def show(uuid)
    get("/vpns/#{uuid}") do |response|
      if response.code == 200
        parse(response)
      else
        nil
      end
    end
  end

  # {
  #   uuid: "some unique identifier",
  #   identifier: "email@domain.com"
  # }
  def create(options = {})
    parameters = {
      vpn: options
    }
    post("/vpns", parameters) do |response|
      if response.code == 200
        parse(response)
      else
        nil
      end
    end
  end

  def destroy(uuid)
    delete("/vpns/#{uuid}") do |response|
      if response.code == 200
        parse(response)
      else
        nil
      end
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apitool-client-2.0.0 lib/apitool/client/vpn.rb