Class: Apitool::Client::Vpn
- Inherits:
-
ApitoolClient
- Object
- ApitoolClient
- Apitool::Client::Vpn
- Defined in:
- lib/apitool/client/vpn.rb
Instance Method Summary collapse
-
#create(options = {}) ⇒ Object
{ uuid: “some unique identifier”, identifier: “[email protected]” }.
- #destroy(uuid) ⇒ Object
- #index ⇒ Object
- #show(uuid) ⇒ Object
Methods inherited from ApitoolClient
#errors, #initialize, #request, #response, #result
Constructor Details
This class inherits a constructor from Apitool::Client::ApitoolClient
Instance Method Details
#create(options = {}) ⇒ Object
uuid: "some unique identifier",
identifier: "[email protected]"
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/apitool/client/vpn.rb', line 27 def create( = {}) parameters = { vpn: } post("/vpns", parameters) do |response| if response.code == 200 parse(response) else nil end end end |
#destroy(uuid) ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/apitool/client/vpn.rb', line 40 def destroy(uuid) delete("/vpns/#{uuid}") do |response| if response.code == 200 parse(response) else nil end end end |
#index ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/apitool/client/vpn.rb', line 3 def index get('/vpns') do |response, request, result| if response.code == 200 parse(response) else nil end end end |
#show(uuid) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/apitool/client/vpn.rb', line 13 def show(uuid) get("/vpns/#{uuid}") do |response| if response.code == 200 parse(response) else nil end end end |