authress-sdk 0.1.20.0 → 1.0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -32
  3. data/lib/authress_sdk.rb +18 -0
  4. data/lib/{swagger_client → authress_sdk}/api/access_records_api.rb +73 -80
  5. data/lib/{swagger_client → authress_sdk}/api/accounts_api.rb +31 -38
  6. data/lib/{swagger_client → authress_sdk}/api/metadata_api.rb +23 -30
  7. data/lib/{swagger_client → authress_sdk}/api/resource_permissions_api.rb +33 -40
  8. data/lib/{swagger_client → authress_sdk}/api/roles_api.rb +36 -43
  9. data/lib/{swagger_client → authress_sdk}/api/service_clients_api.rb +56 -63
  10. data/lib/{swagger_client → authress_sdk}/api/user_permissions_api.rb +44 -51
  11. data/lib/authress_sdk/api_error.rb +50 -0
  12. data/lib/{swagger_client/api_client.rb → authress_sdk/authress_client.rb} +36 -110
  13. data/lib/authress_sdk/constant_token_provider.rb +19 -0
  14. data/lib/{swagger_client → authress_sdk}/models/access_record.rb +4 -11
  15. data/lib/{swagger_client → authress_sdk}/models/access_record_collection.rb +4 -11
  16. data/lib/{swagger_client → authress_sdk}/models/access_record_collection_records.rb +4 -11
  17. data/lib/{swagger_client → authress_sdk}/models/account.rb +4 -11
  18. data/lib/{swagger_client/models/inline_response_200_11.rb → authress_sdk/models/account_collection.rb} +5 -12
  19. data/lib/{swagger_client → authress_sdk}/models/account_collection_accounts.rb +4 -11
  20. data/lib/{swagger_client → authress_sdk}/models/body.rb +4 -11
  21. data/lib/{swagger_client → authress_sdk}/models/body_1.rb +4 -11
  22. data/lib/{swagger_client → authress_sdk}/models/body_10.rb +4 -11
  23. data/lib/{swagger_client → authress_sdk}/models/body_11.rb +4 -11
  24. data/lib/{swagger_client → authress_sdk}/models/body_2.rb +4 -11
  25. data/lib/{swagger_client → authress_sdk}/models/body_3.rb +4 -11
  26. data/lib/{swagger_client → authress_sdk}/models/body_4.rb +4 -11
  27. data/lib/{swagger_client → authress_sdk}/models/body_5.rb +4 -11
  28. data/lib/{swagger_client → authress_sdk}/models/body_6.rb +4 -11
  29. data/lib/{swagger_client → authress_sdk}/models/body_7.rb +4 -11
  30. data/lib/{swagger_client → authress_sdk}/models/body_8.rb +4 -11
  31. data/lib/{swagger_client → authress_sdk}/models/body_9.rb +4 -11
  32. data/lib/{swagger_client → authress_sdk}/models/claim_request.rb +4 -11
  33. data/lib/{swagger_client → authress_sdk}/models/claim_response.rb +4 -11
  34. data/lib/{swagger_client → authress_sdk}/models/client.rb +4 -11
  35. data/lib/{swagger_client → authress_sdk}/models/client_access_key.rb +4 -11
  36. data/lib/{swagger_client → authress_sdk}/models/client_collection.rb +4 -11
  37. data/lib/{swagger_client → authress_sdk}/models/client_collection_clients.rb +4 -11
  38. data/lib/{swagger_client → authress_sdk}/models/identity.rb +4 -11
  39. data/lib/{swagger_client → authress_sdk}/models/identity_collection.rb +4 -11
  40. data/lib/{swagger_client → authress_sdk}/models/identity_collection_identities.rb +4 -11
  41. data/lib/{swagger_client → authress_sdk}/models/identity_request.rb +4 -11
  42. data/lib/{swagger_client → authress_sdk}/models/inline_response_200.rb +4 -11
  43. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_1.rb +4 -11
  44. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_10.rb +4 -11
  45. data/lib/{swagger_client/models/account_collection.rb → authress_sdk/models/inline_response_200_11.rb} +5 -12
  46. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_12.rb +4 -11
  47. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_13.rb +4 -11
  48. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_14.rb +4 -11
  49. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_15.rb +4 -11
  50. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_2.rb +4 -11
  51. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_3.rb +4 -11
  52. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_4.rb +4 -11
  53. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_5.rb +4 -11
  54. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_6.rb +4 -11
  55. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_7.rb +4 -11
  56. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_8.rb +4 -11
  57. data/lib/{swagger_client → authress_sdk}/models/inline_response_200_9.rb +4 -11
  58. data/lib/{swagger_client → authress_sdk}/models/invite.rb +4 -11
  59. data/lib/{swagger_client → authress_sdk}/models/link.rb +4 -11
  60. data/lib/{swagger_client → authress_sdk}/models/metadata_object.rb +4 -11
  61. data/lib/{swagger_client/models/v1roles_permissions.rb → authress_sdk/models/permission_object.rb} +5 -12
  62. data/lib/{swagger_client → authress_sdk}/models/permission_response.rb +4 -11
  63. data/lib/{swagger_client → authress_sdk}/models/resource_permission.rb +4 -11
  64. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection.rb +4 -11
  65. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links.rb +4 -11
  66. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_links_next.rb +4 -11
  67. data/lib/{swagger_client → authress_sdk}/models/resource_permission_collection_resources.rb +4 -11
  68. data/lib/{swagger_client → authress_sdk}/models/resource_users_collection.rb +4 -11
  69. data/lib/{swagger_client → authress_sdk}/models/role.rb +4 -11
  70. data/lib/{swagger_client → authress_sdk}/models/statement.rb +4 -11
  71. data/lib/{swagger_client → authress_sdk}/models/token_request.rb +4 -11
  72. data/lib/{swagger_client → authress_sdk}/models/user.rb +4 -11
  73. data/lib/{swagger_client → authress_sdk}/models/user_resources.rb +4 -11
  74. data/lib/{swagger_client → authress_sdk}/models/user_resources_resources.rb +4 -11
  75. data/lib/{swagger_client → authress_sdk}/models/user_token.rb +4 -11
  76. data/lib/{swagger_client → authress_sdk}/models/user_token_links.rb +4 -11
  77. data/lib/{swagger_client → authress_sdk}/models/user_token_links_self.rb +4 -11
  78. data/lib/{swagger_client → authress_sdk}/models/v1clients_options.rb +4 -11
  79. data/lib/{swagger_client → authress_sdk}/models/v1records_account.rb +4 -11
  80. data/lib/{swagger_client → authress_sdk}/models/v1records_links.rb +4 -11
  81. data/lib/{swagger_client → authress_sdk}/models/v1records_links_self.rb +4 -11
  82. data/lib/{swagger_client → authress_sdk}/models/v1records_users.rb +4 -11
  83. data/lib/{swagger_client → authress_sdk}/models/v1resourcesresource_uri_permissions.rb +4 -11
  84. data/lib/{swagger_client/models/permission_object.rb → authress_sdk/models/v1roles_permissions.rb} +5 -12
  85. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idresourcesresource_urimetadata_account.rb +4 -11
  86. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_resources.rb +4 -11
  87. data/lib/{swagger_client → authress_sdk}/models/v1usersuser_idtokens_statements.rb +4 -11
  88. data/lib/authress_sdk/service_client_token_provider.rb +18 -0
  89. metadata +87 -87
  90. data/lib/swagger_client.rb +0 -30
  91. data/lib/swagger_client/api_error.rb +0 -57
  92. data/lib/swagger_client/configuration.rb +0 -205
  93. data/lib/swagger_client/version.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0f4c75e258a72d3a4c3d0a21fe628d3d43aad9d0faf81c4fc4aa1e4d6b1ee34
