Class: ShedCloud::PartnerApi::Resources::Quotes
- Inherits:
-
Base
- Object
- Base
- ShedCloud::PartnerApi::Resources::Quotes
show all
- Defined in:
- lib/shedcloud/partner_api/resources/quotes.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#add_line_item(id, body) ⇒ Object
39
40
41
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 39
def add_line_item(id, body)
@http.request('POST', "/partner/v1/quotes/#{path_segment(id)}/line-items", body: body) || {}
end
|
#convert(id, body = {}, options: nil) ⇒ Object
15
16
17
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 15
def convert(id, body = {}, options: nil)
@http.request('POST', "/partner/v1/quotes/#{path_segment(id)}/convert", body: body, headers: (options)) || {}
end
|
#create(body, options: nil) ⇒ Object
11
12
13
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 11
def create(body, options: nil)
@http.request('POST', '/partner/v1/quotes', body: body, headers: (options)) || {}
end
|
#delete_line_item(id, line_id) ⇒ Object
43
44
45
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 43
def delete_line_item(id, line_id)
@http.request('DELETE', "/partner/v1/quotes/#{path_segment(id)}/line-items/#{path_segment(line_id)}")
end
|
#get(id) ⇒ Object
19
20
21
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 19
def get(id)
@http.request('GET', "/partner/v1/quotes/#{path_segment(id)}") || {}
end
|
#line_items(id) ⇒ Object
35
36
37
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 35
def line_items(id)
@http.request('GET', "/partner/v1/quotes/#{path_segment(id)}/line-items") || {}
end
|
#list(params = {}) ⇒ Object
7
8
9
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 7
def list(params = {})
@http.request('GET', '/partner/v1/quotes', query: params) || {}
end
|
#status_history(id, params = {}) ⇒ Object
31
32
33
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 31
def status_history(id, params = {})
@http.request('GET', "/partner/v1/quotes/#{path_segment(id)}/status-history", query: params) || {}
end
|
#update(id, body, options: nil) ⇒ Object
23
24
25
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 23
def update(id, body, options: nil)
@http.request('PATCH', "/partner/v1/quotes/#{path_segment(id)}", body: body, headers: (options)) || {}
end
|
#update_status(id, body) ⇒ Object
27
28
29
|
# File 'lib/shedcloud/partner_api/resources/quotes.rb', line 27
def update_status(id, body)
@http.request('POST', "/partner/v1/quotes/#{path_segment(id)}/status", body: body) || {}
end
|