Class: PostmanMta::Route

Inherits:
ApplicationModel show all
Defined in:
app/models/postman_mta/route.rb

Instance Method Summary collapse

Instance Method Details

#create(params = {}) ⇒ Object



11
12
13
# File 'app/models/postman_mta/route.rb', line 11

def create(params = {})
  post('/routes', body: params)
end

#destroy(uuid, params = {}) ⇒ Object



15
16
17
# File 'app/models/postman_mta/route.rb', line 15

def destroy(uuid, params = {})
  delete("/routes/#{uuid}", body: params)
end

#indexObject



3
4
5
# File 'app/models/postman_mta/route.rb', line 3

def index
  get('/routes')
end

#update(uuid, params = {}) ⇒ Object



7
8
9
# File 'app/models/postman_mta/route.rb', line 7

def update(uuid, params = {})
  patch("/routes/#{uuid}", body: params)
end