4
- data.tar.gz: f4b603cd98c9c5068fa645a55532a0cc8a19a2934326ce075c7208f75df672c1
3
+ metadata.gz: 1c5a693c4a396e756163b59236b16585d436bed46ec77e1fcbcc3a7f4d20195b
4
+ data.tar.gz: 634f538904c98074473f5abccf9c52fff75b6498f4b8918d85b3df932f923f0d
5
5
  SHA512:
6
- metadata.gz: 3e519ce0fc9c3bcb48a307de7e4c5e8347b0f3504c7a6445522db030f5d0f69ded735a54ca864b80022ae8c4c3c566b54fd70316c33227760ddc24fd61186cbc
7
- data.tar.gz: 9bb5f4552bbca426284fe2c9a498c99b354c4bfd8ac7760cfbab9119bf5d1fa90ee9f54fb2c7e56df69652fc5699d51e4d426ecec6cefa1b0c5f940069866e4a
6
+ metadata.gz: 431d45ed1cb1e78de9ca77ded3d5bcfcd757c0205bd59c59cc93faadcedf3b7b9bd5b447371ab7ba8de6f51b4fbeca1c40562ac2fd2f24feadfa56997734736b
7
+ data.tar.gz: bbd2498547756f28ddf01361ec2f5baaf2e363d2c5fb411e7c720b44d0111ffdd1fd00f26172c5f38130fa9c5dac3f4c5db2baaf1c21aec022ff24f71c0f4edd
data/README.md CHANGED
@@ -12,86 +12,86 @@ gem install authress-sdk
12
12
 
