Class: SyncteraRubySdk::NotesApi
- Inherits:
-
Object
- Object
- SyncteraRubySdk::NotesApi
- Defined in:
- lib/synctera_ruby_sdk/api/notes_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_note(note_create, opts = {}) ⇒ NoteResponse
Create a note Create a note.
-
#create_note_with_http_info(note_create, opts = {}) ⇒ Array<(NoteResponse, Integer, Hash)>
Create a note Create a note.
-
#initialize(api_client = ApiClient.default) ⇒ NotesApi
constructor
A new instance of NotesApi.
-
#list_notes(opts = {}) ⇒ NoteList
List notes Get paginated list of notes.
-
#list_notes_with_http_info(opts = {}) ⇒ Array<(NoteList, Integer, Hash)>
List notes Get paginated list of notes.
-
#patch_note(note_id, patch_note, opts = {}) ⇒ NoteResponse
Patch Note Update a Note by ID.
-
#patch_note_with_http_info(note_id, patch_note, opts = {}) ⇒ Array<(NoteResponse, Integer, Hash)>
Patch Note Update a Note by ID.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_note(note_create, opts = {}) ⇒ NoteResponse
Create a note Create a note
27 28 29 30 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 27 def create_note(note_create, opts = {}) data, _status_code, _headers = create_note_with_http_info(note_create, opts) data end |
#create_note_with_http_info(note_create, opts = {}) ⇒ Array<(NoteResponse, Integer, Hash)>
Create a note Create a note
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 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 37 def create_note_with_http_info(note_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.create_note ...' end # verify the required parameter 'note_create' is set if @api_client.config.client_side_validation && note_create.nil? fail ArgumentError, "Missing the required parameter 'note_create' when calling NotesApi.create_note" end # resource path local_var_path = '/notes' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(note_create) # return_type return_type = opts[:debug_return_type] || 'NoteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"NotesApi.create_note", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#create_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_notes(opts = {}) ⇒ NoteList
List notes Get paginated list of notes
101 102 103 104 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 101 def list_notes(opts = {}) data, _status_code, _headers = list_notes_with_http_info(opts) data end |
#list_notes_with_http_info(opts = {}) ⇒ Array<(NoteList, Integer, Hash)>
List notes Get paginated list of notes
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 117 def list_notes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.list_notes ...' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NotesApi.list_notes, must be greater than or equal to 1.' end # resource path local_var_path = '/notes' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :csv) if !opts[:'id'].nil? query_params[:'related_resource_id'] = @api_client.build_collection_param(opts[:'related_resource_id'], :csv) if !opts[:'related_resource_id'].nil? query_params[:'related_resource_type'] = opts[:'related_resource_type'] if !opts[:'related_resource_type'].nil? query_params[:'author_user_id'] = opts[:'author_user_id'] if !opts[:'author_user_id'].nil? query_params[:'tenant'] = opts[:'tenant'] if !opts[:'tenant'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NoteList' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"NotesApi.list_notes", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#list_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_note(note_id, patch_note, opts = {}) ⇒ NoteResponse
Patch Note Update a Note by ID.
180 181 182 183 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 180 def patch_note(note_id, patch_note, opts = {}) data, _status_code, _headers = patch_note_with_http_info(note_id, patch_note, opts) data end |
#patch_note_with_http_info(note_id, patch_note, opts = {}) ⇒ Array<(NoteResponse, Integer, Hash)>
Patch Note Update a Note by ID.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 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 |
# File 'lib/synctera_ruby_sdk/api/notes_api.rb', line 193 def patch_note_with_http_info(note_id, patch_note, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NotesApi.patch_note ...' end # verify the required parameter 'note_id' is set if @api_client.config.client_side_validation && note_id.nil? fail ArgumentError, "Missing the required parameter 'note_id' when calling NotesApi.patch_note" end # verify the required parameter 'patch_note' is set if @api_client.config.client_side_validation && patch_note.nil? fail ArgumentError, "Missing the required parameter 'patch_note' when calling NotesApi.patch_note" end # resource path local_var_path = '/notes/{note_id}'.sub('{' + 'note_id' + '}', CGI.escape(note_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'related_resource_type'] = opts[:'related_resource_type'] if !opts[:'related_resource_type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_note) # return_type return_type = opts[:debug_return_type] || 'NoteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"NotesApi.patch_note", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NotesApi#patch_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |