moneykit 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +1 -1
  4. data/docs/AccessTokenApi.md +26 -21
  5. data/docs/AccountBalances.md +2 -2
  6. data/docs/AccountGroup.md +1 -1
  7. data/docs/AccountIdentity.md +2 -0
  8. data/docs/AccountImportData.md +26 -0
  9. data/docs/AccountResponse.md +28 -0
  10. data/docs/AccountWithAccountNumbersLegacy20230218.md +2 -0
  11. data/docs/Address.md +1 -1
  12. data/docs/AppClientResponse.md +2 -2
  13. data/docs/AppLinkStateChangedWebhook.md +36 -0
  14. data/docs/AppResponse.md +2 -2
  15. data/docs/Body.md +3 -3
  16. data/docs/CreateAccessTokenResponse.md +22 -0
  17. data/docs/CreateLinkSessionRequest.md +1 -1
  18. data/docs/CustomerUser.md +22 -0
  19. data/docs/CustomerUserEmail.md +20 -0
  20. data/docs/CustomerUserPhone.md +22 -0
  21. data/docs/Date.md +15 -0
  22. data/docs/Email.md +1 -1
  23. data/docs/GetAccountResponse.md +1 -1
  24. data/docs/GetAccountsResponse.md +1 -1
  25. data/docs/GetHoldingsResponse.md +1 -1
  26. data/docs/GetInvestmentTransactionsResponse.md +1 -1
  27. data/docs/GetTransactionsResponse.md +2 -2
  28. data/docs/GetUserTransactionsResponse.md +1 -1
  29. data/docs/ImportLinkRequest.md +26 -0
  30. data/docs/Institution.md +1 -1
  31. data/docs/LinkCommon.md +3 -3
  32. data/docs/LinkProductError.md +15 -0
  33. data/docs/LinkProductRefreshWebhook.md +2 -2
  34. data/docs/LinkProductResponse.md +28 -0
  35. data/docs/LinkProducts.md +7 -5
  36. data/docs/LinkResponse.md +3 -3
  37. data/docs/LinkSessionApi.md +1 -1
  38. data/docs/LinksApi.md +79 -9
  39. data/docs/PhoneNumber.md +1 -1
  40. data/docs/PublicLinkState.md +15 -0
  41. data/docs/Response401DeleteLinkLinksIdDelete.md +22 -0
  42. data/docs/Response401GetTransactionsSyncLinksIdTransactionsSyncGet.md +22 -0
  43. data/docs/Response401ImportLinkLinksImportPost.md +22 -0
  44. data/docs/ResponseHandleLinkWebhookEventRequestBodyWebhookPost.md +3 -3
  45. data/docs/TransactionCategoryResponse.md +20 -0
  46. data/docs/TransactionEnrichmentResponse.md +26 -0
  47. data/docs/TransactionImportData.md +28 -0
  48. data/docs/TransactionMerchantResponse.md +24 -0
  49. data/docs/TransactionProcessorResponse.md +24 -0
  50. data/docs/TransactionRecurrenceResponse.md +20 -0
  51. data/docs/TransactionResponse.md +42 -0
  52. data/docs/TransactionSubcategoryResponse.md +20 -0
  53. data/docs/TransactionSync.md +22 -0
  54. data/docs/TransactionSyncResponse.md +1 -1
  55. data/docs/TransactionUpdatesAvailableWebhook.md +4 -2
  56. data/docs/TransactionsApi.md +15 -15
  57. data/docs/TransactionsLinkProduct.md +1 -1
  58. data/lib/moneykit/api/access_token_api.rb +19 -16
  59. data/lib/moneykit/api/links_api.rb +75 -7
  60. data/lib/moneykit/api/transactions_api.rb +17 -17
  61. data/lib/moneykit/api_client.rb +1 -1
  62. data/lib/moneykit/models/account_balances.rb +2 -30
  63. data/lib/moneykit/models/account_group.rb +1 -1
  64. data/lib/moneykit/models/account_identity.rb +11 -1
  65. data/lib/moneykit/models/account_import_data.rb +280 -0
  66. data/lib/moneykit/models/account_response.rb +290 -0
  67. data/lib/moneykit/models/account_with_account_numbers_legacy20230218.rb +11 -1
  68. data/lib/moneykit/models/address.rb +0 -2
  69. data/lib/moneykit/models/app_client_response.rb +1 -1
  70. data/lib/moneykit/models/app_link_state_changed_webhook.rb +394 -0
  71. data/lib/moneykit/models/body.rb +1 -1
  72. data/lib/moneykit/models/create_access_token_response.rb +255 -0
  73. data/lib/moneykit/models/create_link_session_request.rb +1 -1
  74. data/lib/moneykit/models/customer_user.rb +266 -0
  75. data/lib/moneykit/models/customer_user_email.rb +258 -0
  76. data/lib/moneykit/models/customer_user_phone.rb +289 -0
  77. data/lib/moneykit/models/date.rb +104 -0
  78. data/lib/moneykit/models/email.rb +0 -2
  79. data/lib/moneykit/models/get_account_response.rb +1 -1
  80. data/lib/moneykit/models/get_accounts_response.rb +1 -1
  81. data/lib/moneykit/models/get_holdings_response.rb +1 -1
  82. data/lib/moneykit/models/get_investment_transactions_response.rb +1 -1
  83. data/lib/moneykit/models/get_transactions_response.rb +2 -2
  84. data/lib/moneykit/models/get_user_transactions_response.rb +1 -1
  85. data/lib/moneykit/models/import_link_request.rb +303 -0
  86. data/lib/moneykit/models/institution.rb +0 -7
  87. data/lib/moneykit/models/link_common.rb +3 -3
  88. data/lib/moneykit/models/link_product_error.rb +46 -0
  89. data/lib/moneykit/models/link_product_refresh_webhook.rb +24 -24
  90. data/lib/moneykit/models/link_product_response.rb +283 -0
  91. data/lib/moneykit/models/link_product_state.rb +3 -1
  92. data/lib/moneykit/models/link_products.rb +16 -7
  93. data/lib/moneykit/models/link_response.rb +3 -3
  94. data/lib/moneykit/models/phone_number.rb +0 -2
  95. data/lib/moneykit/models/product.rb +2 -1
  96. data/lib/moneykit/models/provider.rb +1 -2
  97. data/lib/moneykit/models/public_link_error.rb +1 -1
  98. data/lib/moneykit/models/public_link_state.rb +43 -0
  99. data/lib/moneykit/models/response401_delete_link_links_id_delete.rb +104 -0
  100. data/lib/moneykit/models/response401_get_transactions_sync_links_id_transactions_sync_get.rb +104 -0
  101. data/lib/moneykit/models/response401_import_link_links_import_post.rb +103 -0
  102. data/lib/moneykit/models/response_handle_link_webhook_event_request_body_webhook_post.rb +1 -1
  103. data/lib/moneykit/models/transaction_category_response.rb +230 -0
  104. data/lib/moneykit/models/transaction_enrichment_response.rb +255 -0
  105. data/lib/moneykit/models/transaction_import_data.rb +283 -0
  106. data/lib/moneykit/models/transaction_merchant_response.rb +243 -0
  107. data/lib/moneykit/models/transaction_processor_response.rb +243 -0
  108. data/lib/moneykit/models/transaction_recurrence_response.rb +223 -0
  109. data/lib/moneykit/models/transaction_response.rb +402 -0
  110. data/lib/moneykit/models/transaction_subcategory_response.rb +230 -0
  111. data/lib/moneykit/models/transaction_sync.rb +257 -0
  112. data/lib/moneykit/models/transaction_sync_response.rb +1 -1
  113. data/lib/moneykit/models/transaction_updates_available_webhook.rb +42 -24
  114. data/lib/moneykit/models/transactions_link_product.rb +1 -1
  115. data/lib/moneykit/version.rb +1 -1
  116. data/lib/moneykit.rb +25 -16
  117. data/spec/models/account_import_data_spec.rb +60 -0
  118. data/spec/models/account_response_spec.rb +66 -0
  119. data/spec/models/app_link_state_changed_webhook_spec.rb +102 -0
  120. data/spec/models/create_access_token_response_spec.rb +48 -0
  121. data/spec/models/customer_user_email_spec.rb +42 -0
  122. data/spec/models/customer_user_phone_spec.rb +48 -0
  123. data/spec/models/customer_user_spec.rb +48 -0
  124. data/spec/models/date_spec.rb +21 -0
  125. data/spec/models/import_link_request_spec.rb +60 -0
  126. data/spec/models/link_product_error_spec.rb +30 -0
  127. data/spec/models/link_product_response_spec.rb +66 -0
  128. data/spec/models/public_link_error_spec.rb +30 -0
  129. data/spec/models/public_link_state_spec.rb +30 -0
  130. data/spec/models/response401_delete_link_links_id_delete_spec.rb +21 -0
  131. data/spec/models/response401_get_transactions_sync_links_id_transactions_sync_get_spec.rb +21 -0
  132. data/spec/models/response401_import_link_links_import_post_spec.rb +21 -0
  133. data/spec/models/transaction_category_response_spec.rb +42 -0
  134. data/spec/models/transaction_enrichment_response_spec.rb +60 -0
  135. data/spec/models/transaction_import_data_spec.rb +66 -0
  136. data/spec/models/transaction_merchant_response_spec.rb +54 -0
  137. data/spec/models/transaction_processor_response_spec.rb +54 -0
  138. data/spec/models/transaction_recurrence_response_spec.rb +42 -0
  139. data/spec/models/transaction_response_spec.rb +108 -0
  140. data/spec/models/transaction_subcategory_response_spec.rb +42 -0
  141. data/spec/models/transaction_sync_spec.rb +48 -0
  142. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
  143. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  144. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/gem_make.out +5 -5
  145. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.1.1/mkmf.log +2 -2
  146. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
  147. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
  148. metadata +220 -122
