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.
-
#initialize(api_client = ApiClient.default) ⇒ ResidentCenterApi
constructor
A new instance of ResidentCenterApi.
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 |