bombbomb 1.0.0

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.
Files changed (51) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE +201 -0
  3. data/README.md +139 -0
  4. data/Rakefile +3 -0
  5. data/bombbomb.gemspec +55 -0
  6. data/docs/BBWebHook.md +11 -0
  7. data/docs/InlineResponse200.md +9 -0
  8. data/docs/InlineResponse200Items.md +11 -0
  9. data/docs/JerichoConfiguration.md +18 -0
  10. data/docs/JerichoPerformance.md +18 -0
  11. data/docs/OAuthClient.md +13 -0
  12. data/docs/PromptsApi.md +169 -0
  13. data/docs/String.md +7 -0
  14. data/docs/TeamsApi.md +290 -0
  15. data/docs/UtilitiesApi.md +204 -0
  16. data/docs/VideoEmailPrompt.md +25 -0
  17. data/docs/WebhooksApi.md +207 -0
  18. data/git_push.sh +67 -0
  19. data/lib/bombbomb.rb +62 -0
  20. data/lib/bombbomb/api/prompts_api.rb +217 -0
  21. data/lib/bombbomb/api/teams_api.rb +346 -0
  22. data/lib/bombbomb/api/utilities_api.rb +258 -0
  23. data/lib/bombbomb/api/webhooks_api.rb +254 -0
  24. data/lib/bombbomb/api_client.rb +379 -0
  25. data/lib/bombbomb/api_error.rb +47 -0
  26. data/lib/bombbomb/configuration.rb +214 -0
  27. data/lib/bombbomb/models/bb_web_hook.rb +230 -0
  28. data/lib/bombbomb/models/inline_response_200.rb +210 -0
  29. data/lib/bombbomb/models/inline_response_200_items.rb +226 -0
  30. data/lib/bombbomb/models/jericho_configuration.rb +299 -0
  31. data/lib/bombbomb/models/jericho_performance.rb +300 -0
  32. data/lib/bombbomb/models/o_auth_client.rb +250 -0
  33. data/lib/bombbomb/models/string.rb +190 -0
  34. data/lib/bombbomb/models/video_email_prompt.rb +379 -0
  35. data/lib/bombbomb/version.rb +26 -0
  36. data/spec/api/prompts_api_spec.rb +84 -0
  37. data/spec/api/teams_api_spec.rb +113 -0
  38. data/spec/api/utilities_api_spec.rb +93 -0
  39. data/spec/api/webhooks_api_spec.rb +92 -0
  40. data/spec/api_client_spec.rb +237 -0
  41. data/spec/configuration_spec.rb +53 -0
  42. data/spec/models/bb_web_hook_spec.rb +71 -0
  43. data/spec/models/inline_response_200_items_spec.rb +71 -0
  44. data/spec/models/inline_response_200_spec.rb +59 -0
  45. data/spec/models/jericho_configuration_spec.rb +113 -0
  46. data/spec/models/jericho_performance_spec.rb +113 -0
  47. data/spec/models/o_auth_client_spec.rb +83 -0
  48. data/spec/models/string_spec.rb +47 -0
  49. data/spec/models/video_email_prompt_spec.rb +155 -0
  50. data/spec/spec_helper.rb +122 -0
  51. metadata +288 -0
