daytona_api_client 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 (168) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +101 -0
  4. data/Rakefile +10 -0
  5. data/daytona_api_client.gemspec +39 -0
  6. data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
  7. data/lib/daytona_api_client/api/audit_api.rb +240 -0
  8. data/lib/daytona_api_client/api/config_api.rb +77 -0
  9. data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
  10. data/lib/daytona_api_client/api/health_api.rb +75 -0
  11. data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
  12. data/lib/daytona_api_client/api/organizations_api.rb +1695 -0
  13. data/lib/daytona_api_client/api/preview_api.rb +209 -0
  14. data/lib/daytona_api_client/api/runners_api.rb +321 -0
  15. data/lib/daytona_api_client/api/sandbox_api.rb +1573 -0
  16. data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
  17. data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
  18. data/lib/daytona_api_client/api/users_api.rb +553 -0
  19. data/lib/daytona_api_client/api/volumes_api.rb +342 -0
  20. data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
  21. data/lib/daytona_api_client/api/workspace_api.rb +955 -0
  22. data/lib/daytona_api_client/api_client.rb +393 -0
  23. data/lib/daytona_api_client/api_error.rb +58 -0
  24. data/lib/daytona_api_client/configuration.rb +306 -0
  25. data/lib/daytona_api_client/models/account_provider.rb +261 -0
  26. data/lib/daytona_api_client/models/announcement.rb +246 -0
  27. data/lib/daytona_api_client/models/api_key_list.rb +384 -0
  28. data/lib/daytona_api_client/models/api_key_response.rb +344 -0
  29. data/lib/daytona_api_client/models/audit_log.rb +422 -0
  30. data/lib/daytona_api_client/models/build_info.rb +285 -0
  31. data/lib/daytona_api_client/models/command.rb +273 -0
  32. data/lib/daytona_api_client/models/completion_context.rb +244 -0
  33. data/lib/daytona_api_client/models/completion_item.rb +289 -0
  34. data/lib/daytona_api_client/models/completion_list.rb +263 -0
  35. data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
  36. data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
  37. data/lib/daytona_api_client/models/computer_use_status_response.rb +260 -0
  38. data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
  39. data/lib/daytona_api_client/models/create_api_key.rb +288 -0
  40. data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
  41. data/lib/daytona_api_client/models/create_build_info.rb +248 -0
  42. data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
  43. data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
  44. data/lib/daytona_api_client/models/create_organization.rb +236 -0
  45. data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
  46. data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
  47. data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
  48. data/lib/daytona_api_client/models/create_runner.rb +545 -0
  49. data/lib/daytona_api_client/models/create_sandbox.rb +429 -0
  50. data/lib/daytona_api_client/models/create_session_request.rb +236 -0
  51. data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
  52. data/lib/daytona_api_client/models/create_user.rb +331 -0
  53. data/lib/daytona_api_client/models/create_volume.rb +235 -0
  54. data/lib/daytona_api_client/models/create_workspace.rb +411 -0
  55. data/lib/daytona_api_client/models/daytona_configuration.rb +531 -0
  56. data/lib/daytona_api_client/models/display_info_response.rb +238 -0
  57. data/lib/daytona_api_client/models/docker_registry.rb +449 -0
  58. data/lib/daytona_api_client/models/download_files.rb +238 -0
  59. data/lib/daytona_api_client/models/execute_request.rb +255 -0
  60. data/lib/daytona_api_client/models/execute_response.rb +263 -0
  61. data/lib/daytona_api_client/models/file_info.rb +417 -0
  62. data/lib/daytona_api_client/models/file_status.rb +313 -0
  63. data/lib/daytona_api_client/models/git_add_request.rb +264 -0
  64. data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
  65. data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
  66. data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
  67. data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
  68. data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
  69. data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
  70. data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
  71. data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
  72. data/lib/daytona_api_client/models/git_status.rb +290 -0
  73. data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
  74. data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
  75. data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
  76. data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
  77. data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
  78. data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
  79. data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
  80. data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
  81. data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
  82. data/lib/daytona_api_client/models/lsp_location.rb +261 -0
  83. data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
  84. data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
  85. data/lib/daytona_api_client/models/match.rb +287 -0
  86. data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
  87. data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
  88. data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
  89. data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
  90. data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
  91. data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
  92. data/lib/daytona_api_client/models/mouse_position.rb +263 -0
  93. data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
  94. data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
  95. data/lib/daytona_api_client/models/oidc_config.rb +290 -0
  96. data/lib/daytona_api_client/models/organization.rb +695 -0
  97. data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
  98. data/lib/daytona_api_client/models/organization_role.rb +412 -0
  99. data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +236 -0
  100. data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
  101. data/lib/daytona_api_client/models/organization_usage_overview.rb +469 -0
  102. data/lib/daytona_api_client/models/organization_user.rb +451 -0
  103. data/lib/daytona_api_client/models/paginated_audit_logs.rb +315 -0
  104. data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
  105. data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
  106. data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
  107. data/lib/daytona_api_client/models/port_preview_url.rb +273 -0
  108. data/lib/daytona_api_client/models/position.rb +261 -0
  109. data/lib/daytona_api_client/models/posthog_config.rb +263 -0
  110. data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
  111. data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
  112. data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
  113. data/lib/daytona_api_client/models/process_status_response.rb +263 -0
  114. data/lib/daytona_api_client/models/project_dir_response.rb +218 -0
  115. data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
  116. data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
  117. data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
  118. data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
  119. data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
  120. data/lib/daytona_api_client/models/range.rb +261 -0
  121. data/lib/daytona_api_client/models/region.rb +236 -0
  122. data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
  123. data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
  124. data/lib/daytona_api_client/models/replace_request.rb +289 -0
  125. data/lib/daytona_api_client/models/replace_result.rb +236 -0
  126. data/lib/daytona_api_client/models/runner.rb +780 -0
  127. data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
  128. data/lib/daytona_api_client/models/runner_state.rb +43 -0
  129. data/lib/daytona_api_client/models/sandbox.rb +755 -0
  130. data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
  131. data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
  132. data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
  133. data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
  134. data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
  135. data/lib/daytona_api_client/models/sandbox_volume.rb +263 -0
  136. data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
  137. data/lib/daytona_api_client/models/search_files_response.rb +237 -0
  138. data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
  139. data/lib/daytona_api_client/models/session.rb +251 -0
  140. data/lib/daytona_api_client/models/session_execute_request.rb +256 -0
  141. data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
  142. data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
  143. data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
  144. data/lib/daytona_api_client/models/snapshot_state.rb +49 -0
  145. data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
  146. data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +283 -0
  147. data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
  148. data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
  149. data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
  150. data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
  151. data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
  152. data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
  153. data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +260 -0
  154. data/lib/daytona_api_client/models/user.rb +346 -0
  155. data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
  156. data/lib/daytona_api_client/models/user_public_key.rb +263 -0
  157. data/lib/daytona_api_client/models/volume_dto.rb +417 -0
  158. data/lib/daytona_api_client/models/volume_state.rb +45 -0
  159. data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
  160. data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
  161. data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
  162. data/lib/daytona_api_client/models/windows_response.rb +265 -0
  163. data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
  164. data/lib/daytona_api_client/models/workspace.rb +834 -0
  165. data/lib/daytona_api_client/version.rb +15 -0
  166. data/lib/daytona_api_client.rb +194 -0
  167. data/project.json +37 -0
  168. metadata +246 -0
