Class: CentrumFaktur::API::Estimate

Inherits:
Base
  • Object
show all
Defined in:
lib/centrum_faktur/api/estimate.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from CentrumFaktur::API::Base

Instance Method Details

#create(params) ⇒ Object



20
21
22
23
# File 'lib/centrum_faktur/api/estimate.rb', line 20

def create(params)
  request = connection.post("/api/1.0/estimates/", params)
  request.handle_response
end

#destroy(estimate_uri) ⇒ Object



30
31
32
33
# File 'lib/centrum_faktur/api/estimate.rb', line 30

def destroy(estimate_uri)
  request = connection.delete(estimate_uri)
  request.handle_response
end

#list(options = {}) ⇒ Object



5
6
7
8
# File 'lib/centrum_faktur/api/estimate.rb', line 5

def list(options = {})
  request = connection.get("/api/1.0/estimates/", options)
  request.handle_response
end

#list_updates(options = {}) ⇒ Object



10
11
12
13
# File 'lib/centrum_faktur/api/estimate.rb', line 10

def list_updates(options = {})
  request = connection.get("/api/1.0/estimates/updates/", options)
  request.handle_response
end

#show(estimate_uri, options = {}) ⇒ Object



15
16
17
18
# File 'lib/centrum_faktur/api/estimate.rb', line 15

def show(estimate_uri, options = {})
  request = connection.get(estimate_uri, options)
  request.handle_response
end

#update(estimate_uri, params) ⇒ Object



25
26
27
28
# File 'lib/centrum_faktur/api/estimate.rb', line 25

def update(estimate_uri, params)
  request = connection.put(estimate_uri, params)
  request.handle_response
end