emailguard_sdk 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 (128) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +169 -0
  4. data/Rakefile +10 -0
  5. data/docs/BaseResponse.md +20 -0
  6. data/docs/BillingApi.md +85 -0
  7. data/docs/BillingUsageEvent.md +26 -0
  8. data/docs/BillingUsageItem.md +28 -0
  9. data/docs/BillingUsageResponse.md +22 -0
  10. data/docs/ChannelsApi.md +366 -0
  11. data/docs/CreateNotificationChannelInput.md +22 -0
  12. data/docs/CreateNotificationRuleInput.md +28 -0
  13. data/docs/EmailApi.md +72 -0
  14. data/docs/EmailDetectData.md +44 -0
  15. data/docs/EmailDetectResponse.md +22 -0
  16. data/docs/EventsApi.md +76 -0
  17. data/docs/GetNotificationChannelResponse.md +22 -0
  18. data/docs/GetNotificationChannelsResponse.md +22 -0
  19. data/docs/GetNotificationEventsResponse.md +22 -0
  20. data/docs/GetNotificationRulesResponse.md +22 -0
  21. data/docs/GetPublicTeamResponse.md +22 -0
  22. data/docs/IdDataResponse.md +22 -0
  23. data/docs/IdDataStruct.md +18 -0
  24. data/docs/InviteTeamMemberInput.md +20 -0
  25. data/docs/InvitesApi.md +220 -0
  26. data/docs/ListPublicTeamInvitesResponse.md +22 -0
  27. data/docs/ListPublicTeamMembersResponse.md +22 -0
  28. data/docs/MembersApi.md +222 -0
  29. data/docs/MessageResponse.md +20 -0
  30. data/docs/NotificationChannelResponse.md +28 -0
  31. data/docs/NotificationRuleChannelInput.md +22 -0
  32. data/docs/NotificationRuleChannelResponse.md +28 -0
  33. data/docs/NotificationRuleResponse.md +32 -0
  34. data/docs/PublicTeamInviteResponse.md +24 -0
  35. data/docs/PublicTeamMemberResponse.md +34 -0
  36. data/docs/PublicTeamResponse.md +28 -0
  37. data/docs/RulesApi.md +294 -0
  38. data/docs/TeamsApi.md +148 -0
  39. data/docs/UpdateNotificationChannelInput.md +20 -0
  40. data/docs/UpdateNotificationRuleInput.md +28 -0
  41. data/docs/UpdateTeamInput.md +24 -0
  42. data/docs/UpdateTeamMemberInput.md +22 -0
  43. data/emailguard_sdk.gemspec +39 -0
  44. data/git_push.sh +57 -0
  45. data/lib/emailguard_sdk/api/billing_api.rb +92 -0
  46. data/lib/emailguard_sdk/api/channels_api.rb +347 -0
  47. data/lib/emailguard_sdk/api/email_api.rb +86 -0
  48. data/lib/emailguard_sdk/api/events_api.rb +79 -0
  49. data/lib/emailguard_sdk/api/invites_api.rb +210 -0
  50. data/lib/emailguard_sdk/api/members_api.rb +216 -0
  51. data/lib/emailguard_sdk/api/rules_api.rb +284 -0
  52. data/lib/emailguard_sdk/api/teams_api.rb +147 -0
  53. data/lib/emailguard_sdk/api_client.rb +397 -0
  54. data/lib/emailguard_sdk/api_error.rb +58 -0
  55. data/lib/emailguard_sdk/api_model_base.rb +88 -0
  56. data/lib/emailguard_sdk/configuration.rb +322 -0
  57. data/lib/emailguard_sdk/models/base_response.rb +175 -0
  58. data/lib/emailguard_sdk/models/billing_usage_event.rb +268 -0
  59. data/lib/emailguard_sdk/models/billing_usage_item.rb +262 -0
  60. data/lib/emailguard_sdk/models/billing_usage_response.rb +186 -0
  61. data/lib/emailguard_sdk/models/create_notification_channel_input.rb +204 -0
  62. data/lib/emailguard_sdk/models/create_notification_rule_input.rb +264 -0
  63. data/lib/emailguard_sdk/models/email_detect_data.rb +266 -0
  64. data/lib/emailguard_sdk/models/email_detect_response.rb +184 -0
  65. data/lib/emailguard_sdk/models/get_notification_channel_response.rb +184 -0
  66. data/lib/emailguard_sdk/models/get_notification_channels_response.rb +186 -0
  67. data/lib/emailguard_sdk/models/get_notification_events_response.rb +186 -0
  68. data/lib/emailguard_sdk/models/get_notification_rules_response.rb +186 -0
  69. data/lib/emailguard_sdk/models/get_public_team_response.rb +184 -0
  70. data/lib/emailguard_sdk/models/id_data_response.rb +184 -0
  71. data/lib/emailguard_sdk/models/id_data_struct.rb +148 -0
  72. data/lib/emailguard_sdk/models/invite_team_member_input.rb +192 -0
  73. data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +186 -0
  74. data/lib/emailguard_sdk/models/list_public_team_members_response.rb +186 -0
  75. data/lib/emailguard_sdk/models/message_response.rb +175 -0
  76. data/lib/emailguard_sdk/models/notification_channel_response.rb +200 -0
  77. data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +168 -0
  78. data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +198 -0
  79. data/lib/emailguard_sdk/models/notification_rule_response.rb +224 -0
  80. data/lib/emailguard_sdk/models/public_team_invite_response.rb +246 -0
  81. data/lib/emailguard_sdk/models/public_team_member_response.rb +347 -0
  82. data/lib/emailguard_sdk/models/public_team_response.rb +198 -0
  83. data/lib/emailguard_sdk/models/update_notification_channel_input.rb +160 -0
  84. data/lib/emailguard_sdk/models/update_notification_rule_input.rb +204 -0
  85. data/lib/emailguard_sdk/models/update_team_input.rb +195 -0
  86. data/lib/emailguard_sdk/models/update_team_member_input.rb +185 -0
  87. data/lib/emailguard_sdk/version.rb +15 -0
  88. data/lib/emailguard_sdk.rb +78 -0
  89. data/spec/api/billing_api_spec.rb +49 -0
  90. data/spec/api/channels_api_spec.rb +95 -0
  91. data/spec/api/email_api_spec.rb +47 -0
  92. data/spec/api/events_api_spec.rb +46 -0
  93. data/spec/api/invites_api_spec.rb +70 -0
  94. data/spec/api/members_api_spec.rb +71 -0
  95. data/spec/api/rules_api_spec.rb +83 -0
  96. data/spec/api/teams_api_spec.rb +58 -0
  97. data/spec/models/base_response_spec.rb +42 -0
  98. data/spec/models/billing_usage_event_spec.rb +60 -0
  99. data/spec/models/billing_usage_item_spec.rb +66 -0
  100. data/spec/models/billing_usage_response_spec.rb +48 -0
  101. data/spec/models/create_notification_channel_input_spec.rb +48 -0
  102. data/spec/models/create_notification_rule_input_spec.rb +66 -0
  103. data/spec/models/email_detect_data_spec.rb +114 -0
  104. data/spec/models/email_detect_response_spec.rb +48 -0
  105. data/spec/models/get_notification_channel_response_spec.rb +48 -0
  106. data/spec/models/get_notification_channels_response_spec.rb +48 -0
  107. data/spec/models/get_notification_events_response_spec.rb +48 -0
  108. data/spec/models/get_notification_rules_response_spec.rb +48 -0
  109. data/spec/models/get_public_team_response_spec.rb +48 -0
  110. data/spec/models/id_data_response_spec.rb +48 -0
  111. data/spec/models/id_data_struct_spec.rb +36 -0
  112. data/spec/models/invite_team_member_input_spec.rb +42 -0
  113. data/spec/models/list_public_team_invites_response_spec.rb +48 -0
  114. data/spec/models/list_public_team_members_response_spec.rb +48 -0
  115. data/spec/models/message_response_spec.rb +42 -0
  116. data/spec/models/notification_channel_response_spec.rb +66 -0
  117. data/spec/models/notification_rule_channel_input_spec.rb +48 -0
  118. data/spec/models/notification_rule_channel_response_spec.rb +66 -0
  119. data/spec/models/notification_rule_response_spec.rb +78 -0
  120. data/spec/models/public_team_invite_response_spec.rb +54 -0
  121. data/spec/models/public_team_member_response_spec.rb +84 -0
  122. data/spec/models/public_team_response_spec.rb +66 -0
  123. data/spec/models/update_notification_channel_input_spec.rb +42 -0
  124. data/spec/models/update_notification_rule_input_spec.rb +66 -0
  125. data/spec/models/update_team_input_spec.rb +54 -0
  126. data/spec/models/update_team_member_input_spec.rb +48 -0
  127. data/spec/spec_helper.rb +111 -0
  128. metadata +251 -0