@@ -5,7 +5,7 @@ All URIs are relative to *https://api.moneykit.com*
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
7
  | [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /links/{id}/transactions | /links/{id}/transactions |
8
- | [**get_transactions_diff**](TransactionsApi.md#get_transactions_diff) | **GET** /links/{id}/transactions/sync | /links/{id}/transactions/sync |
8
+ | [**get_transactions_sync**](TransactionsApi.md#get_transactions_sync) | **GET** /links/{id}/transactions/sync | /links/{id}/transactions/sync |
9
9
  | [**get_user_transactions**](TransactionsApi.md#get_user_transactions) | **GET** /users/{id}/transactions | /users/{id}/transactions |
10
10
 
11
11
 
@@ -32,10 +32,10 @@ api_instance = MoneyKit::TransactionsApi.new
32
32
  id = 'id_example' # String | The unique ID for this link.
33
33
  opts = {
34
34
  account_ids: ['inner_example'], # Array<String> | An optional list of account IDs to filter the results.
35
- page: 56, # Integer | The page number to return.
36
- size: 56, # Integer | The number of items to return per page.
37
35
  start_date: Date.parse('2013-10-20'), # Date | The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the `end_date`. <p>If you want to retrieve **all** transactions, use `1900-01-01`.
38
- end_date: Date.parse('2013-10-20') # Date | The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
36
+ end_date: Date.parse('2013-10-20'), # Date | The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
37
+ page: 56, # Integer | The page number to return.
38
+ size: 56 # Integer | The number of items to return per page.
39
39
  }
40
40
 
41
41
  begin
@@ -71,10 +71,10 @@ end
71
71
  | ---- | ---- | ----------- | ----- |
72
72
  | **id** | **String** | The unique ID for this link. | |
73
73
  | **account_ids** | [**Array&lt;String&gt;**](String.md) | An optional list of account IDs to filter the results. | [optional] |
74
- | **page** | **Integer** | The page number to return. | [optional][default to 1] |
75
- | **size** | **Integer** | The number of items to return per page. | [optional][default to 50] |
76
74
  | **start_date** | **Date** | The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the &#x60;end_date&#x60;. &lt;p&gt;If you want to retrieve **all** transactions, use &#x60;1900-01-01&#x60;. | [optional] |
77
75
  | **end_date** | **Date** | The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today. | [optional] |
76
+ | **page** | **Integer** | The page number to return. | [optional][default to 1] |
77
+ | **size** | **Integer** | The number of items to return per page. | [optional][default to 50] |
78
78
 
79
79
  ### Return type
80
80
 
@@ -90,13 +90,13 @@ end
90
90
  - **Accept**: application/json
91
91
 
92
92
 
93
- ## get_transactions_diff
93
+ ## get_transactions_sync
94
94
 
95
- > <TransactionSyncResponse> get_transactions_diff(id, opts)
95
+ > <TransactionSyncResponse> get_transactions_sync(id, opts)
96
96
 
97
97
  /links/{id}/transactions/sync
98
98
 
99
- Provides a paginated feed of transactions, grouped into `created`, `updated`, and `removed` lists. <p>Each call will also return a `cursor.next` value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. <p>Large numbers of transactions will be paginated, and the `has_more` field will be true. You should continue calling this endpoint with each new `cursor.next` value until `has_more` is false. <p>**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because `prefetch` was requested when the link was created, or because of scheduled or on-demand updates. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>Note also that the `transactions.updates_available` webhook will alert you when new data is available.
99
+ Provides a paginated feed of transactions, grouped into `created`, `updated`, and `removed` lists. <p>Each call will also return a `cursor.next` value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. <p>**Pending** transactions will only be reported as `created`. Pending transactions are completely removed and replaced with each transaction refresh or update; no attempt is made to track their removal or modification. <p>Large numbers of transactions will be paginated, and the `has_more` field will be true. You should continue calling this endpoint with each new `cursor.next` value until `has_more` is false. <p>**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because `prefetch` was requested when the link was created, or because of scheduled or on-demand updates. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>Note also that the `transactions.updates_available` webhook will alert you when new data is available.
100
100
 
101
101
  ### Examples
102
102
 
@@ -118,28 +118,28 @@ opts = {
118
118
 
119
119
  begin
120
120
  # /links/{id}/transactions/sync
121
- result = api_instance.get_transactions_diff(id, opts)
121
+ result = api_instance.get_transactions_sync(id, opts)
122
122
  p result
123
123
  rescue MoneyKit::ApiError => e
124
- puts "Error when calling TransactionsApi->get_transactions_diff: #{e}"
124
+ puts "Error when calling TransactionsApi->get_transactions_sync: #{e}"
125
125
  end
126
126
  ```
127
127
 
128
- #### Using the get_transactions_diff_with_http_info variant
128
+ #### Using the get_transactions_sync_with_http_info variant
129
129
 
130
130
  This returns an Array which contains the response data, status code and headers.
131
131
 
132
- > <Array(<TransactionSyncResponse>, Integer, Hash)> get_transactions_diff_with_http_info(id, opts)
132
+ > <Array(<TransactionSyncResponse>, Integer, Hash)> get_transactions_sync_with_http_info(id, opts)
133
133
 
134
134
  ```ruby
135
135
  begin
136
136
  # /links/{id}/transactions/sync
137
- data, status_code, headers = api_instance.get_transactions_diff_with_http_info(id, opts)
137
+ data, status_code, headers = api_instance.get_transactions_sync_with_http_info(id, opts)
138
138
  p status_code # => 2xx
139
139
  p headers # => { ... }
140
140
  p data # => <TransactionSyncResponse>
141
141
  rescue MoneyKit::ApiError => e
142
- puts "Error when calling TransactionsApi->get_transactions_diff_with_http_info: #{e}"
142
+ puts "Error when calling TransactionsApi->get_transactions_sync_with_http_info: #{e}"
143
143
  end
144
144
  ```
145
145
 
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **refreshed_at** | **Time** | An ISO-8601 timestamp indicating the last time that the product was updated. | [optional] |
8
8
  | **last_attempted_at** | **Time** | An ISO-8601 timestamp indicating the last time that the product was attempted. | [optional] |
9
- | **error_code** | [**LinkProductFailureReasons**](LinkProductFailureReasons.md) | | [optional] |
9
+ | **error_code** | [**LinkProductError**](LinkProductError.md) | | [optional] |
10
10
  | **error_message** | **String** | The error message, if the last attempt to refresh the product failed. | [optional] |
11
11
  | **unavailable** | **String** | If this product can&#39;t currently be updated, the reason why it is unavailable. &lt;p&gt;Unavailable products can&#39;t be refreshed, but past data, if any, is still accessible. | [optional] |
12
12
  | **settings** | [**TransactionsProductSettings**](TransactionsProductSettings.md) | | [optional] |
@@ -26,9 +26,9 @@ module MoneyKit
26
26
  # @option opts [String] :scope Actions to be allowed for this token, given as one or more strings separated by spaces. If omitted, all actions allowed for your application will be granted to this token. (default to '')
27
27
  # @option opts [String] :client_id Your application&#39;s MoneyKit client ID.
28
28
  # @option opts [String] :client_secret Your application&#39;s MoneyKit client secret.
29
- # @return [GenerateAccessTokenResponse]
30
- def generate_access_token(opts = {})
31
- data, _status_code, _headers = generate_access_token_with_http_info(opts)
29
+ # @return [CreateAccessTokenResponse]
30
+ def create_access_token(opts = {})
31
+ data, _status_code, _headers = create_access_token_with_http_info(opts)
32
32
  data
33
33
  end
34
34
 
@@ -39,14 +39,14 @@ module MoneyKit
39
39
  # @option opts [String] :scope Actions to be allowed for this token, given as one or more strings separated by spaces. If omitted, all actions allowed for your application will be granted to this token. (default to '')
40
40
  # @option opts [String] :client_id Your application&#39;s MoneyKit client ID.
41
41
  # @option opts [String] :client_secret Your application&#39;s MoneyKit client secret.
42
- # @return [Array<(GenerateAccessTokenResponse, Integer, Hash)>] GenerateAccessTokenResponse data, response status code and response headers
43
- def generate_access_token_with_http_info(opts = {})
42
+ # @return [Array<(CreateAccessTokenResponse, Integer, Hash)>] CreateAccessTokenResponse data, response status code and response headers
43
+ def create_access_token_with_http_info(opts = {})
44
44
  if @api_client.config.debugging
45
- @api_client.config.logger.debug 'Calling API: AccessTokenApi.generate_access_token ...'
45
+ @api_client.config.logger.debug 'Calling API: AccessTokenApi.create_access_token ...'
46
46
  end
47
47
  pattern = Regexp.new(/^(client_credentials|refresh_token)$/)
48
48
  if @api_client.config.client_side_validation && !opts[:'grant_type'].nil? && opts[:'grant_type'] !~ pattern
49
- fail ArgumentError, "invalid value for 'opts[:\"grant_type\"]' when calling AccessTokenApi.generate_access_token, must conform to the pattern #{pattern}."
49
+ fail ArgumentError, "invalid value for 'opts[:\"grant_type\"]' when calling AccessTokenApi.create_access_token, must conform to the pattern #{pattern}."
50
50
  end
51
51
 
52
52
  # resource path
@@ -76,13 +76,13 @@ module MoneyKit
76
76
  post_body = opts[:debug_body]
77
77
 
78
78
  # return_type
79
- return_type = opts[:debug_return_type] || 'GenerateAccessTokenResponse'
79
+ return_type = opts[:debug_return_type] || 'CreateAccessTokenResponse'
80
80
 
81
81
  # auth_names
82
82
  auth_names = opts[:debug_auth_names] || ['HTTPBasic']
83
83
 
84
84
  new_options = opts.merge(
85
- :operation => :"AccessTokenApi.generate_access_token",
85
+ :operation => :"AccessTokenApi.create_access_token",
86
86
  :header_params => header_params,
87
87
  :query_params => query_params,
88
88
  :form_params => form_params,
@@ -93,7 +93,7 @@ module MoneyKit
93
93
 
94
94
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
95
95
  if @api_client.config.debugging
96
- @api_client.config.logger.debug "API called: AccessTokenApi#generate_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
96
+ @api_client.config.logger.debug "API called: AccessTokenApi#create_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
97
  end
98
98
  return data, status_code, headers
99
99
  end
@@ -101,19 +101,21 @@ module MoneyKit
101
101
  # JSON Web Key Set
102
102
  # The JSON Web Key Set (JWKS) is a set of keys containing the public keys used to verify webhook JSON Web Tokens (JWT) issued by MoneyKit webhooks.
103
103
  # @param [Hash] opts the optional parameters
104
+ # @option opts [String] :x_client_id Your client ID.
104
105
  # @return [JWKSet]
105
- def get_well_known_jwks(opts = {})
106
- data, _status_code, _headers = get_well_known_jwks_with_http_info(opts)
106
+ def get_app_jwks(opts = {})
107
+ data, _status_code, _headers = get_app_jwks_with_http_info(opts)
107
108
  data
108
109
  end
109
110
 
110
111
  # JSON Web Key Set
111
112
  # The JSON Web Key Set (JWKS) is a set of keys containing the public keys used to verify webhook JSON Web Tokens (JWT) issued by MoneyKit webhooks.
112
113
  # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :x_client_id Your client ID.
113
115
  # @return [Array<(JWKSet, Integer, Hash)>] JWKSet data, response status code and response headers
114
- def get_well_known_jwks_with_http_info(opts = {})
116
+ def get_app_jwks_with_http_info(opts = {})
115
117
  if @api_client.config.debugging
116
- @api_client.config.logger.debug 'Calling API: AccessTokenApi.get_well_known_jwks ...'
118
+ @api_client.config.logger.debug 'Calling API: AccessTokenApi.get_app_jwks ...'
117
119
  end
118
120
  # resource path
119
121
  local_var_path = '/.well-known/jwks.json'
@@ -125,6 +127,7 @@ module MoneyKit
125
127
  header_params = opts[:header_params] || {}
126
128
  # HTTP header 'Accept' (if needed)
127
129
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
130
+ header_params[:'X-Client-Id'] = opts[:'x_client_id'] if !opts[:'x_client_id'].nil?
128
131
 
129
132
  # form parameters
130
133
  form_params = opts[:form_params] || {}
@@ -139,7 +142,7 @@ module MoneyKit
139
142
  auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials']
140
143
 
141
144
  new_options = opts.merge(
142
- :operation => :"AccessTokenApi.get_well_known_jwks",
145
+ :operation => :"AccessTokenApi.get_app_jwks",
143
146
  :header_params => header_params,
144
147
  :query_params => query_params,
145
148
  :form_params => form_params,
@@ -150,7 +153,7 @@ module MoneyKit
150
153
 
151
154
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
152
155
  if @api_client.config.debugging
153
- @api_client.config.logger.debug "API called: AccessTokenApi#get_well_known_jwks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
+ @api_client.config.logger.debug "API called: AccessTokenApi#get_app_jwks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
157
  end
155
158
  return data, status_code, headers
156
159
  end
@@ -24,8 +24,8 @@ module MoneyKit
24
24
  # @param id [String] The unique ID for this link.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @return [nil]
27
- def disconnect(id, opts = {})
28
- disconnect_with_http_info(id, opts)
27
+ def delete_link(id, opts = {})
28
+ delete_link_with_http_info(id, opts)
29
29
  nil
30
30
  end
31
31
 
@@ -34,13 +34,13 @@ module MoneyKit
34
34
  # @param id [String] The unique ID for this link.
35
35
  # @param [Hash] opts the optional parameters
36
36
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
- def disconnect_with_http_info(id, opts = {})
37
+ def delete_link_with_http_info(id, opts = {})
38
38
  if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: LinksApi.disconnect ...'
39
+ @api_client.config.logger.debug 'Calling API: LinksApi.delete_link ...'
40
40
  end
41
41
  # verify the required parameter 'id' is set
42
42
  if @api_client.config.client_side_validation && id.nil?
43
- fail ArgumentError, "Missing the required parameter 'id' when calling LinksApi.disconnect"
43
+ fail ArgumentError, "Missing the required parameter 'id' when calling LinksApi.delete_link"
44
44
  end
45
45
  # resource path
46
46
  local_var_path = '/links/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
@@ -66,7 +66,7 @@ module MoneyKit
66
66
  auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials']
67
67
 
68
68
  new_options = opts.merge(
69
- :operation => :"LinksApi.disconnect",
69
+ :operation => :"LinksApi.delete_link",
70
70
  :header_params => header_params,
71
71
  :query_params => query_params,
72
72
  :form_params => form_params,
@@ -77,7 +77,7 @@ module MoneyKit
77
77
 
78
78
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
79
79
  if @api_client.config.debugging
80
- @api_client.config.logger.debug "API called: LinksApi#disconnect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
+ @api_client.config.logger.debug "API called: LinksApi#delete_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
81
  end
82
82
  return data, status_code, headers
83
83
  end
@@ -208,6 +208,74 @@ module MoneyKit
208
208
  return data, status_code, headers
209
209
  end
210
210
 
211
+ # /links/import
212
+ # Creates a new link with pre-populated accounts and transactions. The new link will be created in an initially `disconnected` state, with an error code of `auth_expired`, but all data will be available. As with any disconnected link, the imported link can then be reconnected at any time by starting a new <a href=#operation/create_link_session>/link-session</a> with `existing_link_id` set to the link's `link_id`. Note that the link can be reconnected using any suitable provider.
213
+ # @param import_link_request [ImportLinkRequest]
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [LinkResponse]
216
+ def import_link(import_link_request, opts = {})
217
+ data, _status_code, _headers = import_link_with_http_info(import_link_request, opts)
218
+ data
219
+ end
220
+
221
+ # /links/import
222
+ # Creates a new link with pre-populated accounts and transactions. The new link will be created in an initially &#x60;disconnected&#x60; state, with an error code of &#x60;auth_expired&#x60;, but all data will be available. As with any disconnected link, the imported link can then be reconnected at any time by starting a new &lt;a href&#x3D;#operation/create_link_session&gt;/link-session&lt;/a&gt; with &#x60;existing_link_id&#x60; set to the link&#39;s &#x60;link_id&#x60;. Note that the link can be reconnected using any suitable provider.
223
+ # @param import_link_request [ImportLinkRequest]
224
+ # @param [Hash] opts the optional parameters
225
+ # @return [Array<(LinkResponse, Integer, Hash)>] LinkResponse data, response status code and response headers
226
+ def import_link_with_http_info(import_link_request, opts = {})
227
+ if @api_client.config.debugging
228
+ @api_client.config.logger.debug 'Calling API: LinksApi.import_link ...'
229
+ end
230
+ # verify the required parameter 'import_link_request' is set
231
+ if @api_client.config.client_side_validation && import_link_request.nil?
232
+ fail ArgumentError, "Missing the required parameter 'import_link_request' when calling LinksApi.import_link"
233
+ end
234
+ # resource path
235
+ local_var_path = '/links/import'
236
+
237
+ # query parameters
238
+ query_params = opts[:query_params] || {}
239
+
240
+ # header parameters
241
+ header_params = opts[:header_params] || {}
242
+ # HTTP header 'Accept' (if needed)
243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
244
+ # HTTP header 'Content-Type'
245
+ content_type = @api_client.select_header_content_type(['application/json'])
246
+ if !content_type.nil?
247
+ header_params['Content-Type'] = content_type
248
+ end
249
+
250
+ # form parameters
251
+ form_params = opts[:form_params] || {}
252
+
253
+ # http body (model)
254
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(import_link_request)
255
+
256
+ # return_type
257
+ return_type = opts[:debug_return_type] || 'LinkResponse'
258
+
259
+ # auth_names
260
+ auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials']
261
+
262
+ new_options = opts.merge(
263
+ :operation => :"LinksApi.import_link",
264
+ :header_params => header_params,
265
+ :query_params => query_params,
266
+ :form_params => form_params,
267
+ :body => post_body,
268
+ :auth_names => auth_names,
269
+ :return_type => return_type
270
+ )
271
+
272
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
273
+ if @api_client.config.debugging
274
+ @api_client.config.logger.debug "API called: LinksApi#import_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
+ end
276
+ return data, status_code, headers
277
+ end
278
+
211
279
  # Force a \"relink required\" state on a link (Test only).
212
280
  # @param id [String] The unique ID for this link.
213
281
  # @param [Hash] opts the optional parameters
@@ -24,10 +24,10 @@ module MoneyKit
24
24
  # @param id [String] The unique ID for this link.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [Array<String>] :account_ids An optional list of account IDs to filter the results.
27
- # @option opts [Integer] :page The page number to return. (default to 1)
28
- # @option opts [Integer] :size The number of items to return per page. (default to 50)
29
27
  # @option opts [Date] :start_date The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the &#x60;end_date&#x60;. &lt;p&gt;If you want to retrieve **all** transactions, use &#x60;1900-01-01&#x60;.
30
28
  # @option opts [Date] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
29
+ # @option opts [Integer] :page The page number to return. (default to 1)
30
+ # @option opts [Integer] :size The number of items to return per page. (default to 50)
31
31
  # @return [GetTransactionsResponse]
32
32
  def get_transactions(id, opts = {})
33
33
  data, _status_code, _headers = get_transactions_with_http_info(id, opts)
@@ -39,10 +39,10 @@ module MoneyKit
39
39
  # @param id [String] The unique ID for this link.
40
40
  # @param [Hash] opts the optional parameters
41
41
  # @option opts [Array<String>] :account_ids An optional list of account IDs to filter the results.
42
- # @option opts [Integer] :page The page number to return. (default to 1)
43
- # @option opts [Integer] :size The number of items to return per page. (default to 50)
44
42
  # @option opts [Date] :start_date The earliest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to 90 days before the &#x60;end_date&#x60;. &lt;p&gt;If you want to retrieve **all** transactions, use &#x60;1900-01-01&#x60;.
45
43
  # @option opts [Date] :end_date The latest date for which data should be returned, formatted as YYYY-MM-DD. Defaults to today.
44
+ # @option opts [Integer] :page The page number to return. (default to 1)
45
+ # @option opts [Integer] :size The number of items to return per page. (default to 50)
46
46
  # @return [Array<(GetTransactionsResponse, Integer, Hash)>] GetTransactionsResponse data, response status code and response headers
47
47
  def get_transactions_with_http_info(id, opts = {})
48
48
  if @api_client.config.debugging
@@ -70,10 +70,10 @@ module MoneyKit
70
70
  # query parameters
71
71
  query_params = opts[:query_params] || {}
72
72
  query_params[:'account_ids'] = @api_client.build_collection_param(opts[:'account_ids'], :multi) if !opts[:'account_ids'].nil?
73
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
74
- query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
75
73
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
76
74
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
75
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
76
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
77
77
 
78
78
  # header parameters
79
79
  header_params = opts[:header_params] || {}
@@ -110,38 +110,38 @@ module MoneyKit
110
110
  end
111
111
 
112
112
  # /links/{id}/transactions/sync
113
- # Provides a paginated feed of transactions, grouped into `created`, `updated`, and `removed` lists. <p>Each call will also return a `cursor.next` value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. <p>Large numbers of transactions will be paginated, and the `has_more` field will be true. You should continue calling this endpoint with each new `cursor.next` value until `has_more` is false. <p>**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because `prefetch` was requested when the link was created, or because of scheduled or on-demand updates. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>Note also that the `transactions.updates_available` webhook will alert you when new data is available.
113
+ # Provides a paginated feed of transactions, grouped into `created`, `updated`, and `removed` lists. <p>Each call will also return a `cursor.next` value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. <p>**Pending** transactions will only be reported as `created`. Pending transactions are completely removed and replaced with each transaction refresh or update; no attempt is made to track their removal or modification. <p>Large numbers of transactions will be paginated, and the `has_more` field will be true. You should continue calling this endpoint with each new `cursor.next` value until `has_more` is false. <p>**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because `prefetch` was requested when the link was created, or because of scheduled or on-demand updates. <p>MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the <a href=#operation/refresh_products>/products</a> endpoint.** <p>Note also that the `transactions.updates_available` webhook will alert you when new data is available.
114
114
  # @param id [String] The unique ID for this link.
115
115
  # @param [Hash] opts the optional parameters
116
116
  # @option opts [String] :cursor A cursor value representing the last update requested. If included, the response will only return changes after this update. If omitted, a complete history of updates will be returned. This value must be stored by the client as we do not keep track of app cursors.
117
117
  # @option opts [Integer] :size The number of items to return. (default to 50)
118
118
  # @return [TransactionSyncResponse]
119
- def get_transactions_diff(id, opts = {})
120
- data, _status_code, _headers = get_transactions_diff_with_http_info(id, opts)
119
+ def get_transactions_sync(id, opts = {})
120
+ data, _status_code, _headers = get_transactions_sync_with_http_info(id, opts)
121
121
  data
122
122
  end
123
123
 
124
124
  # /links/{id}/transactions/sync
125
- # Provides a paginated feed of transactions, grouped into &#x60;created&#x60;, &#x60;updated&#x60;, and &#x60;removed&#x60; lists. &lt;p&gt;Each call will also return a &#x60;cursor.next&#x60; value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. &lt;p&gt;Large numbers of transactions will be paginated, and the &#x60;has_more&#x60; field will be true. You should continue calling this endpoint with each new &#x60;cursor.next&#x60; value until &#x60;has_more&#x60; is false. &lt;p&gt;**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because &#x60;prefetch&#x60; was requested when the link was created, or because of scheduled or on-demand updates. &lt;p&gt;MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the &lt;a href&#x3D;#operation/refresh_products&gt;/products&lt;/a&gt; endpoint.** &lt;p&gt;Note also that the &#x60;transactions.updates_available&#x60; webhook will alert you when new data is available.
125
+ # Provides a paginated feed of transactions, grouped into &#x60;created&#x60;, &#x60;updated&#x60;, and &#x60;removed&#x60; lists. &lt;p&gt;Each call will also return a &#x60;cursor.next&#x60; value. In subsequent calls, include that value to receive only changes that have occurred since the previous call. &lt;p&gt;**Pending** transactions will only be reported as &#x60;created&#x60;. Pending transactions are completely removed and replaced with each transaction refresh or update; no attempt is made to track their removal or modification. &lt;p&gt;Large numbers of transactions will be paginated, and the &#x60;has_more&#x60; field will be true. You should continue calling this endpoint with each new &#x60;cursor.next&#x60; value until &#x60;has_more&#x60; is false. &lt;p&gt;**Note** that this endpoint does **not** trigger a fetch of transactions from the institution; it merely returns transactions that have already been fetched, either because &#x60;prefetch&#x60; was requested when the link was created, or because of scheduled or on-demand updates. &lt;p&gt;MoneyKit checks for updated account data, including transactions, periodically throughout the day, but the update frequency can vary, depending on the downstream data provider, the institution, and whether one or both provide webhook-based updates. **To force a check for updated transactions, you can use the &lt;a href&#x3D;#operation/refresh_products&gt;/products&lt;/a&gt; endpoint.** &lt;p&gt;Note also that the &#x60;transactions.updates_available&#x60; webhook will alert you when new data is available.
126
126
  # @param id [String] The unique ID for this link.
127
127
  # @param [Hash] opts the optional parameters
128
128
  # @option opts [String] :cursor A cursor value representing the last update requested. If included, the response will only return changes after this update. If omitted, a complete history of updates will be returned. This value must be stored by the client as we do not keep track of app cursors.
129
129
  # @option opts [Integer] :size The number of items to return. (default to 50)
130
130
  # @return [Array<(TransactionSyncResponse, Integer, Hash)>] TransactionSyncResponse data, response status code and response headers
131
- def get_transactions_diff_with_http_info(id, opts = {})
131
+ def get_transactions_sync_with_http_info(id, opts = {})
132
132
  if @api_client.config.debugging
133
- @api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_diff ...'
133
+ @api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_sync ...'
134
134
  end
135
135
  # verify the required parameter 'id' is set
136
136
  if @api_client.config.client_side_validation && id.nil?
137
- fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_transactions_diff"
137
+ fail ArgumentError, "Missing the required parameter 'id' when calling TransactionsApi.get_transactions_sync"
138
138
  end
139
139
  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 500
140
- fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_diff, must be smaller than or equal to 500.'
140
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_sync, must be smaller than or equal to 500.'
141
141
  end
142
142
 
143
143
  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
144
- fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_diff, must be greater than or equal to 1.'
144
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling TransactionsApi.get_transactions_sync, must be greater than or equal to 1.'
145
145
  end
146
146
 
147
147
  # resource path
@@ -170,7 +170,7 @@ module MoneyKit
170
170
  auth_names = opts[:debug_auth_names] || ['OAuth2ClientCredentials']
171
171
 
172
172
  new_options = opts.merge(
173
- :operation => :"TransactionsApi.get_transactions_diff",
173
+ :operation => :"TransactionsApi.get_transactions_sync",
174
174
  :header_params => header_params,
175
175
  :query_params => query_params,
176
176
  :form_params => form_params,
@@ -181,7 +181,7 @@ module MoneyKit
181
181
 
182
182
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
183
183
  if @api_client.config.debugging
184
- @api_client.config.logger.debug "API called: TransactionsApi#get_transactions_diff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ @api_client.config.logger.debug "API called: TransactionsApi#get_transactions_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
185
  end
186
186
  return data, status_code, headers
187
187
  end
@@ -302,7 +302,7 @@ module MoneyKit
302
302
  Time.parse data
303
303
  when 'Date'
304
304
  # parse date time (expecting ISO 8601 format)
305
- Date.parse data
305
+ ::Date.parse data
306
306
  when 'Object'
307
307
  # generic object (usually a Hash), return directly
308
308
  data
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module MoneyKit
17
17
  class AccountBalances
18
+ # A three-character currency code (ISO-4217 or similar, *e.g.*, `USD`, `CAD`) for the account balances.
18
19
  attr_accessor :currency
19
20
 
20
21
  # The amount of funds available for use. Not all institutions report the available balance. <p>Note that the available balance typically does not include overdraft limits.
@@ -29,28 +30,6 @@ module MoneyKit
29
30
  # The date that the balance was captured at. This may not include a time. When this field is null, the balance was captured at an unknown time.
30
31
  attr_accessor :balance_date
31
32
 
32
- class EnumAttributeValidator
33
- attr_reader :datatype
34
- attr_reader :allowable_values
35
-
36
- def initialize(datatype, allowable_values)
37
- @allowable_values = allowable_values.map do |value|
38
- case datatype.to_s
39
- when /Integer/i
40
- value.to_i
41
- when /Float/i
42
- value.to_f
43
- else
44
- value
45
- end
46
- end
47
- end
48
-
49
- def valid?(value)
50
- !value || allowable_values.include?(value)
51
- end
52
- end
53
-
54
33
  # Attribute mapping from ruby-style variable name to JSON key.
55
34
  def self.attribute_map
56
35
  {
@@ -70,7 +49,7 @@ module MoneyKit
70
49
  # Attribute type mapping.
71
50
  def self.openapi_types
72
51
  {
73
- :'currency' => :'Currency',
52
+ :'currency' => :'String',
74
53
  :'available' => :'Float',
75
54
  :'current' => :'Float',
76
55
  :'limit' => :'Float',
@@ -101,8 +80,6 @@ module MoneyKit
101
80
 
102
81
  if attributes.key?(:'currency')
103
82
  self.currency = attributes[:'currency']
104
- else
105
- self.currency = nil
106
83
  end
107
84
 
108
85
  if attributes.key?(:'available')
@@ -127,10 +104,6 @@ module MoneyKit
127
104
  def list_invalid_properties
128
105
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
106
  invalid_properties = Array.new
130
- if @currency.nil?
131
- invalid_properties.push('invalid value for "currency", currency cannot be nil.')
132
- end
133
-
134
107
  invalid_properties
135
108
  end
136
109
 
@@ -138,7 +111,6 @@ module MoneyKit
138
111
  # @return true if the model is valid
139
112
  def valid?
140
113
  warn '[DEPRECATED] the `valid?` method is obsolete'
141
- return false if @currency.nil?
142
114
  true
143
115
  end
144
116
 
@@ -36,7 +36,7 @@ module MoneyKit
36
36
  # Attribute type mapping.
37
37
  def self.openapi_types
38
38
  {
39
- :'accounts' => :'Array<Account>',
39
+ :'accounts' => :'Array<AccountResponse>',
40
40
  :'last_synced_at' => :'Time'
41
41
  }
42
42
  end
@@ -29,6 +29,9 @@ module MoneyKit
29
29
 
30
30
  attr_accessor :balances
31
31
 
32
+ # The original ID of this account, if supplied (by you) during an import.
33
+ attr_accessor :original_id
34
+
32
35
  attr_accessor :owners
33
36
 
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -39,6 +42,7 @@ module MoneyKit
39
42
  :'name' => :'name',
40
43
  :'account_mask' => :'account_mask',
41
44
  :'balances' => :'balances',
45
+ :'original_id' => :'original_id',
42
46
  :'owners' => :'owners'
43
47
  }
44
48
  end
@@ -56,6 +60,7 @@ module MoneyKit
56
60
  :'name' => :'String',
57
61
  :'account_mask' => :'String',
58
62
  :'balances' => :'AccountBalances',
63
+ :'original_id' => :'String',
59
64
  :'owners' => :'Array<Owner>'
60
65
  }
61
66
  end
@@ -109,6 +114,10 @@ module MoneyKit
109
114
  self.balances = nil
110
115
  end
111
116
 
117
+ if attributes.key?(:'original_id')
118
+ self.original_id = attributes[:'original_id']
119
+ end
120
+
112
121
  if attributes.key?(:'owners')
113
122
  if (value = attributes[:'owners']).is_a?(Array)
114
123
  self.owners = value
@@ -168,6 +177,7 @@ module MoneyKit
168
177
  name == o.name &&
169
178
  account_mask == o.account_mask &&
170
179
  balances == o.balances &&
180
+ original_id == o.original_id &&
171
181
  owners == o.owners
172
182
  end
173
183
 
@@ -180,7 +190,7 @@ module MoneyKit
180
190
  # Calculates hash code according to all attributes.
181
191
  # @return [Integer] Hash code
182
192
  def hash
183
- [account_id, account_type, name, account_mask, balances, owners].hash
193
+ [account_id, account_type, name, account_mask, balances, original_id, owners].hash
184
194
  end
185
195
 
186
196
  # Builds the object from hash