@@ -0,0 +1,1695 @@
1
+ =begin
2
+ #Daytona
3
+
4
+ #Daytona AI platform API Docs
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@daytona.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.12.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module DaytonaApiClient
16
+ class OrganizationsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Accept organization invitation
23
+ # @param invitation_id [String] Invitation ID
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def accept_organization_invitation(invitation_id, opts = {})
27
+ accept_organization_invitation_with_http_info(invitation_id, opts)
28
+ nil
29
+ end
30
+
31
+ # Accept organization invitation
32
+ # @param invitation_id [String] Invitation ID
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def accept_organization_invitation_with_http_info(invitation_id, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.accept_organization_invitation ...'
38
+ end
39
+ # verify the required parameter 'invitation_id' is set
40
+ if @api_client.config.client_side_validation && invitation_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.accept_organization_invitation"
42
+ end
43
+ # resource path
44
+ local_var_path = '/organizations/invitations/{invitationId}/accept'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+
52
+ # form parameters
53
+ form_params = opts[:form_params] || {}
54
+
55
+ # http body (model)
56
+ post_body = opts[:debug_body]
57
+
58
+ # return_type
59
+ return_type = opts[:debug_return_type]
60
+
61
+ # auth_names
62
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
63
+
64
+ new_options = opts.merge(
65
+ :operation => :"OrganizationsApi.accept_organization_invitation",
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: OrganizationsApi#accept_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+
81
+ # Cancel organization invitation
82
+ # @param organization_id [String] Organization ID
83
+ # @param invitation_id [String] Invitation ID
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [nil]
86
+ def cancel_organization_invitation(organization_id, invitation_id, opts = {})
87
+ cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts)
88
+ nil
89
+ end
90
+
91
+ # Cancel organization invitation
92
+ # @param organization_id [String] Organization ID
93
+ # @param invitation_id [String] Invitation ID
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
96
+ def cancel_organization_invitation_with_http_info(organization_id, invitation_id, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.cancel_organization_invitation ...'
99
+ end
100
+ # verify the required parameter 'organization_id' is set
101
+ if @api_client.config.client_side_validation && organization_id.nil?
102
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.cancel_organization_invitation"
103
+ end
104
+ # verify the required parameter 'invitation_id' is set
105
+ if @api_client.config.client_side_validation && invitation_id.nil?
106
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.cancel_organization_invitation"
107
+ end
108
+ # resource path
109
+ local_var_path = '/organizations/{organizationId}/invitations/{invitationId}/cancel'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
110
+
111
+ # query parameters
112
+ query_params = opts[:query_params] || {}
113
+
114
+ # header parameters
115
+ header_params = opts[:header_params] || {}
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body]
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type]
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"OrganizationsApi.cancel_organization_invitation",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: OrganizationsApi#cancel_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Create organization
147
+ # @param create_organization [CreateOrganization]
148
+ # @param [Hash] opts the optional parameters
149
+ # @return [Organization]
150
+ def create_organization(create_organization, opts = {})
151
+ data, _status_code, _headers = create_organization_with_http_info(create_organization, opts)
152
+ data
153
+ end
154
+
155
+ # Create organization
156
+ # @param create_organization [CreateOrganization]
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
159
+ def create_organization_with_http_info(create_organization, opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization ...'
162
+ end
163
+ # verify the required parameter 'create_organization' is set
164
+ if @api_client.config.client_side_validation && create_organization.nil?
165
+ fail ArgumentError, "Missing the required parameter 'create_organization' when calling OrganizationsApi.create_organization"
166
+ end
167
+ # resource path
168
+ local_var_path = '/organizations'
169
+
170
+ # query parameters
171
+ query_params = opts[:query_params] || {}
172
+
173
+ # header parameters
174
+ header_params = opts[:header_params] || {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
177
+ # HTTP header 'Content-Type'
178
+ content_type = @api_client.select_header_content_type(['application/json'])
179
+ if !content_type.nil?
180
+ header_params['Content-Type'] = content_type
181
+ end
182
+
183
+ # form parameters
184
+ form_params = opts[:form_params] || {}
185
+
186
+ # http body (model)
187
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization)
188
+
189
+ # return_type
190
+ return_type = opts[:debug_return_type] || 'Organization'
191
+
192
+ # auth_names
193
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
194
+
195
+ new_options = opts.merge(
196
+ :operation => :"OrganizationsApi.create_organization",
197
+ :header_params => header_params,
198
+ :query_params => query_params,
199
+ :form_params => form_params,
200
+ :body => post_body,
201
+ :auth_names => auth_names,
202
+ :return_type => return_type
203
+ )
204
+
205
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
208
+ end
209
+ return data, status_code, headers
210
+ end
211
+
212
+ # Create organization invitation
213
+ # @param organization_id [String] Organization ID
214
+ # @param create_organization_invitation [CreateOrganizationInvitation]
215
+ # @param [Hash] opts the optional parameters
216
+ # @return [OrganizationInvitation]
217
+ def create_organization_invitation(organization_id, create_organization_invitation, opts = {})
218
+ data, _status_code, _headers = create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts)
219
+ data
220
+ end
221
+
222
+ # Create organization invitation
223
+ # @param organization_id [String] Organization ID
224
+ # @param create_organization_invitation [CreateOrganizationInvitation]
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
227
+ def create_organization_invitation_with_http_info(organization_id, create_organization_invitation, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_invitation ...'
230
+ end
231
+ # verify the required parameter 'organization_id' is set
232
+ if @api_client.config.client_side_validation && organization_id.nil?
233
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_invitation"
234
+ end
235
+ # verify the required parameter 'create_organization_invitation' is set
236
+ if @api_client.config.client_side_validation && create_organization_invitation.nil?
237
+ fail ArgumentError, "Missing the required parameter 'create_organization_invitation' when calling OrganizationsApi.create_organization_invitation"
238
+ end
239
+ # resource path
240
+ local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_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(create_organization_invitation)
260
+
261
+ # return_type
262
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
263
+
264
+ # auth_names
265
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
266
+
267
+ new_options = opts.merge(
268
+ :operation => :"OrganizationsApi.create_organization_invitation",
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(:POST, local_var_path, new_options)
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
283
+
284
+ # Create organization role
285
+ # @param organization_id [String] Organization ID
286
+ # @param create_organization_role [CreateOrganizationRole]
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [OrganizationRole]
289
+ def create_organization_role(organization_id, create_organization_role, opts = {})
290
+ data, _status_code, _headers = create_organization_role_with_http_info(organization_id, create_organization_role, opts)
291
+ data
292
+ end
293
+
294
+ # Create organization role
295
+ # @param organization_id [String] Organization ID
296
+ # @param create_organization_role [CreateOrganizationRole]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
299
+ def create_organization_role_with_http_info(organization_id, create_organization_role, opts = {})
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.create_organization_role ...'
302
+ end
303
+ # verify the required parameter 'organization_id' is set
304
+ if @api_client.config.client_side_validation && organization_id.nil?
305
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.create_organization_role"
306
+ end
307
+ # verify the required parameter 'create_organization_role' is set
308
+ if @api_client.config.client_side_validation && create_organization_role.nil?
309
+ fail ArgumentError, "Missing the required parameter 'create_organization_role' when calling OrganizationsApi.create_organization_role"
310
+ end
311
+ # resource path
312
+ local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
313
+
314
+ # query parameters
315
+ query_params = opts[:query_params] || {}
316
+
317
+ # header parameters
318
+ header_params = opts[:header_params] || {}
319
+ # HTTP header 'Accept' (if needed)
320
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
321
+ # HTTP header 'Content-Type'
322
+ content_type = @api_client.select_header_content_type(['application/json'])
323
+ if !content_type.nil?
324
+ header_params['Content-Type'] = content_type
325
+ end
326
+
327
+ # form parameters
328
+ form_params = opts[:form_params] || {}
329
+
330
+ # http body (model)
331
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_organization_role)
332
+
333
+ # return_type
334
+ return_type = opts[:debug_return_type] || 'OrganizationRole'
335
+
336
+ # auth_names
337
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
338
+
339
+ new_options = opts.merge(
340
+ :operation => :"OrganizationsApi.create_organization_role",
341
+ :header_params => header_params,
342
+ :query_params => query_params,
343
+ :form_params => form_params,
344
+ :body => post_body,
345
+ :auth_names => auth_names,
346
+ :return_type => return_type
347
+ )
348
+
349
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
350
+ if @api_client.config.debugging
351
+ @api_client.config.logger.debug "API called: OrganizationsApi#create_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
+ end
353
+ return data, status_code, headers
354
+ end
355
+
356
+ # Decline organization invitation
357
+ # @param invitation_id [String] Invitation ID
358
+ # @param [Hash] opts the optional parameters
359
+ # @return [nil]
360
+ def decline_organization_invitation(invitation_id, opts = {})
361
+ decline_organization_invitation_with_http_info(invitation_id, opts)
362
+ nil
363
+ end
364
+
365
+ # Decline organization invitation
366
+ # @param invitation_id [String] Invitation ID
367
+ # @param [Hash] opts the optional parameters
368
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
369
+ def decline_organization_invitation_with_http_info(invitation_id, opts = {})
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.decline_organization_invitation ...'
372
+ end
373
+ # verify the required parameter 'invitation_id' is set
374
+ if @api_client.config.client_side_validation && invitation_id.nil?
375
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.decline_organization_invitation"
376
+ end
377
+ # resource path
378
+ local_var_path = '/organizations/invitations/{invitationId}/decline'.sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
379
+
380
+ # query parameters
381
+ query_params = opts[:query_params] || {}
382
+
383
+ # header parameters
384
+ header_params = opts[:header_params] || {}
385
+
386
+ # form parameters
387
+ form_params = opts[:form_params] || {}
388
+
389
+ # http body (model)
390
+ post_body = opts[:debug_body]
391
+
392
+ # return_type
393
+ return_type = opts[:debug_return_type]
394
+
395
+ # auth_names
396
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
397
+
398
+ new_options = opts.merge(
399
+ :operation => :"OrganizationsApi.decline_organization_invitation",
400
+ :header_params => header_params,
401
+ :query_params => query_params,
402
+ :form_params => form_params,
403
+ :body => post_body,
404
+ :auth_names => auth_names,
405
+ :return_type => return_type
406
+ )
407
+
408
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
409
+ if @api_client.config.debugging
410
+ @api_client.config.logger.debug "API called: OrganizationsApi#decline_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
411
+ end
412
+ return data, status_code, headers
413
+ end
414
+
415
+ # Delete organization
416
+ # @param organization_id [String] Organization ID
417
+ # @param [Hash] opts the optional parameters
418
+ # @return [nil]
419
+ def delete_organization(organization_id, opts = {})
420
+ delete_organization_with_http_info(organization_id, opts)
421
+ nil
422
+ end
423
+
424
+ # Delete organization
425
+ # @param organization_id [String] Organization ID
426
+ # @param [Hash] opts the optional parameters
427
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
428
+ def delete_organization_with_http_info(organization_id, opts = {})
429
+ if @api_client.config.debugging
430
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization ...'
431
+ end
432
+ # verify the required parameter 'organization_id' is set
433
+ if @api_client.config.client_side_validation && organization_id.nil?
434
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization"
435
+ end
436
+ # resource path
437
+ local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
438
+
439
+ # query parameters
440
+ query_params = opts[:query_params] || {}
441
+
442
+ # header parameters
443
+ header_params = opts[:header_params] || {}
444
+
445
+ # form parameters
446
+ form_params = opts[:form_params] || {}
447
+
448
+ # http body (model)
449
+ post_body = opts[:debug_body]
450
+
451
+ # return_type
452
+ return_type = opts[:debug_return_type]
453
+
454
+ # auth_names
455
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
456
+
457
+ new_options = opts.merge(
458
+ :operation => :"OrganizationsApi.delete_organization",
459
+ :header_params => header_params,
460
+ :query_params => query_params,
461
+ :form_params => form_params,
462
+ :body => post_body,
463
+ :auth_names => auth_names,
464
+ :return_type => return_type
465
+ )
466
+
467
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
468
+ if @api_client.config.debugging
469
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
470
+ end
471
+ return data, status_code, headers
472
+ end
473
+
474
+ # Delete organization member
475
+ # @param organization_id [String] Organization ID
476
+ # @param user_id [String] User ID
477
+ # @param [Hash] opts the optional parameters
478
+ # @return [nil]
479
+ def delete_organization_member(organization_id, user_id, opts = {})
480
+ delete_organization_member_with_http_info(organization_id, user_id, opts)
481
+ nil
482
+ end
483
+
484
+ # Delete organization member
485
+ # @param organization_id [String] Organization ID
486
+ # @param user_id [String] User ID
487
+ # @param [Hash] opts the optional parameters
488
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
489
+ def delete_organization_member_with_http_info(organization_id, user_id, opts = {})
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_member ...'
492
+ end
493
+ # verify the required parameter 'organization_id' is set
494
+ if @api_client.config.client_side_validation && organization_id.nil?
495
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_member"
496
+ end
497
+ # verify the required parameter 'user_id' is set
498
+ if @api_client.config.client_side_validation && user_id.nil?
499
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.delete_organization_member"
500
+ end
501
+ # resource path
502
+ local_var_path = '/organizations/{organizationId}/users/{userId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
503
+
504
+ # query parameters
505
+ query_params = opts[:query_params] || {}
506
+
507
+ # header parameters
508
+ header_params = opts[:header_params] || {}
509
+
510
+ # form parameters
511
+ form_params = opts[:form_params] || {}
512
+
513
+ # http body (model)
514
+ post_body = opts[:debug_body]
515
+
516
+ # return_type
517
+ return_type = opts[:debug_return_type]
518
+
519
+ # auth_names
520
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
521
+
522
+ new_options = opts.merge(
523
+ :operation => :"OrganizationsApi.delete_organization_member",
524
+ :header_params => header_params,
525
+ :query_params => query_params,
526
+ :form_params => form_params,
527
+ :body => post_body,
528
+ :auth_names => auth_names,
529
+ :return_type => return_type
530
+ )
531
+
532
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
533
+ if @api_client.config.debugging
534
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
535
+ end
536
+ return data, status_code, headers
537
+ end
538
+
539
+ # Delete organization role
540
+ # @param organization_id [String] Organization ID
541
+ # @param role_id [String] Role ID
542
+ # @param [Hash] opts the optional parameters
543
+ # @return [nil]
544
+ def delete_organization_role(organization_id, role_id, opts = {})
545
+ delete_organization_role_with_http_info(organization_id, role_id, opts)
546
+ nil
547
+ end
548
+
549
+ # Delete organization role
550
+ # @param organization_id [String] Organization ID
551
+ # @param role_id [String] Role ID
552
+ # @param [Hash] opts the optional parameters
553
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
554
+ def delete_organization_role_with_http_info(organization_id, role_id, opts = {})
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_organization_role ...'
557
+ end
558
+ # verify the required parameter 'organization_id' is set
559
+ if @api_client.config.client_side_validation && organization_id.nil?
560
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.delete_organization_role"
561
+ end
562
+ # verify the required parameter 'role_id' is set
563
+ if @api_client.config.client_side_validation && role_id.nil?
564
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.delete_organization_role"
565
+ end
566
+ # resource path
567
+ local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))
568
+
569
+ # query parameters
570
+ query_params = opts[:query_params] || {}
571
+
572
+ # header parameters
573
+ header_params = opts[:header_params] || {}
574
+
575
+ # form parameters
576
+ form_params = opts[:form_params] || {}
577
+
578
+ # http body (model)
579
+ post_body = opts[:debug_body]
580
+
581
+ # return_type
582
+ return_type = opts[:debug_return_type]
583
+
584
+ # auth_names
585
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
586
+
587
+ new_options = opts.merge(
588
+ :operation => :"OrganizationsApi.delete_organization_role",
589
+ :header_params => header_params,
590
+ :query_params => query_params,
591
+ :form_params => form_params,
592
+ :body => post_body,
593
+ :auth_names => auth_names,
594
+ :return_type => return_type
595
+ )
596
+
597
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
598
+ if @api_client.config.debugging
599
+ @api_client.config.logger.debug "API called: OrganizationsApi#delete_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
600
+ end
601
+ return data, status_code, headers
602
+ end
603
+
604
+ # Get organization by ID
605
+ # @param organization_id [String] Organization ID
606
+ # @param [Hash] opts the optional parameters
607
+ # @return [Organization]
608
+ def get_organization(organization_id, opts = {})
609
+ data, _status_code, _headers = get_organization_with_http_info(organization_id, opts)
610
+ data
611
+ end
612
+
613
+ # Get organization by ID
614
+ # @param organization_id [String] Organization ID
615
+ # @param [Hash] opts the optional parameters
616
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
617
+ def get_organization_with_http_info(organization_id, opts = {})
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization ...'
620
+ end
621
+ # verify the required parameter 'organization_id' is set
622
+ if @api_client.config.client_side_validation && organization_id.nil?
623
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization"
624
+ end
625
+ # resource path
626
+ local_var_path = '/organizations/{organizationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
627
+
628
+ # query parameters
629
+ query_params = opts[:query_params] || {}
630
+
631
+ # header parameters
632
+ header_params = opts[:header_params] || {}
633
+ # HTTP header 'Accept' (if needed)
634
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
635
+
636
+ # form parameters
637
+ form_params = opts[:form_params] || {}
638
+
639
+ # http body (model)
640
+ post_body = opts[:debug_body]
641
+
642
+ # return_type
643
+ return_type = opts[:debug_return_type] || 'Organization'
644
+
645
+ # auth_names
646
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
647
+
648
+ new_options = opts.merge(
649
+ :operation => :"OrganizationsApi.get_organization",
650
+ :header_params => header_params,
651
+ :query_params => query_params,
652
+ :form_params => form_params,
653
+ :body => post_body,
654
+ :auth_names => auth_names,
655
+ :return_type => return_type
656
+ )
657
+
658
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
659
+ if @api_client.config.debugging
660
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
661
+ end
662
+ return data, status_code, headers
663
+ end
664
+
665
+ # Get organization by sandbox ID
666
+ # @param sandbox_id [String] Sandbox ID
667
+ # @param [Hash] opts the optional parameters
668
+ # @return [Organization]
669
+ def get_organization_by_sandbox_id(sandbox_id, opts = {})
670
+ data, _status_code, _headers = get_organization_by_sandbox_id_with_http_info(sandbox_id, opts)
671
+ data
672
+ end
673
+
674
+ # Get organization by sandbox ID
675
+ # @param sandbox_id [String] Sandbox ID
676
+ # @param [Hash] opts the optional parameters
677
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
678
+ def get_organization_by_sandbox_id_with_http_info(sandbox_id, opts = {})
679
+ if @api_client.config.debugging
680
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_by_sandbox_id ...'
681
+ end
682
+ # verify the required parameter 'sandbox_id' is set
683
+ if @api_client.config.client_side_validation && sandbox_id.nil?
684
+ fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling OrganizationsApi.get_organization_by_sandbox_id"
685
+ end
686
+ # resource path
687
+ local_var_path = '/organizations/by-sandbox-id/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
688
+
689
+ # query parameters
690
+ query_params = opts[:query_params] || {}
691
+
692
+ # header parameters
693
+ header_params = opts[:header_params] || {}
694
+ # HTTP header 'Accept' (if needed)
695
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
696
+
697
+ # form parameters
698
+ form_params = opts[:form_params] || {}
699
+
700
+ # http body (model)
701
+ post_body = opts[:debug_body]
702
+
703
+ # return_type
704
+ return_type = opts[:debug_return_type] || 'Organization'
705
+
706
+ # auth_names
707
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
708
+
709
+ new_options = opts.merge(
710
+ :operation => :"OrganizationsApi.get_organization_by_sandbox_id",
711
+ :header_params => header_params,
712
+ :query_params => query_params,
713
+ :form_params => form_params,
714
+ :body => post_body,
715
+ :auth_names => auth_names,
716
+ :return_type => return_type
717
+ )
718
+
719
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
720
+ if @api_client.config.debugging
721
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
722
+ end
723
+ return data, status_code, headers
724
+ end
725
+
726
+ # Get count of organization invitations for authenticated user
727
+ # @param [Hash] opts the optional parameters
728
+ # @return [Float]
729
+ def get_organization_invitations_count_for_authenticated_user(opts = {})
730
+ data, _status_code, _headers = get_organization_invitations_count_for_authenticated_user_with_http_info(opts)
731
+ data
732
+ end
733
+
734
+ # Get count of organization invitations for authenticated user
735
+ # @param [Hash] opts the optional parameters
736
+ # @return [Array<(Float, Integer, Hash)>] Float data, response status code and response headers
737
+ def get_organization_invitations_count_for_authenticated_user_with_http_info(opts = {})
738
+ if @api_client.config.debugging
739
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_invitations_count_for_authenticated_user ...'
740
+ end
741
+ # resource path
742
+ local_var_path = '/organizations/invitations/count'
743
+
744
+ # query parameters
745
+ query_params = opts[:query_params] || {}
746
+
747
+ # header parameters
748
+ header_params = opts[:header_params] || {}
749
+ # HTTP header 'Accept' (if needed)
750
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
751
+
752
+ # form parameters
753
+ form_params = opts[:form_params] || {}
754
+
755
+ # http body (model)
756
+ post_body = opts[:debug_body]
757
+
758
+ # return_type
759
+ return_type = opts[:debug_return_type] || 'Float'
760
+
761
+ # auth_names
762
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
763
+
764
+ new_options = opts.merge(
765
+ :operation => :"OrganizationsApi.get_organization_invitations_count_for_authenticated_user",
766
+ :header_params => header_params,
767
+ :query_params => query_params,
768
+ :form_params => form_params,
769
+ :body => post_body,
770
+ :auth_names => auth_names,
771
+ :return_type => return_type
772
+ )
773
+
774
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
775
+ if @api_client.config.debugging
776
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_invitations_count_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
777
+ end
778
+ return data, status_code, headers
779
+ end
780
+
781
+ # Get organization current usage overview
782
+ # @param organization_id [String] Organization ID
783
+ # @param [Hash] opts the optional parameters
784
+ # @return [OrganizationUsageOverview]
785
+ def get_organization_usage_overview(organization_id, opts = {})
786
+ data, _status_code, _headers = get_organization_usage_overview_with_http_info(organization_id, opts)
787
+ data
788
+ end
789
+
790
+ # Get organization current usage overview
791
+ # @param organization_id [String] Organization ID
792
+ # @param [Hash] opts the optional parameters
793
+ # @return [Array<(OrganizationUsageOverview, Integer, Hash)>] OrganizationUsageOverview data, response status code and response headers
794
+ def get_organization_usage_overview_with_http_info(organization_id, opts = {})
795
+ if @api_client.config.debugging
796
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.get_organization_usage_overview ...'
797
+ end
798
+ # verify the required parameter 'organization_id' is set
799
+ if @api_client.config.client_side_validation && organization_id.nil?
800
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_organization_usage_overview"
801
+ end
802
+ # resource path
803
+ local_var_path = '/organizations/{organizationId}/usage'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
804
+
805
+ # query parameters
806
+ query_params = opts[:query_params] || {}
807
+
808
+ # header parameters
809
+ header_params = opts[:header_params] || {}
810
+ # HTTP header 'Accept' (if needed)
811
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
812
+
813
+ # form parameters
814
+ form_params = opts[:form_params] || {}
815
+
816
+ # http body (model)
817
+ post_body = opts[:debug_body]
818
+
819
+ # return_type
820
+ return_type = opts[:debug_return_type] || 'OrganizationUsageOverview'
821
+
822
+ # auth_names
823
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
824
+
825
+ new_options = opts.merge(
826
+ :operation => :"OrganizationsApi.get_organization_usage_overview",
827
+ :header_params => header_params,
828
+ :query_params => query_params,
829
+ :form_params => form_params,
830
+ :body => post_body,
831
+ :auth_names => auth_names,
832
+ :return_type => return_type
833
+ )
834
+
835
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
836
+ if @api_client.config.debugging
837
+ @api_client.config.logger.debug "API called: OrganizationsApi#get_organization_usage_overview\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
838
+ end
839
+ return data, status_code, headers
840
+ end
841
+
842
+ # Leave organization
843
+ # @param organization_id [String] Organization ID
844
+ # @param [Hash] opts the optional parameters
845
+ # @return [nil]
846
+ def leave_organization(organization_id, opts = {})
847
+ leave_organization_with_http_info(organization_id, opts)
848
+ nil
849
+ end
850
+
851
+ # Leave organization
852
+ # @param organization_id [String] Organization ID
853
+ # @param [Hash] opts the optional parameters
854
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
855
+ def leave_organization_with_http_info(organization_id, opts = {})
856
+ if @api_client.config.debugging
857
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.leave_organization ...'
858
+ end
859
+ # verify the required parameter 'organization_id' is set
860
+ if @api_client.config.client_side_validation && organization_id.nil?
861
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.leave_organization"
862
+ end
863
+ # resource path
864
+ local_var_path = '/organizations/{organizationId}/leave'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
865
+
866
+ # query parameters
867
+ query_params = opts[:query_params] || {}
868
+
869
+ # header parameters
870
+ header_params = opts[:header_params] || {}
871
+
872
+ # form parameters
873
+ form_params = opts[:form_params] || {}
874
+
875
+ # http body (model)
876
+ post_body = opts[:debug_body]
877
+
878
+ # return_type
879
+ return_type = opts[:debug_return_type]
880
+
881
+ # auth_names
882
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
883
+
884
+ new_options = opts.merge(
885
+ :operation => :"OrganizationsApi.leave_organization",
886
+ :header_params => header_params,
887
+ :query_params => query_params,
888
+ :form_params => form_params,
889
+ :body => post_body,
890
+ :auth_names => auth_names,
891
+ :return_type => return_type
892
+ )
893
+
894
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
895
+ if @api_client.config.debugging
896
+ @api_client.config.logger.debug "API called: OrganizationsApi#leave_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
897
+ end
898
+ return data, status_code, headers
899
+ end
900
+
901
+ # List pending organization invitations
902
+ # @param organization_id [String] Organization ID
903
+ # @param [Hash] opts the optional parameters
904
+ # @return [Array<OrganizationInvitation>]
905
+ def list_organization_invitations(organization_id, opts = {})
906
+ data, _status_code, _headers = list_organization_invitations_with_http_info(organization_id, opts)
907
+ data
908
+ end
909
+
910
+ # List pending organization invitations
911
+ # @param organization_id [String] Organization ID
912
+ # @param [Hash] opts the optional parameters
913
+ # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
914
+ def list_organization_invitations_with_http_info(organization_id, opts = {})
915
+ if @api_client.config.debugging
916
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations ...'
917
+ end
918
+ # verify the required parameter 'organization_id' is set
919
+ if @api_client.config.client_side_validation && organization_id.nil?
920
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_invitations"
921
+ end
922
+ # resource path
923
+ local_var_path = '/organizations/{organizationId}/invitations'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
924
+
925
+ # query parameters
926
+ query_params = opts[:query_params] || {}
927
+
928
+ # header parameters
929
+ header_params = opts[:header_params] || {}
930
+ # HTTP header 'Accept' (if needed)
931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
932
+
933
+ # form parameters
934
+ form_params = opts[:form_params] || {}
935
+
936
+ # http body (model)
937
+ post_body = opts[:debug_body]
938
+
939
+ # return_type
940
+ return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'
941
+
942
+ # auth_names
943
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
944
+
945
+ new_options = opts.merge(
946
+ :operation => :"OrganizationsApi.list_organization_invitations",
947
+ :header_params => header_params,
948
+ :query_params => query_params,
949
+ :form_params => form_params,
950
+ :body => post_body,
951
+ :auth_names => auth_names,
952
+ :return_type => return_type
953
+ )
954
+
955
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
958
+ end
959
+ return data, status_code, headers
960
+ end
961
+
962
+ # List organization invitations for authenticated user
963
+ # @param [Hash] opts the optional parameters
964
+ # @return [Array<OrganizationInvitation>]
965
+ def list_organization_invitations_for_authenticated_user(opts = {})
966
+ data, _status_code, _headers = list_organization_invitations_for_authenticated_user_with_http_info(opts)
967
+ data
968
+ end
969
+
970
+ # List organization invitations for authenticated user
971
+ # @param [Hash] opts the optional parameters
972
+ # @return [Array<(Array<OrganizationInvitation>, Integer, Hash)>] Array<OrganizationInvitation> data, response status code and response headers
973
+ def list_organization_invitations_for_authenticated_user_with_http_info(opts = {})
974
+ if @api_client.config.debugging
975
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_invitations_for_authenticated_user ...'
976
+ end
977
+ # resource path
978
+ local_var_path = '/organizations/invitations'
979
+
980
+ # query parameters
981
+ query_params = opts[:query_params] || {}
982
+
983
+ # header parameters
984
+ header_params = opts[:header_params] || {}
985
+ # HTTP header 'Accept' (if needed)
986
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
987
+
988
+ # form parameters
989
+ form_params = opts[:form_params] || {}
990
+
991
+ # http body (model)
992
+ post_body = opts[:debug_body]
993
+
994
+ # return_type
995
+ return_type = opts[:debug_return_type] || 'Array<OrganizationInvitation>'
996
+
997
+ # auth_names
998
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
999
+
1000
+ new_options = opts.merge(
1001
+ :operation => :"OrganizationsApi.list_organization_invitations_for_authenticated_user",
1002
+ :header_params => header_params,
1003
+ :query_params => query_params,
1004
+ :form_params => form_params,
1005
+ :body => post_body,
1006
+ :auth_names => auth_names,
1007
+ :return_type => return_type
1008
+ )
1009
+
1010
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1011
+ if @api_client.config.debugging
1012
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_invitations_for_authenticated_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1013
+ end
1014
+ return data, status_code, headers
1015
+ end
1016
+
1017
+ # List organization members
1018
+ # @param organization_id [String] Organization ID
1019
+ # @param [Hash] opts the optional parameters
1020
+ # @return [Array<OrganizationUser>]
1021
+ def list_organization_members(organization_id, opts = {})
1022
+ data, _status_code, _headers = list_organization_members_with_http_info(organization_id, opts)
1023
+ data
1024
+ end
1025
+
1026
+ # List organization members
1027
+ # @param organization_id [String] Organization ID
1028
+ # @param [Hash] opts the optional parameters
1029
+ # @return [Array<(Array<OrganizationUser>, Integer, Hash)>] Array<OrganizationUser> data, response status code and response headers
1030
+ def list_organization_members_with_http_info(organization_id, opts = {})
1031
+ if @api_client.config.debugging
1032
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_members ...'
1033
+ end
1034
+ # verify the required parameter 'organization_id' is set
1035
+ if @api_client.config.client_side_validation && organization_id.nil?
1036
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_members"
1037
+ end
1038
+ # resource path
1039
+ local_var_path = '/organizations/{organizationId}/users'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1040
+
1041
+ # query parameters
1042
+ query_params = opts[:query_params] || {}
1043
+
1044
+ # header parameters
1045
+ header_params = opts[:header_params] || {}
1046
+ # HTTP header 'Accept' (if needed)
1047
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1048
+
1049
+ # form parameters
1050
+ form_params = opts[:form_params] || {}
1051
+
1052
+ # http body (model)
1053
+ post_body = opts[:debug_body]
1054
+
1055
+ # return_type
1056
+ return_type = opts[:debug_return_type] || 'Array<OrganizationUser>'
1057
+
1058
+ # auth_names
1059
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1060
+
1061
+ new_options = opts.merge(
1062
+ :operation => :"OrganizationsApi.list_organization_members",
1063
+ :header_params => header_params,
1064
+ :query_params => query_params,
1065
+ :form_params => form_params,
1066
+ :body => post_body,
1067
+ :auth_names => auth_names,
1068
+ :return_type => return_type
1069
+ )
1070
+
1071
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1072
+ if @api_client.config.debugging
1073
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1074
+ end
1075
+ return data, status_code, headers
1076
+ end
1077
+
1078
+ # List organization roles
1079
+ # @param organization_id [String] Organization ID
1080
+ # @param [Hash] opts the optional parameters
1081
+ # @return [Array<OrganizationRole>]
1082
+ def list_organization_roles(organization_id, opts = {})
1083
+ data, _status_code, _headers = list_organization_roles_with_http_info(organization_id, opts)
1084
+ data
1085
+ end
1086
+
1087
+ # List organization roles
1088
+ # @param organization_id [String] Organization ID
1089
+ # @param [Hash] opts the optional parameters
1090
+ # @return [Array<(Array<OrganizationRole>, Integer, Hash)>] Array<OrganizationRole> data, response status code and response headers
1091
+ def list_organization_roles_with_http_info(organization_id, opts = {})
1092
+ if @api_client.config.debugging
1093
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organization_roles ...'
1094
+ end
1095
+ # verify the required parameter 'organization_id' is set
1096
+ if @api_client.config.client_side_validation && organization_id.nil?
1097
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.list_organization_roles"
1098
+ end
1099
+ # resource path
1100
+ local_var_path = '/organizations/{organizationId}/roles'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1101
+
1102
+ # query parameters
1103
+ query_params = opts[:query_params] || {}
1104
+
1105
+ # header parameters
1106
+ header_params = opts[:header_params] || {}
1107
+ # HTTP header 'Accept' (if needed)
1108
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1109
+
1110
+ # form parameters
1111
+ form_params = opts[:form_params] || {}
1112
+
1113
+ # http body (model)
1114
+ post_body = opts[:debug_body]
1115
+
1116
+ # return_type
1117
+ return_type = opts[:debug_return_type] || 'Array<OrganizationRole>'
1118
+
1119
+ # auth_names
1120
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1121
+
1122
+ new_options = opts.merge(
1123
+ :operation => :"OrganizationsApi.list_organization_roles",
1124
+ :header_params => header_params,
1125
+ :query_params => query_params,
1126
+ :form_params => form_params,
1127
+ :body => post_body,
1128
+ :auth_names => auth_names,
1129
+ :return_type => return_type
1130
+ )
1131
+
1132
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1133
+ if @api_client.config.debugging
1134
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organization_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1135
+ end
1136
+ return data, status_code, headers
1137
+ end
1138
+
1139
+ # List organizations
1140
+ # @param [Hash] opts the optional parameters
1141
+ # @return [Array<Organization>]
1142
+ def list_organizations(opts = {})
1143
+ data, _status_code, _headers = list_organizations_with_http_info(opts)
1144
+ data
1145
+ end
1146
+
1147
+ # List organizations
1148
+ # @param [Hash] opts the optional parameters
1149
+ # @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
1150
+ def list_organizations_with_http_info(opts = {})
1151
+ if @api_client.config.debugging
1152
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.list_organizations ...'
1153
+ end
1154
+ # resource path
1155
+ local_var_path = '/organizations'
1156
+
1157
+ # query parameters
1158
+ query_params = opts[:query_params] || {}
1159
+
1160
+ # header parameters
1161
+ header_params = opts[:header_params] || {}
1162
+ # HTTP header 'Accept' (if needed)
1163
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1164
+
1165
+ # form parameters
1166
+ form_params = opts[:form_params] || {}
1167
+
1168
+ # http body (model)
1169
+ post_body = opts[:debug_body]
1170
+
1171
+ # return_type
1172
+ return_type = opts[:debug_return_type] || 'Array<Organization>'
1173
+
1174
+ # auth_names
1175
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1176
+
1177
+ new_options = opts.merge(
1178
+ :operation => :"OrganizationsApi.list_organizations",
1179
+ :header_params => header_params,
1180
+ :query_params => query_params,
1181
+ :form_params => form_params,
1182
+ :body => post_body,
1183
+ :auth_names => auth_names,
1184
+ :return_type => return_type
1185
+ )
1186
+
1187
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1188
+ if @api_client.config.debugging
1189
+ @api_client.config.logger.debug "API called: OrganizationsApi#list_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1190
+ end
1191
+ return data, status_code, headers
1192
+ end
1193
+
1194
+ # Suspend organization
1195
+ # @param organization_id [String] Organization ID
1196
+ # @param [Hash] opts the optional parameters
1197
+ # @option opts [OrganizationSuspension] :organization_suspension
1198
+ # @return [nil]
1199
+ def suspend_organization(organization_id, opts = {})
1200
+ suspend_organization_with_http_info(organization_id, opts)
1201
+ nil
1202
+ end
1203
+
1204
+ # Suspend organization
1205
+ # @param organization_id [String] Organization ID
1206
+ # @param [Hash] opts the optional parameters
1207
+ # @option opts [OrganizationSuspension] :organization_suspension
1208
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1209
+ def suspend_organization_with_http_info(organization_id, opts = {})
1210
+ if @api_client.config.debugging
1211
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.suspend_organization ...'
1212
+ end
1213
+ # verify the required parameter 'organization_id' is set
1214
+ if @api_client.config.client_side_validation && organization_id.nil?
1215
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.suspend_organization"
1216
+ end
1217
+ # resource path
1218
+ local_var_path = '/organizations/{organizationId}/suspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1219
+
1220
+ # query parameters
1221
+ query_params = opts[:query_params] || {}
1222
+
1223
+ # header parameters
1224
+ header_params = opts[:header_params] || {}
1225
+ # HTTP header 'Content-Type'
1226
+ content_type = @api_client.select_header_content_type(['application/json'])
1227
+ if !content_type.nil?
1228
+ header_params['Content-Type'] = content_type
1229
+ end
1230
+
1231
+ # form parameters
1232
+ form_params = opts[:form_params] || {}
1233
+
1234
+ # http body (model)
1235
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'organization_suspension'])
1236
+
1237
+ # return_type
1238
+ return_type = opts[:debug_return_type]
1239
+
1240
+ # auth_names
1241
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1242
+
1243
+ new_options = opts.merge(
1244
+ :operation => :"OrganizationsApi.suspend_organization",
1245
+ :header_params => header_params,
1246
+ :query_params => query_params,
1247
+ :form_params => form_params,
1248
+ :body => post_body,
1249
+ :auth_names => auth_names,
1250
+ :return_type => return_type
1251
+ )
1252
+
1253
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1254
+ if @api_client.config.debugging
1255
+ @api_client.config.logger.debug "API called: OrganizationsApi#suspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1256
+ end
1257
+ return data, status_code, headers
1258
+ end
1259
+
1260
+ # Unsuspend organization
1261
+ # @param organization_id [String] Organization ID
1262
+ # @param [Hash] opts the optional parameters
1263
+ # @return [nil]
1264
+ def unsuspend_organization(organization_id, opts = {})
1265
+ unsuspend_organization_with_http_info(organization_id, opts)
1266
+ nil
1267
+ end
1268
+
1269
+ # Unsuspend organization
1270
+ # @param organization_id [String] Organization ID
1271
+ # @param [Hash] opts the optional parameters
1272
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1273
+ def unsuspend_organization_with_http_info(organization_id, opts = {})
1274
+ if @api_client.config.debugging
1275
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.unsuspend_organization ...'
1276
+ end
1277
+ # verify the required parameter 'organization_id' is set
1278
+ if @api_client.config.client_side_validation && organization_id.nil?
1279
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.unsuspend_organization"
1280
+ end
1281
+ # resource path
1282
+ local_var_path = '/organizations/{organizationId}/unsuspend'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1283
+
1284
+ # query parameters
1285
+ query_params = opts[:query_params] || {}
1286
+
1287
+ # header parameters
1288
+ header_params = opts[:header_params] || {}
1289
+
1290
+ # form parameters
1291
+ form_params = opts[:form_params] || {}
1292
+
1293
+ # http body (model)
1294
+ post_body = opts[:debug_body]
1295
+
1296
+ # return_type
1297
+ return_type = opts[:debug_return_type]
1298
+
1299
+ # auth_names
1300
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1301
+
1302
+ new_options = opts.merge(
1303
+ :operation => :"OrganizationsApi.unsuspend_organization",
1304
+ :header_params => header_params,
1305
+ :query_params => query_params,
1306
+ :form_params => form_params,
1307
+ :body => post_body,
1308
+ :auth_names => auth_names,
1309
+ :return_type => return_type
1310
+ )
1311
+
1312
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1313
+ if @api_client.config.debugging
1314
+ @api_client.config.logger.debug "API called: OrganizationsApi#unsuspend_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1315
+ end
1316
+ return data, status_code, headers
1317
+ end
1318
+
1319
+ # Update access for organization member
1320
+ # @param organization_id [String] Organization ID
1321
+ # @param user_id [String] User ID
1322
+ # @param update_organization_member_access [UpdateOrganizationMemberAccess]
1323
+ # @param [Hash] opts the optional parameters
1324
+ # @return [OrganizationUser]
1325
+ def update_access_for_organization_member(organization_id, user_id, update_organization_member_access, opts = {})
1326
+ data, _status_code, _headers = update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts)
1327
+ data
1328
+ end
1329
+
1330
+ # Update access for organization member
1331
+ # @param organization_id [String] Organization ID
1332
+ # @param user_id [String] User ID
1333
+ # @param update_organization_member_access [UpdateOrganizationMemberAccess]
1334
+ # @param [Hash] opts the optional parameters
1335
+ # @return [Array<(OrganizationUser, Integer, Hash)>] OrganizationUser data, response status code and response headers
1336
+ def update_access_for_organization_member_with_http_info(organization_id, user_id, update_organization_member_access, opts = {})
1337
+ if @api_client.config.debugging
1338
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_access_for_organization_member ...'
1339
+ end
1340
+ # verify the required parameter 'organization_id' is set
1341
+ if @api_client.config.client_side_validation && organization_id.nil?
1342
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_access_for_organization_member"
1343
+ end
1344
+ # verify the required parameter 'user_id' is set
1345
+ if @api_client.config.client_side_validation && user_id.nil?
1346
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling OrganizationsApi.update_access_for_organization_member"
1347
+ end
1348
+ # verify the required parameter 'update_organization_member_access' is set
1349
+ if @api_client.config.client_side_validation && update_organization_member_access.nil?
1350
+ fail ArgumentError, "Missing the required parameter 'update_organization_member_access' when calling OrganizationsApi.update_access_for_organization_member"
1351
+ end
1352
+ # resource path
1353
+ local_var_path = '/organizations/{organizationId}/users/{userId}/access'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
1354
+
1355
+ # query parameters
1356
+ query_params = opts[:query_params] || {}
1357
+
1358
+ # header parameters
1359
+ header_params = opts[:header_params] || {}
1360
+ # HTTP header 'Accept' (if needed)
1361
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1362
+ # HTTP header 'Content-Type'
1363
+ content_type = @api_client.select_header_content_type(['application/json'])
1364
+ if !content_type.nil?
1365
+ header_params['Content-Type'] = content_type
1366
+ end
1367
+
1368
+ # form parameters
1369
+ form_params = opts[:form_params] || {}
1370
+
1371
+ # http body (model)
1372
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_member_access)
1373
+
1374
+ # return_type
1375
+ return_type = opts[:debug_return_type] || 'OrganizationUser'
1376
+
1377
+ # auth_names
1378
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1379
+
1380
+ new_options = opts.merge(
1381
+ :operation => :"OrganizationsApi.update_access_for_organization_member",
1382
+ :header_params => header_params,
1383
+ :query_params => query_params,
1384
+ :form_params => form_params,
1385
+ :body => post_body,
1386
+ :auth_names => auth_names,
1387
+ :return_type => return_type
1388
+ )
1389
+
1390
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1391
+ if @api_client.config.debugging
1392
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_access_for_organization_member\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1393
+ end
1394
+ return data, status_code, headers
1395
+ end
1396
+
1397
+ # Update organization invitation
1398
+ # @param organization_id [String] Organization ID
1399
+ # @param invitation_id [String] Invitation ID
1400
+ # @param update_organization_invitation [UpdateOrganizationInvitation]
1401
+ # @param [Hash] opts the optional parameters
1402
+ # @return [OrganizationInvitation]
1403
+ def update_organization_invitation(organization_id, invitation_id, update_organization_invitation, opts = {})
1404
+ data, _status_code, _headers = update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts)
1405
+ data
1406
+ end
1407
+
1408
+ # Update organization invitation
1409
+ # @param organization_id [String] Organization ID
1410
+ # @param invitation_id [String] Invitation ID
1411
+ # @param update_organization_invitation [UpdateOrganizationInvitation]
1412
+ # @param [Hash] opts the optional parameters
1413
+ # @return [Array<(OrganizationInvitation, Integer, Hash)>] OrganizationInvitation data, response status code and response headers
1414
+ def update_organization_invitation_with_http_info(organization_id, invitation_id, update_organization_invitation, opts = {})
1415
+ if @api_client.config.debugging
1416
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_invitation ...'
1417
+ end
1418
+ # verify the required parameter 'organization_id' is set
1419
+ if @api_client.config.client_side_validation && organization_id.nil?
1420
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_invitation"
1421
+ end
1422
+ # verify the required parameter 'invitation_id' is set
1423
+ if @api_client.config.client_side_validation && invitation_id.nil?
1424
+ fail ArgumentError, "Missing the required parameter 'invitation_id' when calling OrganizationsApi.update_organization_invitation"
1425
+ end
1426
+ # verify the required parameter 'update_organization_invitation' is set
1427
+ if @api_client.config.client_side_validation && update_organization_invitation.nil?
1428
+ fail ArgumentError, "Missing the required parameter 'update_organization_invitation' when calling OrganizationsApi.update_organization_invitation"
1429
+ end
1430
+ # resource path
1431
+ local_var_path = '/organizations/{organizationId}/invitations/{invitationId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'invitationId' + '}', CGI.escape(invitation_id.to_s))
1432
+
1433
+ # query parameters
1434
+ query_params = opts[:query_params] || {}
1435
+
1436
+ # header parameters
1437
+ header_params = opts[:header_params] || {}
1438
+ # HTTP header 'Accept' (if needed)
1439
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1440
+ # HTTP header 'Content-Type'
1441
+ content_type = @api_client.select_header_content_type(['application/json'])
1442
+ if !content_type.nil?
1443
+ header_params['Content-Type'] = content_type
1444
+ end
1445
+
1446
+ # form parameters
1447
+ form_params = opts[:form_params] || {}
1448
+
1449
+ # http body (model)
1450
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_invitation)
1451
+
1452
+ # return_type
1453
+ return_type = opts[:debug_return_type] || 'OrganizationInvitation'
1454
+
1455
+ # auth_names
1456
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1457
+
1458
+ new_options = opts.merge(
1459
+ :operation => :"OrganizationsApi.update_organization_invitation",
1460
+ :header_params => header_params,
1461
+ :query_params => query_params,
1462
+ :form_params => form_params,
1463
+ :body => post_body,
1464
+ :auth_names => auth_names,
1465
+ :return_type => return_type
1466
+ )
1467
+
1468
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1469
+ if @api_client.config.debugging
1470
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_invitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1471
+ end
1472
+ return data, status_code, headers
1473
+ end
1474
+
1475
+ # Update organization quota
1476
+ # @param organization_id [String] Organization ID
1477
+ # @param update_organization_quota [UpdateOrganizationQuota]
1478
+ # @param [Hash] opts the optional parameters
1479
+ # @return [Organization]
1480
+ def update_organization_quota(organization_id, update_organization_quota, opts = {})
1481
+ data, _status_code, _headers = update_organization_quota_with_http_info(organization_id, update_organization_quota, opts)
1482
+ data
1483
+ end
1484
+
1485
+ # Update organization quota
1486
+ # @param organization_id [String] Organization ID
1487
+ # @param update_organization_quota [UpdateOrganizationQuota]
1488
+ # @param [Hash] opts the optional parameters
1489
+ # @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
1490
+ def update_organization_quota_with_http_info(organization_id, update_organization_quota, opts = {})
1491
+ if @api_client.config.debugging
1492
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_quota ...'
1493
+ end
1494
+ # verify the required parameter 'organization_id' is set
1495
+ if @api_client.config.client_side_validation && organization_id.nil?
1496
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_quota"
1497
+ end
1498
+ # verify the required parameter 'update_organization_quota' is set
1499
+ if @api_client.config.client_side_validation && update_organization_quota.nil?
1500
+ fail ArgumentError, "Missing the required parameter 'update_organization_quota' when calling OrganizationsApi.update_organization_quota"
1501
+ end
1502
+ # resource path
1503
+ local_var_path = '/organizations/{organizationId}/quota'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1504
+
1505
+ # query parameters
1506
+ query_params = opts[:query_params] || {}
1507
+
1508
+ # header parameters
1509
+ header_params = opts[:header_params] || {}
1510
+ # HTTP header 'Accept' (if needed)
1511
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1512
+ # HTTP header 'Content-Type'
1513
+ content_type = @api_client.select_header_content_type(['application/json'])
1514
+ if !content_type.nil?
1515
+ header_params['Content-Type'] = content_type
1516
+ end
1517
+
1518
+ # form parameters
1519
+ form_params = opts[:form_params] || {}
1520
+
1521
+ # http body (model)
1522
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_quota)
1523
+
1524
+ # return_type
1525
+ return_type = opts[:debug_return_type] || 'Organization'
1526
+
1527
+ # auth_names
1528
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1529
+
1530
+ new_options = opts.merge(
1531
+ :operation => :"OrganizationsApi.update_organization_quota",
1532
+ :header_params => header_params,
1533
+ :query_params => query_params,
1534
+ :form_params => form_params,
1535
+ :body => post_body,
1536
+ :auth_names => auth_names,
1537
+ :return_type => return_type
1538
+ )
1539
+
1540
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1541
+ if @api_client.config.debugging
1542
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_quota\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1543
+ end
1544
+ return data, status_code, headers
1545
+ end
1546
+
1547
+ # Update organization role
1548
+ # @param organization_id [String] Organization ID
1549
+ # @param role_id [String] Role ID
1550
+ # @param update_organization_role [UpdateOrganizationRole]
1551
+ # @param [Hash] opts the optional parameters
1552
+ # @return [OrganizationRole]
1553
+ def update_organization_role(organization_id, role_id, update_organization_role, opts = {})
1554
+ data, _status_code, _headers = update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts)
1555
+ data
1556
+ end
1557
+
1558
+ # Update organization role
1559
+ # @param organization_id [String] Organization ID
1560
+ # @param role_id [String] Role ID
1561
+ # @param update_organization_role [UpdateOrganizationRole]
1562
+ # @param [Hash] opts the optional parameters
1563
+ # @return [Array<(OrganizationRole, Integer, Hash)>] OrganizationRole data, response status code and response headers
1564
+ def update_organization_role_with_http_info(organization_id, role_id, update_organization_role, opts = {})
1565
+ if @api_client.config.debugging
1566
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_organization_role ...'
1567
+ end
1568
+ # verify the required parameter 'organization_id' is set
1569
+ if @api_client.config.client_side_validation && organization_id.nil?
1570
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_organization_role"
1571
+ end
1572
+ # verify the required parameter 'role_id' is set
1573
+ if @api_client.config.client_side_validation && role_id.nil?
1574
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling OrganizationsApi.update_organization_role"
1575
+ end
1576
+ # verify the required parameter 'update_organization_role' is set
1577
+ if @api_client.config.client_side_validation && update_organization_role.nil?
1578
+ fail ArgumentError, "Missing the required parameter 'update_organization_role' when calling OrganizationsApi.update_organization_role"
1579
+ end
1580
+ # resource path
1581
+ local_var_path = '/organizations/{organizationId}/roles/{roleId}'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s)).sub('{' + 'roleId' + '}', CGI.escape(role_id.to_s))
1582
+
1583
+ # query parameters
1584
+ query_params = opts[:query_params] || {}
1585
+
1586
+ # header parameters
1587
+ header_params = opts[:header_params] || {}
1588
+ # HTTP header 'Accept' (if needed)
1589
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1590
+ # HTTP header 'Content-Type'
1591
+ content_type = @api_client.select_header_content_type(['application/json'])
1592
+ if !content_type.nil?
1593
+ header_params['Content-Type'] = content_type
1594
+ end
1595
+
1596
+ # form parameters
1597
+ form_params = opts[:form_params] || {}
1598
+
1599
+ # http body (model)
1600
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_role)
1601
+
1602
+ # return_type
1603
+ return_type = opts[:debug_return_type] || 'OrganizationRole'
1604
+
1605
+ # auth_names
1606
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1607
+
1608
+ new_options = opts.merge(
1609
+ :operation => :"OrganizationsApi.update_organization_role",
1610
+ :header_params => header_params,
1611
+ :query_params => query_params,
1612
+ :form_params => form_params,
1613
+ :body => post_body,
1614
+ :auth_names => auth_names,
1615
+ :return_type => return_type
1616
+ )
1617
+
1618
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1619
+ if @api_client.config.debugging
1620
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_organization_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1621
+ end
1622
+ return data, status_code, headers
1623
+ end
1624
+
1625
+ # Update sandbox default limited network egress
1626
+ # @param organization_id [String] Organization ID
1627
+ # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress]
1628
+ # @param [Hash] opts the optional parameters
1629
+ # @return [nil]
1630
+ def update_sandbox_default_limited_network_egress(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
1631
+ update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts)
1632
+ nil
1633
+ end
1634
+
1635
+ # Update sandbox default limited network egress
1636
+ # @param organization_id [String] Organization ID
1637
+ # @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress]
1638
+ # @param [Hash] opts the optional parameters
1639
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1640
+ def update_sandbox_default_limited_network_egress_with_http_info(organization_id, organization_sandbox_default_limited_network_egress, opts = {})
1641
+ if @api_client.config.debugging
1642
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_sandbox_default_limited_network_egress ...'
1643
+ end
1644
+ # verify the required parameter 'organization_id' is set
1645
+ if @api_client.config.client_side_validation && organization_id.nil?
1646
+ fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
1647
+ end
1648
+ # verify the required parameter 'organization_sandbox_default_limited_network_egress' is set
1649
+ if @api_client.config.client_side_validation && organization_sandbox_default_limited_network_egress.nil?
1650
+ fail ArgumentError, "Missing the required parameter 'organization_sandbox_default_limited_network_egress' when calling OrganizationsApi.update_sandbox_default_limited_network_egress"
1651
+ end
1652
+ # resource path
1653
+ local_var_path = '/organizations/{organizationId}/sandbox-default-limited-network-egress'.sub('{' + 'organizationId' + '}', CGI.escape(organization_id.to_s))
1654
+
1655
+ # query parameters
1656
+ query_params = opts[:query_params] || {}
1657
+
1658
+ # header parameters
1659
+ header_params = opts[:header_params] || {}
1660
+ # HTTP header 'Content-Type'
1661
+ content_type = @api_client.select_header_content_type(['application/json'])
1662
+ if !content_type.nil?
1663
+ header_params['Content-Type'] = content_type
1664
+ end
1665
+
1666
+ # form parameters
1667
+ form_params = opts[:form_params] || {}
1668
+
1669
+ # http body (model)
1670
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(organization_sandbox_default_limited_network_egress)
1671
+
1672
+ # return_type
1673
+ return_type = opts[:debug_return_type]
1674
+
1675
+ # auth_names
1676
+ auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
1677
+
1678
+ new_options = opts.merge(
1679
+ :operation => :"OrganizationsApi.update_sandbox_default_limited_network_egress",
1680
+ :header_params => header_params,
1681
+ :query_params => query_params,
1682
+ :form_params => form_params,
1683
+ :body => post_body,
1684
+ :auth_names => auth_names,
1685
+ :return_type => return_type
1686
+ )
1687
+
1688
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1689
+ if @api_client.config.debugging
1690
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_sandbox_default_limited_network_egress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1691
+ end
1692
+ return data, status_code, headers
1693
+ end
1694
+ end
1695
+ end