data/lib/bombbomb.rb ADDED
@@ -0,0 +1,62 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ # Common files
25
+ require 'bombbomb/api_client'
26
+ require 'bombbomb/api_error'
27
+ require 'bombbomb/version'
28
+ require 'bombbomb/configuration'
29
+
30
+ # Models
31
+ require 'bombbomb/models/bb_web_hook'
32
+ require 'bombbomb/models/inline_response_200'
33
+ require 'bombbomb/models/inline_response_200_items'
34
+ require 'bombbomb/models/jericho_configuration'
35
+ require 'bombbomb/models/jericho_performance'
36
+ require 'bombbomb/models/o_auth_client'
37
+ require 'bombbomb/models/string'
38
+ require 'bombbomb/models/video_email_prompt'
39
+
40
+ # APIs
41
+ require 'bombbomb/api/prompts_api'
42
+ require 'bombbomb/api/teams_api'
43
+ require 'bombbomb/api/utilities_api'
44
+ require 'bombbomb/api/webhooks_api'
45
+
46
+ module BombBomb
47
+ class << self
48
+ # Customize default settings for the SDK using block.
49
+ # BombBomb.configure do |config|
50
+ # config.username = "xxx"
51
+ # config.password = "xxx"
52
+ # end
53
+ # If no block given, return the default Configuration object.
54
+ def configure
55
+ if block_given?
56
+ yield(Configuration.default)
57
+ else
58
+ Configuration.default
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,217 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module BombBomb
27
+ class PromptsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Prompts user to send a video
35
+ # Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.
36
+ # @param prompt The Video Email Prompt to be created
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [VideoEmailPrompt]
39
+ def create_video_email_prompt(prompt, opts = {})
40
+ data, _status_code, _headers = create_video_email_prompt_with_http_info(prompt, opts)
41
+ return data
42
+ end
43
+
44
+ # Prompts user to send a video
45
+ # Sends the account holder an email prompting them to add a video to a scheduled outgoing message. Recipients, content and timing is all preset for the user.
46
+ # @param prompt The Video Email Prompt to be created
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(VideoEmailPrompt, Fixnum, Hash)>] VideoEmailPrompt data, response status code and response headers
49
+ def create_video_email_prompt_with_http_info(prompt, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: PromptsApi.create_video_email_prompt ..."
52
+ end
53
+ # verify the required parameter 'prompt' is set
54
+ fail ArgumentError, "Missing the required parameter 'prompt' when calling PromptsApi.create_video_email_prompt" if prompt.nil?
55
+ # resource path
56
+ local_var_path = "/prompt".sub('{format}','json')
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = []
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = @api_client.object_to_http_body(prompt)
77
+ auth_names = ['BBOAuth2']
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names,
84
+ :return_type => 'VideoEmailPrompt')
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: PromptsApi#create_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Gets a prompt
92
+ # Gets a prompt
93
+ # @param id The Id of the prompt
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [VideoEmailPrompt]
96
+ def get_video_email_prompt(id, opts = {})
97
+ data, _status_code, _headers = get_video_email_prompt_with_http_info(id, opts)
98
+ return data
99
+ end
100
+
101
+ # Gets a prompt
102
+ # Gets a prompt
103
+ # @param id The Id of the prompt
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(VideoEmailPrompt, Fixnum, Hash)>] VideoEmailPrompt data, response status code and response headers
106
+ def get_video_email_prompt_with_http_info(id, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: PromptsApi.get_video_email_prompt ..."
109
+ end
110
+ # verify the required parameter 'id' is set
111
+ fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.get_video_email_prompt" if id.nil?
112
+ # resource path
113
+ local_var_path = "/prompt/{id}".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = ['application/json']
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = []
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = nil
134
+ auth_names = ['BBOAuth2']
135
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => 'VideoEmailPrompt')
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: PromptsApi#get_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # Respond to a prompt
149
+ # Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.
150
+ # @param id The id of the prompt.
151
+ # @param choice The users&#39; selection. Can be: WithVideo, WithoutVideo, Cancel
152
+ # @param [Hash] opts the optional parameters
153
+ # @option opts [String] :video_id The id of the video.
154
+ # @return [VideoEmailPrompt]
155
+ def respond_to_video_email_prompt(id, choice, opts = {})
156
+ data, _status_code, _headers = respond_to_video_email_prompt_with_http_info(id, choice, opts)
157
+ return data
158
+ end
159
+
160
+ # Respond to a prompt
161
+ # Respond to a prompt by either adding a video, sending without a video or cancelling the prompt.
162
+ # @param id The id of the prompt.
163
+ # @param choice The users&#39; selection. Can be: WithVideo, WithoutVideo, Cancel
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :video_id The id of the video.
166
+ # @return [Array<(VideoEmailPrompt, Fixnum, Hash)>] VideoEmailPrompt data, response status code and response headers
167
+ def respond_to_video_email_prompt_with_http_info(id, choice, opts = {})
168
+ if @api_client.config.debugging
169
+ @api_client.config.logger.debug "Calling API: PromptsApi.respond_to_video_email_prompt ..."
170
+ end
171
+ # verify the required parameter 'id' is set
172
+ fail ArgumentError, "Missing the required parameter 'id' when calling PromptsApi.respond_to_video_email_prompt" if id.nil?
173
+ # verify the required parameter 'choice' is set
174
+ fail ArgumentError, "Missing the required parameter 'choice' when calling PromptsApi.respond_to_video_email_prompt" if choice.nil?
175
+ # verify enum value
176
+ unless ['WithVideo', 'WithoutVideo', 'Cancel'].include?(choice)
177
+ fail ArgumentError, "invalid value for 'choice', must be one of WithVideo, WithoutVideo, Cancel"
178
+ end
179
+ # resource path
180
+ local_var_path = "/prompt/{id}/response".sub('{format}','json').sub('{' + 'id' + '}', id.to_s)
181
+
182
+ # query parameters
183
+ query_params = {}
184
+
185
+ # header parameters
186
+ header_params = {}
187
+
188
+ # HTTP header 'Accept' (if needed)
189
+ local_header_accept = ['application/json']
190
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
191
+
192
+ # HTTP header 'Content-Type'
193
+ local_header_content_type = []
194
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
195
+
196
+ # form parameters
197
+ form_params = {}
198
+ form_params["choice"] = choice
199
+ form_params["videoId"] = opts[:'video_id'] if !opts[:'video_id'].nil?
200
+
201
+ # http body (model)
202
+ post_body = nil
203
+ auth_names = []
204
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => 'VideoEmailPrompt')
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: PromptsApi#respond_to_video_email_prompt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+ end
217
+ end
@@ -0,0 +1,346 @@
1
+ =begin
2
+ #BombBomb
3
+
4
+ #We make it easy to build relationships using simple videos.
5
+
6
+ OpenAPI spec version: 2.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require "uri"
25
+
26
+ module BombBomb
27
+ class TeamsApi
28
+ attr_accessor :api_client
29
+
30
+ def initialize(api_client = ApiClient.default)
31
+ @api_client = api_client
32
+ end
33
+
34
+ # Cancel a Jericho Send
35
+ # Cancels a scheduled Jericho send from being sent.
36
+ # @param jericho_id ID of the Jericho Job to cancel
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [nil]
39
+ def cancel_jericho_send(jericho_id, opts = {})
40
+ cancel_jericho_send_with_http_info(jericho_id, opts)
41
+ return nil
42
+ end
43
+
44
+ # Cancel a Jericho Send
45
+ # Cancels a scheduled Jericho send from being sent.
46
+ # @param jericho_id ID of the Jericho Job to cancel
47
+ # @param [Hash] opts the optional parameters
48
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
49
+ def cancel_jericho_send_with_http_info(jericho_id, opts = {})
50
+ if @api_client.config.debugging
51
+ @api_client.config.logger.debug "Calling API: TeamsApi.cancel_jericho_send ..."
52
+ end
53
+ # verify the required parameter 'jericho_id' is set
54
+ fail ArgumentError, "Missing the required parameter 'jericho_id' when calling TeamsApi.cancel_jericho_send" if jericho_id.nil?
55
+ # resource path
56
+ local_var_path = "/team/{teamId}/jericho/{jerichoId}".sub('{format}','json').sub('{' + 'jerichoId' + '}', jericho_id.to_s)
57
+
58
+ # query parameters
59
+ query_params = {}
60
+
61
+ # header parameters
62
+ header_params = {}
63
+
64
+ # HTTP header 'Accept' (if needed)
65
+ local_header_accept = ['application/json']
66
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
67
+
68
+ # HTTP header 'Content-Type'
69
+ local_header_content_type = []
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['BBOAuth2']
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: TeamsApi#cancel_jericho_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Lists team assets
91
+ # Returns a collection of assets
92
+ # @param asset_type The type of assets.
93
+ # @param [Hash] opts the optional parameters
94
+ # @option opts [String] :team_id The team containing the assets.
95
+ # @option opts [String] :auto_tag_name The auto tag name containing the assets.
96
+ # @option opts [String] :page_size The number of items to retrieve in a single db query.
97
+ # @option opts [String] :page Zero-based index of the page of data to retrieve from the db.
98
+ # @option opts [String] :search Search words.
99
+ # @return [InlineResponse200]
100
+ def get_client_group_assets(asset_type, opts = {})
101
+ data, _status_code, _headers = get_client_group_assets_with_http_info(asset_type, opts)
102
+ return data
103
+ end
104
+
105
+ # Lists team assets
106
+ # Returns a collection of assets
107
+ # @param asset_type The type of assets.
108
+ # @param [Hash] opts the optional parameters
109
+ # @option opts [String] :team_id The team containing the assets.
110
+ # @option opts [String] :auto_tag_name The auto tag name containing the assets.
111
+ # @option opts [String] :page_size The number of items to retrieve in a single db query.
112
+ # @option opts [String] :page Zero-based index of the page of data to retrieve from the db.
113
+ # @option opts [String] :search Search words.
114
+ # @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
115
+ def get_client_group_assets_with_http_info(asset_type, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug "Calling API: TeamsApi.get_client_group_assets ..."
118
+ end
119
+ # verify the required parameter 'asset_type' is set
120
+ fail ArgumentError, "Missing the required parameter 'asset_type' when calling TeamsApi.get_client_group_assets" if asset_type.nil?
121
+ # verify enum value
122
+ unless ['email', 'video'].include?(asset_type)
123
+ fail ArgumentError, "invalid value for 'asset_type', must be one of email, video"
124
+ end
125
+ # resource path
126
+ local_var_path = "/team/assets/".sub('{format}','json')
127
+
128
+ # query parameters
129
+ query_params = {}
130
+ query_params[:'assetType'] = asset_type
131
+ query_params[:'teamId'] = opts[:'team_id'] if !opts[:'team_id'].nil?
132
+ query_params[:'autoTagName'] = opts[:'auto_tag_name'] if !opts[:'auto_tag_name'].nil?
133
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
134
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
135
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
136
+
137
+ # header parameters
138
+ header_params = {}
139
+
140
+ # HTTP header 'Accept' (if needed)
141
+ local_header_accept = ['application/json']
142
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
143
+
144
+ # HTTP header 'Content-Type'
145
+ local_header_content_type = []
146
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
147
+
148
+ # form parameters
149
+ form_params = {}
150
+
151
+ # http body (model)
152
+ post_body = nil
153
+ auth_names = ['BBOAuth2']
154
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => 'InlineResponse200')
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: TeamsApi#get_client_group_assets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ return data, status_code, headers
165
+ end
166
+
167
+ # List Jericho Sends
168
+ # Lists Jericho sends, both pending and sent.
169
+ # @param team_id The team whose Jericho sends you wish to see.
170
+ # @param [Hash] opts the optional parameters
171
+ # @return [Array<JerichoConfiguration>]
172
+ def get_jericho_sends(team_id, opts = {})
173
+ data, _status_code, _headers = get_jericho_sends_with_http_info(team_id, opts)
174
+ return data
175
+ end
176
+
177
+ # List Jericho Sends
178
+ # Lists Jericho sends, both pending and sent.
179
+ # @param team_id The team whose Jericho sends you wish to see.
180
+ # @param [Hash] opts the optional parameters
181
+ # @return [Array<(Array<JerichoConfiguration>, Fixnum, Hash)>] Array<JerichoConfiguration> data, response status code and response headers
182
+ def get_jericho_sends_with_http_info(team_id, opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "Calling API: TeamsApi.get_jericho_sends ..."
185
+ end
186
+ # verify the required parameter 'team_id' is set
187
+ fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.get_jericho_sends" if team_id.nil?
188
+ # resource path
189
+ local_var_path = "/team/{teamId}/jericho".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)
190
+
191
+ # query parameters
192
+ query_params = {}
193
+
194
+ # header parameters
195
+ header_params = {}
196
+
197
+ # HTTP header 'Accept' (if needed)
198
+ local_header_accept = ['application/json']
199
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
200
+
201
+ # HTTP header 'Content-Type'
202
+ local_header_content_type = []
203
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
204
+
205
+ # form parameters
206
+ form_params = {}
207
+
208
+ # http body (model)
209
+ post_body = nil
210
+ auth_names = ['BBOAuth2']
211
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => 'Array<JerichoConfiguration>')
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: TeamsApi#get_jericho_sends\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+
224
+ # Gets Jericho performance statistics
225
+ # Returns an aggregate view of the performance of a Jericho send
226
+ # @param jericho_id ID of the Jericho job
227
+ # @param team_id ID of team through which Jericho was sent
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [JerichoPerformance]
230
+ def get_jericho_stats(jericho_id, team_id, opts = {})
231
+ data, _status_code, _headers = get_jericho_stats_with_http_info(jericho_id, team_id, opts)
232
+ return data
233
+ end
234
+
235
+ # Gets Jericho performance statistics
236
+ # Returns an aggregate view of the performance of a Jericho send
237
+ # @param jericho_id ID of the Jericho job
238
+ # @param team_id ID of team through which Jericho was sent
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(JerichoPerformance, Fixnum, Hash)>] JerichoPerformance data, response status code and response headers
241
+ def get_jericho_stats_with_http_info(jericho_id, team_id, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug "Calling API: TeamsApi.get_jericho_stats ..."
244
+ end
245
+ # verify the required parameter 'jericho_id' is set
246
+ fail ArgumentError, "Missing the required parameter 'jericho_id' when calling TeamsApi.get_jericho_stats" if jericho_id.nil?
247
+ # verify the required parameter 'team_id' is set
248
+ fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.get_jericho_stats" if team_id.nil?
249
+ # resource path
250
+ local_var_path = "/team/{teamId}/jericho/{jerichoId}/performance".sub('{format}','json').sub('{' + 'jerichoId' + '}', jericho_id.to_s).sub('{' + 'teamId' + '}', team_id.to_s)
251
+
252
+ # query parameters
253
+ query_params = {}
254
+
255
+ # header parameters
256
+ header_params = {}
257
+
258
+ # HTTP header 'Accept' (if needed)
259
+ local_header_accept = ['application/json']
260
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
261
+
262
+ # HTTP header 'Content-Type'
263
+ local_header_content_type = []
264
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
265
+
266
+ # form parameters
267
+ form_params = {}
268
+
269
+ # http body (model)
270
+ post_body = nil
271
+ auth_names = ['BBOAuth2']
272
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
273
+ :header_params => header_params,
274
+ :query_params => query_params,
275
+ :form_params => form_params,
276
+ :body => post_body,
277
+ :auth_names => auth_names,
278
+ :return_type => 'JerichoPerformance')
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: TeamsApi#get_jericho_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ # Creates a Jericho send.
286
+ # Sends email content on behalf of members of a client group. There are two forms this send can take: Static Email, and Video Prompt. Static emails require only an emailId. Video Prompts build emails dynamically and require most of the other fields. You must be an administrator of a Team Account to use this method.
287
+ # @param config JSON representing a Jericho configuration
288
+ # @param team_id The ID of the team.
289
+ # @param [Hash] opts the optional parameters
290
+ # @return [JerichoConfiguration]
291
+ def queue_jericho_send(config, team_id, opts = {})
292
+ data, _status_code, _headers = queue_jericho_send_with_http_info(config, team_id, opts)
293
+ return data
294
+ end
295
+
296
+ # Creates a Jericho send.
297
+ # Sends email content on behalf of members of a client group. There are two forms this send can take: Static Email, and Video Prompt. Static emails require only an emailId. Video Prompts build emails dynamically and require most of the other fields. You must be an administrator of a Team Account to use this method.
298
+ # @param config JSON representing a Jericho configuration
299
+ # @param team_id The ID of the team.
300
+ # @param [Hash] opts the optional parameters
301
+ # @return [Array<(JerichoConfiguration, Fixnum, Hash)>] JerichoConfiguration data, response status code and response headers
302
+ def queue_jericho_send_with_http_info(config, team_id, opts = {})
303
+ if @api_client.config.debugging
304
+ @api_client.config.logger.debug "Calling API: TeamsApi.queue_jericho_send ..."
305
+ end
306
+ # verify the required parameter 'config' is set
307
+ fail ArgumentError, "Missing the required parameter 'config' when calling TeamsApi.queue_jericho_send" if config.nil?
308
+ # verify the required parameter 'team_id' is set
309
+ fail ArgumentError, "Missing the required parameter 'team_id' when calling TeamsApi.queue_jericho_send" if team_id.nil?
310
+ # resource path
311
+ local_var_path = "/team/{teamId}/jericho".sub('{format}','json').sub('{' + 'teamId' + '}', team_id.to_s)
312
+
313
+ # query parameters
314
+ query_params = {}
315
+
316
+ # header parameters
317
+ header_params = {}
318
+
319
+ # HTTP header 'Accept' (if needed)
320
+ local_header_accept = ['application/json']
321
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
322
+
323
+ # HTTP header 'Content-Type'
324
+ local_header_content_type = []
325
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
326
+
327
+ # form parameters
328
+ form_params = {}
329
+
330
+ # http body (model)
331
+ post_body = @api_client.object_to_http_body(config)
332
+ auth_names = ['BBOAuth2']
333
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
334
+ :header_params => header_params,
335
+ :query_params => query_params,
336
+ :form_params => form_params,
337
+ :body => post_body,
338
+ :auth_names => auth_names,
339
+ :return_type => 'JerichoConfiguration')
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug "API called: TeamsApi#queue_jericho_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
342
+ end
343
+ return data, status_code, headers
344
+ end
345
+ end
346
+ end