13
13
  Then required the package:
14
14
  ```rb
15
- require 'authress-sdk';
15
+ require 'authress-sdk'
16
16
  ```
17
17
 
18
18
  ## Getting started examples
19
19
 
20
20
  ### Authorize using a user token
21
21
  ```rb
22
- require 'authress-sdk';
22
+ require 'authress-sdk'
23
23
 
24
24
  # create an instance of the API class during service initialization
25
25
  # Replace DOMAIN with the Authress domain for your account
26
- AuthressClient.configure do |config|
26
+ AuthressSdk.configure do |config|
27
27
  config.base_url = 'https://DOMAIN.api-REGION.authress.io'
28
28
  end
29
29
 
30
30
  # on api route
31
31
  [route('/resources/<resourceId>')]
32
- function getResource(resourceId) {
32
+ def getResource(resourceId)
33
33
  # Get the user token and pass it to authress
34
- authorizationToken = request.headers.get('authorization');
35
- AuthressClient.setToken(authorizationToken);
34
+ authorizationToken = request.headers.get('authorization')
35
+ AuthressSdk::AuthressClient.set_token(authorizationToken)
36
36
 
37
37
  # Check Authress to authorize the user
38
38
  user_id = 'user_id_example' # String | The user to check permissions on
39
- resource_uri = `resources/${resourceId}` # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
39
+ resource_uri = "resources/#{resourceId}" # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
40
40
  permission = 'READ' # String | Permission to check, '*' and scoped permissions can also be checked here.
41
41
  begin
42
42
  #Check to see if a user has permissions to a resource.
43
- api_instance = SwaggerClient::UserPermissionsApi.new
43
+ api_instance = AuthressSdk::UserPermissionsApi.new
44
44
  api_instance.authorize_user(user_id, resource_uri, permission)
45
- rescue SwaggerClient::ApiError => e
45
+ rescue AuthressSdk::ApiError => e
46
46
  # Will throw except if the user is not authorized to read the resource
47
47
  if (e.status === 404) {
48
- return { statusCode: 404 };
48
+ return { statusCode: 404 }
49
49
  }
50
50
  puts "Exception when calling UserPermissionsApi->authorize_user: #{e}"
51
- throw e;
51
+ raise
52
52
  end
53
53
 
54
54
  # On success, continue with the route code to load resource and return it
55
- return { resource: {}, statusCode: 200 };
55
+ return { resource: {}, statusCode: 200 }
56
56
  ```
57
57
 
58
58
  ### Authorize with a service client
59
59
  ```rb
60
- require 'authress-sdk';
60
+ require 'authress-sdk'
61
61
 
62
62
  # create an instance of the API class during service initialization
63
63
  # Replace DOMAIN with the Authress domain for your account
64
64
 
65
65
  # Create a service client in the Authress management portal and past the access token here
66
66
  # This will generate a token automatically instead of passing the user token to the api
67
- AuthressClient.configure do |config|
67
+ AuthressSdk.configure do |config|
68
68
  config.base_url = 'https://DOMAIN.api-REGION.authress.io'
69
- accessToken = 'eyJrZXlJ....';
70
- config.token_provider = ServiceClientTokenProvider.new(accessToken)
69
+ client_access_key = 'eyJrZXlJ....'
70
+ config.token_provider = AuthressSdk::ServiceClientTokenProvider.new(client_access_key)
71
71
  end
72
72
 
73
73
  # on api route
74
74
  [route('/resources/<resourceId>')]
75
- function getResource(resourceId) {
75
+ def getResource(resourceId) {
76
76
  # Check Authress to authorize the user
77
77
  user_id = 'user_id_example' # String | The user to check permissions on
78
- resource_uri = `resources/${resourceId}` # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
78
+ resource_uri = "resources/#{resourceId}" # String | The uri path of a resource to validate, must be URL encoded, uri segments are allowed, the resource must be a full path, and permissions are not inherited by sub-resources.
79
79
  permission = 'READ' # String | Permission to check, '*' and scoped permissions can also be checked here.
80
80
  begin
81
81
  #Check to see if a user has permissions to a resource.
82
- api_instance = SwaggerClient::UserPermissionsApi.new
82
+ api_instance = AuthressSdk::UserPermissionsApi.new
83
83
  api_instance.authorize_user(user_id, resource_uri, permission)
84
- rescue SwaggerClient::ApiError => e
85
- # Will throw except if the user is not authorized to read the resource
84
+ rescue AuthressSdk::ApiError => e
85
+ # Will raise exception if the user is not authorized to read the resource
86
86
  if (e.status === 404) {
87
- return { statusCode: 404 };
87
+ return { statusCode: 404 }
88
88
  }
89
89
  puts "Exception when calling UserPermissionsApi->authorize_user: #{e}"
90
- throw e;
90
+ raise
91
91
  end
92
92
 
93
93
  # On success, continue with the route code to load resource and return it
94
- return { resource: {}, statusCode: 200 };
94
+ return { resource: {}, statusCode: 200 }
95
95
  ```
