Class: HaloMspApi::Resources::Quotations

Inherits:
Base
  • Object
show all
Defined in:
lib/halo_msp_api/resources/quotations.rb

Overview

Resource class for Quotations

Instance Attribute Summary

Attributes inherited from Base

#client_instance

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from HaloMspApi::Resources::Base

Instance Method Details

#approval(data) ⇒ Object

POST /Quotation/Approval - Quotation approval



33
34
35
# File 'lib/halo_msp_api/resources/quotations.rb', line 33

def approval(data)
  post(resource_path('Quotation', nil, 'Approval'), data)
end

#create_quotation(data) ⇒ Object

POST /Quotation - Create a new Quotation



18
19
20
# File 'lib/halo_msp_api/resources/quotations.rb', line 18

def create_quotation(data)
  create_resource('Quotation', data)
end

#delete_quotation(id) ⇒ Object

DELETE /Quotation/id - Delete a Quotation



28
29
30
# File 'lib/halo_msp_api/resources/quotations.rb', line 28

def delete_quotation(id)
  delete_resource('Quotation', id)
end

#lines(params = {}) ⇒ Object

GET /Quotation/Lines - Get Quotation lines



38
39
40
# File 'lib/halo_msp_api/resources/quotations.rb', line 38

def lines(params = {})
  get(resource_path('Quotation', nil, 'Lines'), params)
end

#quotation(id, params = {}) ⇒ Object

GET /Quotation/id - Get a specific Quotation



13
14
15
# File 'lib/halo_msp_api/resources/quotations.rb', line 13

def quotation(id, params = {})
  get_resource('Quotation', id, params)
end

#quotations(params = {}) ⇒ Object

GET /Quotation - List of Quotations



8
9
10
# File 'lib/halo_msp_api/resources/quotations.rb', line 8

def quotations(params = {})
  list_resource('Quotation', params)
end

#update_quotation(id, data) ⇒ Object

PUT /Quotation/id - Update a Quotation



23
24
25
# File 'lib/halo_msp_api/resources/quotations.rb', line 23

def update_quotation(id, data)
  update_resource('Quotation', id, data)
end

#view(params = {}) ⇒ Object

GET /Quotation/View - Get Quotation view



43
44
45
# File 'lib/halo_msp_api/resources/quotations.rb', line 43

def view(params = {})
  get(resource_path('Quotation', nil, 'View'), params)
end