infusionsoft 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,64 @@
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.
6
+
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
22
+
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
33
+
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
41
+
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
55
+
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)
62
+ end
63
+ end
64
+ end
@@ -1,17 +1,17 @@
1
1
  module Infusionsoft
2
2
  class Client
3
- ########################
4
- ### Ticket Service ###
5
- ########################
6
3
  module Ticket
7
4
  # add move notes to existing tickets
8
- def ticket_add_move_notes(ticket_list, move_notes, move_to_stage_id, notify_ids)
9
- response = get('ServiceCallService', 'addMoveNotes', ticket_list, move_notes, move_to_stage_id, notify_ids)
5
+ def ticket_add_move_notes(ticket_list, move_notes,
6
+ move_to_stage_id, notify_ids)
7
+ response = get('ServiceCallService', 'addMoveNotes', ticket_list,
8
+ move_notes, move_to_stage_id, notify_ids)
10
9
  end
11
10
 
12
11
  # add move notes to existing tickets
13
12
  def ticket_move_stage(ticket_id, ticket_stage, move_notes, notify_ids)
14
- response = get('ServiceCallService', 'moveTicketStage', ticket_id, ticket_stage, move_notes, notify_ids)
13
+ response = get('ServiceCallService', 'moveTicketStage',
14
+ ticket_id, ticket_stage, move_notes, notify_ids)
15
15
  end
16
16
  end
17
17
  end
@@ -1,4 +1,4 @@
1
1
  module Infusionsoft
2
2
  # The version of the gem
3
- VERSION = '1.0.2'.freeze unless defined?(::Infusionsoft::VERSION)
3
+ VERSION = '1.0.3'.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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 2
10
- version: 1.0.2
9
+ - 3
10
+ version: 1.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Leavitt
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-26 00:00:00 -07:00
18
+ date: 2011-09-27 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -42,6 +42,7 @@ files:
42
42
  - lib/infusionsoft/client/email.rb
43
43
  - lib/infusionsoft/client/file.rb
44
44
  - lib/infusionsoft/client/invoice.rb
45
+ - lib/infusionsoft/client/search.rb
45
46
  - lib/infusionsoft/client/ticket.rb
46
47
  - lib/infusionsoft/client/version.rb
47
48
  - lib/infusionsoft/configuration.rb