96
96
 
97
97
  ### Creating resources
@@ -100,23 +100,27 @@ When a user creates a resource in your application, we want to ensure that they
100
100
  You may receive **User does not have sufficient access to grant permissions to resources** as an error along with the status code **403**. This means that the service client or user jwt does not have access to create the access record. If using a service client, go to the Authress portal and create a one time record which grants the service client `Authress:Owner` to `Resources/` so that it can manage access records for these types of resources.
101
101
 
102
102
  ```rb
103
- require 'authress-sdk';
103
+ require 'authress-sdk'
104
104
 
105
105
  begin
106
106
  #Create a new access record.
107
- new_record = SwaggerClient::Body3.new {
108
- name: `Access To New Resource ${NewResourceId}`,
107
+ new_record = AuthressSdk::Body3.new {
108
+ name: "Access To New Resource #{NewResourceId}",
109
109
  users: [{ userId: requestUserId }],
110
110
  statements: [{
111
- resources: [{ resourceUri: `Resources/${NewResourceId}` }],
111
+ resources: [{ resourceUri: "Resources/#{NewResourceId}" }],
112
112
  # Owner by default gives full control over this new resource, including the ability to grant others access as well.
113
113
  roles: ['Authress:Owner']
114
114
  }]
115
- };
116
- api_instance = SwaggerClient::AccessRecordsApi.new
115
+ }
116
+ api_instance = AuthressSdk::AccessRecordsApi.new
117
117
  result = api_instance.create_record(new_record)
118
118
  puts result
119
- rescue SwaggerClient::ApiError => e
119
+ rescue AuthressSdk::ApiError => e
120
120
  puts "Exception when calling AccessRecordsApi->create_record: #{e}"
121
+ raise
121
122
  end
122
- ```
123
+ ```
124
+
125
+ ### Early release
126
+ * Add in access_token handling to client
@@ -0,0 +1,18 @@
1
+ =begin
2
+
3
+ =end
4
+
5
+ Dir["#{File.expand_path(File.dirname(__FILE__))}/**/*.rb"].each{|f| require f}
6
+
7
+ module AuthressSdk
8
+ class << self
9
+ # Customize default settings for the SDK using block.
10
+ # AuthressSdk.configure do |config|
11
+ # config.username = "xxx"
12
+ # config.password = "xxx"
13
+ # end
14
+ def configure
15
+ AuthressClient.default
16
+ end
17
+ end
18
+ end
@@ -1,20 +1,13 @@
1
1
  =begin
2
- #Authress
3
2
 
4
- #<p> <h2>Authorization</h2> <p>Authorization for Authress is handled one of two different ways. Both mechanisms use oauth2 <i>Bearer</i> tokens.</p> <br> <h4>Identity Provider JWT</h4> <p>Hook up your preferred identity provider directly to Authress. Authress will verify JWTs sourced from that identify provider and allow direct integration with these APIs. Any OIDC JWT provider works, Google, Auth0, Okta, etc... With this mechanism your web app can make direct calls to the permissions API on behalf of your users. <br> <a href=\"https://authress.io/app/#/manage?focus=identity\">Link identity provider</a> </p> <br> <h4>Authress Clients</h4> <p>Regardless of using direct identity provider integration, with the API you can create Authress clients which can call any of the methods on the API. Your users won't be able to directly make API calls, all web app integrations must go through a service which stores the Authress private key. <br> <a href=\"https://authress.io/app/#/manage?focus=clients\">Create Authress service client</a> </p> <br> <h2>Usage</h2> <h4>Billable APIs</h4> <p>Most of the api available is completely free. Use it to populate your roles and configure your account. You'll only be charged for the ones marked as Billable.</p> <p><ul> <li><i class=\"far fa-fw fa-money-bill-alt text-primary\"></i> <span class=\"text-primary\">Billable</span> - <small>These APIs count as calls for your account and will be charged.</small></li> <li><i class=\"fas fa-fw fa-angle-double-right text-secondary\"></i> <span class=\"text-secondary\">Free</span> - <small>These are totally free.</small></li> <li><i class=\"fas fa-fw fa-balance-scale text-secondary\"></i> <span class=\"text-secondary\">Condition</span> - <small>Are conditionally free, see api methods for details.</small></li> </ul></p> <br> <h4>API Access</h4> <p>Access to the following APIs is based on Authress permissions, not the application permissions assigned in Authress to the application services. Each resource is tagged with the required permission <span class=\"badge badge-outline-secondary\">Action: Resource</span> </p>
5
-
6
- OpenAPI spec version: v1
7
- Contact: support@authress.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.23
10
3
  =end
11
4
 
12
- module SwaggerClient
5
+ module AuthressSdk
13
6
  class AccessRecordsApi
14
- attr_accessor :api_client
7
+ attr_accessor :authress_client
15
8
 
16
- def initialize(api_client = ApiClient.default)
17
- @api_client = api_client
9
+ def initialize(authress_client = AuthressClient.default)
10
+ @authress_client = authress_client
18
11
  end
19
12
  # Claim a resource by an allowed user.
20
13
  # Claim a resource by allowing a user to pick an identifier and receive admin access to that resource if it hasn't already been claimed. This only works for resources specifically marked as <strong>CLAIM</strong>. The result will be a new access record listing that user as the admin for this resource. The resourceUri will be appended to the collection resource uri using a '/' (forward slash) automatically. <br><span class=\"badge badge-outline-secondary\">RESOURCE CLAIM: {resourceUri}</span> or <span class=\"badge badge-outline-secondary\">DELEGATE *: {resourceUri}</span>
@@ -32,11 +25,11 @@ module SwaggerClient
32
25
  # @param [Hash] opts the optional parameters
33
26
  # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
34
27
  def create_claim_with_http_info(body, opts = {})
35
- if @api_client.config.debugging
36
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_claim ...'
28
+ if @authress_client.config.debugging
29
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_claim ...'
37
30
  end
38
31
  # verify the required parameter 'body' is set
39
- if @api_client.config.client_side_validation && body.nil?
32
+ if @authress_client.config.client_side_validation && body.nil?
40
33
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_claim"
41
34
  end
42
35
  # resource path
@@ -48,20 +41,20 @@ module SwaggerClient
48
41
  # header parameters
49
42
  header_params = opts[:header_params] || {}
50
43
  # HTTP header 'Accept' (if needed)
51
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
44
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
52
45
  # HTTP header 'Content-Type'
53
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
46
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
54
47
 
55
48
  # form parameters
56
49
  form_params = opts[:form_params] || {}
57
50
 
58
51
  # http body (model)
59
- post_body = opts[:body] || @api_client.object_to_http_body(body)
52
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
60
53
 
61
54
  return_type = opts[:return_type] || 'Object'
62
55
 
63
56
  auth_names = opts[:auth_names] || ['oauth2']
64
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
57
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
65
58
  :header_params => header_params,
66
59
  :query_params => query_params,
67
60
  :form_params => form_params,
@@ -69,8 +62,8 @@ module SwaggerClient
69
62
  :auth_names => auth_names,
70
63
  :return_type => return_type)
71
64
 
72
- if @api_client.config.debugging
73
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ if @authress_client.config.debugging
66
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
67
  end
75
68
  return data, status_code, headers
76
69
  end
@@ -90,11 +83,11 @@ module SwaggerClient
90
83
  # @param [Hash] opts the optional parameters
91
84
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
92
85
  def create_invite_with_http_info(body, opts = {})
93
- if @api_client.config.debugging
94
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_invite ...'
86
+ if @authress_client.config.debugging
87
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_invite ...'
95
88
  end
96
89
  # verify the required parameter 'body' is set
97
- if @api_client.config.client_side_validation && body.nil?
90
+ if @authress_client.config.client_side_validation && body.nil?
98
91
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_invite"
99
92
  end
100
93
  # resource path
@@ -106,18 +99,18 @@ module SwaggerClient
106
99
  # header parameters
107
100
  header_params = opts[:header_params] || {}
108
101
  # HTTP header 'Content-Type'
109
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
102
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
110
103
 
111
104
  # form parameters
112
105
  form_params = opts[:form_params] || {}
113
106
 
114
107
  # http body (model)
115
- post_body = opts[:body] || @api_client.object_to_http_body(body)
108
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
116
109
 
117
110
  return_type = opts[:return_type]
118
111
 
119
112
  auth_names = opts[:auth_names] || ['oauth2']
120
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
113
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
121
114
  :header_params => header_params,
122
115
  :query_params => query_params,
123
116
  :form_params => form_params,
@@ -125,8 +118,8 @@ module SwaggerClient
125
118
  :auth_names => auth_names,
126
119
  :return_type => return_type)
127
120
 
128
- if @api_client.config.debugging
129
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ if @authress_client.config.debugging
122
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
123
  end
131
124
  return data, status_code, headers
132
125
  end
@@ -146,11 +139,11 @@ module SwaggerClient
146
139
  # @param [Hash] opts the optional parameters
147
140
  # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
148
141
  def create_record_with_http_info(body, opts = {})
149
- if @api_client.config.debugging
150
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.create_record ...'
142
+ if @authress_client.config.debugging
143
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.create_record ...'
151
144
  end
152
145
  # verify the required parameter 'body' is set
153
- if @api_client.config.client_side_validation && body.nil?
146
+ if @authress_client.config.client_side_validation && body.nil?
154
147
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.create_record"
155
148
  end
156
149
  # resource path
@@ -162,20 +155,20 @@ module SwaggerClient
162
155
  # header parameters
163
156
  header_params = opts[:header_params] || {}
164
157
  # HTTP header 'Accept' (if needed)
165
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
158
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
166
159
  # HTTP header 'Content-Type'
167
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
160
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
168
161
 
169
162
  # form parameters
170
163
  form_params = opts[:form_params] || {}
171
164
 
172
165
  # http body (model)
173
- post_body = opts[:body] || @api_client.object_to_http_body(body)
166
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
174
167
 
175
168
  return_type = opts[:return_type] || 'InlineResponse2008'
176
169
 
177
170
  auth_names = opts[:auth_names] || ['oauth2']
178
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
171
+ data, status_code, headers = @authress_client.call_api(:POST, local_var_path,
179
172
  :header_params => header_params,
180
173
  :query_params => query_params,
181
174
  :form_params => form_params,
@@ -183,8 +176,8 @@ module SwaggerClient
183
176
  :auth_names => auth_names,
184
177
  :return_type => return_type)
185
178
 
186
- if @api_client.config.debugging
187
- @api_client.config.logger.debug "API called: AccessRecordsApi#create_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
179
+ if @authress_client.config.debugging
180
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#create_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
188
181
  end
189
182
  return data, status_code, headers
190
183
  end
@@ -204,11 +197,11 @@ module SwaggerClient
204
197
  # @param [Hash] opts the optional parameters
205
198
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
206
199
  def delete_invite_with_http_info(invite_id, opts = {})
207
- if @api_client.config.debugging
208
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_invite ...'
200
+ if @authress_client.config.debugging
201
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_invite ...'
209
202
  end
210
203
  # verify the required parameter 'invite_id' is set
211
- if @api_client.config.client_side_validation && invite_id.nil?
204
+ if @authress_client.config.client_side_validation && invite_id.nil?
212
205
  fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.delete_invite"
213
206
  end
214
207
  # resource path
@@ -229,7 +222,7 @@ module SwaggerClient
229
222
  return_type = opts[:return_type]
230
223
 
231
224
  auth_names = opts[:auth_names] || ['oauth2']
232
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
225
+ data, status_code, headers = @authress_client.call_api(:DELETE, local_var_path,
233
226
  :header_params => header_params,
234
227
  :query_params => query_params,
235
228
  :form_params => form_params,
@@ -237,8 +230,8 @@ module SwaggerClient
237
230
  :auth_names => auth_names,
238
231
  :return_type => return_type)
239
232
 
240
- if @api_client.config.debugging
241
- @api_client.config.logger.debug "API called: AccessRecordsApi#delete_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ if @authress_client.config.debugging
234
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#delete_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
235
  end
243
236
  return data, status_code, headers
244
237
  end
@@ -258,11 +251,11 @@ module SwaggerClient
258
251
  # @param [Hash] opts the optional parameters
259
252
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
260
253
  def delete_record_with_http_info(record_id, opts = {})
261
- if @api_client.config.debugging
262
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_record ...'
254
+ if @authress_client.config.debugging
255
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.delete_record ...'
263
256
  end
264
257
  # verify the required parameter 'record_id' is set
265
- if @api_client.config.client_side_validation && record_id.nil?
258
+ if @authress_client.config.client_side_validation && record_id.nil?
266
259
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.delete_record"
267
260
  end
268
261
  # resource path
@@ -283,7 +276,7 @@ module SwaggerClient
283
276
  return_type = opts[:return_type]
284
277
 
285
278
  auth_names = opts[:auth_names] || ['oauth2']
286
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
279
+ data, status_code, headers = @authress_client.call_api(:DELETE, local_var_path,
287
280
  :header_params => header_params,
288
281
  :query_params => query_params,
289
282
  :form_params => form_params,
@@ -291,8 +284,8 @@ module SwaggerClient
291
284
  :auth_names => auth_names,
292
285
  :return_type => return_type)
293
286
 
294
- if @api_client.config.debugging
295
- @api_client.config.logger.debug "API called: AccessRecordsApi#delete_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ if @authress_client.config.debugging
288
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#delete_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
296
289
  end
297
290
  return data, status_code, headers
298
291
  end
@@ -312,11 +305,11 @@ module SwaggerClient
312
305
  # @param [Hash] opts the optional parameters
313
306
  # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
314
307
  def get_record_with_http_info(record_id, opts = {})
315
- if @api_client.config.debugging
316
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_record ...'
308
+ if @authress_client.config.debugging
309
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.get_record ...'
317
310
  end
318
311
  # verify the required parameter 'record_id' is set
319
- if @api_client.config.client_side_validation && record_id.nil?
312
+ if @authress_client.config.client_side_validation && record_id.nil?
320
313
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.get_record"
321
314
  end
322
315
  # resource path
@@ -328,7 +321,7 @@ module SwaggerClient
328
321
  # header parameters
329
322
  header_params = opts[:header_params] || {}
330
323
  # HTTP header 'Accept' (if needed)
331
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
324
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
332
325
 
333
326
  # form parameters
334
327
  form_params = opts[:form_params] || {}
@@ -339,7 +332,7 @@ module SwaggerClient
339
332
  return_type = opts[:return_type] || 'InlineResponse2008'
340
333
 
341
334
  auth_names = opts[:auth_names] || ['oauth2']
342
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
335
+ data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
343
336
  :header_params => header_params,
344
337
  :query_params => query_params,
345
338
  :form_params => form_params,
@@ -347,8 +340,8 @@ module SwaggerClient
347
340
  :auth_names => auth_names,
348
341
  :return_type => return_type)
349
342
 
350
- if @api_client.config.debugging
351
- @api_client.config.logger.debug "API called: AccessRecordsApi#get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
343
+ if @authress_client.config.debugging
344
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
345
  end
353
346
  return data, status_code, headers
354
347
  end
@@ -374,10 +367,10 @@ module SwaggerClient
374
367
  # @option opts [String] :status Filter records by their current status.
375
368
  # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
376
369
  def get_records_with_http_info(opts = {})
377
- if @api_client.config.debugging
378
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.get_records ...'
370
+ if @authress_client.config.debugging
371
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.get_records ...'
379
372
  end
380
- if @api_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'DELETED'].include?(opts[:'status'])
373
+ if @authress_client.config.client_side_validation && opts[:'status'] && !['ACTIVE', 'DELETED'].include?(opts[:'status'])
381
374
  fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, DELETED'
382
375
  end
383
376
  # resource path
@@ -393,7 +386,7 @@ module SwaggerClient
393
386
  # header parameters
394
387
  header_params = opts[:header_params] || {}
395
388
  # HTTP header 'Accept' (if needed)
396
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
389
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
397
390
 
398
391
  # form parameters
399
392
  form_params = opts[:form_params] || {}
@@ -404,7 +397,7 @@ module SwaggerClient
404
397
  return_type = opts[:return_type] || 'InlineResponse2007'
405
398
 
406
399
  auth_names = opts[:auth_names] || ['oauth2']
407
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
400
+ data, status_code, headers = @authress_client.call_api(:GET, local_var_path,
408
401
  :header_params => header_params,
409
402
  :query_params => query_params,
410
403
  :form_params => form_params,
@@ -412,8 +405,8 @@ module SwaggerClient
412
405
  :auth_names => auth_names,
413
406
  :return_type => return_type)
414
407
 
415
- if @api_client.config.debugging
416
- @api_client.config.logger.debug "API called: AccessRecordsApi#get_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
408
+ if @authress_client.config.debugging
409
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#get_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
417
410
  end
418
411
  return data, status_code, headers
419
412
  end
@@ -433,11 +426,11 @@ module SwaggerClient
433
426
  # @param [Hash] opts the optional parameters
434
427
  # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
435
428
  def respond_to_invite_with_http_info(invite_id, opts = {})
436
- if @api_client.config.debugging
437
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
429
+ if @authress_client.config.debugging
430
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.respond_to_invite ...'
438
431
  end
439
432
  # verify the required parameter 'invite_id' is set
440
- if @api_client.config.client_side_validation && invite_id.nil?
433
+ if @authress_client.config.client_side_validation && invite_id.nil?
441
434
  fail ArgumentError, "Missing the required parameter 'invite_id' when calling AccessRecordsApi.respond_to_invite"
442
435
  end
443
436
  # resource path
@@ -449,7 +442,7 @@ module SwaggerClient
449
442
  # header parameters
450
443
  header_params = opts[:header_params] || {}
451
444
  # HTTP header 'Accept' (if needed)
452
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
445
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
453
446
 
454
447
  # form parameters
455
448
  form_params = opts[:form_params] || {}
@@ -460,7 +453,7 @@ module SwaggerClient
460
453
  return_type = opts[:return_type] || 'InlineResponse2009'
461
454
 
462
455
  auth_names = opts[:auth_names] || ['oauth2']
463
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
456
+ data, status_code, headers = @authress_client.call_api(:PATCH, local_var_path,
464
457
  :header_params => header_params,
465
458
  :query_params => query_params,
466
459
  :form_params => form_params,
@@ -468,8 +461,8 @@ module SwaggerClient
468
461
  :auth_names => auth_names,
469
462
  :return_type => return_type)
470
463
 
471
- if @api_client.config.debugging
472
- @api_client.config.logger.debug "API called: AccessRecordsApi#respond_to_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
464
+ if @authress_client.config.debugging
465
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#respond_to_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
473
466
  end
474
467
  return data, status_code, headers
475
468
  end
@@ -491,15 +484,15 @@ module SwaggerClient
491
484
  # @param [Hash] opts the optional parameters
492
485
  # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
493
486
  def update_record_with_http_info(body, record_id, opts = {})
494
- if @api_client.config.debugging
495
- @api_client.config.logger.debug 'Calling API: AccessRecordsApi.update_record ...'
487
+ if @authress_client.config.debugging
488
+ @authress_client.config.logger.debug 'Calling API: AccessRecordsApi.update_record ...'
496
489
  end
497
490
  # verify the required parameter 'body' is set
498
- if @api_client.config.client_side_validation && body.nil?
491
+ if @authress_client.config.client_side_validation && body.nil?
499
492
  fail ArgumentError, "Missing the required parameter 'body' when calling AccessRecordsApi.update_record"
500
493
  end
501
494
  # verify the required parameter 'record_id' is set
502
- if @api_client.config.client_side_validation && record_id.nil?
495
+ if @authress_client.config.client_side_validation && record_id.nil?
503
496
  fail ArgumentError, "Missing the required parameter 'record_id' when calling AccessRecordsApi.update_record"
504
497
  end
505
498
  # resource path
@@ -511,20 +504,20 @@ module SwaggerClient
511
504
  # header parameters
512
505
  header_params = opts[:header_params] || {}
513
506
  # HTTP header 'Accept' (if needed)
514
- header_params['Accept'] = @api_client.select_header_accept(['application/links+json'])
507
+ header_params['Accept'] = @authress_client.select_header_accept(['application/links+json'])
515
508
  # HTTP header 'Content-Type'
516
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
509
+ header_params['Content-Type'] = @authress_client.select_header_content_type(['application/json'])
517
510
 
518
511
  # form parameters
519
512
  form_params = opts[:form_params] || {}
520
513
 
521
514
  # http body (model)
522
- post_body = opts[:body] || @api_client.object_to_http_body(body)
515
+ post_body = opts[:body] || @authress_client.object_to_http_body(body)
523
516
 
524
517
  return_type = opts[:return_type] || 'InlineResponse2008'
525
518
 
526
519
  auth_names = opts[:auth_names] || ['oauth2']
527
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
520
+ data, status_code, headers = @authress_client.call_api(:PUT, local_var_path,
528
521
  :header_params => header_params,
529
522
  :query_params => query_params,
530
523
  :form_params => form_params,
@@ -532,8 +525,8 @@ module SwaggerClient
532
525
  :auth_names => auth_names,
533
526
  :return_type => return_type)
534
527
 
535
- if @api_client.config.debugging
536
- @api_client.config.logger.debug "API called: AccessRecordsApi#update_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
528
+ if @authress_client.config.debugging
529
+ @authress_client.config.logger.debug "API called: AccessRecordsApi#update_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
537
530
  end
538
531
  return data, status_code, headers
539
532
  end