From 8b4b3ea7b60c1d9b4a299dcb2d8707683c9232b1 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Mar 2026 02:47:10 -0700 Subject: [PATCH] Version 2.1.0-v2.1-1.4.3 release --- CHANGELOG.md | 5 + docusign_admin.gemspec | 2 +- lib/docusign_admin.rb | 9 + lib/docusign_admin/api/bulk_exports_api.rb | 4 +- lib/docusign_admin/api/org_connect_api.rb | 696 ++++++++++++++++++ lib/docusign_admin/api/users_api.rb | 34 +- lib/docusign_admin/client/api_client.rb | 2 +- .../add_user_response_account_properties.rb | 44 +- .../models/connect_event_data.rb | 194 +++++ .../models/ds_group_response.rb | 17 +- lib/docusign_admin/models/error_detail.rb | 192 +++++ .../models/membership_response.rb | 44 +- .../models/new_account_user_request.rb | 17 +- .../new_multi_product_user_add_request.rb | 17 +- .../new_user_response_account_properties.rb | 44 +- .../organization_connect_config_response.rb | 273 +++++++ .../organization_connect_configs_response.rb | 203 +++++ ..._connect_configuration_details_response.rb | 326 ++++++++ ...anization_connect_configuration_request.rb | 326 ++++++++ ...anization_connect_hmac_secrets_response.rb | 185 +++++ ...ganization_connect_o_auth_configuration.rb | 221 ++++++ .../models/organization_user_response.rb | 71 +- .../models/update_membership_request.rb | 17 +- .../models/update_users_request.rb | 18 +- .../models/user_drilldown_response.rb | 44 +- lib/docusign_admin/version.rb | 2 +- 26 files changed, 2959 insertions(+), 48 deletions(-) create mode 100644 lib/docusign_admin/api/org_connect_api.rb create mode 100644 lib/docusign_admin/models/connect_event_data.rb create mode 100644 lib/docusign_admin/models/error_detail.rb create mode 100644 lib/docusign_admin/models/organization_connect_config_response.rb create mode 100644 lib/docusign_admin/models/organization_connect_configs_response.rb create mode 100644 lib/docusign_admin/models/organization_connect_configuration_details_response.rb create mode 100644 lib/docusign_admin/models/organization_connect_configuration_request.rb create mode 100644 lib/docusign_admin/models/organization_connect_hmac_secrets_response.rb create mode 100644 lib/docusign_admin/models/organization_connect_o_auth_configuration.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index b970755..7362bf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [v2.1.0] - Admin API v2.1-1.4.3 - 2026-03-09 +### Changed +- Added support for version v2.1-1.4.3 of the DocuSign Admin API. +- Updated the SDK release version. + ## [v2.0.0] - Admin API v2.1-1.4.1 - 2024-10-28 ### Changed - Added support for version v2.1-1.4.1 of the DocuSign Admin API. diff --git a/docusign_admin.gemspec b/docusign_admin.gemspec index 9b2bb22..278eef8 100644 --- a/docusign_admin.gemspec +++ b/docusign_admin.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |s| s.license = "MIT" s.required_ruby_version = ">= 1.9" - s.add_runtime_dependency 'jwt', '~> 2.2', '>= 2.2.1' + s.add_runtime_dependency 'jwt', '>= 2.2.1' s.add_runtime_dependency 'addressable', '~> 2.7', '>= 2.7.0' s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' diff --git a/lib/docusign_admin.rb b/lib/docusign_admin.rb index 1b6ce7f..deb394c 100644 --- a/lib/docusign_admin.rb +++ b/lib/docusign_admin.rb @@ -32,6 +32,7 @@ require 'docusign_admin/models/asset_group_account_response' require 'docusign_admin/models/asset_group_accounts_response' require 'docusign_admin/models/certificate_response' +require 'docusign_admin/models/connect_event_data' require 'docusign_admin/models/ds_group_add_request' require 'docusign_admin/models/ds_group_and_users_response' require 'docusign_admin/models/ds_group_list_response' @@ -50,6 +51,7 @@ require 'docusign_admin/models/docu_sign_account_domain_model_address' require 'docusign_admin/models/domain_response' require 'docusign_admin/models/domains_response' +require 'docusign_admin/models/error_detail' require 'docusign_admin/models/error_details' require 'docusign_admin/models/force_activate_membership_request' require 'docusign_admin/models/group_request' @@ -88,6 +90,12 @@ require 'docusign_admin/models/organization_account_settings_import_response' require 'docusign_admin/models/organization_account_settings_import_result_response' require 'docusign_admin/models/organization_accounts_request' +require 'docusign_admin/models/organization_connect_config_response' +require 'docusign_admin/models/organization_connect_configs_response' +require 'docusign_admin/models/organization_connect_configuration_details_response' +require 'docusign_admin/models/organization_connect_configuration_request' +require 'docusign_admin/models/organization_connect_hmac_secrets_response' +require 'docusign_admin/models/organization_connect_o_auth_configuration' require 'docusign_admin/models/organization_export_account' require 'docusign_admin/models/organization_export_domain' require 'docusign_admin/models/organization_export_request' @@ -163,6 +171,7 @@ require 'docusign_admin/api/bulk_imports_api' require 'docusign_admin/api/ds_groups_api' require 'docusign_admin/api/identity_providers_api' +require 'docusign_admin/api/org_connect_api' require 'docusign_admin/api/organizations_api' require 'docusign_admin/api/product_permission_profiles_api' require 'docusign_admin/api/provision_asset_group_api' diff --git a/lib/docusign_admin/api/bulk_exports_api.rb b/lib/docusign_admin/api/bulk_exports_api.rb index 4f4d4c8..8cfbd93 100644 --- a/lib/docusign_admin/api/bulk_exports_api.rb +++ b/lib/docusign_admin/api/bulk_exports_api.rb @@ -21,7 +21,7 @@ def initialize(api_client = BulkExportsApi.default) @api_client = api_client end - # Creates a new Account Setting Export request. + # Creates a new Account Setting Export request. # Required scopes: account_read # @param organization_id The organization ID Guid # @param request Request body containing details about the accounts be compared @@ -31,7 +31,7 @@ def create_account_settings_export(organization_id, request) return data end - # Creates a new Account Setting Export request. + # Creates a new Account Setting Export request. # Required scopes: account_read # @param organization_id The organization ID Guid # @param request Request body containing details about the accounts be compared diff --git a/lib/docusign_admin/api/org_connect_api.rb b/lib/docusign_admin/api/org_connect_api.rb new file mode 100644 index 0000000..820dfc6 --- /dev/null +++ b/lib/docusign_admin/api/org_connect_api.rb @@ -0,0 +1,696 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require "uri" + +module DocuSign_Admin + + class GetOrganizationConnectConfigsOptions + # Sorts configs by field in ascending order. Default sort by config name. Default value: name + attr_accessor :sort_by + + # Selects configs based on siteId + attr_accessor :site_id + + # Selects configs based on accountId + attr_accessor :account_id + + # Selects configs based on their status + attr_accessor :allow_envelope_publish + + # Selects configs based on config id or name provided in the query parameter + attr_accessor :q + + def self.default + @@default ||= GetOrganizationConnectConfigsOptions.new + end + end + + + class OrgConnectApi + attr_accessor :api_client + + def initialize(api_client = OrgConnectApi.default) + @api_client = api_client + end + + # Adds a Connect configuration for an organization + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_request Add an organization Connect request + # @return [OrganizationConnectConfigurationDetailsResponse] + def create_organization_connect_config(organization_id, connect_request) + data, _status_code, _headers = create_organization_connect_config_with_http_info(organization_id, connect_request) + return data + end + + # Adds a Connect configuration for an organization + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_request Add an organization Connect request + # @return [Array<(OrganizationConnectConfigurationDetailsResponse, Fixnum, Hash)>] OrganizationConnectConfigurationDetailsResponse data, response status code and response headers + def create_organization_connect_config_with_http_info(organization_id, connect_request) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.create_organization_connect_config ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.create_organization_connect_config" if organization_id.nil? + # verify the required parameter 'connect_request' is set + fail ArgumentError, "Missing the required parameter 'connect_request' when calling OrgConnectApi.create_organization_connect_config" if connect_request.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(connect_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectConfigurationDetailsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#create_organization_connect_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes information about a Connect HMAC secret + # Required scopes: connect_org_hmac_write_api + # @param organization_id The organization ID Guid + # @param key_id The key ID Guid + # @return [OrganizationConnectHmacSecretsResponse] + def delete_connect_hmac_secret(organization_id, key_id) + data, _status_code, _headers = delete_connect_hmac_secret_with_http_info(organization_id, key_id) + return data + end + + # Deletes information about a Connect HMAC secret + # Required scopes: connect_org_hmac_write_api + # @param organization_id The organization ID Guid + # @param key_id The key ID Guid + # @return [Array<(OrganizationConnectHmacSecretsResponse, Fixnum, Hash)>] OrganizationConnectHmacSecretsResponse data, response status code and response headers + def delete_connect_hmac_secret_with_http_info(organization_id, key_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.delete_connect_hmac_secret ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.delete_connect_hmac_secret" if organization_id.nil? + # verify the required parameter 'key_id' is set + fail ArgumentError, "Missing the required parameter 'key_id' when calling OrgConnectApi.delete_connect_hmac_secret" if key_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/secret/{keyId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectHmacSecretsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#delete_connect_hmac_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes information about an organization-level Connect configuration + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @return [Object] + def delete_organization_connect_config(organization_id, connect_id) + data, _status_code, _headers = delete_organization_connect_config_with_http_info(organization_id, connect_id) + return data + end + + # Deletes information about an organization-level Connect configuration + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers + def delete_organization_connect_config_with_http_info(organization_id, connect_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.delete_organization_connect_config ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.delete_organization_connect_config" if organization_id.nil? + # verify the required parameter 'connect_id' is set + fail ArgumentError, "Missing the required parameter 'connect_id' when calling OrgConnectApi.delete_organization_connect_config" if connect_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/{connectId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'connectId' + '}', connect_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Object') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#delete_organization_connect_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @return [Object] + def delete_organization_connect_o_auth_configuration(organization_id) + data, _status_code, _headers = delete_organization_connect_o_auth_configuration_with_http_info(organization_id) + return data + end + + # Deletes an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers + def delete_organization_connect_o_auth_configuration_with_http_info(organization_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.delete_organization_connect_o_auth_configuration ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.delete_organization_connect_o_auth_configuration" if organization_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/oauth".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Object') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#delete_organization_connect_o_auth_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns information about Connect HMAC secrets + # Required scopes: connect_org_hmac_read_api + # @param organization_id The organization ID Guid + # @return [OrganizationConnectHmacSecretsResponse] + def get_connect_hmac_secrets(organization_id) + data, _status_code, _headers = get_connect_hmac_secrets_with_http_info(organization_id) + return data + end + + # Returns information about Connect HMAC secrets + # Required scopes: connect_org_hmac_read_api + # @param organization_id The organization ID Guid + # @return [Array<(OrganizationConnectHmacSecretsResponse, Fixnum, Hash)>] OrganizationConnectHmacSecretsResponse data, response status code and response headers + def get_connect_hmac_secrets_with_http_info(organization_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.get_connect_hmac_secrets ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.get_connect_hmac_secrets" if organization_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/secret".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectHmacSecretsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#get_connect_hmac_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns an organization-level Connect configuration + # Required scopes: connect_org_config_read_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @return [OrganizationConnectConfigurationDetailsResponse] + def get_organization_connect_config(organization_id, connect_id) + data, _status_code, _headers = get_organization_connect_config_with_http_info(organization_id, connect_id) + return data + end + + # Returns an organization-level Connect configuration + # Required scopes: connect_org_config_read_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @return [Array<(OrganizationConnectConfigurationDetailsResponse, Fixnum, Hash)>] OrganizationConnectConfigurationDetailsResponse data, response status code and response headers + def get_organization_connect_config_with_http_info(organization_id, connect_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.get_organization_connect_config ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.get_organization_connect_config" if organization_id.nil? + # verify the required parameter 'connect_id' is set + fail ArgumentError, "Missing the required parameter 'connect_id' when calling OrgConnectApi.get_organization_connect_config" if connect_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/{connectId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'connectId' + '}', connect_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectConfigurationDetailsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#get_organization_connect_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns a list of Connect configurations under an organization + # Required scopes: connect_org_config_read_api + # @param organization_id The organization ID Guid + # @param DocuSign_Admin::GetOrganizationConnectConfigsOptions Options for modifying the behavior of the function. + # @return [OrganizationConnectConfigsResponse] + def get_organization_connect_configs(organization_id, options = DocuSign_Admin::GetOrganizationConnectConfigsOptions.default) + data, _status_code, _headers = get_organization_connect_configs_with_http_info(organization_id, options) + return data + end + + # Returns a list of Connect configurations under an organization + # Required scopes: connect_org_config_read_api + # @param organization_id The organization ID Guid + # @param DocuSign_Admin::GetOrganizationConnectConfigsOptions Options for modifying the behavior of the function. + # @return [Array<(OrganizationConnectConfigsResponse, Fixnum, Hash)>] OrganizationConnectConfigsResponse data, response status code and response headers + def get_organization_connect_configs_with_http_info(organization_id, options = DocuSign_Admin::GetOrganizationConnectConfigsOptions.default) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.get_organization_connect_configs ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.get_organization_connect_configs" if organization_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + query_params[:'sortBy'] = options.sort_by if !options.sort_by.nil? + query_params[:'siteId'] = options.site_id if !options.site_id.nil? + query_params[:'accountId'] = options.account_id if !options.account_id.nil? + query_params[:'allowEnvelopePublish'] = options.allow_envelope_publish if !options.allow_envelope_publish.nil? + query_params[:'q'] = options.q if !options.q.nil? + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectConfigsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#get_organization_connect_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_read_api + # @param organization_id The organization ID Guid + # @return [Object] + def get_organization_connect_o_auth_configuration(organization_id) + data, _status_code, _headers = get_organization_connect_o_auth_configuration_with_http_info(organization_id) + return data + end + + # Returns information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_read_api + # @param organization_id The organization ID Guid + # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers + def get_organization_connect_o_auth_configuration_with_http_info(organization_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.get_organization_connect_o_auth_configuration ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.get_organization_connect_o_auth_configuration" if organization_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/oauth".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:GET, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'Object') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#get_organization_connect_o_auth_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Saves information about a Connect HMAC secret + # Required scopes: connect_org_hmac_write_api + # @param organization_id The organization ID Guid + # @return [OrganizationConnectHmacSecretsResponse] + def post_connect_hmac_secret(organization_id) + data, _status_code, _headers = post_connect_hmac_secret_with_http_info(organization_id) + return data + end + + # Saves information about a Connect HMAC secret + # Required scopes: connect_org_hmac_write_api + # @param organization_id The organization ID Guid + # @return [Array<(OrganizationConnectHmacSecretsResponse, Fixnum, Hash)>] OrganizationConnectHmacSecretsResponse data, response status code and response headers + def post_connect_hmac_secret_with_http_info(organization_id) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.post_connect_hmac_secret ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.post_connect_hmac_secret" if organization_id.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/secret".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectHmacSecretsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#post_connect_hmac_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Saves information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @param configuration Add an organization-level Connect OAuth configuration + # @return [OrganizationConnectOAuthConfiguration] + def post_organization_connect_o_auth_configuration(organization_id, configuration) + data, _status_code, _headers = post_organization_connect_o_auth_configuration_with_http_info(organization_id, configuration) + return data + end + + # Saves information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @param configuration Add an organization-level Connect OAuth configuration + # @return [Array<(OrganizationConnectOAuthConfiguration, Fixnum, Hash)>] OrganizationConnectOAuthConfiguration data, response status code and response headers + def post_organization_connect_o_auth_configuration_with_http_info(organization_id, configuration) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.post_organization_connect_o_auth_configuration ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.post_organization_connect_o_auth_configuration" if organization_id.nil? + # verify the required parameter 'configuration' is set + fail ArgumentError, "Missing the required parameter 'configuration' when calling OrgConnectApi.post_organization_connect_o_auth_configuration" if configuration.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/oauth".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(configuration) + auth_names = [] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectOAuthConfiguration') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#post_organization_connect_o_auth_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @param configuration Update an organization-level Connect OAuth configuration + # @return [OrganizationConnectOAuthConfiguration] + def put_organization_connect_o_auth_configuration(organization_id, configuration) + data, _status_code, _headers = put_organization_connect_o_auth_configuration_with_http_info(organization_id, configuration) + return data + end + + # Updates information about an organization-level Connect OAuth configuration + # Required scopes: connect_org_oauth_write_api + # @param organization_id The organization ID Guid + # @param configuration Update an organization-level Connect OAuth configuration + # @return [Array<(OrganizationConnectOAuthConfiguration, Fixnum, Hash)>] OrganizationConnectOAuthConfiguration data, response status code and response headers + def put_organization_connect_o_auth_configuration_with_http_info(organization_id, configuration) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.put_organization_connect_o_auth_configuration ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.put_organization_connect_o_auth_configuration" if organization_id.nil? + # verify the required parameter 'configuration' is set + fail ArgumentError, "Missing the required parameter 'configuration' when calling OrgConnectApi.put_organization_connect_o_auth_configuration" if configuration.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/oauth".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(configuration) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectOAuthConfiguration') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#put_organization_connect_o_auth_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates an organization-level Connect configuration + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @param connect_request Add an organization Connect request + # @return [OrganizationConnectConfigurationDetailsResponse] + def update_organization_connect_config(organization_id, connect_id, connect_request) + data, _status_code, _headers = update_organization_connect_config_with_http_info(organization_id, connect_id, connect_request) + return data + end + + # Updates an organization-level Connect configuration + # Required scopes: connect_org_config_write_api + # @param organization_id The organization ID Guid + # @param connect_id The configuration ID Guid + # @param connect_request Add an organization Connect request + # @return [Array<(OrganizationConnectConfigurationDetailsResponse, Fixnum, Hash)>] OrganizationConnectConfigurationDetailsResponse data, response status code and response headers + def update_organization_connect_config_with_http_info(organization_id, connect_id, connect_request) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: OrgConnectApi.update_organization_connect_config ..." + end + # verify the required parameter 'organization_id' is set + fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrgConnectApi.update_organization_connect_config" if organization_id.nil? + # verify the required parameter 'connect_id' is set + fail ArgumentError, "Missing the required parameter 'connect_id' when calling OrgConnectApi.update_organization_connect_config" if connect_id.nil? + # verify the required parameter 'connect_request' is set + fail ArgumentError, "Missing the required parameter 'connect_request' when calling OrgConnectApi.update_organization_connect_config" if connect_request.nil? + # resource path + local_var_path = "/v2/organizations/{organizationId}/connect/{connectId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'connectId' + '}', connect_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(connect_request) + auth_names = [] + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => 'OrganizationConnectConfigurationDetailsResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrgConnectApi#update_organization_connect_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end \ No newline at end of file diff --git a/lib/docusign_admin/api/users_api.rb b/lib/docusign_admin/api/users_api.rb index 7195520..51fcfc0 100644 --- a/lib/docusign_admin/api/users_api.rb +++ b/lib/docusign_admin/api/users_api.rb @@ -17,6 +17,9 @@ class GetUserDSProfileOptions # Sorts user information by account name ascending attr_accessor :sort + # When true: additional details about the user's license will be included in the response. The account must have an IAM plan with licenses. + attr_accessor :include_license + def self.default @@default ||= GetUserDSProfileOptions.new end @@ -29,6 +32,9 @@ class GetUserDSProfilesByEmailOptions # Sorts user information by account name ascending attr_accessor :sort + # When true: additional details about the user's license will be included in the response. The account must have an IAM plan with licenses. + attr_accessor :include_license + def self.default @@default ||= GetUserDSProfilesByEmailOptions.new end @@ -38,6 +44,9 @@ class GetUserProfilesOptions # The email address attr_accessor :email + # When true: additional details about the user's license will be included in the response. The account must have an IAM plan with licenses. + attr_accessor :include_license + def self.default @@default ||= GetUserProfilesOptions.new end @@ -77,11 +86,23 @@ class GetUsersOptions # Select users with groups the users belong to; account_id must be specified. The organization must have the entitlement AllowMultiApplication enabled. attr_accessor :include_ds_groups + # When true: additional details about the user's license will be included in the response; account_id must be specified and the account must have an IAM plan with licenses. + attr_accessor :include_license + def self.default @@default ||= GetUsersOptions.new end end + class UpdateUserOptions + # If an account has an IAM plan with licenses, this query specifies how a user's license is handled. Values: true - Updates the user's existing license; false - Adds a license to the user + attr_accessor :apply_license_override + + def self.default + @@default ||= UpdateUserOptions.new + end + end + class UsersApi attr_accessor :api_client @@ -475,6 +496,7 @@ def get_user_ds_profile_with_http_info(organization_id, user_id, options = DocuS # query parameters query_params = {} query_params[:'sort'] = options.sort if !options.sort.nil? + query_params[:'include_license'] = options.include_license if !options.include_license.nil? # header parameters header_params = {} @@ -530,6 +552,7 @@ def get_user_ds_profiles_by_email_with_http_info(organization_id, options = Docu query_params = {} query_params[:'email'] = options.email if !options.email.nil? query_params[:'sort'] = options.sort if !options.sort.nil? + query_params[:'include_license'] = options.include_license if !options.include_license.nil? # header parameters header_params = {} @@ -584,6 +607,7 @@ def get_user_profiles_with_http_info(organization_id, options = DocuSign_Admin:: # query parameters query_params = {} query_params[:'email'] = options.email if !options.email.nil? + query_params[:'include_license'] = options.include_license if !options.include_license.nil? # header parameters header_params = {} @@ -648,6 +672,7 @@ def get_users_with_http_info(organization_id, options = DocuSign_Admin::GetUsers query_params[:'organization_reserved_domain_id'] = options.organization_reserved_domain_id if !options.organization_reserved_domain_id.nil? query_params[:'last_modified_since'] = options.last_modified_since if !options.last_modified_since.nil? query_params[:'include_ds_groups'] = options.include_ds_groups if !options.include_ds_groups.nil? + query_params[:'include_license'] = options.include_license if !options.include_license.nil? # header parameters header_params = {} @@ -734,9 +759,10 @@ def update_email_address_with_http_info(organization_id, request) # Required scopes: user_write # @param organization_id The organization ID Guid # @param request The user details to update + # @param DocuSign_Admin::UpdateUserOptions Options for modifying the behavior of the function. # @return [UsersUpdateResponse] - def update_user(organization_id, request) - data, _status_code, _headers = update_user_with_http_info(organization_id, request) + def update_user(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default) + data, _status_code, _headers = update_user_with_http_info(organization_id, request, options) return data end @@ -744,8 +770,9 @@ def update_user(organization_id, request) # Required scopes: user_write # @param organization_id The organization ID Guid # @param request The user details to update + # @param DocuSign_Admin::UpdateUserOptions Options for modifying the behavior of the function. # @return [Array<(UsersUpdateResponse, Fixnum, Hash)>] UsersUpdateResponse data, response status code and response headers - def update_user_with_http_info(organization_id, request) + def update_user_with_http_info(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.update_user ..." end @@ -758,6 +785,7 @@ def update_user_with_http_info(organization_id, request) # query parameters query_params = {} + query_params[:'apply_license_override'] = options.apply_license_override if !options.apply_license_override.nil? # header parameters header_params = {} diff --git a/lib/docusign_admin/client/api_client.rb b/lib/docusign_admin/client/api_client.rb index 7cd36e3..04fb711 100644 --- a/lib/docusign_admin/client/api_client.rb +++ b/lib/docusign_admin/client/api_client.rb @@ -35,7 +35,7 @@ class ApiClient # @option config [Configuration] Configuration for initializing the object, default to Configuration.default def initialize(config = Configuration.default) @config = config - @user_agent = "Swagger-Codegen/v2.1/2.0.0/ruby-#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}" + @user_agent = "Swagger-Codegen/v2.1/2.1.0/ruby-#{RUBY_VERSION}p#{RUBY_PATCHLEVEL}" @default_headers = { 'Content-Type' => "application/json", 'User-Agent' => @user_agent diff --git a/lib/docusign_admin/models/add_user_response_account_properties.rb b/lib/docusign_admin/models/add_user_response_account_properties.rb index f5ce460..4093b60 100644 --- a/lib/docusign_admin/models/add_user_response_account_properties.rb +++ b/lib/docusign_admin/models/add_user_response_account_properties.rb @@ -25,6 +25,14 @@ class AddUserResponseAccountProperties attr_accessor :job_title + attr_accessor :license_type + + attr_accessor :subscription_id + + attr_accessor :plan_name + + attr_accessor :license_status + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -33,7 +41,11 @@ def self.attribute_map :'product_permission_profiles' => :'product_permission_profiles', :'ds_groups' => :'ds_groups', :'company_name' => :'company_name', - :'job_title' => :'job_title' + :'job_title' => :'job_title', + :'license_type' => :'license_type', + :'subscription_id' => :'subscription_id', + :'plan_name' => :'plan_name', + :'license_status' => :'license_status' } end @@ -45,7 +57,11 @@ def self.swagger_types :'product_permission_profiles' => :'Array', :'ds_groups' => :'Array', :'company_name' => :'String', - :'job_title' => :'String' + :'job_title' => :'String', + :'license_type' => :'String', + :'subscription_id' => :'String', + :'plan_name' => :'String', + :'license_status' => :'String' } end @@ -84,6 +100,22 @@ def initialize(attributes = {}) if attributes.has_key?(:'job_title') self.job_title = attributes[:'job_title'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end + + if attributes.has_key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_id'] + end + + if attributes.has_key?(:'plan_name') + self.plan_name = attributes[:'plan_name'] + end + + if attributes.has_key?(:'license_status') + self.license_status = attributes[:'license_status'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -109,7 +141,11 @@ def ==(o) product_permission_profiles == o.product_permission_profiles && ds_groups == o.ds_groups && company_name == o.company_name && - job_title == o.job_title + job_title == o.job_title && + license_type == o.license_type && + subscription_id == o.subscription_id && + plan_name == o.plan_name && + license_status == o.license_status end # @see the `==` method @@ -121,7 +157,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, site_id, product_permission_profiles, ds_groups, company_name, job_title].hash + [id, site_id, product_permission_profiles, ds_groups, company_name, job_title, license_type, subscription_id, plan_name, license_status].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/connect_event_data.rb b/lib/docusign_admin/models/connect_event_data.rb new file mode 100644 index 0000000..01565f0 --- /dev/null +++ b/lib/docusign_admin/models/connect_event_data.rb @@ -0,0 +1,194 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class ConnectEventData + attr_accessor :version + + attr_accessor :include_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'version' => :'version', + :'include_data' => :'includeData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'version' => :'String', + :'include_data' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.has_key?(:'includeData') + if (value = attributes[:'includeData']).is_a?(Array) + self.include_data = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + version == o.version && + include_data == o.include_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [version, include_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/ds_group_response.rb b/lib/docusign_admin/models/ds_group_response.rb index 17bb024..38e73f8 100644 --- a/lib/docusign_admin/models/ds_group_response.rb +++ b/lib/docusign_admin/models/ds_group_response.rb @@ -35,6 +35,8 @@ class DSGroupResponse attr_accessor :account_name + attr_accessor :is_managed_by_scim + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -48,7 +50,8 @@ def self.attribute_map :'last_modified_on' => :'last_modified_on', :'user_count' => :'user_count', :'external_account_id' => :'external_account_id', - :'account_name' => :'account_name' + :'account_name' => :'account_name', + :'is_managed_by_scim' => :'is_managed_by_scim' } end @@ -65,7 +68,8 @@ def self.swagger_types :'last_modified_on' => :'DateTime', :'user_count' => :'Integer', :'external_account_id' => :'Integer', - :'account_name' => :'String' + :'account_name' => :'String', + :'is_managed_by_scim' => :'BOOLEAN' } end @@ -120,6 +124,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'account_name') self.account_name = attributes[:'account_name'] end + + if attributes.has_key?(:'is_managed_by_scim') + self.is_managed_by_scim = attributes[:'is_managed_by_scim'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -150,7 +158,8 @@ def ==(o) last_modified_on == o.last_modified_on && user_count == o.user_count && external_account_id == o.external_account_id && - account_name == o.account_name + account_name == o.account_name && + is_managed_by_scim == o.is_managed_by_scim end # @see the `==` method @@ -162,7 +171,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [ds_group_id, account_id, source_product_name, group_id, group_name, description, is_admin, last_modified_on, user_count, external_account_id, account_name].hash + [ds_group_id, account_id, source_product_name, group_id, group_name, description, is_admin, last_modified_on, user_count, external_account_id, account_name, is_managed_by_scim].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/error_detail.rb b/lib/docusign_admin/models/error_detail.rb new file mode 100644 index 0000000..dfd4583 --- /dev/null +++ b/lib/docusign_admin/models/error_detail.rb @@ -0,0 +1,192 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class ErrorDetail + attr_accessor :error_message + + attr_accessor :reference_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error_message' => :'errorMessage', + :'reference_id' => :'referenceId' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'error_message' => :'String', + :'reference_id' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'errorMessage') + self.error_message = attributes[:'errorMessage'] + end + + if attributes.has_key?(:'referenceId') + self.reference_id = attributes[:'referenceId'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_message == o.error_message && + reference_id == o.reference_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [error_message, reference_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/membership_response.rb b/lib/docusign_admin/models/membership_response.rb index 6840272..d91ab53 100644 --- a/lib/docusign_admin/models/membership_response.rb +++ b/lib/docusign_admin/models/membership_response.rb @@ -13,6 +13,8 @@ module DocuSign_Admin class MembershipResponse + attr_accessor :id + attr_accessor :email attr_accessor :account_id @@ -33,9 +35,16 @@ class MembershipResponse attr_accessor :is_admin + attr_accessor :license_type + + attr_accessor :subscription_id + + attr_accessor :plan_name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'id' => :'id', :'email' => :'email', :'account_id' => :'account_id', :'external_account_id' => :'external_account_id', @@ -45,13 +54,17 @@ def self.attribute_map :'permission_profile' => :'permission_profile', :'created_on' => :'created_on', :'groups' => :'groups', - :'is_admin' => :'is_admin' + :'is_admin' => :'is_admin', + :'license_type' => :'license_type', + :'subscription_id' => :'subscription_id', + :'plan_name' => :'plan_name' } end # Attribute type mapping. def self.swagger_types { + :'id' => :'String', :'email' => :'String', :'account_id' => :'String', :'external_account_id' => :'String', @@ -61,7 +74,10 @@ def self.swagger_types :'permission_profile' => :'PermissionProfileResponse', :'created_on' => :'DateTime', :'groups' => :'Array', - :'is_admin' => :'BOOLEAN' + :'is_admin' => :'BOOLEAN', + :'license_type' => :'String', + :'subscription_id' => :'String', + :'plan_name' => :'String' } end @@ -73,6 +89,10 @@ def initialize(attributes = {}) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + if attributes.has_key?(:'id') + self.id = attributes[:'id'] + end + if attributes.has_key?(:'email') self.email = attributes[:'email'] end @@ -114,6 +134,18 @@ def initialize(attributes = {}) if attributes.has_key?(:'is_admin') self.is_admin = attributes[:'is_admin'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end + + if attributes.has_key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_id'] + end + + if attributes.has_key?(:'plan_name') + self.plan_name = attributes[:'plan_name'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -134,6 +166,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + id == o.id && email == o.email && account_id == o.account_id && external_account_id == o.external_account_id && @@ -143,7 +176,10 @@ def ==(o) permission_profile == o.permission_profile && created_on == o.created_on && groups == o.groups && - is_admin == o.is_admin + is_admin == o.is_admin && + license_type == o.license_type && + subscription_id == o.subscription_id && + plan_name == o.plan_name end # @see the `==` method @@ -155,7 +191,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [email, account_id, external_account_id, account_name, is_external_account, status, permission_profile, created_on, groups, is_admin].hash + [id, email, account_id, external_account_id, account_name, is_external_account, status, permission_profile, created_on, groups, is_admin, license_type, subscription_id, plan_name].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/new_account_user_request.rb b/lib/docusign_admin/models/new_account_user_request.rb index c87993d..9e3d872 100644 --- a/lib/docusign_admin/models/new_account_user_request.rb +++ b/lib/docusign_admin/models/new_account_user_request.rb @@ -37,6 +37,8 @@ class NewAccountUserRequest attr_accessor :auto_activate_memberships + attr_accessor :license_type + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -51,7 +53,8 @@ def self.attribute_map :'selected_languages' => :'selected_languages', :'access_code' => :'access_code', :'federated_status' => :'federated_status', - :'auto_activate_memberships' => :'auto_activate_memberships' + :'auto_activate_memberships' => :'auto_activate_memberships', + :'license_type' => :'license_type' } end @@ -69,7 +72,8 @@ def self.swagger_types :'selected_languages' => :'String', :'access_code' => :'String', :'federated_status' => :'String', - :'auto_activate_memberships' => :'BOOLEAN' + :'auto_activate_memberships' => :'BOOLEAN', + :'license_type' => :'String' } end @@ -130,6 +134,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'auto_activate_memberships') self.auto_activate_memberships = attributes[:'auto_activate_memberships'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -166,7 +174,8 @@ def ==(o) selected_languages == o.selected_languages && access_code == o.access_code && federated_status == o.federated_status && - auto_activate_memberships == o.auto_activate_memberships + auto_activate_memberships == o.auto_activate_memberships && + license_type == o.license_type end # @see the `==` method @@ -178,7 +187,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [permission_profile, groups, user_name, first_name, last_name, email, default_account_id, language_culture, selected_languages, access_code, federated_status, auto_activate_memberships].hash + [permission_profile, groups, user_name, first_name, last_name, email, default_account_id, language_culture, selected_languages, access_code, federated_status, auto_activate_memberships, license_type].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/new_multi_product_user_add_request.rb b/lib/docusign_admin/models/new_multi_product_user_add_request.rb index 36fbcec..e56c1ce 100644 --- a/lib/docusign_admin/models/new_multi_product_user_add_request.rb +++ b/lib/docusign_admin/models/new_multi_product_user_add_request.rb @@ -35,6 +35,8 @@ class NewMultiProductUserAddRequest attr_accessor :auto_activate_memberships + attr_accessor :license_type + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -48,7 +50,8 @@ def self.attribute_map :'language_culture' => :'language_culture', :'access_code' => :'access_code', :'federated_status' => :'federated_status', - :'auto_activate_memberships' => :'auto_activate_memberships' + :'auto_activate_memberships' => :'auto_activate_memberships', + :'license_type' => :'license_type' } end @@ -65,7 +68,8 @@ def self.swagger_types :'language_culture' => :'String', :'access_code' => :'String', :'federated_status' => :'String', - :'auto_activate_memberships' => :'BOOLEAN' + :'auto_activate_memberships' => :'BOOLEAN', + :'license_type' => :'String' } end @@ -124,6 +128,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'auto_activate_memberships') self.auto_activate_memberships = attributes[:'auto_activate_memberships'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -164,7 +172,8 @@ def ==(o) language_culture == o.language_culture && access_code == o.access_code && federated_status == o.federated_status && - auto_activate_memberships == o.auto_activate_memberships + auto_activate_memberships == o.auto_activate_memberships && + license_type == o.license_type end # @see the `==` method @@ -176,7 +185,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [product_permission_profiles, ds_groups, user_name, first_name, last_name, email, default_account_id, language_culture, access_code, federated_status, auto_activate_memberships].hash + [product_permission_profiles, ds_groups, user_name, first_name, last_name, email, default_account_id, language_culture, access_code, federated_status, auto_activate_memberships, license_type].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/new_user_response_account_properties.rb b/lib/docusign_admin/models/new_user_response_account_properties.rb index faf5abf..2a50d26 100644 --- a/lib/docusign_admin/models/new_user_response_account_properties.rb +++ b/lib/docusign_admin/models/new_user_response_account_properties.rb @@ -25,6 +25,14 @@ class NewUserResponseAccountProperties attr_accessor :job_title + attr_accessor :license_type + + attr_accessor :subscription_id + + attr_accessor :plan_name + + attr_accessor :license_status + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -33,7 +41,11 @@ def self.attribute_map :'permission_profile' => :'permission_profile', :'groups' => :'groups', :'company_name' => :'company_name', - :'job_title' => :'job_title' + :'job_title' => :'job_title', + :'license_type' => :'license_type', + :'subscription_id' => :'subscription_id', + :'plan_name' => :'plan_name', + :'license_status' => :'license_status' } end @@ -45,7 +57,11 @@ def self.swagger_types :'permission_profile' => :'PermissionProfileResponse', :'groups' => :'Array', :'company_name' => :'String', - :'job_title' => :'String' + :'job_title' => :'String', + :'license_type' => :'String', + :'subscription_id' => :'String', + :'plan_name' => :'String', + :'license_status' => :'String' } end @@ -82,6 +98,22 @@ def initialize(attributes = {}) if attributes.has_key?(:'job_title') self.job_title = attributes[:'job_title'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end + + if attributes.has_key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_id'] + end + + if attributes.has_key?(:'plan_name') + self.plan_name = attributes[:'plan_name'] + end + + if attributes.has_key?(:'license_status') + self.license_status = attributes[:'license_status'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -107,7 +139,11 @@ def ==(o) permission_profile == o.permission_profile && groups == o.groups && company_name == o.company_name && - job_title == o.job_title + job_title == o.job_title && + license_type == o.license_type && + subscription_id == o.subscription_id && + plan_name == o.plan_name && + license_status == o.license_status end # @see the `==` method @@ -119,7 +155,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, site_id, permission_profile, groups, company_name, job_title].hash + [id, site_id, permission_profile, groups, company_name, job_title, license_type, subscription_id, plan_name, license_status].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/organization_connect_config_response.rb b/lib/docusign_admin/models/organization_connect_config_response.rb new file mode 100644 index 0000000..c84bc1e --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_config_response.rb @@ -0,0 +1,273 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectConfigResponse + attr_accessor :connect_id + + attr_accessor :configuration_type + + attr_accessor :disabled_by + + attr_accessor :allow_salesforce_publish + + attr_accessor :name + + attr_accessor :account_id + + attr_accessor :account_name + + attr_accessor :allow_envelope_publish + + attr_accessor :site_id + + attr_accessor :pause_publish + + attr_accessor :requires_acknowledgement + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connect_id' => :'connectId', + :'configuration_type' => :'configurationType', + :'disabled_by' => :'disabledBy', + :'allow_salesforce_publish' => :'allowSalesforcePublish', + :'name' => :'name', + :'account_id' => :'accountId', + :'account_name' => :'accountName', + :'allow_envelope_publish' => :'allowEnvelopePublish', + :'site_id' => :'siteId', + :'pause_publish' => :'pausePublish', + :'requires_acknowledgement' => :'requiresAcknowledgement' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'connect_id' => :'String', + :'configuration_type' => :'String', + :'disabled_by' => :'String', + :'allow_salesforce_publish' => :'String', + :'name' => :'String', + :'account_id' => :'String', + :'account_name' => :'String', + :'allow_envelope_publish' => :'String', + :'site_id' => :'Integer', + :'pause_publish' => :'String', + :'requires_acknowledgement' => :'String' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'connectId') + self.connect_id = attributes[:'connectId'] + end + + if attributes.has_key?(:'configurationType') + self.configuration_type = attributes[:'configurationType'] + end + + if attributes.has_key?(:'disabledBy') + self.disabled_by = attributes[:'disabledBy'] + end + + if attributes.has_key?(:'allowSalesforcePublish') + self.allow_salesforce_publish = attributes[:'allowSalesforcePublish'] + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'accountId') + self.account_id = attributes[:'accountId'] + end + + if attributes.has_key?(:'accountName') + self.account_name = attributes[:'accountName'] + end + + if attributes.has_key?(:'allowEnvelopePublish') + self.allow_envelope_publish = attributes[:'allowEnvelopePublish'] + end + + if attributes.has_key?(:'siteId') + self.site_id = attributes[:'siteId'] + end + + if attributes.has_key?(:'pausePublish') + self.pause_publish = attributes[:'pausePublish'] + end + + if attributes.has_key?(:'requiresAcknowledgement') + self.requires_acknowledgement = attributes[:'requiresAcknowledgement'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connect_id == o.connect_id && + configuration_type == o.configuration_type && + disabled_by == o.disabled_by && + allow_salesforce_publish == o.allow_salesforce_publish && + name == o.name && + account_id == o.account_id && + account_name == o.account_name && + allow_envelope_publish == o.allow_envelope_publish && + site_id == o.site_id && + pause_publish == o.pause_publish && + requires_acknowledgement == o.requires_acknowledgement + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [connect_id, configuration_type, disabled_by, allow_salesforce_publish, name, account_id, account_name, allow_envelope_publish, site_id, pause_publish, requires_acknowledgement].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_connect_configs_response.rb b/lib/docusign_admin/models/organization_connect_configs_response.rb new file mode 100644 index 0000000..73c4176 --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_configs_response.rb @@ -0,0 +1,203 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectConfigsResponse + attr_accessor :configurations + + attr_accessor :total_set_size + + attr_accessor :error_detail + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'configurations' => :'configurations', + :'total_set_size' => :'totalSetSize', + :'error_detail' => :'errorDetail' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'configurations' => :'Array', + :'total_set_size' => :'Integer', + :'error_detail' => :'ErrorDetail' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'configurations') + if (value = attributes[:'configurations']).is_a?(Array) + self.configurations = value + end + end + + if attributes.has_key?(:'totalSetSize') + self.total_set_size = attributes[:'totalSetSize'] + end + + if attributes.has_key?(:'errorDetail') + self.error_detail = attributes[:'errorDetail'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + configurations == o.configurations && + total_set_size == o.total_set_size && + error_detail == o.error_detail + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [configurations, total_set_size, error_detail].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_connect_configuration_details_response.rb b/lib/docusign_admin/models/organization_connect_configuration_details_response.rb new file mode 100644 index 0000000..2ecf8d6 --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_configuration_details_response.rb @@ -0,0 +1,326 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectConfigurationDetailsResponse + attr_accessor :connect_id + + attr_accessor :configuration_type + + attr_accessor :allow_envelope_publish + + attr_accessor :url_to_publish_to + + attr_accessor :delivery_mode + + attr_accessor :events + + attr_accessor :associated_filter_selection + + attr_accessor :account_ids + + attr_accessor :user_ids + + attr_accessor :group_ids + + attr_accessor :name + + attr_accessor :sign_message_with_x509_certificate + + attr_accessor :include_o_auth + + attr_accessor :include_hmac + + attr_accessor :pause_publish + + attr_accessor :event_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connect_id' => :'connectId', + :'configuration_type' => :'configurationType', + :'allow_envelope_publish' => :'allowEnvelopePublish', + :'url_to_publish_to' => :'urlToPublishTo', + :'delivery_mode' => :'deliveryMode', + :'events' => :'events', + :'associated_filter_selection' => :'associatedFilterSelection', + :'account_ids' => :'accountIds', + :'user_ids' => :'userIds', + :'group_ids' => :'groupIds', + :'name' => :'name', + :'sign_message_with_x509_certificate' => :'signMessageWithX509Certificate', + :'include_o_auth' => :'includeOAuth', + :'include_hmac' => :'includeHMAC', + :'pause_publish' => :'pausePublish', + :'event_data' => :'eventData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'connect_id' => :'String', + :'configuration_type' => :'String', + :'allow_envelope_publish' => :'String', + :'url_to_publish_to' => :'String', + :'delivery_mode' => :'String', + :'events' => :'Array', + :'associated_filter_selection' => :'String', + :'account_ids' => :'Array', + :'user_ids' => :'Array', + :'group_ids' => :'Array', + :'name' => :'String', + :'sign_message_with_x509_certificate' => :'String', + :'include_o_auth' => :'String', + :'include_hmac' => :'String', + :'pause_publish' => :'String', + :'event_data' => :'ConnectEventData' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'connectId') + self.connect_id = attributes[:'connectId'] + end + + if attributes.has_key?(:'configurationType') + self.configuration_type = attributes[:'configurationType'] + end + + if attributes.has_key?(:'allowEnvelopePublish') + self.allow_envelope_publish = attributes[:'allowEnvelopePublish'] + end + + if attributes.has_key?(:'urlToPublishTo') + self.url_to_publish_to = attributes[:'urlToPublishTo'] + end + + if attributes.has_key?(:'deliveryMode') + self.delivery_mode = attributes[:'deliveryMode'] + end + + if attributes.has_key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + + if attributes.has_key?(:'associatedFilterSelection') + self.associated_filter_selection = attributes[:'associatedFilterSelection'] + end + + if attributes.has_key?(:'accountIds') + if (value = attributes[:'accountIds']).is_a?(Array) + self.account_ids = value + end + end + + if attributes.has_key?(:'userIds') + if (value = attributes[:'userIds']).is_a?(Array) + self.user_ids = value + end + end + + if attributes.has_key?(:'groupIds') + if (value = attributes[:'groupIds']).is_a?(Array) + self.group_ids = value + end + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'signMessageWithX509Certificate') + self.sign_message_with_x509_certificate = attributes[:'signMessageWithX509Certificate'] + end + + if attributes.has_key?(:'includeOAuth') + self.include_o_auth = attributes[:'includeOAuth'] + end + + if attributes.has_key?(:'includeHMAC') + self.include_hmac = attributes[:'includeHMAC'] + end + + if attributes.has_key?(:'pausePublish') + self.pause_publish = attributes[:'pausePublish'] + end + + if attributes.has_key?(:'eventData') + self.event_data = attributes[:'eventData'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connect_id == o.connect_id && + configuration_type == o.configuration_type && + allow_envelope_publish == o.allow_envelope_publish && + url_to_publish_to == o.url_to_publish_to && + delivery_mode == o.delivery_mode && + events == o.events && + associated_filter_selection == o.associated_filter_selection && + account_ids == o.account_ids && + user_ids == o.user_ids && + group_ids == o.group_ids && + name == o.name && + sign_message_with_x509_certificate == o.sign_message_with_x509_certificate && + include_o_auth == o.include_o_auth && + include_hmac == o.include_hmac && + pause_publish == o.pause_publish && + event_data == o.event_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [connect_id, configuration_type, allow_envelope_publish, url_to_publish_to, delivery_mode, events, associated_filter_selection, account_ids, user_ids, group_ids, name, sign_message_with_x509_certificate, include_o_auth, include_hmac, pause_publish, event_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_connect_configuration_request.rb b/lib/docusign_admin/models/organization_connect_configuration_request.rb new file mode 100644 index 0000000..c8fbe4e --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_configuration_request.rb @@ -0,0 +1,326 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectConfigurationRequest + attr_accessor :connect_id + + attr_accessor :configuration_type + + attr_accessor :allow_envelope_publish + + attr_accessor :url_to_publish_to + + attr_accessor :delivery_mode + + attr_accessor :events + + attr_accessor :associated_filter_selection + + attr_accessor :group_ids + + attr_accessor :account_ids + + attr_accessor :user_ids + + attr_accessor :name + + attr_accessor :sign_message_with_x509_certificate + + attr_accessor :include_o_auth + + attr_accessor :include_hmac + + attr_accessor :pause_publish + + attr_accessor :event_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connect_id' => :'connectId', + :'configuration_type' => :'configurationType', + :'allow_envelope_publish' => :'allowEnvelopePublish', + :'url_to_publish_to' => :'urlToPublishTo', + :'delivery_mode' => :'deliveryMode', + :'events' => :'events', + :'associated_filter_selection' => :'associatedFilterSelection', + :'group_ids' => :'groupIds', + :'account_ids' => :'accountIds', + :'user_ids' => :'userIds', + :'name' => :'name', + :'sign_message_with_x509_certificate' => :'signMessageWithX509Certificate', + :'include_o_auth' => :'includeOAuth', + :'include_hmac' => :'includeHMAC', + :'pause_publish' => :'pausePublish', + :'event_data' => :'eventData' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'connect_id' => :'String', + :'configuration_type' => :'String', + :'allow_envelope_publish' => :'String', + :'url_to_publish_to' => :'String', + :'delivery_mode' => :'String', + :'events' => :'Array', + :'associated_filter_selection' => :'String', + :'group_ids' => :'Array', + :'account_ids' => :'Array', + :'user_ids' => :'Array', + :'name' => :'String', + :'sign_message_with_x509_certificate' => :'String', + :'include_o_auth' => :'String', + :'include_hmac' => :'String', + :'pause_publish' => :'String', + :'event_data' => :'ConnectEventData' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'connectId') + self.connect_id = attributes[:'connectId'] + end + + if attributes.has_key?(:'configurationType') + self.configuration_type = attributes[:'configurationType'] + end + + if attributes.has_key?(:'allowEnvelopePublish') + self.allow_envelope_publish = attributes[:'allowEnvelopePublish'] + end + + if attributes.has_key?(:'urlToPublishTo') + self.url_to_publish_to = attributes[:'urlToPublishTo'] + end + + if attributes.has_key?(:'deliveryMode') + self.delivery_mode = attributes[:'deliveryMode'] + end + + if attributes.has_key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + + if attributes.has_key?(:'associatedFilterSelection') + self.associated_filter_selection = attributes[:'associatedFilterSelection'] + end + + if attributes.has_key?(:'groupIds') + if (value = attributes[:'groupIds']).is_a?(Array) + self.group_ids = value + end + end + + if attributes.has_key?(:'accountIds') + if (value = attributes[:'accountIds']).is_a?(Array) + self.account_ids = value + end + end + + if attributes.has_key?(:'userIds') + if (value = attributes[:'userIds']).is_a?(Array) + self.user_ids = value + end + end + + if attributes.has_key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.has_key?(:'signMessageWithX509Certificate') + self.sign_message_with_x509_certificate = attributes[:'signMessageWithX509Certificate'] + end + + if attributes.has_key?(:'includeOAuth') + self.include_o_auth = attributes[:'includeOAuth'] + end + + if attributes.has_key?(:'includeHMAC') + self.include_hmac = attributes[:'includeHMAC'] + end + + if attributes.has_key?(:'pausePublish') + self.pause_publish = attributes[:'pausePublish'] + end + + if attributes.has_key?(:'eventData') + self.event_data = attributes[:'eventData'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + connect_id == o.connect_id && + configuration_type == o.configuration_type && + allow_envelope_publish == o.allow_envelope_publish && + url_to_publish_to == o.url_to_publish_to && + delivery_mode == o.delivery_mode && + events == o.events && + associated_filter_selection == o.associated_filter_selection && + group_ids == o.group_ids && + account_ids == o.account_ids && + user_ids == o.user_ids && + name == o.name && + sign_message_with_x509_certificate == o.sign_message_with_x509_certificate && + include_o_auth == o.include_o_auth && + include_hmac == o.include_hmac && + pause_publish == o.pause_publish && + event_data == o.event_data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [connect_id, configuration_type, allow_envelope_publish, url_to_publish_to, delivery_mode, events, associated_filter_selection, group_ids, account_ids, user_ids, name, sign_message_with_x509_certificate, include_o_auth, include_hmac, pause_publish, event_data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_connect_hmac_secrets_response.rb b/lib/docusign_admin/models/organization_connect_hmac_secrets_response.rb new file mode 100644 index 0000000..01b2742 --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_hmac_secrets_response.rb @@ -0,0 +1,185 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectHmacSecretsResponse + attr_accessor :secrets + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'secrets' => :'secrets' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'secrets' => :'Array' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'secrets') + if (value = attributes[:'secrets']).is_a?(Array) + self.secrets = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + secrets == o.secrets + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [secrets].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_connect_o_auth_configuration.rb b/lib/docusign_admin/models/organization_connect_o_auth_configuration.rb new file mode 100644 index 0000000..c1be584 --- /dev/null +++ b/lib/docusign_admin/models/organization_connect_o_auth_configuration.rb @@ -0,0 +1,221 @@ +=begin +#Docusign Admin API + +#An API for an organization administrator to manage organizations, accounts and users + +OpenAPI spec version: v2.1 +Contact: devcenter@docusign.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +=end + +require 'date' + +module DocuSign_Admin + class OrganizationConnectOAuthConfiguration + attr_accessor :authorization_server_url + + attr_accessor :client_id + + attr_accessor :client_secret + + attr_accessor :scope + + attr_accessor :custom_parameter + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'authorization_server_url' => :'authorizationServerUrl', + :'client_id' => :'clientId', + :'client_secret' => :'clientSecret', + :'scope' => :'scope', + :'custom_parameter' => :'customParameter' + } + end + + # Attribute type mapping. + def self.swagger_types + { + :'authorization_server_url' => :'String', + :'client_id' => :'String', + :'client_secret' => :'String', + :'scope' => :'String', + :'custom_parameter' => :'Hash' + } + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + return unless attributes.is_a?(Hash) + + # convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } + + if attributes.has_key?(:'authorizationServerUrl') + self.authorization_server_url = attributes[:'authorizationServerUrl'] + end + + if attributes.has_key?(:'clientId') + self.client_id = attributes[:'clientId'] + end + + if attributes.has_key?(:'clientSecret') + self.client_secret = attributes[:'clientSecret'] + end + + if attributes.has_key?(:'scope') + self.scope = attributes[:'scope'] + end + + if attributes.has_key?(:'customParameter') + if (value = attributes[:'customParameter']).is_a?(Hash) + self.custom_parameter = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authorization_server_url == o.authorization_server_url && + client_id == o.client_id && + client_secret == o.client_secret && + scope == o.scope && + custom_parameter == o.custom_parameter + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Fixnum] Hash code + def hash + [authorization_server_url, client_id, client_secret, scope, custom_parameter].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.swagger_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :BOOLEAN + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + temp_model = DocuSign_Admin.const_get(type).new + temp_model.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + next if value.nil? + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end +end diff --git a/lib/docusign_admin/models/organization_user_response.rb b/lib/docusign_admin/models/organization_user_response.rb index 56a0e57..dd3d6c5 100644 --- a/lib/docusign_admin/models/organization_user_response.rb +++ b/lib/docusign_admin/models/organization_user_response.rb @@ -29,12 +29,26 @@ class OrganizationUserResponse attr_accessor :created_on + attr_accessor :closed_on + attr_accessor :membership_created_on + attr_accessor :membership_closed_on + attr_accessor :ds_groups attr_accessor :membership_id + attr_accessor :is_membership_managed_by_scim + + attr_accessor :is_managed_by_scim + + attr_accessor :license_type + + attr_accessor :subscription_id + + attr_accessor :plan_name + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -46,9 +60,16 @@ def self.attribute_map :'membership_status' => :'membership_status', :'email' => :'email', :'created_on' => :'created_on', + :'closed_on' => :'closed_on', :'membership_created_on' => :'membership_created_on', + :'membership_closed_on' => :'membership_closed_on', :'ds_groups' => :'ds_groups', - :'membership_id' => :'membership_id' + :'membership_id' => :'membership_id', + :'is_membership_managed_by_scim' => :'is_membership_managed_by_scim', + :'is_managed_by_scim' => :'is_managed_by_scim', + :'license_type' => :'license_type', + :'subscription_id' => :'subscription_id', + :'plan_name' => :'plan_name' } end @@ -63,9 +84,16 @@ def self.swagger_types :'membership_status' => :'String', :'email' => :'String', :'created_on' => :'DateTime', + :'closed_on' => :'DateTime', :'membership_created_on' => :'DateTime', + :'membership_closed_on' => :'DateTime', :'ds_groups' => :'Array', - :'membership_id' => :'String' + :'membership_id' => :'String', + :'is_membership_managed_by_scim' => :'BOOLEAN', + :'is_managed_by_scim' => :'BOOLEAN', + :'license_type' => :'String', + :'subscription_id' => :'String', + :'plan_name' => :'String' } end @@ -109,10 +137,18 @@ def initialize(attributes = {}) self.created_on = attributes[:'created_on'] end + if attributes.has_key?(:'closed_on') + self.closed_on = attributes[:'closed_on'] + end + if attributes.has_key?(:'membership_created_on') self.membership_created_on = attributes[:'membership_created_on'] end + if attributes.has_key?(:'membership_closed_on') + self.membership_closed_on = attributes[:'membership_closed_on'] + end + if attributes.has_key?(:'ds_groups') if (value = attributes[:'ds_groups']).is_a?(Array) self.ds_groups = value @@ -122,6 +158,26 @@ def initialize(attributes = {}) if attributes.has_key?(:'membership_id') self.membership_id = attributes[:'membership_id'] end + + if attributes.has_key?(:'is_membership_managed_by_scim') + self.is_membership_managed_by_scim = attributes[:'is_membership_managed_by_scim'] + end + + if attributes.has_key?(:'is_managed_by_scim') + self.is_managed_by_scim = attributes[:'is_managed_by_scim'] + end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end + + if attributes.has_key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_id'] + end + + if attributes.has_key?(:'plan_name') + self.plan_name = attributes[:'plan_name'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -150,9 +206,16 @@ def ==(o) membership_status == o.membership_status && email == o.email && created_on == o.created_on && + closed_on == o.closed_on && membership_created_on == o.membership_created_on && + membership_closed_on == o.membership_closed_on && ds_groups == o.ds_groups && - membership_id == o.membership_id + membership_id == o.membership_id && + is_membership_managed_by_scim == o.is_membership_managed_by_scim && + is_managed_by_scim == o.is_managed_by_scim && + license_type == o.license_type && + subscription_id == o.subscription_id && + plan_name == o.plan_name end # @see the `==` method @@ -164,7 +227,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, user_name, first_name, last_name, user_status, membership_status, email, created_on, membership_created_on, ds_groups, membership_id].hash + [id, user_name, first_name, last_name, user_status, membership_status, email, created_on, closed_on, membership_created_on, membership_closed_on, ds_groups, membership_id, is_membership_managed_by_scim, is_managed_by_scim, license_type, subscription_id, plan_name].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/update_membership_request.rb b/lib/docusign_admin/models/update_membership_request.rb index 775d417..c5933c6 100644 --- a/lib/docusign_admin/models/update_membership_request.rb +++ b/lib/docusign_admin/models/update_membership_request.rb @@ -27,6 +27,8 @@ class UpdateMembershipRequest attr_accessor :access_code + attr_accessor :license_type + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -36,7 +38,8 @@ def self.attribute_map :'company_name' => :'company_name', :'job_title' => :'job_title', :'send_activation' => :'send_activation', - :'access_code' => :'access_code' + :'access_code' => :'access_code', + :'license_type' => :'license_type' } end @@ -49,7 +52,8 @@ def self.swagger_types :'company_name' => :'String', :'job_title' => :'String', :'send_activation' => :'BOOLEAN', - :'access_code' => :'String' + :'access_code' => :'String', + :'license_type' => :'String' } end @@ -90,6 +94,10 @@ def initialize(attributes = {}) if attributes.has_key?(:'access_code') self.access_code = attributes[:'access_code'] end + + if attributes.has_key?(:'license_type') + self.license_type = attributes[:'license_type'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -121,7 +129,8 @@ def ==(o) company_name == o.company_name && job_title == o.job_title && send_activation == o.send_activation && - access_code == o.access_code + access_code == o.access_code && + license_type == o.license_type end # @see the `==` method @@ -133,7 +142,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [account_id, permission_profile, groups, company_name, job_title, send_activation, access_code].hash + [account_id, permission_profile, groups, company_name, job_title, send_activation, access_code, license_type].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/update_users_request.rb b/lib/docusign_admin/models/update_users_request.rb index 4ba64d5..4ade868 100644 --- a/lib/docusign_admin/models/update_users_request.rb +++ b/lib/docusign_admin/models/update_users_request.rb @@ -15,17 +15,22 @@ module DocuSign_Admin class UpdateUsersRequest attr_accessor :users + # When set to **true**, the user's memberships will be automatically activated on reactivation. + attr_accessor :auto_activate_memberships_on_reactivation + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'users' => :'users' + :'users' => :'users', + :'auto_activate_memberships_on_reactivation' => :'auto_activate_memberships_on_reactivation' } end # Attribute type mapping. def self.swagger_types { - :'users' => :'Array' + :'users' => :'Array', + :'auto_activate_memberships_on_reactivation' => :'BOOLEAN' } end @@ -42,6 +47,10 @@ def initialize(attributes = {}) self.users = value end end + + if attributes.has_key?(:'auto_activate_memberships_on_reactivation') + self.auto_activate_memberships_on_reactivation = attributes[:'auto_activate_memberships_on_reactivation'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -62,7 +71,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - users == o.users + users == o.users && + auto_activate_memberships_on_reactivation == o.auto_activate_memberships_on_reactivation end # @see the `==` method @@ -74,7 +84,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [users].hash + [users, auto_activate_memberships_on_reactivation].hash end # Builds the object from hash diff --git a/lib/docusign_admin/models/user_drilldown_response.rb b/lib/docusign_admin/models/user_drilldown_response.rb index 1de6cd4..b115d5d 100644 --- a/lib/docusign_admin/models/user_drilldown_response.rb +++ b/lib/docusign_admin/models/user_drilldown_response.rb @@ -49,6 +49,14 @@ class UserDrilldownResponse attr_accessor :device_verification_enabled + attr_accessor :require_two_step_verification + + attr_accessor :allow_two_step_verification_snooze + + attr_accessor :allow_extend_org_admin_rights_to_self + + attr_accessor :is_managed_by_scim + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -69,7 +77,11 @@ def self.attribute_map :'last_login' => :'last_login', :'memberships' => :'memberships', :'identities' => :'identities', - :'device_verification_enabled' => :'device_verification_enabled' + :'device_verification_enabled' => :'device_verification_enabled', + :'require_two_step_verification' => :'require_two_step_verification', + :'allow_two_step_verification_snooze' => :'allow_two_step_verification_snooze', + :'allow_extend_org_admin_rights_to_self' => :'allow_extend_org_admin_rights_to_self', + :'is_managed_by_scim' => :'is_managed_by_scim' } end @@ -93,7 +105,11 @@ def self.swagger_types :'last_login' => :'DateTime', :'memberships' => :'Array', :'identities' => :'Array', - :'device_verification_enabled' => :'BOOLEAN' + :'device_verification_enabled' => :'BOOLEAN', + :'require_two_step_verification' => :'BOOLEAN', + :'allow_two_step_verification_snooze' => :'BOOLEAN', + :'allow_extend_org_admin_rights_to_self' => :'BOOLEAN', + :'is_managed_by_scim' => :'BOOLEAN' } end @@ -180,6 +196,22 @@ def initialize(attributes = {}) if attributes.has_key?(:'device_verification_enabled') self.device_verification_enabled = attributes[:'device_verification_enabled'] end + + if attributes.has_key?(:'require_two_step_verification') + self.require_two_step_verification = attributes[:'require_two_step_verification'] + end + + if attributes.has_key?(:'allow_two_step_verification_snooze') + self.allow_two_step_verification_snooze = attributes[:'allow_two_step_verification_snooze'] + end + + if attributes.has_key?(:'allow_extend_org_admin_rights_to_self') + self.allow_extend_org_admin_rights_to_self = attributes[:'allow_extend_org_admin_rights_to_self'] + end + + if attributes.has_key?(:'is_managed_by_scim') + self.is_managed_by_scim = attributes[:'is_managed_by_scim'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -217,7 +249,11 @@ def ==(o) last_login == o.last_login && memberships == o.memberships && identities == o.identities && - device_verification_enabled == o.device_verification_enabled + device_verification_enabled == o.device_verification_enabled && + require_two_step_verification == o.require_two_step_verification && + allow_two_step_verification_snooze == o.allow_two_step_verification_snooze && + allow_extend_org_admin_rights_to_self == o.allow_extend_org_admin_rights_to_self && + is_managed_by_scim == o.is_managed_by_scim end # @see the `==` method @@ -229,7 +265,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, site_id, site_name, user_name, first_name, last_name, user_status, default_account_id, default_account_name, language_culture, selected_languages, federated_status, is_organization_admin, created_on, last_login, memberships, identities, device_verification_enabled].hash + [id, site_id, site_name, user_name, first_name, last_name, user_status, default_account_id, default_account_name, language_culture, selected_languages, federated_status, is_organization_admin, created_on, last_login, memberships, identities, device_verification_enabled, require_two_step_verification, allow_two_step_verification_snooze, allow_extend_org_admin_rights_to_self, is_managed_by_scim].hash end # Builds the object from hash diff --git a/lib/docusign_admin/version.rb b/lib/docusign_admin/version.rb index f827c4e..e05e735 100644 --- a/lib/docusign_admin/version.rb +++ b/lib/docusign_admin/version.rb @@ -10,5 +10,5 @@ =end module DocuSign_Admin - VERSION = '2.0.0' + VERSION = '2.1.0' end