Class: Buildium::ResidentCenterApi
- Inherits:
-
Object
- Object
- Buildium::ResidentCenterApi
- Defined in:
- lib/buildium-ruby/api/resident_center_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_resident_center_users(opts = {}) ⇒ Array<ResidentCenterUserMessage>
Retrieve all resident center users Retrieves all resident center users for both rentals and associations.
-
#get_resident_center_users_with_http_info(opts = {}) ⇒ Array<(Array<ResidentCenterUserMessage>, Integer, Hash)>
Retrieve all resident center users Retrieves all resident center users for both rentals and associations.
-
#get_retail_cash_user(user_id, unit_agreement_id, opts = {}) ⇒ RetailCashUserMessage
Retrieve a retail cash user Retrieves a retail cash user.
-
#get_retail_cash_user_with_http_info(user_id, unit_agreement_id, opts = {}) ⇒ Array<(RetailCashUserMessage, Integer, Hash)>
Retrieve a retail cash user Retrieves a retail cash user.
-
#get_retail_cash_users(opts = {}) ⇒ Array<RetailCashUserMessage>
Retrieve all retail cash users Retrieves all retail cash users.
-
#get_retail_cash_users_with_http_info(opts = {}) ⇒ Array<(Array<RetailCashUserMessage>, Integer, Hash)>
Retrieve all retail cash users Retrieves all retail cash users.
-
#initialize(api_client = ApiClient.default) ⇒ ResidentCenterApi
constructor
A new instance of ResidentCenterApi.
-
#update_retail_cash_user(user_id, unit_agreement_id, retail_cash_user_put_message, opts = {}) ⇒ RetailCashUserMessage
Update a retail cash user Updates a retail cash user.
-
#update_retail_cash_user_with_http_info(user_id, unit_agreement_id, retail_cash_user_put_message, opts = {}) ⇒ Array<(RetailCashUserMessage, Integer, Hash)>
Update a retail cash user Updates a retail cash user.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ResidentCenterApi
Returns a new instance of ResidentCenterApi.
19 20 21 |
# File 'lib/buildium-ruby/api/resident_center_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/buildium-ruby/api/resident_center_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_resident_center_users(opts = {}) ⇒ Array<ResidentCenterUserMessage>
Retrieve all resident center users Retrieves all resident center users for both rentals and associations. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Communications > Resident Center Users</span> - ‘View` <br /><span class="permissionBlock">Rentals > Tenants</span> - `View` is required to retrieve resident center users that are tenants. <br /><span class="permissionBlock">Associations > Association owners and tenants</span> - `View` is required to retrieve resident center users that are association owners.
34 35 36 37 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 34 def get_resident_center_users(opts = {}) data, _status_code, _headers = get_resident_center_users_with_http_info(opts) data end |
#get_resident_center_users_with_http_info(opts = {}) ⇒ Array<(Array<ResidentCenterUserMessage>, Integer, Hash)>
Retrieve all resident center users Retrieves all resident center users for both rentals and associations. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Communications &gt; Resident Center Users</span> - `View` <br /><span class="permissionBlock">Rentals &gt; Tenants</span> - `View` is required to retrieve resident center users that are tenants. <br /><span class="permissionBlock">Associations &gt; Association owners and tenants</span> - `View` is required to retrieve resident center users that are association owners.
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 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 51 def get_resident_center_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResidentCenterApi.get_resident_center_users ...' end allowable_values = ["Tenant", "AssociationOwner"] if @api_client.config.client_side_validation && opts[:'usertypes'] && !opts[:'usertypes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"usertypes\", must include one of #{allowable_values}" end allowable_values = ["AccountExistsButNoEmailSent", "PasswordSent", "EmailFailed", "SignedIn", "Blocked"] if @api_client.config.client_side_validation && opts[:'residentcenteruserstatuses'] && !opts[:'residentcenteruserstatuses'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"residentcenteruserstatuses\", must include one of #{allowable_values}" end # resource path local_var_path = '/v1/residentCenterUsers' # query parameters query_params = opts[:query_params] || {} query_params[:'unitagreementids'] = @api_client.build_collection_param(opts[:'unitagreementids'], :multi) if !opts[:'unitagreementids'].nil? query_params[:'userids'] = @api_client.build_collection_param(opts[:'userids'], :multi) if !opts[:'userids'].nil? query_params[:'usertypes'] = @api_client.build_collection_param(opts[:'usertypes'], :multi) if !opts[:'usertypes'].nil? query_params[:'residentcenteruserstatuses'] = @api_client.build_collection_param(opts[:'residentcenteruserstatuses'], :multi) if !opts[:'residentcenteruserstatuses'].nil? query_params[:'isautopayenabled'] = opts[:'isautopayenabled'] if !opts[:'isautopayenabled'].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<ResidentCenterUserMessage>' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"ResidentCenterApi.get_resident_center_users", :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: ResidentCenterApi#get_resident_center_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_retail_cash_user(user_id, unit_agreement_id, opts = {}) ⇒ RetailCashUserMessage
Retrieve a retail cash user Retrieves a retail cash user. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Tenants</span> - ‘View` OR <span class="permissionBlock"> Associations > Association owners and tenants</span> - `View`
117 118 119 120 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 117 def get_retail_cash_user(user_id, unit_agreement_id, opts = {}) data, _status_code, _headers = get_retail_cash_user_with_http_info(user_id, unit_agreement_id, opts) data end |
#get_retail_cash_user_with_http_info(user_id, unit_agreement_id, opts = {}) ⇒ Array<(RetailCashUserMessage, Integer, Hash)>
Retrieve a retail cash user Retrieves a retail cash user. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Tenants</span> - `View` OR <span class="permissionBlock"> Associations &gt; Association owners and tenants</span> - `View`
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 171 172 173 174 175 176 177 178 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 128 def get_retail_cash_user_with_http_info(user_id, unit_agreement_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResidentCenterApi.get_retail_cash_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ResidentCenterApi.get_retail_cash_user" end # verify the required parameter 'unit_agreement_id' is set if @api_client.config.client_side_validation && unit_agreement_id.nil? fail ArgumentError, "Missing the required parameter 'unit_agreement_id' when calling ResidentCenterApi.get_retail_cash_user" end # resource path local_var_path = '/v1/retailcashusers/{userId}/{unitAgreementId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'unitAgreementId' + '}', CGI.escape(unit_agreement_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] || 'RetailCashUserMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"ResidentCenterApi.get_retail_cash_user", :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: ResidentCenterApi#get_retail_cash_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_retail_cash_users(opts = {}) ⇒ Array<RetailCashUserMessage>
Retrieve all retail cash users Retrieves all retail cash users. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Tenants</span> - ‘View` OR <span class="permissionBlock"> Associations > Association owners and tenants</span> - `View`
193 194 195 196 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 193 def get_retail_cash_users(opts = {}) data, _status_code, _headers = get_retail_cash_users_with_http_info(opts) data end |
#get_retail_cash_users_with_http_info(opts = {}) ⇒ Array<(Array<RetailCashUserMessage>, Integer, Hash)>
Retrieve all retail cash users Retrieves all retail cash users. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Tenants</span> - `View` OR <span class="permissionBlock"> Associations &gt; Association owners and tenants</span> - `View`
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 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 211 def get_retail_cash_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResidentCenterApi.get_retail_cash_users ...' end allowable_values = ["Rental", "RentalOwner", "Association"] if @api_client.config.client_side_validation && opts[:'entitytype'] && !allowable_values.include?(opts[:'entitytype']) fail ArgumentError, "invalid value for \"entitytype\", must be one of #{allowable_values}" end allowable_values = ["Active", "Past", "Future"] if @api_client.config.client_side_validation && opts[:'statuses'] && !opts[:'statuses'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"statuses\", must include one of #{allowable_values}" end # resource path local_var_path = '/v1/retailcashusers' # query parameters query_params = opts[:query_params] || {} query_params[:'entityid'] = opts[:'entityid'] if !opts[:'entityid'].nil? query_params[:'entitytype'] = opts[:'entitytype'] if !opts[:'entitytype'].nil? query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if !opts[:'statuses'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'unitaddress'] = opts[:'unitaddress'] if !opts[:'unitaddress'].nil? query_params[:'isaccountcreated'] = opts[:'isaccountcreated'] if !opts[:'isaccountcreated'].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<RetailCashUserMessage>' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"ResidentCenterApi.get_retail_cash_users", :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: ResidentCenterApi#get_retail_cash_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_retail_cash_user(user_id, unit_agreement_id, retail_cash_user_put_message, opts = {}) ⇒ RetailCashUserMessage
Update a retail cash user Updates a retail cash user. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals > Tenants</span> - ‘View` `Edit` OR <span class="permissionBlock"> Associations > Association owners and tenants</span> - `View` `Edit`
279 280 281 282 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 279 def update_retail_cash_user(user_id, unit_agreement_id, , opts = {}) data, _status_code, _headers = update_retail_cash_user_with_http_info(user_id, unit_agreement_id, , opts) data end |
#update_retail_cash_user_with_http_info(user_id, unit_agreement_id, retail_cash_user_put_message, opts = {}) ⇒ Array<(RetailCashUserMessage, Integer, Hash)>
Update a retail cash user Updates a retail cash user. <br /><br /><h4>Required permission(s):</h4><span class="permissionBlock">Rentals &gt; Tenants</span> - `View` `Edit` OR <span class="permissionBlock"> Associations &gt; Association owners and tenants</span> - `View` `Edit`
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/buildium-ruby/api/resident_center_api.rb', line 291 def update_retail_cash_user_with_http_info(user_id, unit_agreement_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ResidentCenterApi.update_retail_cash_user ...' end # verify the required parameter 'user_id' is set if @api_client.config.client_side_validation && user_id.nil? fail ArgumentError, "Missing the required parameter 'user_id' when calling ResidentCenterApi.update_retail_cash_user" end # verify the required parameter 'unit_agreement_id' is set if @api_client.config.client_side_validation && unit_agreement_id.nil? fail ArgumentError, "Missing the required parameter 'unit_agreement_id' when calling ResidentCenterApi.update_retail_cash_user" end # verify the required parameter 'retail_cash_user_put_message' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'retail_cash_user_put_message' when calling ResidentCenterApi.update_retail_cash_user" end # resource path local_var_path = '/v1/retailcashusers/{userId}/{unitAgreementId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'unitAgreementId' + '}', CGI.escape(unit_agreement_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() # return_type return_type = opts[:debug_return_type] || 'RetailCashUserMessage' # auth_names auth_names = opts[:debug_auth_names] || ['clientId', 'clientSecret'] = opts.merge( :operation => :"ResidentCenterApi.update_retail_cash_user", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ResidentCenterApi#update_retail_cash_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |