=begin #DocuSign Click API #DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations. OpenAPI spec version: v1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module DocuSign_Click class DeleteClickwrapOptions # attr_accessor :versions def self.default @@default ||= DeleteClickwrapOptions.new end end class DeleteClickwrapVersionsOptions # attr_accessor :clickwrap_version_ids def self.default @@default ||= DeleteClickwrapVersionsOptions.new end end class DeleteClickwrapsOptions # attr_accessor :clickwrap_ids def self.default @@default ||= DeleteClickwrapsOptions.new end end class GetAgreementPdfOptions # attr_accessor :include_coc def self.default @@default ||= GetAgreementPdfOptions.new end end class GetClickwrapAgreementsOptions # attr_accessor :client_user_id # attr_accessor :from_date # attr_accessor :page_number # attr_accessor :status # attr_accessor :to_date def self.default @@default ||= GetClickwrapAgreementsOptions.new end end class GetClickwrapVersionAgreementsOptions # attr_accessor :client_user_id # attr_accessor :from_date # attr_accessor :page_number # attr_accessor :status # attr_accessor :to_date def self.default @@default ||= GetClickwrapVersionAgreementsOptions.new end end class GetClickwrapsOptions # attr_accessor :filter # attr_accessor :from_date # attr_accessor :name # attr_accessor :owner_user_id # attr_accessor :page_number # attr_accessor :status # attr_accessor :to_date def self.default @@default ||= GetClickwrapsOptions.new end end class AccountsApi attr_accessor :api_client def initialize(api_client = AccountsApi.default) @api_client = api_client end # Creates a Clickwrap for the specified accountId # # @param account_id # @param clickwrap_request (optional parameter) # @return [ClickwrapVersionSummaryResponse] def create_clickwrap(account_id, clickwrap_request) data, _status_code, _headers = create_clickwrap_with_http_info(account_id, clickwrap_request) return data end # Creates a Clickwrap for the specified accountId # # @param account_id # @param clickwrap_request (optional parameter) # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers def create_clickwrap_with_http_info(account_id, clickwrap_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.create_clickwrap ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_clickwrap" if account_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(clickwrap_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 => 'ClickwrapVersionSummaryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#create_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Creates the clickwrap version # # @param account_id # @param clickwrap_id # @param clickwrap_request (optional parameter) # @return [ClickwrapVersionSummaryResponse] def create_clickwrap_version(account_id, clickwrap_id, clickwrap_request) data, _status_code, _headers = create_clickwrap_version_with_http_info(account_id, clickwrap_id, clickwrap_request) return data end # Creates the clickwrap version # # @param account_id # @param clickwrap_id # @param clickwrap_request (optional parameter) # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers def create_clickwrap_version_with_http_info(account_id, clickwrap_id, clickwrap_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.create_clickwrap_version ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_clickwrap_version" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.create_clickwrap_version" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(clickwrap_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 => 'ClickwrapVersionSummaryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#create_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Checks if a user has agreed to a clickwrap and returns a response with the agreement url. Returns HttpStatusCode.OK if user has no pending agreement. # # @param account_id # @param clickwrap_id # @param user_agreement_request (optional parameter) # @return [UserAgreementResponse] def create_has_agreed(account_id, clickwrap_id, user_agreement_request) data, _status_code, _headers = create_has_agreed_with_http_info(account_id, clickwrap_id, user_agreement_request) return data end # Checks if a user has agreed to a clickwrap and returns a response with the agreement url. Returns HttpStatusCode.OK if user has no pending agreement. # # @param account_id # @param clickwrap_id # @param user_agreement_request (optional parameter) # @return [Array<(UserAgreementResponse, Fixnum, Hash)>] UserAgreementResponse data, response status code and response headers def create_has_agreed_with_http_info(account_id, clickwrap_id, user_agreement_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.create_has_agreed ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.create_has_agreed" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.create_has_agreed" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(user_agreement_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 => 'UserAgreementResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#create_has_agreed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes the clickwrap and all its version specified by clickwrapId. Active clickwrap will not get deleted # # @param account_id # @param clickwrap_id # @param DocuSign_Click::DeleteClickwrapOptions Options for modifying the behavior of the function. # @return [ClickwrapVersionsDeleteResponse] def delete_clickwrap(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapOptions.default) data, _status_code, _headers = delete_clickwrap_with_http_info(account_id, clickwrap_id, options) return data end # Deletes the clickwrap and all its version specified by clickwrapId. Active clickwrap will not get deleted # # @param account_id # @param clickwrap_id # @param DocuSign_Click::DeleteClickwrapOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapVersionsDeleteResponse, Fixnum, Hash)>] ClickwrapVersionsDeleteResponse data, response status code and response headers def delete_clickwrap_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s) # query parameters query_params = {} query_params[:'versions'] = options.versions if !options.versions.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapVersionsDeleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a Clickwrap version specified by versionId # # @param account_id # @param clickwrap_id # @param version_id # @return [ClickwrapVersionDeleteResponse] def delete_clickwrap_version(account_id, clickwrap_id, version_id) data, _status_code, _headers = delete_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id) return data end # Delete a Clickwrap version specified by versionId # # @param account_id # @param clickwrap_id # @param version_id # @return [Array<(ClickwrapVersionDeleteResponse, Fixnum, Hash)>] ClickwrapVersionDeleteResponse data, response status code and response headers def delete_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap_version ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap_version" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap_version" if clickwrap_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.delete_clickwrap_version" if version_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_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']) # 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 => 'ClickwrapVersionDeleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes the versions specified by query parameter clickwrapVersionIds for a clickwrap, or all versions if no query parameter is specified. It will not delete if a version is active. # # @param account_id # @param clickwrap_id # @param DocuSign_Click::DeleteClickwrapVersionsOptions Options for modifying the behavior of the function. # @return [ClickwrapVersionsDeleteResponse] def delete_clickwrap_versions(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapVersionsOptions.default) data, _status_code, _headers = delete_clickwrap_versions_with_http_info(account_id, clickwrap_id, options) return data end # Deletes the versions specified by query parameter clickwrapVersionIds for a clickwrap, or all versions if no query parameter is specified. It will not delete if a version is active. # # @param account_id # @param clickwrap_id # @param DocuSign_Click::DeleteClickwrapVersionsOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapVersionsDeleteResponse, Fixnum, Hash)>] ClickwrapVersionsDeleteResponse data, response status code and response headers def delete_clickwrap_versions_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::DeleteClickwrapVersionsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwrap_versions ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwrap_versions" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.delete_clickwrap_versions" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s) # query parameters query_params = {} query_params[:'clickwrapVersionIds'] = options.clickwrap_version_ids if !options.clickwrap_version_ids.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapVersionsDeleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_clickwrap_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deletes all the clickwraps for an account or the ones passed in query parameter clickwrapIds. It will not delete active clickwraps. # # @param account_id # @param DocuSign_Click::DeleteClickwrapsOptions Options for modifying the behavior of the function. # @return [ClickwrapsDeleteResponse] def delete_clickwraps(account_id, options = DocuSign_Click::DeleteClickwrapsOptions.default) data, _status_code, _headers = delete_clickwraps_with_http_info(account_id, options) return data end # Deletes all the clickwraps for an account or the ones passed in query parameter clickwrapIds. It will not delete active clickwraps. # # @param account_id # @param DocuSign_Click::DeleteClickwrapsOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapsDeleteResponse, Fixnum, Hash)>] ClickwrapsDeleteResponse data, response status code and response headers def delete_clickwraps_with_http_info(account_id, options = DocuSign_Click::DeleteClickwrapsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.delete_clickwraps ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.delete_clickwraps" if account_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'clickwrapIds'] = options.clickwrap_ids if !options.clickwrap_ids.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapsDeleteResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#delete_clickwraps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the agreement by a provided agreement ID # # @param account_id # @param agreement_id # @param clickwrap_id # @return [UserAgreementResponse] def get_agreement(account_id, agreement_id, clickwrap_id) data, _status_code, _headers = get_agreement_with_http_info(account_id, agreement_id, clickwrap_id) return data end # Gets the agreement by a provided agreement ID # # @param account_id # @param agreement_id # @param clickwrap_id # @return [Array<(UserAgreementResponse, Fixnum, Hash)>] UserAgreementResponse data, response status code and response headers def get_agreement_with_http_info(account_id, agreement_id, clickwrap_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_agreement ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_agreement" if account_id.nil? # verify the required parameter 'agreement_id' is set fail ArgumentError, "Missing the required parameter 'agreement_id' when calling AccountsApi.get_agreement" if agreement_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_agreement" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'agreementId' + '}', agreement_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # 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 => 'UserAgreementResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_agreement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Downloads the agreement PDF and optionally certificate of completion. # # @param account_id # @param agreement_id # @param clickwrap_id # @param DocuSign_Click::GetAgreementPdfOptions Options for modifying the behavior of the function. # @return [File] def get_agreement_pdf(account_id, agreement_id, clickwrap_id, options = DocuSign_Click::GetAgreementPdfOptions.default) data, _status_code, _headers = get_agreement_pdf_with_http_info(account_id, agreement_id, clickwrap_id, options) return data end # Downloads the agreement PDF and optionally certificate of completion. # # @param account_id # @param agreement_id # @param clickwrap_id # @param DocuSign_Click::GetAgreementPdfOptions Options for modifying the behavior of the function. # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def get_agreement_pdf_with_http_info(account_id, agreement_id, clickwrap_id, options = DocuSign_Click::GetAgreementPdfOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_agreement_pdf ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_agreement_pdf" if account_id.nil? # verify the required parameter 'agreement_id' is set fail ArgumentError, "Missing the required parameter 'agreement_id' when calling AccountsApi.get_agreement_pdf" if agreement_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_agreement_pdf" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/agreements/{agreementId}/download".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'agreementId' + '}', agreement_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s) # query parameters query_params = {} query_params[:'include_coc'] = options.include_coc if !options.include_coc.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/pdf']) # 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_agreement_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the clickwrap for an account specified by clickwrapId # # @param account_id # @param clickwrap_id # @return [ClickwrapVersionResponse] def get_clickwrap(account_id, clickwrap_id) data, _status_code, _headers = get_clickwrap_with_http_info(account_id, clickwrap_id) return data end # Gets the clickwrap for an account specified by clickwrapId # # @param account_id # @param clickwrap_id # @return [Array<(ClickwrapVersionResponse, Fixnum, Hash)>] ClickwrapVersionResponse data, response status code and response headers def get_clickwrap_with_http_info(account_id, clickwrap_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # 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 => 'ClickwrapVersionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the agreement responses for a clickwrap # # @param account_id # @param clickwrap_id # @param DocuSign_Click::GetClickwrapAgreementsOptions Options for modifying the behavior of the function. # @return [ClickwrapAgreementsResponse] def get_clickwrap_agreements(account_id, clickwrap_id, options = DocuSign_Click::GetClickwrapAgreementsOptions.default) data, _status_code, _headers = get_clickwrap_agreements_with_http_info(account_id, clickwrap_id, options) return data end # Gets the agreement responses for a clickwrap # # @param account_id # @param clickwrap_id # @param DocuSign_Click::GetClickwrapAgreementsOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapAgreementsResponse, Fixnum, Hash)>] ClickwrapAgreementsResponse data, response status code and response headers def get_clickwrap_agreements_with_http_info(account_id, clickwrap_id, options = DocuSign_Click::GetClickwrapAgreementsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_agreements ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_agreements" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_agreements" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s) # query parameters query_params = {} query_params[:'client_user_id'] = options.client_user_id if !options.client_user_id.nil? query_params[:'from_date'] = options.from_date if !options.from_date.nil? query_params[:'page_number'] = options.page_number if !options.page_number.nil? query_params[:'status'] = options.status if !options.status.nil? query_params[:'to_date'] = options.to_date if !options.to_date.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapAgreementsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_agreements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the Clickwrap version by clickwrapId and versionId for an account # # @param account_id # @param clickwrap_id # @param version_id # @return [ClickwrapVersionResponse] def get_clickwrap_version(account_id, clickwrap_id, version_id) data, _status_code, _headers = get_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id) return data end # Gets the Clickwrap version by clickwrapId and versionId for an account # # @param account_id # @param clickwrap_id # @param version_id # @return [Array<(ClickwrapVersionResponse, Fixnum, Hash)>] ClickwrapVersionResponse data, response status code and response headers def get_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version" if clickwrap_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.get_clickwrap_version" if version_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_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']) # 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 => 'ClickwrapVersionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the agreement responses for a clickwrap version # # @param account_id # @param clickwrap_id # @param version_id # @param DocuSign_Click::GetClickwrapVersionAgreementsOptions Options for modifying the behavior of the function. # @return [ClickwrapAgreementsResponse] def get_clickwrap_version_agreements(account_id, clickwrap_id, version_id, options = DocuSign_Click::GetClickwrapVersionAgreementsOptions.default) data, _status_code, _headers = get_clickwrap_version_agreements_with_http_info(account_id, clickwrap_id, version_id, options) return data end # Gets the agreement responses for a clickwrap version # # @param account_id # @param clickwrap_id # @param version_id # @param DocuSign_Click::GetClickwrapVersionAgreementsOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapAgreementsResponse, Fixnum, Hash)>] ClickwrapAgreementsResponse data, response status code and response headers def get_clickwrap_version_agreements_with_http_info(account_id, clickwrap_id, version_id, options = DocuSign_Click::GetClickwrapVersionAgreementsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_version_agreements ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_version_agreements" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_version_agreements" if clickwrap_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.get_clickwrap_version_agreements" if version_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} query_params[:'client_user_id'] = options.client_user_id if !options.client_user_id.nil? query_params[:'from_date'] = options.from_date if !options.from_date.nil? query_params[:'page_number'] = options.page_number if !options.page_number.nil? query_params[:'status'] = options.status if !options.status.nil? query_params[:'to_date'] = options.to_date if !options.to_date.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapAgreementsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_version_agreements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets all the versions of a clickwrap for an account # # @param account_id # @param clickwrap_id # @return [ClickwrapVersionsPagedResponse] def get_clickwrap_versions(account_id, clickwrap_id) data, _status_code, _headers = get_clickwrap_versions_with_http_info(account_id, clickwrap_id) return data end # Gets all the versions of a clickwrap for an account # # @param account_id # @param clickwrap_id # @return [Array<(ClickwrapVersionsPagedResponse, Fixnum, Hash)>] ClickwrapVersionsPagedResponse data, response status code and response headers def get_clickwrap_versions_with_http_info(account_id, clickwrap_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwrap_versions ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwrap_versions" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.get_clickwrap_versions" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # 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 => 'ClickwrapVersionsPagedResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwrap_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Gets the Clickwraps for an account # # @param account_id # @param DocuSign_Click::GetClickwrapsOptions Options for modifying the behavior of the function. # @return [ClickwrapVersionsResponse] def get_clickwraps(account_id, options = DocuSign_Click::GetClickwrapsOptions.default) data, _status_code, _headers = get_clickwraps_with_http_info(account_id, options) return data end # Gets the Clickwraps for an account # # @param account_id # @param DocuSign_Click::GetClickwrapsOptions Options for modifying the behavior of the function. # @return [Array<(ClickwrapVersionsResponse, Fixnum, Hash)>] ClickwrapVersionsResponse data, response status code and response headers def get_clickwraps_with_http_info(account_id, options = DocuSign_Click::GetClickwrapsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_clickwraps ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_clickwraps" if account_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'filter'] = options.filter if !options.filter.nil? query_params[:'from_date'] = options.from_date if !options.from_date.nil? query_params[:'name'] = options.name if !options.name.nil? query_params[:'ownerUserId'] = options.owner_user_id if !options.owner_user_id.nil? query_params[:'page_number'] = options.page_number if !options.page_number.nil? query_params[:'status'] = options.status if !options.status.nil? query_params[:'to_date'] = options.to_date if !options.to_date.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ClickwrapVersionsResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_clickwraps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Provides base service and version access information. # # @return [ServiceInformation] def get_service_information() data, _status_code, _headers = get_service_information_with_http_info() return data end # Provides base service and version access information. # # @return [Array<(ServiceInformation, Fixnum, Hash)>] ServiceInformation data, response status code and response headers def get_service_information_with_http_info() if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.get_service_information ..." end # resource path local_var_path = "/service_information".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['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 => 'ServiceInformation') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#get_service_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the clickwrap specified by clickwrapId # # @param account_id # @param clickwrap_id # @param clickwrap_transfer_request (optional parameter) # @return [ClickwrapVersionSummaryResponse] def update_clickwrap(account_id, clickwrap_id, clickwrap_transfer_request) data, _status_code, _headers = update_clickwrap_with_http_info(account_id, clickwrap_id, clickwrap_transfer_request) return data end # Updates the clickwrap specified by clickwrapId # # @param account_id # @param clickwrap_id # @param clickwrap_transfer_request (optional parameter) # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers def update_clickwrap_with_http_info(account_id, clickwrap_id, clickwrap_transfer_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.update_clickwrap ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_clickwrap" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.update_clickwrap" if clickwrap_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(clickwrap_transfer_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 => 'ClickwrapVersionSummaryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#update_clickwrap\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Updates the clickwrap version specified by versionId # # @param account_id # @param clickwrap_id # @param version_id # @param clickwrap_request (optional parameter) # @return [ClickwrapVersionSummaryResponse] def update_clickwrap_version(account_id, clickwrap_id, version_id, clickwrap_request) data, _status_code, _headers = update_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id, clickwrap_request) return data end # Updates the clickwrap version specified by versionId # # @param account_id # @param clickwrap_id # @param version_id # @param clickwrap_request (optional parameter) # @return [Array<(ClickwrapVersionSummaryResponse, Fixnum, Hash)>] ClickwrapVersionSummaryResponse data, response status code and response headers def update_clickwrap_version_with_http_info(account_id, clickwrap_id, version_id, clickwrap_request) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AccountsApi.update_clickwrap_version ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.update_clickwrap_version" if account_id.nil? # verify the required parameter 'clickwrap_id' is set fail ArgumentError, "Missing the required parameter 'clickwrap_id' when calling AccountsApi.update_clickwrap_version" if clickwrap_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling AccountsApi.update_clickwrap_version" if version_id.nil? # resource path local_var_path = "/v1/accounts/{accountId}/clickwraps/{clickwrapId}/versions/{versionId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'clickwrapId' + '}', clickwrap_id.to_s).sub('{' + 'versionId' + '}', version_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']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(clickwrap_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 => 'ClickwrapVersionSummaryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountsApi#update_clickwrap_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end