propertyware 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.openapi-generator/FILES +6 -3
  3. data/.tool-versions +2 -0
  4. data/DOCS.md +7 -5
  5. data/Gemfile.lock +4 -2
  6. data/bin/config.yml +1 -1
  7. data/bin/fix_json.rb +0 -1
  8. data/bin/propertyware.json +218 -178
  9. data/docs/Adjustment.md +40 -0
  10. data/docs/BankDeposit.md +1 -1
  11. data/docs/ChargeTx.md +1 -5
  12. data/docs/ContactCategory.md +20 -0
  13. data/docs/ContactsApi.md +79 -0
  14. data/docs/DocumentsApi.md +4 -4
  15. data/docs/Inspection.md +8 -0
  16. data/docs/LeasesApi.md +19 -19
  17. data/docs/OwnerContribution.md +5 -5
  18. data/docs/OwnerDraw.md +1 -1
  19. data/docs/Portfolio.md +2 -0
  20. data/docs/Refund.md +5 -5
  21. data/docs/SaveAdjustment.md +2 -2
  22. data/docs/SaveBankDeposit.md +1 -1
  23. data/docs/SaveContact.md +2 -0
  24. data/docs/SaveDiscount.md +1 -1
  25. data/docs/SaveOwnerContribution.md +5 -5
  26. data/docs/SaveOwnerDraw.md +5 -5
  27. data/docs/SavePayment.md +6 -6
  28. data/docs/SavePortfolio.md +6 -0
  29. data/docs/SaveRefund.md +6 -6
  30. data/lib/propertyware/api/contacts_api.rb +57 -0
  31. data/lib/propertyware/api/documents_api.rb +4 -4
  32. data/lib/propertyware/api/leases_api.rb +14 -14
  33. data/lib/propertyware/models/account.rb +1 -1
  34. data/lib/propertyware/models/{transaction.rb → adjustment.rb} +24 -118
  35. data/lib/propertyware/models/auto_journal_entry.rb +2 -2
  36. data/lib/propertyware/models/bank_deposit.rb +1 -1
  37. data/lib/propertyware/models/charge.rb +2 -2
  38. data/lib/propertyware/models/charge_tx.rb +4 -24
  39. data/lib/propertyware/models/contact_category.rb +229 -0
  40. data/lib/propertyware/models/inspection.rb +41 -1
  41. data/lib/propertyware/models/owner_contribution.rb +0 -25
  42. data/lib/propertyware/models/owner_draw.rb +0 -5
  43. data/lib/propertyware/models/portfolio.rb +11 -1
  44. data/lib/propertyware/models/refund.rb +2 -27
  45. data/lib/propertyware/models/save_adjustment.rb +2 -2
  46. data/lib/propertyware/models/save_bank_deposit.rb +1 -1
  47. data/lib/propertyware/models/save_contact.rb +11 -1
  48. data/lib/propertyware/models/save_discount.rb +1 -1
  49. data/lib/propertyware/models/save_owner_contribution.rb +5 -5
  50. data/lib/propertyware/models/save_owner_draw.rb +5 -5
  51. data/lib/propertyware/models/save_payment.rb +6 -6
  52. data/lib/propertyware/models/save_portfolio.rb +31 -1
  53. data/lib/propertyware/models/save_refund.rb +7 -17
  54. data/lib/propertyware/version.rb +1 -1
  55. data/lib/propertyware.rb +2 -1
  56. data/spec/api/contacts_api_spec.rb +11 -0
  57. data/spec/api/documents_api_spec.rb +2 -2
  58. data/spec/api/leases_api_spec.rb +5 -5
  59. data/spec/models/{transaction_spec.rb → adjustment_spec.rb} +6 -52
  60. data/spec/models/auto_journal_entry_spec.rb +1 -1
  61. data/spec/models/charge_spec.rb +1 -1
  62. data/spec/models/charge_tx_spec.rb +0 -12
  63. data/spec/models/contact_category_spec.rb +40 -0
  64. data/spec/models/inspection_spec.rb +24 -0
  65. data/spec/models/portfolio_spec.rb +6 -0
  66. data/spec/models/save_contact_spec.rb +6 -0
  67. data/spec/models/save_portfolio_spec.rb +18 -0
  68. metadata +11 -6
  69. data/docs/Transaction.md +0 -54
@@ -25,9 +25,6 @@ module Propertyware
25
25
  # The amount paid for the charge.
26
26
  attr_accessor :amount_paid
27
27
 
28
- # Status of the charge.
29
- attr_accessor :charge_status
30
-
31
28
  # Comments.
32
29
  attr_accessor :comments
33
30
 
@@ -67,16 +64,12 @@ module Propertyware
67
64
  # Reference number.
