=begin #Open API, powered by Buildium #GetAllGLAccounts) response message now includes the property `IsBankAccount`. This is a boolean property that indicates whether the general ledger account is also a bank account. * A `Country` property has been added to all Address messages. This property contains an enumeration indicating the country of the address. The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.0.1 =end require 'cgi' module Buildium class AssociationUnitsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Create a unit # Creates an association unit.

Required permission(s):

Associations > Associations and units - `View` `Edit` # @param association_units_post_message [AssociationUnitsPostMessage] # @param [Hash] opts the optional parameters # @return [AssociationUnitMessage] def create_association_unit(association_units_post_message, opts = {}) data, _status_code, _headers = create_association_unit_with_http_info(association_units_post_message, opts) data end # Create a unit # Creates an association unit. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` `Edit` # @param association_units_post_message [AssociationUnitsPostMessage] # @param [Hash] opts the optional parameters # @return [Array<(AssociationUnitMessage, Integer, Hash)>] AssociationUnitMessage data, response status code and response headers def create_association_unit_with_http_info(association_units_post_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.create_association_unit ...' end # verify the required parameter 'association_units_post_message' is set if @api_client.config.client_side_validation && association_units_post_message.nil? fail ArgumentError, "Missing the required parameter 'association_units_post_message' when calling AssociationUnitsApi.create_association_unit" end # resource path local_var_path = '/v1/associations/units' # 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']) # 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(association_units_post_message) # return_type return_type = opts[:debug_return_type] || 'AssociationUnitMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.create_association_unit", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#create_association_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a note # Creates a new association unit note.

Required permission(s):

Associations > Associations and units - `View` `Edit` # @param unit_id [Integer] # @param note_post_message [NotePostMessage] # @param [Hash] opts the optional parameters # @return [NoteMessage] def create_association_unit_note(unit_id, note_post_message, opts = {}) data, _status_code, _headers = create_association_unit_note_with_http_info(unit_id, note_post_message, opts) data end # Create a note # Creates a new association unit note. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` `Edit` # @param unit_id [Integer] # @param note_post_message [NotePostMessage] # @param [Hash] opts the optional parameters # @return [Array<(NoteMessage, Integer, Hash)>] NoteMessage data, response status code and response headers def create_association_unit_note_with_http_info(unit_id, note_post_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.create_association_unit_note ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.create_association_unit_note" end # verify the required parameter 'note_post_message' is set if @api_client.config.client_side_validation && note_post_message.nil? fail ArgumentError, "Missing the required parameter 'note_post_message' when calling AssociationUnitsApi.create_association_unit_note" end # resource path local_var_path = '/v1/associations/units/{unitId}/notes'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)) # 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']) # 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_post_message) # return_type return_type = opts[:debug_return_type] || 'NoteMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.create_association_unit_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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#create_association_unit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve all units # Retrieves a list of association units.

Required permission(s):

Associations > Associations and units - `View` # @param [Hash] opts the optional parameters # @option opts [Array] :associationids Filters results to only include Associations with matching IDs # @option opts [Time] :lastupdatedfrom Filters results to any association units that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ. # @option opts [Time] :lastupdatedto Filters results to any association units that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ. # @option opts [String] :orderby `orderby` indicates the field(s) and direction to sort the results in the response. See <a href=\"#section/API-Overview/Bulk-Request-Options\">Bulk Request Options</a> for more information. # @option opts [Integer] :offset `offset` indicates the position of the first record to return. The `offset` is zero-based and the default is 0. # @option opts [Integer] :limit `limit` indicates the maximum number of results to be returned in the response. `limit` can range between 1 and 1000 and the default is 50. # @return [Array] def get_all_association_units(opts = {}) data, _status_code, _headers = get_all_association_units_with_http_info(opts) data end # Retrieve all units # Retrieves a list of association units. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` # @param [Hash] opts the optional parameters # @option opts [Array] :associationids Filters results to only include Associations with matching IDs # @option opts [Time] :lastupdatedfrom Filters results to any association units that were updated on or after the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ. # @option opts [Time] :lastupdatedto Filters results to any association units that were updated on or before the specified date. The value must be in UTC and formatted as YYYY-MM-DDTHH:MM:SSZ. # @option opts [String] :orderby `orderby` indicates the field(s) and direction to sort the results in the response. See <a href=\"#section/API-Overview/Bulk-Request-Options\">Bulk Request Options</a> for more information. # @option opts [Integer] :offset `offset` indicates the position of the first record to return. The `offset` is zero-based and the default is 0. # @option opts [Integer] :limit `limit` indicates the maximum number of results to be returned in the response. `limit` can range between 1 and 1000 and the default is 50. # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def get_all_association_units_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.get_all_association_units ...' end # resource path local_var_path = '/v1/associations/units' # query parameters query_params = opts[:query_params] || {} query_params[:'associationids'] = @api_client.build_collection_param(opts[:'associationids'], :multi) if !opts[:'associationids'].nil? query_params[:'lastupdatedfrom'] = opts[:'lastupdatedfrom'] if !opts[:'lastupdatedfrom'].nil? query_params[:'lastupdatedto'] = opts[:'lastupdatedto'] if !opts[:'lastupdatedto'].nil? query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.get_all_association_units", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#get_all_association_units\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a unit # Retrieve a specific association unit.