@@ -0,0 +1,284 @@
1
+ =begin
2
+ #EmailGuard Public API
3
+
4
+ #Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: dev@emailguard.co
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Emailguard
16
+ class RulesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # List notification rules
23
+ # Returns routing rules that map event types to one or more delivery channels. Each rule includes its enabled state and channel targets.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [GetNotificationRulesResponse]
26
+ def api_v1_team_notifications_rules_get(opts = {})
27
+ data, _status_code, _headers = api_v1_team_notifications_rules_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # List notification rules
32
+ # Returns routing rules that map event types to one or more delivery channels. Each rule includes its enabled state and channel targets.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(GetNotificationRulesResponse, Integer, Hash)>] GetNotificationRulesResponse data, response status code and response headers
35
+ def api_v1_team_notifications_rules_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/team/notifications/rules'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'GetNotificationRulesResponse'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"RulesApi.api_v1_team_notifications_rules_get",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Create notification rule
80
+ # Creates a rule that delivers matching events to the specified channels. At least one event type and one channel target are required.
81
+ # @param create_notification_rule_input [CreateNotificationRuleInput] Rule name, event types, and channel targets
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [IdDataResponse]
84
+ def api_v1_team_notifications_rules_post(create_notification_rule_input, opts = {})
85
+ data, _status_code, _headers = api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input, opts)
86
+ data
87
+ end
88
+
89
+ # Create notification rule
90
+ # Creates a rule that delivers matching events to the specified channels. At least one event type and one channel target are required.
91
+ # @param create_notification_rule_input [CreateNotificationRuleInput] Rule name, event types, and channel targets
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(IdDataResponse, Integer, Hash)>] IdDataResponse data, response status code and response headers
94
+ def api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_post ...'
97
+ end
98
+ # verify the required parameter 'create_notification_rule_input' is set
99
+ if @api_client.config.client_side_validation && create_notification_rule_input.nil?
100
+ fail ArgumentError, "Missing the required parameter 'create_notification_rule_input' when calling RulesApi.api_v1_team_notifications_rules_post"
101
+ end
102
+ # resource path
103
+ local_var_path = '/api/v1/team/notifications/rules'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
112
+ # HTTP header 'Content-Type'
113
+ content_type = @api_client.select_header_content_type(['application/json'])
114
+ if !content_type.nil?
115
+ header_params['Content-Type'] = content_type
116
+ end
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_notification_rule_input)
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'IdDataResponse'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"RulesApi.api_v1_team_notifications_rules_post",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+
147
+ # Delete notification rule
148
+ # Permanently deletes a routing rule and its channel assignments.
149
+ # @param rule_id [String] UUID of the notification rule to delete
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [MessageResponse]
152
+ def api_v1_team_notifications_rules_rule_id_delete(rule_id, opts = {})
153
+ data, _status_code, _headers = api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id, opts)
154
+ data
155
+ end
156
+
157
+ # Delete notification rule
158
+ # Permanently deletes a routing rule and its channel assignments.
159
+ # @param rule_id [String] UUID of the notification rule to delete
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
162
+ def api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id, opts = {})
163
+ if @api_client.config.debugging
164
+ @api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_rule_id_delete ...'
165
+ end
166
+ # verify the required parameter 'rule_id' is set
167
+ if @api_client.config.client_side_validation && rule_id.nil?
168
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling RulesApi.api_v1_team_notifications_rules_rule_id_delete"
169
+ end
170
+ # resource path
171
+ local_var_path = '/api/v1/team/notifications/rules/{ruleId}'.sub('{ruleId}', CGI.escape(rule_id.to_s))
172
+
173
+ # query parameters
174
+ query_params = opts[:query_params] || {}
175
+
176
+ # header parameters
177
+ header_params = opts[:header_params] || {}
178
+ # HTTP header 'Accept' (if needed)
179
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
180
+
181
+ # form parameters
182
+ form_params = opts[:form_params] || {}
183
+
184
+ # http body (model)
185
+ post_body = opts[:debug_body]
186
+
187
+ # return_type
188
+ return_type = opts[:debug_return_type] || 'MessageResponse'
189
+
190
+ # auth_names
191
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
192
+
193
+ new_options = opts.merge(
194
+ :operation => :"RulesApi.api_v1_team_notifications_rules_rule_id_delete",
195
+ :header_params => header_params,
196
+ :query_params => query_params,
197
+ :form_params => form_params,
198
+ :body => post_body,
199
+ :auth_names => auth_names,
200
+ :return_type => return_type
201
+ )
202
+
203
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
204
+ if @api_client.config.debugging
205
+ @api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_rule_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
+ end
207
+ return data, status_code, headers
208
+ end
209
+
210
+ # Update notification rule
211
+ # Updates a rule's name, description, event types, enabled flag, or channel targets. When `channels` is sent it replaces all existing targets.
212
+ # @param rule_id [String] UUID of the notification rule to update
213
+ # @param update_notification_rule_input [UpdateNotificationRuleInput] Fields to update on the rule
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [MessageResponse]
216
+ def api_v1_team_notifications_rules_rule_id_put(rule_id, update_notification_rule_input, opts = {})
217
+ data, _status_code, _headers = api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input, opts)
218
+ data
219
+ end
220
+
221
+ # Update notification rule
222
+ # Updates a rule&#39;s name, description, event types, enabled flag, or channel targets. When &#x60;channels&#x60; is sent it replaces all existing targets.
223
+ # @param rule_id [String] UUID of the notification rule to update
224
+ # @param update_notification_rule_input [UpdateNotificationRuleInput] Fields to update on the rule
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(MessageResponse, Integer, Hash)>] MessageResponse data, response status code and response headers
227
+ def api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: RulesApi.api_v1_team_notifications_rules_rule_id_put ...'
230
+ end
231
+ # verify the required parameter 'rule_id' is set
232
+ if @api_client.config.client_side_validation && rule_id.nil?
233
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling RulesApi.api_v1_team_notifications_rules_rule_id_put"
234
+ end
235
+ # verify the required parameter 'update_notification_rule_input' is set
236
+ if @api_client.config.client_side_validation && update_notification_rule_input.nil?
237
+ fail ArgumentError, "Missing the required parameter 'update_notification_rule_input' when calling RulesApi.api_v1_team_notifications_rules_rule_id_put"
238
+ end
239
+ # resource path
240
+ local_var_path = '/api/v1/team/notifications/rules/{ruleId}'.sub('{ruleId}', CGI.escape(rule_id.to_s))
241
+
242
+ # query parameters
243
+ query_params = opts[:query_params] || {}
244
+
245
+ # header parameters
246
+ header_params = opts[:header_params] || {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
249
+ # HTTP header 'Content-Type'
250
+ content_type = @api_client.select_header_content_type(['application/json'])
251
+ if !content_type.nil?
252
+ header_params['Content-Type'] = content_type
253
+ end
254
+
255
+ # form parameters
256
+ form_params = opts[:form_params] || {}
257
+
258
+ # http body (model)
259
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_notification_rule_input)
260
+
261
+ # return_type
262
+ return_type = opts[:debug_return_type] || 'MessageResponse'
263
+
264
+ # auth_names
265
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
266
+
267
+ new_options = opts.merge(
268
+ :operation => :"RulesApi.api_v1_team_notifications_rules_rule_id_put",
269
+ :header_params => header_params,
270
+ :query_params => query_params,
271
+ :form_params => form_params,
272
+ :body => post_body,
273
+ :auth_names => auth_names,
274
+ :return_type => return_type
275
+ )
276
+
277
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: RulesApi#api_v1_team_notifications_rules_rule_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+ end
284
+ end
@@ -0,0 +1,147 @@
1
+ =begin
2
+ #EmailGuard Public API
3
+
4
+ #Team-scoped REST API at /api/v1. Authenticate with `Authorization: Bearer egsk_live_...` or `X-API-Key`. Forks may register custom routes under /api/v1/tools/* (requires `tools:read` / `tools:write` scopes). Async tool jobs return a `job_id` — poll `GET .../{jobId}/results` until complete. See /docs/api-reference.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: dev@emailguard.co
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.23.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Emailguard
16
+ class TeamsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get team
23
+ # Returns profile fields for the team associated with your API key.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [GetPublicTeamResponse]
26
+ def api_v1_team_get(opts = {})
27
+ data, _status_code, _headers = api_v1_team_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get team
32
+ # Returns profile fields for the team associated with your API key.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(GetPublicTeamResponse, Integer, Hash)>] GetPublicTeamResponse data, response status code and response headers
35
+ def api_v1_team_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: TeamsApi.api_v1_team_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/api/v1/team'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'GetPublicTeamResponse'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"TeamsApi.api_v1_team_get",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: TeamsApi#api_v1_team_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ # Update team
80
+ # Updates mutable team profile fields (name, emoji, URL, email). Send only the fields you want to change; omitted fields are left unchanged except `name`, which is required on every request.
81
+ # @param update_team_input [UpdateTeamInput] Team profile fields to update
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [GetPublicTeamResponse]
84
+ def api_v1_team_patch(update_team_input, opts = {})
85
+ data, _status_code, _headers = api_v1_team_patch_with_http_info(update_team_input, opts)
86
+ data
87
+ end
88
+
89
+ # Update team
90
+ # Updates mutable team profile fields (name, emoji, URL, email). Send only the fields you want to change; omitted fields are left unchanged except &#x60;name&#x60;, which is required on every request.
91
+ # @param update_team_input [UpdateTeamInput] Team profile fields to update
92
+ # @param [Hash] opts the optional parameters
93
+ # @return [Array<(GetPublicTeamResponse, Integer, Hash)>] GetPublicTeamResponse data, response status code and response headers
94
+ def api_v1_team_patch_with_http_info(update_team_input, opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: TeamsApi.api_v1_team_patch ...'
97
+ end
98
+ # verify the required parameter 'update_team_input' is set
99
+ if @api_client.config.client_side_validation && update_team_input.nil?
100
+ fail ArgumentError, "Missing the required parameter 'update_team_input' when calling TeamsApi.api_v1_team_patch"
101
+ end
102
+ # resource path
103
+ local_var_path = '/api/v1/team'
104
+
105
+ # query parameters
106
+ query_params = opts[:query_params] || {}
107
+
108
+ # header parameters
109
+ header_params = opts[:header_params] || {}
110
+ # HTTP header 'Accept' (if needed)
111
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
112
+ # HTTP header 'Content-Type'
113
+ content_type = @api_client.select_header_content_type(['application/json'])
114
+ if !content_type.nil?
115
+ header_params['Content-Type'] = content_type
116
+ end
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_team_input)
123
+
124
+ # return_type
125
+ return_type = opts[:debug_return_type] || 'GetPublicTeamResponse'
126
+
127
+ # auth_names
128
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
129
+
130
+ new_options = opts.merge(
131
+ :operation => :"TeamsApi.api_v1_team_patch",
132
+ :header_params => header_params,
133
+ :query_params => query_params,
134
+ :form_params => form_params,
135
+ :body => post_body,
136
+ :auth_names => auth_names,
137
+ :return_type => return_type
138
+ )
139
+
140
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug "API called: TeamsApi#api_v1_team_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
+ end
144
+ return data, status_code, headers
145
+ end
146
+ end
147
+ end