Class: SignRequestClient::DocumentsApi
- Inherits:
-
Object
- Object
- SignRequestClient::DocumentsApi
- Defined in:
- lib/signrequest_client/api/documents_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#documents_create(data, opts = {}) ⇒ Document
Create a Document.
-
#documents_create_with_http_info(data, opts = {}) ⇒ Array<(Document, Fixnum, Hash)>
Create a Document.
-
#documents_delete(uuid, opts = {}) ⇒ nil
Delete a Document.
-
#documents_delete_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Document.
-
#documents_list(opts = {}) ⇒ InlineResponse2003
Retrieve a list of Documents.
-
#documents_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>
Retrieve a list of Documents.
-
#documents_read(uuid, opts = {}) ⇒ Document
Retrieve a Document.
-
#documents_read_with_http_info(uuid, opts = {}) ⇒ Array<(Document, Fixnum, Hash)>
Retrieve a Document.
-
#initialize(api_client = ApiClient.default) ⇒ DocumentsApi
constructor
A new instance of DocumentsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ DocumentsApi
Returns a new instance of DocumentsApi.
19 20 21 |
# File 'lib/signrequest_client/api/documents_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/signrequest_client/api/documents_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#documents_create(data, opts = {}) ⇒ Document
Create a Document
27 28 29 30 |
# File 'lib/signrequest_client/api/documents_api.rb', line 27 def documents_create(data, opts = {}) data, _status_code, _headers = documents_create_with_http_info(data, opts) data end |
#documents_create_with_http_info(data, opts = {}) ⇒ Array<(Document, Fixnum, Hash)>
Create a Document
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/signrequest_client/api/documents_api.rb', line 37 def documents_create_with_http_info(data, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_create ...' end # verify the required parameter 'data' is set if @api_client.config.client_side_validation && data.nil? fail ArgumentError, "Missing the required parameter 'data' when calling DocumentsApi.documents_create" end # resource path local_var_path = '/documents/' # 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(data) auth_names = ['Token'] 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 => 'Document') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsApi#documents_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#documents_delete(uuid, opts = {}) ⇒ nil
Delete a Document
81 82 83 84 |
# File 'lib/signrequest_client/api/documents_api.rb', line 81 def documents_delete(uuid, opts = {}) documents_delete_with_http_info(uuid, opts) nil end |
#documents_delete_with_http_info(uuid, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a Document
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/signrequest_client/api/documents_api.rb', line 91 def documents_delete_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_delete ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling DocumentsApi.documents_delete" end # resource path local_var_path = '/documents/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 = ['Token'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsApi#documents_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#documents_list(opts = {}) ⇒ InlineResponse2003
Retrieve a list of Documents
144 145 146 147 |
# File 'lib/signrequest_client/api/documents_api.rb', line 144 def documents_list(opts = {}) data, _status_code, _headers = documents_list_with_http_info(opts) data end |
#documents_list_with_http_info(opts = {}) ⇒ Array<(InlineResponse2003, Fixnum, Hash)>
Retrieve a list of Documents
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/signrequest_client/api/documents_api.rb', line 164 def documents_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_list ...' end # resource path local_var_path = '/documents/' # query parameters query_params = {} query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil? query_params[:'signrequest__who'] = opts[:'signrequest__who'] if !opts[:'signrequest__who'].nil? query_params[:'signrequest__from_email'] = opts[:'signrequest__from_email'] if !opts[:'signrequest__from_email'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'user__email'] = opts[:'user__email'] if !opts[:'user__email'].nil? query_params[:'user__first_name'] = opts[:'user__first_name'] if !opts[:'user__first_name'].nil? query_params[:'user__last_name'] = opts[:'user__last_name'] if !opts[:'user__last_name'].nil? query_params[:'created'] = opts[:'created'] if !opts[:'created'].nil? query_params[:'modified'] = opts[:'modified'] if !opts[:'modified'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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 = ['Token'] 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 => 'InlineResponse2003') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsApi#documents_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#documents_read(uuid, opts = {}) ⇒ Document
Retrieve a Document
215 216 217 218 |
# File 'lib/signrequest_client/api/documents_api.rb', line 215 def documents_read(uuid, opts = {}) data, _status_code, _headers = documents_read_with_http_info(uuid, opts) data end |
#documents_read_with_http_info(uuid, opts = {}) ⇒ Array<(Document, Fixnum, Hash)>
Retrieve a Document
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/signrequest_client/api/documents_api.rb', line 225 def documents_read_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentsApi.documents_read ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling DocumentsApi.documents_read" end # resource path local_var_path = '/documents/{uuid}/'.sub('{' + 'uuid' + '}', uuid.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 = ['Token'] 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 => 'Document') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentsApi#documents_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |