=begin #DocuSign Rooms API - v2 #An API for an integrator to access the features of DocuSign Rooms OpenAPI spec version: v2 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git =end require "uri" module DocuSign_Rooms class GetFormGroupsOptions # Number of Form Groups to include in the response, (Default 100). attr_accessor :count # Position in the overall list of Form Groups to begin results. attr_accessor :start_position def self.default @@default ||= GetFormGroupsOptions.new end end class FormGroupsApi attr_accessor :api_client def initialize(api_client = FormGroupsApi.default) @api_client = api_client end # Get account Form Groups. # # @param account_id # @param DocuSign_Rooms::GetFormGroupsOptions Options for modifying the behavior of the function. # @return [FormGroupSummaryList] def get_form_groups(account_id, options = DocuSign_Rooms::GetFormGroupsOptions.default) data, _status_code, _headers = get_form_groups_with_http_info(account_id, options) return data end # Get account Form Groups. # # @param account_id # @param DocuSign_Rooms::GetFormGroupsOptions Options for modifying the behavior of the function. # @return [Array<(FormGroupSummaryList, Fixnum, Hash)>] FormGroupSummaryList data, response status code and response headers def get_form_groups_with_http_info(account_id, options = DocuSign_Rooms::GetFormGroupsOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FormGroupsApi.get_form_groups ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling FormGroupsApi.get_form_groups" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/form_groups".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'count'] = options.count if !options.count.nil? query_params[:'startPosition'] = options.start_position if !options.start_position.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 => 'FormGroupSummaryList') if @api_client.config.debugging @api_client.config.logger.debug "API called: FormGroupsApi#get_form_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end