xbim_identity 2.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 (103) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +174 -0
  4. data/Rakefile +10 -0
  5. data/lib/xbim_identity/api/authentication_api.rb +118 -0
  6. data/lib/xbim_identity/api/client_applications_api.rb +315 -0
  7. data/lib/xbim_identity/api/invitations_api.rb +489 -0
  8. data/lib/xbim_identity/api/me_api.rb +148 -0
  9. data/lib/xbim_identity/api/members_api.rb +406 -0
  10. data/lib/xbim_identity/api/registration_api.rb +85 -0
  11. data/lib/xbim_identity/api/tenants_api.rb +709 -0
  12. data/lib/xbim_identity/api/users_api.rb +308 -0
  13. data/lib/xbim_identity/api_client.rb +390 -0
  14. data/lib/xbim_identity/api_error.rb +57 -0
  15. data/lib/xbim_identity/configuration.rb +278 -0
  16. data/lib/xbim_identity/models/application_type.rb +39 -0
  17. data/lib/xbim_identity/models/client_app.rb +351 -0
  18. data/lib/xbim_identity/models/client_app_endpoint.rb +239 -0
  19. data/lib/xbim_identity/models/draft_invitation.rb +379 -0
  20. data/lib/xbim_identity/models/invitation.rb +379 -0
  21. data/lib/xbim_identity/models/invitation_create.rb +253 -0
  22. data/lib/xbim_identity/models/invitation_edit.rb +239 -0
  23. data/lib/xbim_identity/models/invite_status.rb +41 -0
  24. data/lib/xbim_identity/models/master.rb +331 -0
  25. data/lib/xbim_identity/models/master_base.rb +243 -0
  26. data/lib/xbim_identity/models/master_subscription.rb +323 -0
  27. data/lib/xbim_identity/models/o_data_boolean.rb +230 -0
  28. data/lib/xbim_identity/models/o_data_client_app_endpoint_list.rb +252 -0
  29. data/lib/xbim_identity/models/o_data_client_app_list.rb +252 -0
  30. data/lib/xbim_identity/models/o_data_invitation_list.rb +252 -0
  31. data/lib/xbim_identity/models/o_data_string.rb +230 -0
  32. data/lib/xbim_identity/models/o_data_tenant_list.rb +252 -0
  33. data/lib/xbim_identity/models/o_data_tenant_user_list.rb +252 -0
  34. data/lib/xbim_identity/models/o_data_user_list.rb +252 -0
  35. data/lib/xbim_identity/models/problem_details.rb +259 -0
  36. data/lib/xbim_identity/models/region.rb +280 -0
  37. data/lib/xbim_identity/models/region_info.rb +256 -0
  38. data/lib/xbim_identity/models/subscription.rb +309 -0
  39. data/lib/xbim_identity/models/team_member_create.rb +229 -0
  40. data/lib/xbim_identity/models/team_member_edit.rb +219 -0
  41. data/lib/xbim_identity/models/tenancy_type.rb +38 -0
  42. data/lib/xbim_identity/models/tenant.rb +383 -0
  43. data/lib/xbim_identity/models/tenant_create.rb +267 -0
  44. data/lib/xbim_identity/models/tenant_edit.rb +229 -0
  45. data/lib/xbim_identity/models/tenant_role.rb +39 -0
  46. data/lib/xbim_identity/models/tenant_user.rb +299 -0
  47. data/lib/xbim_identity/models/token_err_response.rb +219 -0
  48. data/lib/xbim_identity/models/token_response.rb +259 -0
  49. data/lib/xbim_identity/models/user.rb +261 -0
  50. data/lib/xbim_identity/models/user_create.rb +247 -0
  51. data/lib/xbim_identity/models/user_tenant.rb +279 -0
  52. data/lib/xbim_identity/version.rb +15 -0
  53. data/lib/xbim_identity.rb +83 -0
  54. data/spec/api/authentication_api_spec.rb +52 -0
  55. data/spec/api/client_applications_api_spec.rb +101 -0
  56. data/spec/api/invitations_api_spec.rb +130 -0
  57. data/spec/api/me_api_spec.rb +61 -0
  58. data/spec/api/members_api_spec.rb +113 -0
  59. data/spec/api/registration_api_spec.rb +48 -0
  60. data/spec/api/tenants_api_spec.rb +176 -0
  61. data/spec/api/users_api_spec.rb +95 -0
  62. data/spec/api_client_spec.rb +226 -0
  63. data/spec/configuration_spec.rb +42 -0
  64. data/spec/models/application_type_spec.rb +28 -0
  65. data/spec/models/client_app_endpoint_spec.rb +46 -0
  66. data/spec/models/client_app_spec.rb +112 -0
  67. data/spec/models/draft_invitation_spec.rb +130 -0
  68. data/spec/models/invitation_create_spec.rb +52 -0
  69. data/spec/models/invitation_edit_spec.rb +46 -0
  70. data/spec/models/invitation_spec.rb +130 -0
  71. data/spec/models/invite_status_spec.rb +28 -0
  72. data/spec/models/master_base_spec.rb +46 -0
  73. data/spec/models/master_spec.rb +94 -0
  74. data/spec/models/master_subscription_spec.rb +94 -0
  75. data/spec/models/o_data_boolean_spec.rb +40 -0
  76. data/spec/models/o_data_client_app_endpoint_list_spec.rb +52 -0
  77. data/spec/models/o_data_client_app_list_spec.rb +52 -0
  78. data/spec/models/o_data_invitation_list_spec.rb +52 -0
  79. data/spec/models/o_data_string_spec.rb +40 -0
  80. data/spec/models/o_data_tenant_list_spec.rb +52 -0
  81. data/spec/models/o_data_tenant_user_list_spec.rb +52 -0
  82. data/spec/models/o_data_user_list_spec.rb +52 -0
  83. data/spec/models/problem_details_spec.rb +58 -0
  84. data/spec/models/region_info_spec.rb +46 -0
  85. data/spec/models/region_spec.rb +58 -0
  86. data/spec/models/subscription_spec.rb +88 -0
  87. data/spec/models/team_member_create_spec.rb +40 -0
  88. data/spec/models/team_member_edit_spec.rb +34 -0
  89. data/spec/models/tenancy_type_spec.rb +28 -0
  90. data/spec/models/tenant_create_spec.rb +58 -0
  91. data/spec/models/tenant_edit_spec.rb +40 -0
  92. data/spec/models/tenant_role_spec.rb +28 -0
  93. data/spec/models/tenant_spec.rb +130 -0
  94. data/spec/models/tenant_user_spec.rb +82 -0
  95. data/spec/models/token_err_response_spec.rb +34 -0
  96. data/spec/models/token_response_spec.rb +58 -0
  97. data/spec/models/user_create_spec.rb +46 -0
  98. data/spec/models/user_spec.rb +58 -0
  99. data/spec/models/user_tenant_spec.rb +70 -0
  100. data/spec/spec_helper.rb +111 -0
  101. data/xbim_identity-1.0.0.gem +0 -0
  102. data/xbim_identity.gemspec +38 -0
  103. metadata +184 -0
@@ -0,0 +1,406 @@
1
+ =begin
2
+ #Xbim Flex Identity API 2.0
3
+
4
+ #Communication centralised around construction data
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: info@xbim.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module XbimIdentity
16
+ class MembersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Team members
23
+ # <span style='font-size: 17px;'>Summary:</span>Team members.<br/>Queries support: $filter, $orderby, $select, $expand(including nested filters, selects and expands), $top, $skip.<br/>Return Type: <b>ODataTenantUserList</b><br/>For more information about OData responses <a href='https://www.odata.org/getting-started/understand-odata-in-6-steps/'>link</a>.<br/><br/>
24
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 5.
27
+ # @option opts [String] :filter Restricts the set of items returned. The maximum number of expressions is 1000. The allowed functions are: allfunctions.
28
+ # @option opts [String] :select Limits the properties returned in the result.
29
+ # @option opts [String] :orderby Specifies the order in which items are returned. The maximum number of expressions is 5.
30
+ # @option opts [Integer] :top Limits the number of items returned from a collection. The maximum value is 1000.
31
+ # @option opts [Integer] :skip Excludes the specified number of items of the queried collection from the result.
32
+ # @option opts [Boolean] :count Indicates whether the total count of items within a collection are returned in the result.
33
+ # @return [ODataTenantUserList]
34
+ def id20_tenants_tenant_id_members_get(tenant_id, opts = {})
35
+ data, _status_code, _headers = id20_tenants_tenant_id_members_get_with_http_info(tenant_id, opts)
36
+ data
37
+ end
38
+
39
+ # Team members
40
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Team members.&lt;br/&gt;Queries support: $filter, $orderby, $select, $expand(including nested filters, selects and expands), $top, $skip.&lt;br/&gt;Return Type: &lt;b&gt;ODataTenantUserList&lt;/b&gt;&lt;br/&gt;For more information about OData responses &lt;a href&#x3D;&#39;https://www.odata.org/getting-started/understand-odata-in-6-steps/&#39;&gt;link&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;
41
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
42
+ # @param [Hash] opts the optional parameters
43
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 5.
44
+ # @option opts [String] :filter Restricts the set of items returned. The maximum number of expressions is 1000. The allowed functions are: allfunctions.
45
+ # @option opts [String] :select Limits the properties returned in the result.
46
+ # @option opts [String] :orderby Specifies the order in which items are returned. The maximum number of expressions is 5.
47
+ # @option opts [Integer] :top Limits the number of items returned from a collection. The maximum value is 1000.
48
+ # @option opts [Integer] :skip Excludes the specified number of items of the queried collection from the result.
49
+ # @option opts [Boolean] :count Indicates whether the total count of items within a collection are returned in the result.
50
+ # @return [Array<(ODataTenantUserList, Integer, Hash)>] ODataTenantUserList data, response status code and response headers
51
+ def id20_tenants_tenant_id_members_get_with_http_info(tenant_id, opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: MembersApi.id20_tenants_tenant_id_members_get ...'
54
+ end
55
+ # verify the required parameter 'tenant_id' is set
56
+ if @api_client.config.client_side_validation && tenant_id.nil?
57
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MembersApi.id20_tenants_tenant_id_members_get"
58
+ end
59
+ # resource path
60
+ local_var_path = '/id/2.0/Tenants({tenantId})/Members'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
61
+
62
+ # query parameters
63
+ query_params = opts[:query_params] || {}
64
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
65
+ query_params[:'$filter'] = opts[:'filter'] if !opts[:'filter'].nil?
66
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
67
+ query_params[:'$orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil?
68
+ query_params[:'$top'] = opts[:'top'] if !opts[:'top'].nil?
69
+ query_params[:'$skip'] = opts[:'skip'] if !opts[:'skip'].nil?
70
+ query_params[:'$count'] = opts[:'count'] if !opts[:'count'].nil?
71
+
72
+ # header parameters
73
+ header_params = opts[:header_params] || {}
74
+ # HTTP header 'Accept' (if needed)
75
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
76
+
77
+ # form parameters
78
+ form_params = opts[:form_params] || {}
79
+
80
+ # http body (model)
81
+ post_body = opts[:debug_body]
82
+
83
+ # return_type
84
+ return_type = opts[:debug_return_type] || 'ODataTenantUserList'
85
+
86
+ # auth_names
87
+ auth_names = opts[:debug_auth_names] || ['oauth2']
88
+
89
+ new_options = opts.merge(
90
+ :operation => :"MembersApi.id20_tenants_tenant_id_members_get",
91
+ :header_params => header_params,
92
+ :query_params => query_params,
93
+ :form_params => form_params,
94
+ :body => post_body,
95
+ :auth_names => auth_names,
96
+ :return_type => return_type
97
+ )
98
+
99
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug "API called: MembersApi#id20_tenants_tenant_id_members_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
102
+ end
103
+ return data, status_code, headers
104
+ end
105
+
106
+ # Creates a new Team member adding an existing user to the tenant
107
+ # <span style='font-size: 17px;'>Summary:</span>Creates a new Team member adding an existing user to the tenant.<br/>The ability to add users to a limited by tenant role.<br/>Return Type: <b>TenantUser</b><br/><br/>
108
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
109
+ # @param [Hash] opts the optional parameters
110
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
111
+ # @option opts [String] :select Limits the properties returned in the result.
112
+ # @option opts [TeamMemberCreate] :team_member_create
113
+ # @return [TenantUser]
114
+ def id20_tenants_tenant_id_members_post(tenant_id, opts = {})
115
+ data, _status_code, _headers = id20_tenants_tenant_id_members_post_with_http_info(tenant_id, opts)
116
+ data
117
+ end
118
+
119
+ # Creates a new Team member adding an existing user to the tenant
120
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Creates a new Team member adding an existing user to the tenant.&lt;br/&gt;The ability to add users to a limited by tenant role.&lt;br/&gt;Return Type: &lt;b&gt;TenantUser&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
121
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
122
+ # @param [Hash] opts the optional parameters
123
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
124
+ # @option opts [String] :select Limits the properties returned in the result.
125
+ # @option opts [TeamMemberCreate] :team_member_create
126
+ # @return [Array<(TenantUser, Integer, Hash)>] TenantUser data, response status code and response headers
127
+ def id20_tenants_tenant_id_members_post_with_http_info(tenant_id, opts = {})
128
+ if @api_client.config.debugging
129
+ @api_client.config.logger.debug 'Calling API: MembersApi.id20_tenants_tenant_id_members_post ...'
130
+ end
131
+ # verify the required parameter 'tenant_id' is set
132
+ if @api_client.config.client_side_validation && tenant_id.nil?
133
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MembersApi.id20_tenants_tenant_id_members_post"
134
+ end
135
+ # resource path
136
+ local_var_path = '/id/2.0/Tenants({tenantId})/Members'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
137
+
138
+ # query parameters
139
+ query_params = opts[:query_params] || {}
140
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
141
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
142
+
143
+ # header parameters
144
+ header_params = opts[:header_params] || {}
145
+ # HTTP header 'Accept' (if needed)
146
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
147
+ # HTTP header 'Content-Type'
148
+ content_type = @api_client.select_header_content_type(['application/json', 'application/xml', 'text/json', 'application/*+json'])
149
+ if !content_type.nil?
150
+ header_params['Content-Type'] = content_type
151
+ end
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'team_member_create'])
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type] || 'TenantUser'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['oauth2']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"MembersApi.id20_tenants_tenant_id_members_post",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: MembersApi#id20_tenants_tenant_id_members_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
182
+ # Revokes a user from this Tenant. Requires the Administrator Tenant Role
183
+ # <span style='font-size: 17px;'>Summary:</span>Revokes a user from this Tenant. Requires the Administrator Tenant Role.<br/>Return Type: <b></b><br/><br/>
184
+ # @param user_id [String] The UserId to revoke
185
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
186
+ # @param [Hash] opts the optional parameters
187
+ # @return [nil]
188
+ def id20_tenants_tenant_id_members_user_id_delete(user_id, tenant_id, opts = {})
189
+ id20_tenants_tenant_id_members_user_id_delete_with_http_info(user_id, tenant_id, opts)
190
+ nil
191
+ end
192
+
193
+ # Revokes a user from this Tenant. Requires the Administrator Tenant Role
194
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Revokes a user from this Tenant. Requires the Administrator Tenant Role.&lt;br/&gt;Return Type: &lt;b&gt;&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
195
+ # @param user_id [String] The UserId to revoke
196
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
197
+ # @param [Hash] opts the optional parameters
198
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
199
+ def id20_tenants_tenant_id_members_user_id_delete_with_http_info(user_id, tenant_id, opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: MembersApi.id20_tenants_tenant_id_members_user_id_delete ...'
202
+ end
203
+ # verify the required parameter 'user_id' is set
204
+ if @api_client.config.client_side_validation && user_id.nil?
205
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_delete"
206
+ end
207
+ # verify the required parameter 'tenant_id' is set
208
+ if @api_client.config.client_side_validation && tenant_id.nil?
209
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_delete"
210
+ end
211
+ # resource path
212
+ local_var_path = '/id/2.0/Tenants({tenantId})/Members({userId})'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
213
+
214
+ # query parameters
215
+ query_params = opts[:query_params] || {}
216
+
217
+ # header parameters
218
+ header_params = opts[:header_params] || {}
219
+
220
+ # form parameters
221
+ form_params = opts[:form_params] || {}
222
+
223
+ # http body (model)
224
+ post_body = opts[:debug_body]
225
+
226
+ # return_type
227
+ return_type = opts[:debug_return_type]
228
+
229
+ # auth_names
230
+ auth_names = opts[:debug_auth_names] || ['oauth2']
231
+
232
+ new_options = opts.merge(
233
+ :operation => :"MembersApi.id20_tenants_tenant_id_members_user_id_delete",
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: MembersApi#id20_tenants_tenant_id_members_user_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ return data, status_code, headers
247
+ end
248
+
249
+ # Gets the specified Tenant Member by their userId
250
+ # <span style='font-size: 17px;'>Summary:</span>Gets the specified Tenant Member by their userId.<br/>Return Type: <b>TenantUser</b><br/><br/>
251
+ # @param user_id [String] The user id
252
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
253
+ # @param [Hash] opts the optional parameters
254
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
255
+ # @option opts [String] :select Limits the properties returned in the result.
256
+ # @return [TenantUser]
257
+ def id20_tenants_tenant_id_members_user_id_get(user_id, tenant_id, opts = {})
258
+ data, _status_code, _headers = id20_tenants_tenant_id_members_user_id_get_with_http_info(user_id, tenant_id, opts)
259
+ data
260
+ end
261
+
262
+ # Gets the specified Tenant Member by their userId
263
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Gets the specified Tenant Member by their userId.&lt;br/&gt;Return Type: &lt;b&gt;TenantUser&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
264
+ # @param user_id [String] The user id
265
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
266
+ # @param [Hash] opts the optional parameters
267
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
268
+ # @option opts [String] :select Limits the properties returned in the result.
269
+ # @return [Array<(TenantUser, Integer, Hash)>] TenantUser data, response status code and response headers
270
+ def id20_tenants_tenant_id_members_user_id_get_with_http_info(user_id, tenant_id, opts = {})
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug 'Calling API: MembersApi.id20_tenants_tenant_id_members_user_id_get ...'
273
+ end
274
+ # verify the required parameter 'user_id' is set
275
+ if @api_client.config.client_side_validation && user_id.nil?
276
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_get"
277
+ end
278
+ # verify the required parameter 'tenant_id' is set
279
+ if @api_client.config.client_side_validation && tenant_id.nil?
280
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_get"
281
+ end
282
+ # resource path
283
+ local_var_path = '/id/2.0/Tenants({tenantId})/Members({userId})'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
284
+
285
+ # query parameters
286
+ query_params = opts[:query_params] || {}
287
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
288
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
289
+
290
+ # header parameters
291
+ header_params = opts[:header_params] || {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+
295
+ # form parameters
296
+ form_params = opts[:form_params] || {}
297
+
298
+ # http body (model)
299
+ post_body = opts[:debug_body]
300
+
301
+ # return_type
302
+ return_type = opts[:debug_return_type] || 'TenantUser'
303
+
304
+ # auth_names
305
+ auth_names = opts[:debug_auth_names] || ['oauth2']
306
+
307
+ new_options = opts.merge(
308
+ :operation => :"MembersApi.id20_tenants_tenant_id_members_user_id_get",
309
+ :header_params => header_params,
310
+ :query_params => query_params,
311
+ :form_params => form_params,
312
+ :body => post_body,
313
+ :auth_names => auth_names,
314
+ :return_type => return_type
315
+ )
316
+
317
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug "API called: MembersApi#id20_tenants_tenant_id_members_user_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
320
+ end
321
+ return data, status_code, headers
322
+ end
323
+
324
+ # Amend an existing team member's team details
325
+ # <span style='font-size: 17px;'>Summary:</span>Amend an existing team member's team details.<br/>Editing users requires Admin rights on the tenant.<br/>Return Type: <b>TenantUser</b><br/><br/>
326
+ # @param user_id [String] The User ID to patch
327
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
328
+ # @param [Hash] opts the optional parameters
329
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
330
+ # @option opts [String] :select Limits the properties returned in the result.
331
+ # @option opts [TeamMemberEdit] :team_member_edit The partial Team Member record
332
+ # @return [TenantUser]
333
+ def id20_tenants_tenant_id_members_user_id_patch(user_id, tenant_id, opts = {})
334
+ data, _status_code, _headers = id20_tenants_tenant_id_members_user_id_patch_with_http_info(user_id, tenant_id, opts)
335
+ data
336
+ end
337
+
338
+ # Amend an existing team member&#39;s team details
339
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Amend an existing team member&#39;s team details.&lt;br/&gt;Editing users requires Admin rights on the tenant.&lt;br/&gt;Return Type: &lt;b&gt;TenantUser&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
340
+ # @param user_id [String] The User ID to patch
341
+ # @param tenant_id [String] The unique Tenant ID (UUID or Identifier string)
342
+ # @param [Hash] opts the optional parameters
343
+ # @option opts [String] :expand Indicates the related entities to be represented inline. The maximum depth is 2.
344
+ # @option opts [String] :select Limits the properties returned in the result.
345
+ # @option opts [TeamMemberEdit] :team_member_edit The partial Team Member record
346
+ # @return [Array<(TenantUser, Integer, Hash)>] TenantUser data, response status code and response headers
347
+ def id20_tenants_tenant_id_members_user_id_patch_with_http_info(user_id, tenant_id, opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: MembersApi.id20_tenants_tenant_id_members_user_id_patch ...'
350
+ end
351
+ # verify the required parameter 'user_id' is set
352
+ if @api_client.config.client_side_validation && user_id.nil?
353
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_patch"
354
+ end
355
+ # verify the required parameter 'tenant_id' is set
356
+ if @api_client.config.client_side_validation && tenant_id.nil?
357
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MembersApi.id20_tenants_tenant_id_members_user_id_patch"
358
+ end
359
+ # resource path
360
+ local_var_path = '/id/2.0/Tenants({tenantId})/Members({userId})'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
361
+
362
+ # query parameters
363
+ query_params = opts[:query_params] || {}
364
+ query_params[:'$expand'] = opts[:'expand'] if !opts[:'expand'].nil?
365
+ query_params[:'$select'] = opts[:'select'] if !opts[:'select'].nil?
366
+
367
+ # header parameters
368
+ header_params = opts[:header_params] || {}
369
+ # HTTP header 'Accept' (if needed)
370
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
371
+ # HTTP header 'Content-Type'
372
+ content_type = @api_client.select_header_content_type(['application/json', 'application/xml', 'text/json', 'application/*+json'])
373
+ if !content_type.nil?
374
+ header_params['Content-Type'] = content_type
375
+ end
376
+
377
+ # form parameters
378
+ form_params = opts[:form_params] || {}
379
+
380
+ # http body (model)
381
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'team_member_edit'])
382
+
383
+ # return_type
384
+ return_type = opts[:debug_return_type] || 'TenantUser'
385
+
386
+ # auth_names
387
+ auth_names = opts[:debug_auth_names] || ['oauth2']
388
+
389
+ new_options = opts.merge(
390
+ :operation => :"MembersApi.id20_tenants_tenant_id_members_user_id_patch",
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => return_type
397
+ )
398
+
399
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug "API called: MembersApi#id20_tenants_tenant_id_members_user_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
402
+ end
403
+ return data, status_code, headers
404
+ end
405
+ end
406
+ end
@@ -0,0 +1,85 @@
1
+ =begin
2
+ #Xbim Flex Identity API 2.0
3
+
4
+ #Communication centralised around construction data
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: info@xbim.net
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module XbimIdentity
16
+ class RegistrationApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Accepts a user's invitation to join a Tenant
23
+ # <span style='font-size: 17px;'>Summary:</span>Accepts a user's invitation to join a Tenant.<br/>Creates or updates a User account with the granted access rights. See https://developers.google.com/recaptcha/docs/verify for details on reCAPTCA.<br/>Return Type: <b>UserTenant</b><br/><br/>
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :secret The secret supplied by email
26
+ # @option opts [String] :captcha_response The reCAPTCHA v2 &#39;g-recaptcha-reponse&#39; token
27
+ # @return [UserTenant]
28
+ def id20_registration_acceptinvitation_post(opts = {})
29
+ data, _status_code, _headers = id20_registration_acceptinvitation_post_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Accepts a user&#39;s invitation to join a Tenant
34
+ # &lt;span style&#x3D;&#39;font-size: 17px;&#39;&gt;Summary:&lt;/span&gt;Accepts a user&#39;s invitation to join a Tenant.&lt;br/&gt;Creates or updates a User account with the granted access rights. See https://developers.google.com/recaptcha/docs/verify for details on reCAPTCA.&lt;br/&gt;Return Type: &lt;b&gt;UserTenant&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;
35
+ # @param [Hash] opts the optional parameters
36
+ # @option opts [String] :secret The secret supplied by email
37
+ # @option opts [String] :captcha_response The reCAPTCHA v2 &#39;g-recaptcha-reponse&#39; token
38
+ # @return [Array<(UserTenant, Integer, Hash)>] UserTenant data, response status code and response headers
39
+ def id20_registration_acceptinvitation_post_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: RegistrationApi.id20_registration_acceptinvitation_post ...'
42
+ end
43
+ # resource path
44
+ local_var_path = '/id/2.0/registration/acceptinvitation'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+ query_params[:'secret'] = opts[:'secret'] if !opts[:'secret'].nil?
49
+ query_params[:'captchaResponse'] = opts[:'captcha_response'] if !opts[:'captcha_response'].nil?
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+
56
+ # form parameters
57
+ form_params = opts[:form_params] || {}
58
+
59
+ # http body (model)
60
+ post_body = opts[:debug_body]
61
+
62
+ # return_type
63
+ return_type = opts[:debug_return_type] || 'UserTenant'
64
+
65
+ # auth_names
66
+ auth_names = opts[:debug_auth_names] || ['oauth2']
67
+
68
+ new_options = opts.merge(
69
+ :operation => :"RegistrationApi.id20_registration_acceptinvitation_post",
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: RegistrationApi#id20_registration_acceptinvitation_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+ end
85
+ end