Required permission(s):

Associations > Associations and units - `View` # @param unit_id [Integer] The association unit identifier. # @param [Hash] opts the optional parameters # @return [AssociationUnitMessage] def get_association_unit_by_id(unit_id, opts = {}) data, _status_code, _headers = get_association_unit_by_id_with_http_info(unit_id, opts) data end # Retrieve a unit # Retrieve a specific association unit. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` # @param unit_id [Integer] The association unit identifier. # @param [Hash] opts the optional parameters # @return [Array<(AssociationUnitMessage, Integer, Hash)>] AssociationUnitMessage data, response status code and response headers def get_association_unit_by_id_with_http_info(unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.get_association_unit_by_id ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.get_association_unit_by_id" end # resource path local_var_path = '/v1/associations/units/{unitId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)) # 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AssociationUnitMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.get_association_unit_by_id", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#get_association_unit_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve a note # Retrieves an association unit note.

Required permission(s):

Associations > Associations and units - `View` # @param unit_id [Integer] # @param note_id [Integer] # @param [Hash] opts the optional parameters # @return [NoteMessage] def get_association_unit_note_by_note_id(unit_id, note_id, opts = {}) data, _status_code, _headers = get_association_unit_note_by_note_id_with_http_info(unit_id, note_id, opts) data end # Retrieve a note # Retrieves an association unit note. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` # @param unit_id [Integer] # @param note_id [Integer] # @param [Hash] opts the optional parameters # @return [Array<(NoteMessage, Integer, Hash)>] NoteMessage data, response status code and response headers def get_association_unit_note_by_note_id_with_http_info(unit_id, note_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.get_association_unit_note_by_note_id ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.get_association_unit_note_by_note_id" 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 AssociationUnitsApi.get_association_unit_note_by_note_id" end # resource path local_var_path = '/v1/associations/units/{unitId}/notes/{noteId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_id.to_s)) # 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'NoteMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.get_association_unit_note_by_note_id", :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#get_association_unit_note_by_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve all notes # Retrieves all association unit notes.

Required permission(s):

Associations > Associations and units - `View` # @param unit_id [Integer] # @param [Hash] opts the optional parameters # @option opts [Time] :updateddatetimefrom Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS. # @option opts [Time] :updateddatetimeto Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS. # @option opts [Integer] :lastupdatedbyuserid Filters results to only notes that were last updated by the specified user identifier. # @option opts [String] :orderby `orderby` indicates the field(s) and direction to sort the results in the response. See <a href=\"#section/API-Overview/Bulk-Request-Options\">Bulk Request Options</a> for more information. # @option opts [Integer] :offset `offset` indicates the position of the first record to return. The `offset` is zero-based and the default is 0. # @option opts [Integer] :limit `limit` indicates the maximum number of results to be returned in the response. `limit` can range between 1 and 1000 and the default is 50. # @return [Array] def get_association_unit_notes(unit_id, opts = {}) data, _status_code, _headers = get_association_unit_notes_with_http_info(unit_id, opts) data end # Retrieve all notes # Retrieves all association unit notes. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` # @param unit_id [Integer] # @param [Hash] opts the optional parameters # @option opts [Time] :updateddatetimefrom Filters results to any note whose updated date and time are greater than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS. # @option opts [Time] :updateddatetimeto Filters results to any note whose updated date and time are less than or equal to the specified value. The value must be formatted as YYYY-MM-DD HH:MM:SS. # @option opts [Integer] :lastupdatedbyuserid Filters results to only notes that were last updated by the specified user identifier. # @option opts [String] :orderby `orderby` indicates the field(s) and direction to sort the results in the response. See <a href=\"#section/API-Overview/Bulk-Request-Options\">Bulk Request Options</a> for more information. # @option opts [Integer] :offset `offset` indicates the position of the first record to return. The `offset` is zero-based and the default is 0. # @option opts [Integer] :limit `limit` indicates the maximum number of results to be returned in the response. `limit` can range between 1 and 1000 and the default is 50. # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def get_association_unit_notes_with_http_info(unit_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.get_association_unit_notes ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.get_association_unit_notes" end # resource path local_var_path = '/v1/associations/units/{unitId}/notes'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'updateddatetimefrom'] = opts[:'updateddatetimefrom'] if !opts[:'updateddatetimefrom'].nil? query_params[:'updateddatetimeto'] = opts[:'updateddatetimeto'] if !opts[:'updateddatetimeto'].nil? query_params[:'lastupdatedbyuserid'] = opts[:'lastupdatedbyuserid'] if !opts[:'lastupdatedbyuserid'].nil? query_params[:'orderby'] = opts[:'orderby'] if !opts[:'orderby'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.get_association_unit_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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#get_association_unit_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a unit # Updates an association unit.