68
65
  attr_accessor :ref_no
69
66
 
70
- # The status of the lease.
71
- attr_accessor :status
72
-
73
67
  # Attribute mapping from ruby-style variable name to JSON key.
74
68
  def self.attribute_map
75
69
  {
76
70
  :'amount' => :'amount',
77
71
  :'amount_due' => :'amountDue',
78
72
  :'amount_paid' => :'amountPaid',
79
- :'charge_status' => :'chargeStatus',
80
73
  :'comments' => :'comments',
81
74
  :'created_by' => :'createdBy',
82
75
  :'created_date_time' => :'createdDateTime',
@@ -89,8 +82,7 @@ module Propertyware
89
82
  :'parent_tx_id' => :'parentTxID',
90
83
  :'payments' => :'payments',
91
84
  :'portfolio_id' => :'portfolioID',
92
- :'ref_no' => :'refNo',
93
- :'status' => :'status'
85
+ :'ref_no' => :'refNo'
94
86
  }
95
87
  end
96
88
 
@@ -105,7 +97,6 @@ module Propertyware
105
97
  :'amount' => :'Float',
106
98
  :'amount_due' => :'Float',
107
99
  :'amount_paid' => :'Float',
108
- :'charge_status' => :'String',
109
100
  :'comments' => :'String',
110
101
  :'created_by' => :'String',
111
102
  :'created_date_time' => :'Time',
@@ -118,8 +109,7 @@ module Propertyware
118
109
  :'parent_tx_id' => :'Integer',
119
110
  :'payments' => :'Array<PaymentCharge>',
120
111
  :'portfolio_id' => :'Integer',
121
- :'ref_no' => :'String',
122
- :'status' => :'String'
112
+ :'ref_no' => :'String'
123
113
  }
124
114
  end
125
115
 
@@ -156,10 +146,6 @@ module Propertyware
156
146
  self.amount_paid = attributes[:'amount_paid']
157
147
  end
158
148
 
159
- if attributes.key?(:'charge_status')
160
- self.charge_status = attributes[:'charge_status']
161
- end
162
-
163
149
  if attributes.key?(:'comments')
164
150
  self.comments = attributes[:'comments']
165
151
  end
@@ -213,10 +199,6 @@ module Propertyware
213
199
  if attributes.key?(:'ref_no')
214
200
  self.ref_no = attributes[:'ref_no']
215
201
  end
216
-
217
- if attributes.key?(:'status')
218
- self.status = attributes[:'status']
219
- end
220
202
  end
221
203
 
222
204
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -250,7 +232,6 @@ module Propertyware
250
232
  amount == o.amount &&
251
233
  amount_due == o.amount_due &&
252
234
  amount_paid == o.amount_paid &&
253
- charge_status == o.charge_status &&
254
235
  comments == o.comments &&
255
236
  created_by == o.created_by &&
256
237
  created_date_time == o.created_date_time &&
@@ -263,8 +244,7 @@ module Propertyware
263
244
  parent_tx_id == o.parent_tx_id &&
264
245
  payments == o.payments &&
265
246
  portfolio_id == o.portfolio_id &&
266
- ref_no == o.ref_no &&
267
- status == o.status
247
+ ref_no == o.ref_no
268
248
  end
269
249
 
270
250
  # @see the `==` method
@@ -276,7 +256,7 @@ module Propertyware
276
256
  # Calculates hash code according to all attributes.
277
257
  # @return [Integer] Hash code
278
258
  def hash
279
- [amount, amount_due, amount_paid, charge_status, comments, created_by, created_date_time, date, gl_account_id, id, last_modified_by, last_modified_date_time, lease_id, parent_tx_id, payments, portfolio_id, ref_no, status].hash
259
+ [amount, amount_due, amount_paid, comments, created_by, created_date_time, date, gl_account_id, id, last_modified_by, last_modified_date_time, lease_id, parent_tx_id, payments, portfolio_id, ref_no].hash
280
260
  end
281
261
 
282
262
  # Builds the object from hash
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Open API, powered by Propertyware
3
+
4
+ #<script type=\"text/javascript\" src=\"https://buildium.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/-raa8on/b/8/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-US&collectorId=e43cd15d\"></script> # Introduction Welcome to Propertyware’s API—a powerful, RESTful programming interface that lets you leverage valuable Propertyware data. ## Account Configuration Before you can use Propertyware’s API, you’ll need to make some tweaks to your account settings. <br /> ### Enabling the API In order to start creating your keys and making requests, you’ll need to enable the API. > **Tip:** You’ll need an administrator user role with access to ***Administration Setup > API Keys*** to set things up properly. **Let's Begin!** 1. Sign in to your [Propertyware](https://app.propertyware.com/pw/login.jsp) account from your browser. 2. Open the ***Setup*** page 3. On the left navigation bar, expand ***Administration Setup*** and then click ***API Keys***. If you are having issues accessing the API keys page within your account you can submit a [Support](#section/API-Overview/Support) request for assistance. ## API Keys Account-level API keys authenticate every request and keep things secure. API keys have two components: a “client ID” and a “secret”. * **Client IDs** are similar to usernames. They’re used to identify your Propertyware API key and are safe to share. * **Secrets** are similar to passwords. They must be kept confidential. Whenever you make a request, you’ll need the API key’s client ID and secret. If you forget it, make a mistake, or try to use information that’s linked to a deleted key, the API will return a `401` response code. > **Tip:** We compiled a list of best practices that detail how securely store API keys. [Give it a read](#section/Getting-Started/Keeping-API-Keys-Safe)! ## Creating API Keys Now that the Open API is enabled, you’ll be able to create API keys. You’re almost there! **How to create an API key** 1. On the API Keys page, click ***Create API Key***. A modal will appear. <p> <img src=\"APIKey_Page.JPG\"/> </p> <p> <img src=\"APIKey_New.JPG\"/> </p> 2. Enter a clear, memorable name and description for your API key. It’ll make it easier to locate the right key when you make a request. 3. Now, choose which pieces of Propertyware data you want this API key to have access to by selecting the corresponding radio buttons. Once finished, click **GENERATE KEY**. 4. You have successfully created an API key! The client id and secret associated to this key will be presented. <p> <img src=\"APIKey_Generate.JPG\"/> </p> > **Important:** This is your only chance to record the secret. Make sure it’s stored somewhere secure! If it’s forgotten, you’ll need to delete this key and start from scratch. You have now successfully created an API key and have everything you need to send requests to the Propertyware API! Before moving on to [making your first request](#section/Getting-Started/How-to-Make-a-Request) please review [Keeping API Keys Safe](#section/Getting-Started/Keeping-API-Keys-Safe) for an overview on securely storing your API keys. <br /> If you are having issues creating API keys you can submit a [Support](#section/API-Overview/Support) request for assistance. ## Keeping API Keys Safe Based on their permissions, API keys could have full access to your account’s Propertyware data. It’s important that you only grant access to trusted applications, securely record secrets, and consider a password manager to stay organized. ### Recommended Practices - Avoid hard-coding client IDs and secrets inside source files. - Avoid storing client IDs and secrets in any files that may be committed to source control, particularly cloud-based source control platforms. - Apply restrictions to client IDs and secrets shared with your staff. You can restrict a key to particular Propertyware entities or to read-only access (GET resources only). - Avoid sharing client IDs and secrets across public, insecure platforms. - Establish a process to regularly recreate your client IDs and secrets from your Propertyware account. <br /> <br /> ## How to Make a Request You’ve done a great job setting up your account, Now, we’ll walk you through how to access your data. It’s very straightforward and should only take a few minutes! > **Tip:** Looking for the right HTTP client? If you’re just getting started, we recommend Postman. ### Let's Get Started! #### Step 1: Get Your API Key If you haven't yet done so, obtain your API key client ID and secret from your Propertyware account. Your API key is how the Propertyware API authenticates requests and ensures only you can access your data. #### Step 2: Install a HTTP client The Propertyware API supports any standard HTTP client. If you're looking for a user-friendly HTTP client application, we recommend [Postman](https://www.postman.com/product/api-client) – it allows you to access the Propertyware API without writing code. We’ll use Postman for our example below to demonstrate sending an API request. #### Step 3: Make a Sample Request Let's dive in and make a simple request to get all the [Buildings](#operation/getBuildingsUsingGET) in your account. This will confirm your connectivity to our platform and validate the keys you created on our website. Simply follow the instructions below. 1. Open the Postman application. 2. Open the *verb* menu and select **GET**. 3. Enter the request endpoint in the field next to GET. - Here’s the endpoint to get all buildings: https://api.propertyware.com/pw/api/rest/v1/buildings. 4. To authenticate the request, enter your `client ID`, your `secret` and your `organization iD` respectively in these request headers: - `x-propertyware-client-id` - `x-propertyware-client-secret` - `x-propertyware-system-id` _(organization id)_ The organization id uniquely identifies your Propertyware account and is an additional measure to enforce proper access to the correct data. ___Your client id and secret pair will only work with the organization it belongs to___. Your full request should look similar to the image below. <kbd><img src=\"request_example.png\" /></kbd> 5. Review the parameters of your request on last time. Once finished, click **Send**. 6. If successful, you should see a JSON response and a `200` HTTP status code. Congratulations! You've connected to the Propertyware API. You now have the knowledge required to make requests for any of our resources. If you've received an error response please review the JSON response message for a description of how to resolve the issue. You can also see more information about HTTP status codes in the [Response Codes](#section/API-Overview/Response-Codes) section. If you are still having trouble making a request after reviewing these sections please submit a [Support](#section/API-Overview/Support) request. # API Overview The Propertyware API is built upon standard REST conventions. It's designed to use consistent resource-oriented URLs, accept and return JSON-encoded messages, and use standard HTTP status codes and verbs. ## Base URL The base URL for production environment API requests is: `https://api.propertyware.com/pw/api/v1/rest` In order to ensure all requests and responses are secure between the API consumer and Propertyware servers, requests must be made using the `https` protocol. Any requests not made with the `https` protocol will be refused by the Propertyware API platform. > **Note:** URL paths are case-sensitive to stay consistent with common REST standards. If your request doesn’t align with the documented URL path, you’ll receive a `404` response code reminding you of this constraint. ## API Versioning The Propertyware API is version controlled. Versioning ensures backwards-incompatible changes to the API don’t impact any existing integrations. Propertyware uses only a major version nomenclature to manage changes. The current version of the Propertyware API is version 1. By specifying a version in the resource request URL, you'll get expected responses regardless of future changes to the API. Here's an example of calling version 1 of the retrieve all leases resource: `https://api.propertyware.com/pw/api/rest/v1/leases` Any request submitted without the version in the URL path will result in a `404` error response code. ### Releasing Changes to the API The Propertyware API will continue to evolve to ensure it meets the needs of our customers. Changes will be defined as either backwards-compatible or backwards-incompatible. We’ll provide advance notice for all API releases–regardless of the type of modifications being made. #### Backward-compatible Changes Backward-compatible changes are modifications to the API that shouldn't impact existing integrations. They'll apply to the current version of the API. Simply put: you won’t need to change the version to consume new changes like these. It's important as you develop against the Propertyware API that you ensure these types of changes don't impact your integration. Here's are examples of backward-compatible modifications. * Adding new API resources and/or endpoints. * Adding new optional request parameters to existing API methods. * Adding new properties to existing API responses and non-required properties for request messages. * Changing property order in existing API responses. All backward-compatible changes to the API will be documented in the [Changelog](#section/Changelog). #### Backwards-incompatible Changes When backwards-incompatible changes to the API occur, a new version of the API will be released. You’ll need to update the URL path to consume resources under the new API version. Backwards-incompatible changes include: * Removing a property from a request and/or response message. * Changing the name of a property in a message. * Adding a required parameter to a request message. * Changing existing enumeration values. New versions of the API will have full reference documentation and an upgrade guide. ## Authentication The Propertyware API uses API key’s client IDs and secrets to authenticate requests. An organization ID, an API key client ID and secret must be passed in every request header using the following parameters: - `x-propertyware-client-id` - `x-propertyware-client-secret` - `x-propertyware-system-id` Failing to provide both of them in the request header will cause the API to return a `401` HTTP status code. <!-- ## Rate Limiting (FUTURE) Rate limits help us ensure consistent and reliable performance for all users, even during peak loads. That’s why we limit clients to **10 concurrent requests per second**. If your request rate violates that limit, a response code of `429` is returned. Simply retry the request after a short interval (~200ms). --> ## Bulk Request Options All top-level API resources support bulk fetches. For instance, you can retrieve all [Portfolios](#operation/getPortfoliosUsingGET). These resources also allow for filtering criteria. Each resource has descriptions of the filter criteria available. In addition to filtering, our API gives you the ability to control the returned data’s pagination and the sort order. ### Pagination Endpoints that return result sets allow for pagination using `limit` and `offset` request parameters to reduce the amount of data returned. The `limit` request parameter will cap the number of results that come back in the response. If you don't specify a `limit` value, a **default of 100 results** are returned. The maximum `limit` value is 500. If a `limit` value is specified greater than 500, it will be overridden to the default to 500. The `offset` request parameter indicates the record position within the resultset to start at when returning the results. The `offset` is zero-based and is inclusive. If no `offset` value is submitted it will default to 0. The total resultset count is returned in the HTTP Header `X-Total-Count` #### Pagination Example As an example, let's say we make a request to retrieve all rental properties with no paging parameters. Our response indicates in the `X-Total-Count` header that there are 150 total rental properties. We want to get only the last 50 results so we would submit a request with the `offset` set to 100 and the `limit` set to 50. > **Note:** The `limit` and `offset` parameter names are case-sensitive. If they aren't formatted correctly, the API will return a `404` HTTP status code. ### Sorting Results You can specify the sort order of returned data by assigning properties from the returned object to the `orderby` parameter in the querystring. For example: ``` orderby=name ``` By default, the sort is performed in ascending order. To specify sort order, use \"asc\" for ascending or \"desc\" for descending. For example: ``` orderby=name desc ``` Additionally, you can sort by multiple properties by comma separating the properties. For example: ``` orderby=abbreviation asc,name desc ``` > **Note:** While the `orderby` parameter is case-sensitive, the properties specified in the `orderby` value aren't. ## Response Codes The Propertyware API supports standard HTTP status codes. |Response Code |Description | |--|--| |200 OK | Everything worked as expected. | |400 Bad Request | The request was unacceptable, often due to missing a required parameter.| |401 Unauthorized|The API client ID and secret weren’t provided or they’re no longer valid. Be sure that the client ID and secret combination are correct and they are still active.| |403 Forbidden|The API key doesn't have permission to perform the request. This could be due to authorization for the given endpoint or an inability to access given entities within the platform (e.g. properties). |404 Not Found|The requested resource doesn't exist.| |415 Unsupported Media Type |Ensure you have the appropriate content-type header value set on your request. Each resource is documented with media type(s) that are accepted.| |429 Too Many Requests |Too many requests against the API too quickly. We recommend an exponential backoff of your requests.| |500 and above - Server Errors|Something went wrong on Propertyware's end. Review the JSON response message for more details about the error.| ## API Date Format * For all request and response date fields allowing ISO date format: YYYY-MM-DD (e.g.2019-08-24). * For all request and response dateAndTime fields format is allowing: YYYY-MM-dd'T'HH:mm:ssXXX (e.g.2022-06-28T08:47:13Z). ## Support If you are unable to resolve your issue after reviewing the API documentation our support team can assist you. # Changelog ### 2023-08-28 * Update a document ### 2023-07-11 * Delete a document ### 2023-07-11 * Retrieve all documents * Retrieve a document * Download a document ### 2023-06-10 * Lease contacts are included in Retrieve all leases API response * Lease contacts are included in Retrieve a lease API response ### 2023-04-24 * Bulk Insertion: Prospects * Bulk Insertion: Bill Payments ### 2023-04-11 * Bulk Insertion: Portfolios * Bulk Insertion: Buildings * Bulk Insertion: Units ### 2023-03-19 * Bulk insertion: contacts ### 2023-03-08 * Bulk insertion: bills ### 2023-01-24 * Custom fields in \"Get all\" endpoints * Prospect creation * Bill removals ### 2022-10-25 * API Read operations for non-financial data ### 2022-09-21 * API Read operations available
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@propertyware.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Propertyware
17
+ # ContactCategory
18
+ class ContactCategory
19
+ # Category name.
20
+ attr_accessor :category_name
21
+
22
+ # Unique identifier.
23
+ attr_accessor :id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'category_name' => :'categoryName',
29
+ :'id' => :'id'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'category_name' => :'String',
42
+ :'id' => :'Integer'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Propertyware::ContactCategory` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Propertyware::ContactCategory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'category_name')
68
+ self.category_name = attributes[:'category_name']
69
+ end
70
+
71
+ if attributes.key?(:'id')
72
+ self.id = attributes[:'id']
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ category_name == o.category_name &&
95
+ id == o.id
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [category_name, id].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ new.build_from_hash(attributes)
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :Time
147
+ Time.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ # models (e.g. Pet) or oneOf
178
+ klass = Propertyware.const_get(type)
179
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+ end
229
+ end
@@ -19,6 +19,9 @@ module Propertyware
19
19
  # Id of the building associated with this inspection.
20
20
  attr_accessor :building_id
21
21
 
22
+ # Date and time the inspection closed (customer time zone).
23
+ attr_accessor :closed_date_and_time
24
+
22
25
  # Inspection comments.
23
26
  attr_accessor :comment
24
27
 
@@ -37,12 +40,21 @@ module Propertyware
37
40
  # List of inspection areas.
38
41
  attr_accessor :inspection_areas
39
42
 
43
+ # Inspector ID
44
+ attr_accessor :inspector_id
45
+
40
46
  # User who last modified the record.
41
47
  attr_accessor :last_modified_by
42
48
 
43
49
  # Date and time the record was last modified. (Timezone: UTC)
44
50
  attr_accessor :last_modified_date_time
45
51
 
52
+ # Id of the lease associated with this inspection.
53
+ attr_accessor :lease_id
54
+
55
+ # Notes to Inspector
56
+ attr_accessor :notes_to_inspector
57
+
46
58
  # Inspection number.
47
59
  attr_accessor :number
48
60
 
@@ -65,14 +77,18 @@ module Propertyware
65
77
  def self.attribute_map
66
78
  {
67
79
  :'building_id' => :'buildingID',
80
+ :'closed_date_and_time' => :'closedDateAndTime',
68
81
  :'comment' => :'comment',
69
82
  :'created_by' => :'createdBy',
70
83
  :'created_date_time' => :'createdDateTime',
71
84
  :'id' => :'id',
72
85
  :'inspected_date_and_time' => :'inspectedDateAndTime',
73
86
  :'inspection_areas' => :'inspectionAreas',
87
+ :'inspector_id' => :'inspectorID',
74
88
  :'last_modified_by' => :'lastModifiedBy',
75
89
  :'last_modified_date_time' => :'lastModifiedDateTime',
90
+ :'lease_id' => :'leaseID',
91
+ :'notes_to_inspector' => :'notesToInspector',
76
92
  :'number' => :'number',
77
93
  :'portfolio_id' => :'portfolioID',
78
94
  :'scheduled_date_and_time' => :'scheduledDateAndTime',
@@ -91,14 +107,18 @@ module Propertyware
91
107
  def self.openapi_types
92
108
  {
93
109
  :'building_id' => :'Integer',
110
+ :'closed_date_and_time' => :'Time',
94
111
  :'comment' => :'String',
95
112
  :'created_by' => :'String',
96
113
  :'created_date_time' => :'Time',
97
114
  :'id' => :'Integer',
98
115
  :'inspected_date_and_time' => :'Time',
99
116
  :'inspection_areas' => :'Array<InspectionArea>',
117
+ :'inspector_id' => :'Integer',
100
118
  :'last_modified_by' => :'String',
101
119
  :'last_modified_date_time' => :'Time',
120
+ :'lease_id' => :'Integer',
121
+ :'notes_to_inspector' => :'String',
102
122
  :'number' => :'Integer',
103
123
  :'portfolio_id' => :'Integer',
104
124
  :'scheduled_date_and_time' => :'Time',
@@ -133,6 +153,10 @@ module Propertyware
133
153
  self.building_id = attributes[:'building_id']
134
154
  end
135
155
 
156
+ if attributes.key?(:'closed_date_and_time')
157
+ self.closed_date_and_time = attributes[:'closed_date_and_time']
158
+ end
159
+
136
160
  if attributes.key?(:'comment')
137
161
  self.comment = attributes[:'comment']
138
162
  end
@@ -159,6 +183,10 @@ module Propertyware
159
183
  end
160
184
  end
161
185
 
186
+ if attributes.key?(:'inspector_id')
187
+ self.inspector_id = attributes[:'inspector_id']
188
+ end
189
+
162
190
  if attributes.key?(:'last_modified_by')
163
191
  self.last_modified_by = attributes[:'last_modified_by']
164
192
  end
@@ -167,6 +195,14 @@ module Propertyware
167
195
  self.last_modified_date_time = attributes[:'last_modified_date_time']
168
196
  end
169
197
 
198
+ if attributes.key?(:'lease_id')
199
+ self.lease_id = attributes[:'lease_id']
200
+ end
201
+
202
+ if attributes.key?(:'notes_to_inspector')
203
+ self.notes_to_inspector = attributes[:'notes_to_inspector']
204
+ end
205
+
170
206
  if attributes.key?(:'number')
171
207
  self.number = attributes[:'number']
172
208
  end
@@ -211,14 +247,18 @@ module Propertyware
211
247
  return true if self.equal?(o)
212
248
  self.class == o.class &&
213
249
  building_id == o.building_id &&
250
+ closed_date_and_time == o.closed_date_and_time &&
214
251
  comment == o.comment &&
215
252
  created_by == o.created_by &&
216
253
  created_date_time == o.created_date_time &&
217
254
  id == o.id &&
218
255
  inspected_date_and_time == o.inspected_date_and_time &&
219
256
  inspection_areas == o.inspection_areas &&
257
+ inspector_id == o.inspector_id &&
220
258
  last_modified_by == o.last_modified_by &&
221
259
  last_modified_date_time == o.last_modified_date_time &&
260
+ lease_id == o.lease_id &&
261
+ notes_to_inspector == o.notes_to_inspector &&
222
262
  number == o.number &&
223
263
  portfolio_id == o.portfolio_id &&
224
264
  scheduled_date_and_time == o.scheduled_date_and_time &&
@@ -236,7 +276,7 @@ module Propertyware
236
276
  # Calculates hash code according to all attributes.
237
277
  # @return [Integer] Hash code
238
278
  def hash
239
- [building_id, comment, created_by, created_date_time, id, inspected_date_and_time, inspection_areas, last_modified_by, last_modified_date_time, number, portfolio_id, scheduled_date_and_time, status, template_name, type].hash
279
+ [building_id, closed_date_and_time, comment, created_by, created_date_time, id, inspected_date_and_time, inspection_areas, inspector_id, last_modified_by, last_modified_date_time, lease_id, notes_to_inspector, number, portfolio_id, scheduled_date_and_time, status, template_name, type].hash
240
280
  end
241
281
 
242
282
  # Builds the object from hash
@@ -211,30 +211,10 @@ module Propertyware
211
211
  invalid_properties.push('invalid value for "amount", amount cannot be nil.')
212
212
  end
213
213
 
214
- if @contact_id.nil?
215
- invalid_properties.push('invalid value for "contact_id", contact_id cannot be nil.')
216
- end
217
-
218
214
  if @date.nil?
219
215
  invalid_properties.push('invalid value for "date", date cannot be nil.')
220
216
  end
221
217
 
222
- if @destination_account_id.nil?
223
- invalid_properties.push('invalid value for "destination_account_id", destination_account_id cannot be nil.')
224
- end
225
-
226
- if @gl_account_id.nil?
227
- invalid_properties.push('invalid value for "gl_account_id", gl_account_id cannot be nil.')
228
- end
229
-
230
- if @payment_type.nil?
231
- invalid_properties.push('invalid value for "payment_type", payment_type cannot be nil.')
232
- end
233
-
234
- if @portfolio_id.nil?
235
- invalid_properties.push('invalid value for "portfolio_id", portfolio_id cannot be nil.')
236
- end
237
-
238
218
  invalid_properties
239
219
  end
240
220
 
@@ -242,14 +222,9 @@ module Propertyware
242
222
  # @return true if the model is valid
243
223
  def valid?
244
224
  return false if @amount.nil?
245
- return false if @contact_id.nil?
246
225
  return false if @date.nil?
247
- return false if @destination_account_id.nil?
248
- return false if @gl_account_id.nil?
249
- return false if @payment_type.nil?
250
226
  payment_type_validator = EnumAttributeValidator.new('String', ["CHECK", "CHECK21", "CASHIERS_CHECK", "CREDIT_CARD", "CASH", "MONEY_ORDER", "OTHER", "CLICKPAY", "SECTION8", "EPAY", "ECHECK", "NACHA", "RENTMONEY", "PUBLIC_ASSISTANCE"])
251
227
  return false unless payment_type_validator.valid?(@payment_type)
252
- return false if @portfolio_id.nil?
253
228
  true
254
229
  end
255
230
 
@@ -215,10 +215,6 @@ module Propertyware
215
215
  invalid_properties.push('invalid value for "date", date cannot be nil.')
216
216
  end
217
217
 
218
- if @gl_account_id.nil?
219
- invalid_properties.push('invalid value for "gl_account_id", gl_account_id cannot be nil.')
220
- end
221
-
222
218
  invalid_properties
223
219
  end
224
220
 
@@ -227,7 +223,6 @@ module Propertyware
227
223
  def valid?
228
224
  return false if @amount.nil?
229
225
  return false if @date.nil?
230
- return false if @gl_account_id.nil?
231
226
  payment_type_validator = EnumAttributeValidator.new('String', ["CHECK", "CHECK21", "CASHIERS_CHECK", "CREDIT_CARD", "CASH", "MONEY_ORDER", "OTHER", "CLICKPAY", "SECTION8", "EPAY", "ECHECK", "NACHA", "RENTMONEY", "PUBLIC_ASSISTANCE"])
232
227
  return false unless payment_type_validator.valid?(@payment_type)
233
228
  true
@@ -73,6 +73,9 @@ module Propertyware
73
73
  # Portfolio name.
74
74
  attr_accessor :name
75
75
 
76
+ # Portfolio Owner Statement Report ID
77
+ attr_accessor :owner_statement_report_id
78
+
76
79
  # List of portfolio owners.
77
80
  attr_accessor :owners
78
81
 
@@ -126,6 +129,7 @@ module Propertyware
126
129
  :'maintenance_spending_limit_time' => :'maintenanceSpendingLimitTime',
127
130
  :'modified_by' => :'modifiedBy',
128
131
  :'name' => :'name',
132
+ :'owner_statement_report_id' => :'ownerStatementReportID',
129
133
  :'owners' => :'owners',
130
134
  :'sticky_note' => :'stickyNote',
131
135
  :'target_operating_reserve' => :'targetOperatingReserve'
@@ -159,6 +163,7 @@ module Propertyware
159
163
  :'maintenance_spending_limit_time' => :'String',
160
164
  :'modified_by' => :'String',
161
165
  :'name' => :'String',
166
+ :'owner_statement_report_id' => :'Integer',
162
167
  :'owners' => :'Array<Owner>',
163
168
  :'sticky_note' => :'String',
164
169
  :'target_operating_reserve' => :'Float'
@@ -264,6 +269,10 @@ module Propertyware
264
269
  self.name = attributes[:'name']
265
270
  end
266
271
 
272
+ if attributes.key?(:'owner_statement_report_id')
273
+ self.owner_statement_report_id = attributes[:'owner_statement_report_id']
274
+ end
275
+
267
276
  if attributes.key?(:'owners')
268
277
  if (value = attributes[:'owners']).is_a?(Array)
269
278
  self.owners = value
@@ -340,6 +349,7 @@ module Propertyware
340
349
  maintenance_spending_limit_time == o.maintenance_spending_limit_time &&
341
350
  modified_by == o.modified_by &&
342
351
  name == o.name &&
352
+ owner_statement_report_id == o.owner_statement_report_id &&
343
353
  owners == o.owners &&
344
354
  sticky_note == o.sticky_note &&
345
355
  target_operating_reserve == o.target_operating_reserve
@@ -354,7 +364,7 @@ module Propertyware
354
364
  # Calculates hash code according to all attributes.
355
365
  # @return [Integer] Hash code
356
366
  def hash
357
- [abbreviation, active, cash_accrual, closing_date, created_by, created_date_time, custom_fields, default_bank_account_id, default_bank_account_number_and_description, default_security_deposit_bank_account_id, default_security_deposit_bank_account_number_and_description, do_not_pay_owner_draw, id, last_modified_by, last_modified_date_time, maintenance_spending_limit, maintenance_spending_limit_time, modified_by, name, owners, sticky_note, target_operating_reserve].hash
367
+ [abbreviation, active, cash_accrual, closing_date, created_by, created_date_time, custom_fields, default_bank_account_id, default_bank_account_number_and_description, default_security_deposit_bank_account_id, default_security_deposit_bank_account_number_and_description, do_not_pay_owner_draw, id, last_modified_by, last_modified_date_time, maintenance_spending_limit, maintenance_spending_limit_time, modified_by, name, owner_statement_report_id, owners, sticky_note, target_operating_reserve].hash
358
368
  end
359
369
 
360
370
  # Builds the object from hash
@@ -28,10 +28,10 @@ module Propertyware
28
28
  # Post date.
29
29
  attr_accessor :date
30
30
 
31
- # Id of the bank account to send the refund to.
31
+ # Id of the bank account to send the refund from.
32
32
  attr_accessor :destination_account_id
33
33
 
34
- # Id of the general ledger associated with the refund.
34
+ # Id of the general ledger account associated with the refund.
35
35
  attr_accessor :gl_account_id
36
36
 
37
37
  # Unique identifier.
@@ -193,26 +193,6 @@ module Propertyware
193
193
  invalid_properties.push('invalid value for "date", date cannot be nil.')
194
194
  end
195
195
 
196
- if @destination_account_id.nil?
197
- invalid_properties.push('invalid value for "destination_account_id", destination_account_id cannot be nil.')
198
- end
199
-
200
- if @gl_account_id.nil?
201
- invalid_properties.push('invalid value for "gl_account_id", gl_account_id cannot be nil.')
202
- end
203
-
204
- if @lease_id.nil?
205
- invalid_properties.push('invalid value for "lease_id", lease_id cannot be nil.')
206
- end
207
-
208
- if @payee_payer.nil?
209
- invalid_properties.push('invalid value for "payee_payer", payee_payer cannot be nil.')
210
- end
211
-
212
- if @to_be_printed.nil?
213
- invalid_properties.push('invalid value for "to_be_printed", to_be_printed cannot be nil.')
214
- end
215
-
216
196
  invalid_properties
217
197
  end
218
198
 
@@ -221,11 +201,6 @@ module Propertyware
221
201
  def valid?
222
202
  return false if @amount.nil?
223
203
  return false if @date.nil?
224
- return false if @destination_account_id.nil?
225
- return false if @gl_account_id.nil?
226
- return false if @lease_id.nil?
227
- return false if @payee_payer.nil?
228
- return false if @to_be_printed.nil?
229
204
  true
230
205
  end
231
206
 
@@ -25,10 +25,10 @@ module Propertyware
25
25
  # Lease Adjustment date.
26
26
  attr_accessor :date
27
27
 
28
- # Lease id.
28
+ # Id of the lease associated with the Adjustment.
29
29
  attr_accessor :lease_id
30
30
 
31
- # Ref No.
31
+ # Reference number.
32
32
  attr_accessor :ref_no
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.