Class: BaseCRM::LeadUnqualifiedReasonsService
- Inherits:
-
Object
- Object
- BaseCRM::LeadUnqualifiedReasonsService
- Defined in:
- lib/basecrm/services/lead_unqualified_reasons_service.rb
Instance Method Summary collapse
-
#all ⇒ Enumerable
Retrieve all lead unqualified reasons.
-
#initialize(client) ⇒ LeadUnqualifiedReasonsService
constructor
A new instance of LeadUnqualifiedReasonsService.
-
#where(options = {}) ⇒ Array<LeadUnqualifiedReason>
Retrieve all lead unqualified reasons.
Constructor Details
#initialize(client) ⇒ LeadUnqualifiedReasonsService
Returns a new instance of LeadUnqualifiedReasonsService.
5 6 7 |
# File 'lib/basecrm/services/lead_unqualified_reasons_service.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#all ⇒ Enumerable
Retrieve all lead unqualified reasons
get ‘/lead_unqualified_reasons’
If you want to use filtering or sorting (see #where).
15 16 17 |
# File 'lib/basecrm/services/lead_unqualified_reasons_service.rb', line 15 def all PaginatedResource.new(self) end |
#where(options = {}) ⇒ Array<LeadUnqualifiedReason>
Retrieve all lead unqualified reasons
get ‘/lead_unqualified_reasons’
Returns all lead unqualified reasons available to the user according to the parameters provided
27 28 29 30 31 |
# File 'lib/basecrm/services/lead_unqualified_reasons_service.rb', line 27 def where( = {}) _, _, root = @client.get("/lead_unqualified_reasons", ) root[:items].map{ |item| LeadUnqualifiedReason.new(item[:data]) } end |