NOTE: Any field not included in the update request will be set to either an empty string or `null` in the database depending on the field definition.
The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you're about to update and then use this response to fill any of the fields that are not being updated.

Required permission(s):

Associations > Associations and units - `View` `Edit` # @param unit_id [Integer] The identifier of the unit to update. # @param association_unit_put_message [AssociationUnitPutMessage] # @param [Hash] opts the optional parameters # @return [AssociationUnitMessage] def update_association_unit(unit_id, association_unit_put_message, opts = {}) data, _status_code, _headers = update_association_unit_with_http_info(unit_id, association_unit_put_message, opts) data end # Update a unit # Updates an association unit. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or `null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you're about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` `Edit` # @param unit_id [Integer] The identifier of the unit to update. # @param association_unit_put_message [AssociationUnitPutMessage] # @param [Hash] opts the optional parameters # @return [Array<(AssociationUnitMessage, Integer, Hash)>] AssociationUnitMessage data, response status code and response headers def update_association_unit_with_http_info(unit_id, association_unit_put_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.update_association_unit ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.update_association_unit" end # verify the required parameter 'association_unit_put_message' is set if @api_client.config.client_side_validation && association_unit_put_message.nil? fail ArgumentError, "Missing the required parameter 'association_unit_put_message' when calling AssociationUnitsApi.update_association_unit" end # resource path local_var_path = '/v1/associations/units/{unitId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)) # 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']) # 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(association_unit_put_message) # return_type return_type = opts[:debug_return_type] || 'AssociationUnitMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.update_association_unit", :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(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#update_association_unit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a note # Updates an association unit note.

NOTE: Any field not included in the update request will be set to either an empty string or `null` in the database depending on the field definition.
The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you're about to update and then use this response to fill any of the fields that are not being updated.

Required permission(s):

Associations > Associations and units - `View` `Edit` # @param unit_id [Integer] # @param note_id [Integer] # @param note_put_message [NotePutMessage] # @param [Hash] opts the optional parameters # @return [NoteMessage] def update_association_unit_note(unit_id, note_id, note_put_message, opts = {}) data, _status_code, _headers = update_association_unit_note_with_http_info(unit_id, note_id, note_put_message, opts) data end # Update a note # Updates an association unit note. <br /><br /><strong>NOTE:</strong> Any field not included in the update request will be set to either an empty string or `null` in the database depending on the field definition. <br />The recommended workflow to ensure no data is inadvertently overwritten is to execute a `GET` request for the resource you're about to update and then use this response to fill any of the fields that are not being updated. <br /><br /><h4>Required permission(s):</h4><span class=\"permissionBlock\">Associations &gt; Associations and units</span> - `View` `Edit` # @param unit_id [Integer] # @param note_id [Integer] # @param note_put_message [NotePutMessage] # @param [Hash] opts the optional parameters # @return [Array<(NoteMessage, Integer, Hash)>] NoteMessage data, response status code and response headers def update_association_unit_note_with_http_info(unit_id, note_id, note_put_message, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AssociationUnitsApi.update_association_unit_note ...' end # verify the required parameter 'unit_id' is set if @api_client.config.client_side_validation && unit_id.nil? fail ArgumentError, "Missing the required parameter 'unit_id' when calling AssociationUnitsApi.update_association_unit_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 AssociationUnitsApi.update_association_unit_note" end # verify the required parameter 'note_put_message' is set if @api_client.config.client_side_validation && note_put_message.nil? fail ArgumentError, "Missing the required parameter 'note_put_message' when calling AssociationUnitsApi.update_association_unit_note" end # resource path local_var_path = '/v1/associations/units/{unitId}/notes/{noteId}'.sub('{' + 'unitId' + '}', CGI.escape(unit_id.to_s)).sub('{' + 'noteId' + '}', CGI.escape(note_id.to_s)) # 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']) # 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_put_message) # return_type return_type = opts[:debug_return_type] || 'NoteMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] new_options = opts.merge( :operation => :"AssociationUnitsApi.update_association_unit_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(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: AssociationUnitsApi#update_association_unit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end