infusionsoft 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,64 +1,66 @@
1
1
  module Infusionsoft
2
- # The SearchService allows you to retrieve the results of saved searches and reports that
3
- # have been saved within Infusionsoft. Saved searches/reports are tied to the User that
4
- # created them. This service also allows you to utilize the quick search function found in
5
- # the upper right hand corner of your Infusionsoft application.
2
+ class Client
3
+ # The SearchService allows you to retrieve the results of saved searches and reports that
4
+ # have been saved within Infusionsoft. Saved searches/reports are tied to the User that
5
+ # created them. This service also allows you to utilize the quick search function found in
6
+ # the upper right hand corner of your Infusionsoft application.
6
7
 
7
- # @note In order to retrieve the id number for saved searches you will need to utilize
8
- # the data_query method and query the table called SavedFilter based on the user_id
9
- # you are looking for the saved search Id for. Also note that UserId field on the
10
- # SavedFilter table can contain multiple userId’s separated by a comma, so if you are
11
- # querying for a report created by userId 6, I recommend appending the wildcard to the
12
- # end of the userId. Something like $query = array( ‘UserId’ => ’6%’ );
13
- module Search
14
- # Gets all possible fields/columns available for return on a saved search/report.
15
- #
16
- # @param [Integer] saved_search_id
17
- # @param [Integer] user_id the user id who the saved search is assigned to
18
- # @return [Hash]
19
- def search_get_all_report_columns(saved_search_id, user_id)
20
- response = get('SearchService.getAllReportColumns', saved_search_id, user_id)
21
- end
8
+ # @note In order to retrieve the id number for saved searches you will need to utilize
9
+ # the data_query method and query the table called SavedFilter based on the user_id
10
+ # you are looking for the saved search Id for. Also note that UserId field on the
11
+ # SavedFilter table can contain multiple userId’s separated by a comma, so if you are
12
+ # querying for a report created by userId 6, I recommend appending the wildcard to the
13
+ # end of the userId. Something like $query = array( ‘UserId’ => ’6%’ );
14
+ module Search
15
+ # Gets all possible fields/columns available for return on a saved search/report.
16
+ #
17
+ # @param [Integer] saved_search_id
18
+ # @param [Integer] user_id the user id who the saved search is assigned to
19
+ # @return [Hash]
20
+ def search_get_all_report_columns(saved_search_id, user_id)
21
+ response = get('SearchService.getAllReportColumns', saved_search_id, user_id)
22
+ end
22
23
 
23
- # Runs a saved search/report and returns all possible fields.
24
- #
25
- # @param [Integer] saved_search_id
26
- # @param [Integer] user_id the user id who the saved search is assigned to
27
- # @param [Integer] page_number
28
- # @return [Hash]
29
- def search_get_saved_search_results(saved_search_id, user_id, page_number)
30
- response = get('SearchService.getSavedSearchResultsAllFields', saved_search_id,
31
- user_id, page_number)
32
- end
24
+ # Runs a saved search/report and returns all possible fields.
25
+ #
26
+ # @param [Integer] saved_search_id
27
+ # @param [Integer] user_id the user id who the saved search is assigned to
28
+ # @param [Integer] page_number
29
+ # @return [Hash]
30
+ def search_get_saved_search_results(saved_search_id, user_id, page_number)
31
+ response = get('SearchService.getSavedSearchResultsAllFields', saved_search_id,
32
+ user_id, page_number)
33
+ end
33
34
 
34
- # This is used to find what possible quick searches the given user has access to.
35
- #
36
- # @param [Integer] user_id
37
- # @return [Array]
38
- def search_get_available_quick_searches(user_id)
39
- response = get('SearchService.getAvailableQuickSearches', user_id)
40
- end
35
+ # This is used to find what possible quick searches the given user has access to.
36
+ #
37
+ # @param [Integer] user_id
38
+ # @return [Array]
39
+ def search_get_available_quick_searches(user_id)
40
+ response = get('SearchService.getAvailableQuickSearches', user_id)
41
+ end
41
42
 
42
- # This allows you to run a quick search via the API. The quick search is the
43
- # search bar in the upper right hand corner of the Infusionsoft application
44
- #
45
- # @param [String] search_type the type of search (Person, Order, Opportunity, Company, Task,
46
- # Subscription, or Affiliate)
47
- # @param [Integer] user_id
48
- # @param [String] search_data
49
- # @param [Integer] page
50
- # @param [Integer] limit max is 1000
51
- # @return [Array<Hash>]
52
- def search_quick_search(search_type, user_id, search_data, page, limit)
53
- response = get('SearchService.quickSearch', search_type, user_id, search_data, page, limit)
54
- end
43
+ # This allows you to run a quick search via the API. The quick search is the
44
+ # search bar in the upper right hand corner of the Infusionsoft application
45
+ #
46
+ # @param [String] search_type the type of search (Person, Order, Opportunity, Company, Task,
47
+ # Subscription, or Affiliate)
48
+ # @param [Integer] user_id
49
+ # @param [String] search_data
50
+ # @param [Integer] page
51
+ # @param [Integer] limit max is 1000
52
+ # @return [Array<Hash>]
53
+ def search_quick_search(search_type, user_id, search_data, page, limit)
54
+ response = get('SearchService.quickSearch', search_type, user_id, search_data, page, limit)
55
+ end
55
56
 
56
- # Retrieves the quick search type that the given users has set as their default.
57
- #
58
- # @param [Integer] user_id
59
- # @return [String] the quick search type that the given user selected as their default
60
- def search_get_default_search_type(user_id)
61
- response = get('SearchService.getDefaultQuickSearch', user_id)
57
+ # Retrieves the quick search type that the given users has set as their default.
58
+ #
59
+ # @param [Integer] user_id
60
+ # @return [String] the quick search type that the given user selected as their default
61
+ def search_get_default_search_type(user_id)
62
+ response = get('SearchService.getDefaultQuickSearch', user_id)
63
+ end
62
64
  end
63
65
  end
64
66
  end
@@ -1,4 +1,4 @@
1
1
  module Infusionsoft
2
2
  # The version of the gem
3
- VERSION = '1.0.5'.freeze unless defined?(::Infusionsoft::VERSION)
3
+ VERSION = '1.0.6'.freeze unless defined?(::Infusionsoft::VERSION)
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infusionsoft
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 5
10
- version: 1.0.5
9
+ - 6
10
+ version: 1.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Leavitt