Class: ShedCloud::PartnerApi::Resources::Leads
- Inherits:
-
Base
- Object
- Base
- ShedCloud::PartnerApi::Resources::Leads
show all
- Defined in:
- lib/shedcloud/partner_api/resources/leads.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#create(body, options: nil) ⇒ Object
11
12
13
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 11
def create(body, options: nil)
@http.request('POST', '/partner/v1/leads', body: body, headers: (options)) || {}
end
|
#get(id) ⇒ Object
15
16
17
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 15
def get(id)
@http.request('GET', "/partner/v1/leads/#{path_segment(id)}") || {}
end
|
#list(params = {}) ⇒ Object
7
8
9
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 7
def list(params = {})
@http.request('GET', '/partner/v1/leads', query: params) || {}
end
|
#status_history(id, params = {}) ⇒ Object
27
28
29
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 27
def status_history(id, params = {})
@http.request('GET', "/partner/v1/leads/#{path_segment(id)}/status-history", query: params) || {}
end
|
#update(id, body, options: nil) ⇒ Object
19
20
21
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 19
def update(id, body, options: nil)
@http.request('PATCH', "/partner/v1/leads/#{path_segment(id)}", body: body, headers: (options)) || {}
end
|
#update_status(id, body) ⇒ Object
23
24
25
|
# File 'lib/shedcloud/partner_api/resources/leads.rb', line 23
def update_status(id, body)
@http.request('POST', "/partner/v1/leads/#{path_segment(id)}/status", body: body) || {}
end
|