atrium-ruby 1.3.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +5 -2
  3. data/README.md +132 -66
  4. data/Rakefile +7 -4
  5. data/atrium-ruby.gemspec +40 -32
  6. data/docs/Account.md +35 -0
  7. data/docs/AccountNumber.md +12 -0
  8. data/docs/AccountNumbersResponseBody.md +8 -0
  9. data/docs/AccountOwner.md +18 -0
  10. data/docs/AccountOwnersResponseBody.md +8 -0
  11. data/docs/AccountResponseBody.md +8 -0
  12. data/docs/AccountsApi.md +174 -0
  13. data/docs/AccountsResponseBody.md +9 -0
  14. data/docs/Challenge.md +13 -0
  15. data/docs/ChallengeOption.md +10 -0
  16. data/docs/ChallengesResponseBody.md +8 -0
  17. data/docs/ConnectWidget.md +9 -0
  18. data/docs/ConnectWidgetApi.md +44 -0
  19. data/docs/ConnectWidgetRequestBody.md +11 -0
  20. data/docs/ConnectWidgetResponseBody.md +8 -0
  21. data/docs/CredentialOption.md +9 -0
  22. data/docs/CredentialRequest.md +9 -0
  23. data/docs/CredentialResponse.md +12 -0
  24. data/docs/CredentialsResponseBody.md +8 -0
  25. data/docs/IdentityApi.md +82 -0
  26. data/docs/Institution.md +14 -0
  27. data/docs/InstitutionResponseBody.md +8 -0
  28. data/docs/InstitutionsApi.md +120 -0
  29. data/docs/InstitutionsResponseBody.md +9 -0
  30. data/docs/Member.md +18 -0
  31. data/docs/MemberConnectionStatus.md +16 -0
  32. data/docs/MemberConnectionStatusResponseBody.md +8 -0
  33. data/docs/MemberCreateRequest.md +11 -0
  34. data/docs/MemberCreateRequestBody.md +8 -0
  35. data/docs/MemberResponseBody.md +8 -0
  36. data/docs/MemberResumeRequest.md +8 -0
  37. data/docs/MemberResumeRequestBody.md +8 -0
  38. data/docs/MemberUpdateRequest.md +10 -0
  39. data/docs/MemberUpdateRequestBody.md +8 -0
  40. data/docs/MembersApi.md +487 -0
  41. data/docs/MembersResponseBody.md +9 -0
  42. data/docs/Pagination.md +11 -0
  43. data/docs/Transaction.md +38 -0
  44. data/docs/TransactionCleanseAndCategorizeRequest.md +11 -0
  45. data/docs/TransactionCleanseAndCategorizeResponse.md +20 -0
  46. data/docs/TransactionResponseBody.md +8 -0
  47. data/docs/TransactionsApi.md +126 -0
  48. data/docs/TransactionsCleanseAndCategorizeRequestBody.md +8 -0
  49. data/docs/TransactionsCleanseAndCategorizeResponseBody.md +8 -0
  50. data/docs/TransactionsResponseBody.md +9 -0
  51. data/docs/User.md +11 -0
  52. data/docs/UserCreateRequestBody.md +8 -0
  53. data/docs/UserResponseBody.md +8 -0
  54. data/docs/UserUpdateRequestBody.md +8 -0
  55. data/docs/UsersApi.md +193 -0
  56. data/docs/UsersResponseBody.md +9 -0
  57. data/docs/VerificationApi.md +120 -0
  58. data/git_push.sh +49 -0
  59. data/lib/atrium-ruby.rb +88 -0
  60. data/lib/atrium-ruby/api/accounts_api.rb +272 -0
  61. data/lib/atrium-ruby/api/atrium_client.rb +28 -0
  62. data/lib/atrium-ruby/api/connect_widget_api.rb +82 -0
  63. data/lib/atrium-ruby/api/identity_api.rb +140 -0
  64. data/lib/atrium-ruby/api/institutions_api.rb +181 -0
  65. data/lib/atrium-ruby/api/members_api.rb +749 -0
  66. data/lib/atrium-ruby/api/transactions_api.rb +198 -0
  67. data/lib/atrium-ruby/api/users_api.rb +287 -0
  68. data/lib/atrium-ruby/api/verification_api.rb +198 -0
  69. data/lib/atrium-ruby/api_client.rb +384 -0
  70. data/lib/atrium-ruby/api_error.rb +34 -0
  71. data/lib/atrium-ruby/configuration.rb +212 -0
  72. data/lib/atrium-ruby/models/account.rb +422 -0
  73. data/lib/atrium-ruby/models/account_number.rb +215 -0
  74. data/lib/atrium-ruby/models/account_numbers_response_body.rb +181 -0
  75. data/lib/atrium-ruby/models/account_owner.rb +269 -0
  76. data/lib/atrium-ruby/models/account_owners_response_body.rb +181 -0
  77. data/lib/atrium-ruby/models/account_response_body.rb +179 -0
  78. data/lib/atrium-ruby/models/accounts_response_body.rb +190 -0
  79. data/lib/atrium-ruby/models/challenge.rb +226 -0
  80. data/lib/atrium-ruby/models/challenge_option.rb +197 -0
  81. data/lib/atrium-ruby/models/challenges_response_body.rb +181 -0
  82. data/lib/atrium-ruby/models/connect_widget.rb +188 -0
  83. data/lib/atrium-ruby/models/connect_widget_request_body.rb +206 -0
  84. data/lib/atrium-ruby/models/connect_widget_response_body.rb +179 -0
  85. data/lib/atrium-ruby/models/credential_option.rb +188 -0
  86. data/lib/atrium-ruby/models/credential_request.rb +188 -0
  87. data/lib/atrium-ruby/models/credential_response.rb +217 -0
  88. data/lib/atrium-ruby/models/credentials_response_body.rb +181 -0
  89. data/lib/atrium-ruby/models/institution.rb +233 -0
  90. data/lib/atrium-ruby/models/institution_response_body.rb +179 -0
  91. data/lib/atrium-ruby/models/institutions_response_body.rb +190 -0
  92. data/lib/atrium-ruby/models/member.rb +269 -0
  93. data/lib/atrium-ruby/models/member_connection_status.rb +253 -0
  94. data/lib/atrium-ruby/models/member_connection_status_response_body.rb +179 -0
  95. data/lib/atrium-ruby/models/member_create_request.rb +218 -0
  96. data/lib/atrium-ruby/models/member_create_request_body.rb +179 -0
  97. data/lib/atrium-ruby/models/member_response_body.rb +179 -0
  98. data/lib/atrium-ruby/models/member_resume_request.rb +181 -0
  99. data/lib/atrium-ruby/models/member_resume_request_body.rb +179 -0
  100. data/lib/atrium-ruby/models/member_update_request.rb +199 -0
  101. data/lib/atrium-ruby/models/member_update_request_body.rb +179 -0
  102. data/lib/atrium-ruby/models/members_response_body.rb +190 -0
  103. data/lib/atrium-ruby/models/pagination.rb +206 -0
  104. data/lib/atrium-ruby/models/transaction.rb +449 -0
  105. data/lib/atrium-ruby/models/transaction_cleanse_and_categorize_request.rb +206 -0
  106. data/lib/atrium-ruby/models/transaction_cleanse_and_categorize_response.rb +287 -0
  107. data/lib/atrium-ruby/models/transaction_response_body.rb +179 -0
  108. data/lib/atrium-ruby/models/transactions_cleanse_and_categorize_request_body.rb +181 -0
  109. data/lib/atrium-ruby/models/transactions_cleanse_and_categorize_response_body.rb +181 -0
  110. data/lib/atrium-ruby/models/transactions_response_body.rb +190 -0
  111. data/lib/atrium-ruby/models/user.rb +206 -0
  112. data/lib/atrium-ruby/models/user_create_request_body.rb +179 -0
  113. data/lib/atrium-ruby/models/user_response_body.rb +179 -0
  114. data/lib/atrium-ruby/models/user_update_request_body.rb +179 -0
  115. data/lib/atrium-ruby/models/users_response_body.rb +190 -0
  116. data/lib/atrium-ruby/version.rb +11 -0
  117. data/spec/api/accounts_api_spec.rb +88 -0
  118. data/spec/api/connect_widget_api_spec.rb +43 -0
  119. data/spec/api/identity_api_spec.rb +56 -0
  120. data/spec/api/institutions_api_spec.rb +68 -0
  121. data/spec/api/members_api_spec.rb +195 -0
  122. data/spec/api/transactions_api_spec.rb +71 -0
  123. data/spec/api/users_api_spec.rb +92 -0
  124. data/spec/api/verification_api_spec.rb +69 -0
  125. data/spec/api_client_spec.rb +222 -0
  126. data/spec/configuration_spec.rb +38 -0
  127. data/spec/models/account_number_spec.rb +60 -0
  128. data/spec/models/account_numbers_response_body_spec.rb +36 -0
  129. data/spec/models/account_owner_spec.rb +96 -0
  130. data/spec/models/account_owners_response_body_spec.rb +36 -0
  131. data/spec/models/account_response_body_spec.rb +36 -0
  132. data/spec/models/account_spec.rb +198 -0
  133. data/spec/models/accounts_response_body_spec.rb +42 -0
  134. data/spec/models/challenge_option_spec.rb +48 -0
  135. data/spec/models/challenge_spec.rb +66 -0
  136. data/spec/models/challenges_response_body_spec.rb +36 -0
  137. data/spec/models/connect_widget_request_body_spec.rb +54 -0
  138. data/spec/models/connect_widget_response_body_spec.rb +36 -0
  139. data/spec/models/connect_widget_spec.rb +42 -0
  140. data/spec/models/credential_option_spec.rb +42 -0
  141. data/spec/models/credential_request_spec.rb +42 -0
  142. data/spec/models/credential_response_spec.rb +60 -0
  143. data/spec/models/credentials_response_body_spec.rb +36 -0
  144. data/spec/models/institution_response_body_spec.rb +36 -0
  145. data/spec/models/institution_spec.rb +72 -0
  146. data/spec/models/institutions_response_body_spec.rb +42 -0
  147. data/spec/models/member_connection_status_response_body_spec.rb +36 -0
  148. data/spec/models/member_connection_status_spec.rb +84 -0
  149. data/spec/models/member_create_request_body_spec.rb +36 -0
  150. data/spec/models/member_create_request_spec.rb +54 -0
  151. data/spec/models/member_response_body_spec.rb +36 -0
  152. data/spec/models/member_resume_request_body_spec.rb +36 -0
  153. data/spec/models/member_resume_request_spec.rb +36 -0
  154. data/spec/models/member_spec.rb +96 -0
  155. data/spec/models/member_update_request_body_spec.rb +36 -0
  156. data/spec/models/member_update_request_spec.rb +48 -0
  157. data/spec/models/members_response_body_spec.rb +42 -0
  158. data/spec/models/pagination_spec.rb +54 -0
  159. data/spec/models/transaction_cleanse_and_categorize_request_spec.rb +54 -0
  160. data/spec/models/transaction_cleanse_and_categorize_response_spec.rb +108 -0
  161. data/spec/models/transaction_response_body_spec.rb +36 -0
  162. data/spec/models/transaction_spec.rb +216 -0
  163. data/spec/models/transactions_cleanse_and_categorize_request_body_spec.rb +36 -0
  164. data/spec/models/transactions_cleanse_and_categorize_response_body_spec.rb +36 -0
  165. data/spec/models/transactions_response_body_spec.rb +42 -0
  166. data/spec/models/user_create_request_body_spec.rb +36 -0
  167. data/spec/models/user_response_body_spec.rb +36 -0
  168. data/spec/models/user_spec.rb +54 -0
  169. data/spec/models/user_update_request_body_spec.rb +36 -0
  170. data/spec/models/users_response_body_spec.rb +42 -0
  171. data/spec/spec_helper.rb +107 -0
  172. metadata +323 -91
  173. data/.gitignore +0 -10
  174. data/.rubocop.yml +0 -12
  175. data/.travis.yml +0 -12
  176. data/bin/console +0 -14
  177. data/bin/demo +0 -49
  178. data/bin/setup +0 -8
  179. data/examples/accounts_and_transactions.rb +0 -49
  180. data/examples/all_endpoints.rb +0 -226
  181. data/examples/example_workflow.rb +0 -176
  182. data/examples/multi_factor_authentication.rb +0 -57
  183. data/examples/update_credentials.rb +0 -58
  184. data/examples/user_and_member_creation.rb +0 -53
  185. data/lib/atrium.rb +0 -40
  186. data/lib/atrium/account.rb +0 -100
  187. data/lib/atrium/account_number.rb +0 -13
  188. data/lib/atrium/account_owner.rb +0 -19
  189. data/lib/atrium/challenge.rb +0 -13
  190. data/lib/atrium/client.rb +0 -51
  191. data/lib/atrium/connect.rb +0 -34
  192. data/lib/atrium/credential.rb +0 -11
  193. data/lib/atrium/error.rb +0 -4
  194. data/lib/atrium/institution.rb +0 -38
  195. data/lib/atrium/member.rb +0 -264
  196. data/lib/atrium/pageable.rb +0 -74
  197. data/lib/atrium/paginate.rb +0 -92
  198. data/lib/atrium/ruby.rb +0 -3
  199. data/lib/atrium/transaction.rb +0 -74
  200. data/lib/atrium/user.rb +0 -150
  201. data/lib/atrium/version.rb +0 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 279c66eac36024e6ab3cfacdd9243dd784f1676ad87e0d0175d84cc147b7d5d6
4
- data.tar.gz: cdb8839bcf632ee70df7899d3873e92cad318558dfa0350dbf8ccce90ed8261b
2
+ SHA1:
3
+ metadata.gz: c9624847519c952560ff039cbc406308dcc99adf
4
+ data.tar.gz: 12ca20e1f16b2ef8286196d399345d268382e8e0
5
5
  SHA512:
6
- metadata.gz: ddc08d12886e56bbb2dfd2f2fe3bbcf19c618f9376b518037ec723fce28c236669cbac653885cbd6af55fbb0d33b5b0e4076091cac3833e90c083cd61a1e9d66
7
- data.tar.gz: 4dab84a369eeaf288c6829d077c0965bfff26c9f33dc61416cb4bcc824f413b175ff28588c79632e3bece261b772f7c6944b68deefcab044d141606896bad4e0
6
+ metadata.gz: 582cb421c757a5c23ca4362e56b814d9350afc2d69f654cfc277719f7bb408e0acbc9d254e160bf042d6c9c0a2d39131fdbaff333bdcadfc37cb09cb443d282a
7
+ data.tar.gz: 2e28386f660dbe81c80cfa86725d77d08db1cc425229eeb1b2d55c060e4909447267ca0df9490cb54d22e9df824256a5a8ba867599f2f0c61da2e86afc503e3c
data/Gemfile CHANGED
@@ -1,4 +1,7 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in mx-atrium-ruby.gemspec
4
3
  gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ end
data/README.md CHANGED
@@ -1,88 +1,154 @@
1
- # Atrium-Ruby [![Build Status](https://travis-ci.org/mxenabled/atrium-ruby.svg?branch=master)](https://travis-ci.org/mxenabled/atrium-ruby)
1
+ # atrium-ruby
2
2
 
3
- A Ruby wrapper for use with the [MX Atrium API](https://atrium.mx.com). In order to make requests, you will need to [sign up for MX Atrium API](https://atrium.mx.com/developers/sign_up) and get a `MX-API-KEY` and `MX-CLIENT-ID`. Then, configure your instance with:
4
- ```ruby
5
- Atrium.configure do |config|
6
- config.mx_api_key = YOUR_API_KEY
7
- config.mx_client_id = YOUR_CLIENT_ID
8
- config.base_url = "https://atrium.mx.com" # base_url is set to "https://vestibule.mx.com" by default
9
- end
10
- ```
3
+ Atrium - the Ruby gem for the MX API
11
4
 
12
- From there, you can start using some basic class methods to make calls for data. See our [full documentation](https://atrium.mx.com/documentation) for more details.
5
+ The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
13
6
 
14
- ## Examples
7
+ ## Installation
15
8
 
16
- ### Pagination
9
+ ### Build a gem
17
10
 
18
- The following demonstrates how you can read data back from the API in a memory efficient way using built-in pagination
19
- helpers. You can also specify query parameters such as `from_date` and `to_date`.
11
+ To build the Ruby code into a gem:
20
12
 
21
- ```ruby
22
- ::Atrium::User.list_each do |user|
23
- user.each_member do |member|
24
- puts member.name
25
- puts member.accounts.total_entries
26
-
27
- member.each_account do |account|
28
- puts account.name
29
- puts account.transactions.total_entries
30
-
31
- account.each_transaction do |transaction|
32
- puts transaction.description
33
- end
34
- end
35
- end
36
-
37
- user.each_account do |account|
38
- puts account.name
39
- puts account.transactions.total_entries
40
-
41
- account.each_transaction do |transaction|
42
- puts transaction.description
43
- end
44
- end
45
-
46
- user.each_transaction do |transaction|
47
- puts transaction.description
48
- end
49
- end
13
+ ```shell
14
+ gem build atrium-ruby.gemspec
50
15
  ```
51
16
 
52
- ### Date Range
17
+ Then either install the gem locally:
53
18
 
54
- You can specify `from_date` and `to_date` to limit or widen your search. For example:
19
+ ```shell
20
+ gem install ./atrium-ruby-2.0.0.gem
21
+ ```
55
22
 
56
- ```ruby
57
- from_date = ::Date.new(2017, 02, 18)
58
- to_date = ::Date.new(2017, 03, 18)
59
- params = {:from_date => from_date, :to_date => to_date}
23
+ Finally add this to the Gemfile:
60
24
 
61
- ::Atrium::Transaction.list_each(:user_guid => "USR-123", :query_params => params) do |transaction|
62
- puts transaction.description
63
- end
64
- ```
25
+ gem 'atrium-ruby', '~> 2.0.0'
65
26
 
66
- ## Installation
27
+ ### Install from Git
67
28
 
68
- Add this line to your application's Gemfile:
29
+ Add the following in the Gemfile:
69
30
 
70
- ```ruby
71
- gem 'atrium-ruby'
72
- ```
31
+ gem 'atrium-ruby', :git => 'https://github.com/mxenabled/atrium-ruby.git'
73
32
 
74
- And then execute:
33
+ ### Include the Ruby code directly
75
34
 
76
- $ bundle
35
+ Include the Ruby code directly using `-I` as follows:
77
36
 
78
- Or install it yourself as:
37
+ ```shell
38
+ ruby -Ilib script.rb
39
+ ```
79
40
 
80
- $ gem install atrium-ruby
41
+ ## Example Usage
81
42
 
82
- ## Development
43
+ Please see `docs` directory for additional endpoint examples
44
+ ```ruby
45
+ # Load the gem
46
+ require 'atrium-ruby'
47
+
48
+ client = Atrium::AtriumClient.new("YOUR_API_KEY", "YOUR_CLIENT_ID")
49
+
50
+ account_guid = "ACT-123" # String | The unique identifier for an `account`.
51
+ user_guid = "USR-123" # String | The unique identifier for a `user`.
52
+ opts = {
53
+ from_date: "2016-09-20", # String | Filter transactions from this date.
54
+ to_date: "2016-10-20" # String | Filter transactions to this date.
55
+ page: 1, # Integer | Specify current page.
56
+ records_per_page: 12, # Integer | Specify records per page.
57
+ }
58
+
59
+ begin
60
+ #List account transactions
61
+ response = client.accounts.list_account_transactions(account_guid, user_guid, opts)
62
+ p response
63
+ rescue Atrium::ApiError => e
64
+ puts "Exception when calling AccountsApi->list_account_transactions: #{e}"
65
+ end
83
66
 
84
- Suggested implementation flow can be found in `bin/demo` comments. You can also use that as an executable for managing the settings and creating your own test flow to handle the requests and data with `./bin/demo`
67
+ ```
85
68
 
86
- ## Contributing
69
+ ## Documentation for API Endpoints
70
+
71
+ Class | Method | HTTP request | Description
72
+ ------------ | ------------- | ------------- | -------------
73
+ *Atrium::AccountsApi* | [**list_account_transactions**](docs/AccountsApi.md#list_account_transactions) | **GET** /users/{user_guid}/accounts/{account_guid}/transactions | List account transactions
74
+ *Atrium::AccountsApi* | [**list_user_accounts**](docs/AccountsApi.md#list_user_accounts) | **GET** /users/{user_guid}/accounts | List accounts for a user
75
+ *Atrium::AccountsApi* | [**read_account**](docs/AccountsApi.md#read_account) | **GET** /users/{user_guid}/accounts/{account_guid} | Read an account
76
+ *Atrium::AccountsApi* | [**read_account_by_member_guid**](docs/AccountsApi.md#read_account_by_member_guid) | **GET** /users/{user_guid}/members/{member_guid}/accounts/{account_guid} | Read an account
77
+ *Atrium::ConnectWidgetApi* | [**get_connect_widget**](docs/ConnectWidgetApi.md#get_connect_widget) | **POST** /users/{user_guid}/connect_widget_url | Embedding in a website
78
+ *Atrium::IdentityApi* | [**identify_member**](docs/IdentityApi.md#identify_member) | **POST** /users/{user_guid}/members/{member_guid}/identify | Identify
79
+ *Atrium::IdentityApi* | [**list_account_owners**](docs/IdentityApi.md#list_account_owners) | **GET** /users/{user_guid}/members/{member_guid}/account_owners | List member account owners
80
+ *Atrium::InstitutionsApi* | [**list_institutions**](docs/InstitutionsApi.md#list_institutions) | **GET** /institutions | List institutions
81
+ *Atrium::InstitutionsApi* | [**read_institution**](docs/InstitutionsApi.md#read_institution) | **GET** /institutions/{institution_code} | Read institution
82
+ *Atrium::InstitutionsApi* | [**read_institution_credentials**](docs/InstitutionsApi.md#read_institution_credentials) | **GET** /institutions/{institution_code}/credentials | Read institution credentials
83
+ *Atrium::MembersApi* | [**aggregate_member**](docs/MembersApi.md#aggregate_member) | **POST** /users/{user_guid}/members/{member_guid}/aggregate | Aggregate member
84
+ *Atrium::MembersApi* | [**create_member**](docs/MembersApi.md#create_member) | **POST** /users/{user_guid}/members | Create member
85
+ *Atrium::MembersApi* | [**delete_member**](docs/MembersApi.md#delete_member) | **DELETE** /users/{user_guid}/members/{member_guid} | Delete member
86
+ *Atrium::MembersApi* | [**list_member_accounts**](docs/MembersApi.md#list_member_accounts) | **GET** /users/{user_guid}/members/{member_guid}/accounts | List member accounts
87
+ *Atrium::MembersApi* | [**list_member_credentials**](docs/MembersApi.md#list_member_credentials) | **GET** /users/{user_guid}/members/{member_guid}/credentials | List member credentials
88
+ *Atrium::MembersApi* | [**list_member_mfa_challenges**](docs/MembersApi.md#list_member_mfa_challenges) | **GET** /users/{user_guid}/members/{member_guid}/challenges | List member MFA challenges
89
+ *Atrium::MembersApi* | [**list_member_transactions**](docs/MembersApi.md#list_member_transactions) | **GET** /users/{user_guid}/members/{member_guid}/transactions | List member transactions
90
+ *Atrium::MembersApi* | [**list_members**](docs/MembersApi.md#list_members) | **GET** /users/{user_guid}/members | List members
91
+ *Atrium::MembersApi* | [**read_member**](docs/MembersApi.md#read_member) | **GET** /users/{user_guid}/members/{member_guid} | Read member
92
+ *Atrium::MembersApi* | [**read_member_status**](docs/MembersApi.md#read_member_status) | **GET** /users/{user_guid}/members/{member_guid}/status | Read member connection status
93
+ *Atrium::MembersApi* | [**resume_member**](docs/MembersApi.md#resume_member) | **PUT** /users/{user_guid}/members/{member_guid}/resume | Resume aggregation from MFA
94
+ *Atrium::MembersApi* | [**update_member**](docs/MembersApi.md#update_member) | **PUT** /users/{user_guid}/members/{member_guid} | Update member
95
+ *Atrium::TransactionsApi* | [**cleanse_and_categorize_transactions**](docs/TransactionsApi.md#cleanse_and_categorize_transactions) | **POST** /cleanse_and_categorize | Categorize transactions
96
+ *Atrium::TransactionsApi* | [**list_user_transactions**](docs/TransactionsApi.md#list_user_transactions) | **GET** /users/{user_guid}/transactions | List transactions for a user
97
+ *Atrium::TransactionsApi* | [**read_transaction**](docs/TransactionsApi.md#read_transaction) | **GET** /users/{user_guid}/transactions/{transaction_guid} | Read a transaction
98
+ *Atrium::UsersApi* | [**create_user**](docs/UsersApi.md#create_user) | **POST** /users | Create user
99
+ *Atrium::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /users/{user_guid} | Delete user
100
+ *Atrium::UsersApi* | [**list_users**](docs/UsersApi.md#list_users) | **GET** /users | List users
101
+ *Atrium::UsersApi* | [**read_user**](docs/UsersApi.md#read_user) | **GET** /users/{user_guid} | Read user
102
+ *Atrium::UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PUT** /users/{user_guid} | Update user
103
+ *Atrium::VerificationApi* | [**list_account_numbers**](docs/VerificationApi.md#list_account_numbers) | **GET** /users/{user_guid}/members/{member_guid}/account_numbers | Read account numbers
104
+ *Atrium::VerificationApi* | [**list_account_numbers_by_account**](docs/VerificationApi.md#list_account_numbers_by_account) | **GET** /users/{user_guid}/accounts/{account_guid}/account_numbers | Read account numbers by account GUID
105
+ *Atrium::VerificationApi* | [**verify_member**](docs/VerificationApi.md#verify_member) | **POST** /users/{user_guid}/members/{member_guid}/verify | Verify
106
+
107
+
108
+ ## Documentation for Models
109
+
110
+ - [Atrium::Account](docs/Account.md)
111
+ - [Atrium::AccountNumber](docs/AccountNumber.md)
112
+ - [Atrium::AccountNumbersResponseBody](docs/AccountNumbersResponseBody.md)
113
+ - [Atrium::AccountOwner](docs/AccountOwner.md)
114
+ - [Atrium::AccountOwnersResponseBody](docs/AccountOwnersResponseBody.md)
115
+ - [Atrium::AccountResponseBody](docs/AccountResponseBody.md)
116
+ - [Atrium::AccountsResponseBody](docs/AccountsResponseBody.md)
117
+ - [Atrium::Challenge](docs/Challenge.md)
118
+ - [Atrium::ChallengeOption](docs/ChallengeOption.md)
119
+ - [Atrium::ChallengesResponseBody](docs/ChallengesResponseBody.md)
120
+ - [Atrium::ConnectWidget](docs/ConnectWidget.md)
121
+ - [Atrium::ConnectWidgetRequestBody](docs/ConnectWidgetRequestBody.md)
122
+ - [Atrium::ConnectWidgetResponseBody](docs/ConnectWidgetResponseBody.md)
123
+ - [Atrium::CredentialOption](docs/CredentialOption.md)
124
+ - [Atrium::CredentialRequest](docs/CredentialRequest.md)
125
+ - [Atrium::CredentialResponse](docs/CredentialResponse.md)
126
+ - [Atrium::CredentialsResponseBody](docs/CredentialsResponseBody.md)
127
+ - [Atrium::Institution](docs/Institution.md)
128
+ - [Atrium::InstitutionResponseBody](docs/InstitutionResponseBody.md)
129
+ - [Atrium::InstitutionsResponseBody](docs/InstitutionsResponseBody.md)
130
+ - [Atrium::Member](docs/Member.md)
131
+ - [Atrium::MemberConnectionStatus](docs/MemberConnectionStatus.md)
132
+ - [Atrium::MemberConnectionStatusResponseBody](docs/MemberConnectionStatusResponseBody.md)
133
+ - [Atrium::MemberCreateRequest](docs/MemberCreateRequest.md)
134
+ - [Atrium::MemberCreateRequestBody](docs/MemberCreateRequestBody.md)
135
+ - [Atrium::MemberResponseBody](docs/MemberResponseBody.md)
136
+ - [Atrium::MemberResumeRequest](docs/MemberResumeRequest.md)
137
+ - [Atrium::MemberResumeRequestBody](docs/MemberResumeRequestBody.md)
138
+ - [Atrium::MemberUpdateRequest](docs/MemberUpdateRequest.md)
139
+ - [Atrium::MemberUpdateRequestBody](docs/MemberUpdateRequestBody.md)
140
+ - [Atrium::MembersResponseBody](docs/MembersResponseBody.md)
141
+ - [Atrium::Pagination](docs/Pagination.md)
142
+ - [Atrium::Transaction](docs/Transaction.md)
143
+ - [Atrium::TransactionCleanseAndCategorizeRequest](docs/TransactionCleanseAndCategorizeRequest.md)
144
+ - [Atrium::TransactionCleanseAndCategorizeResponse](docs/TransactionCleanseAndCategorizeResponse.md)
145
+ - [Atrium::TransactionResponseBody](docs/TransactionResponseBody.md)
146
+ - [Atrium::TransactionsCleanseAndCategorizeRequestBody](docs/TransactionsCleanseAndCategorizeRequestBody.md)
147
+ - [Atrium::TransactionsCleanseAndCategorizeResponseBody](docs/TransactionsCleanseAndCategorizeResponseBody.md)
148
+ - [Atrium::TransactionsResponseBody](docs/TransactionsResponseBody.md)
149
+ - [Atrium::User](docs/User.md)
150
+ - [Atrium::UserCreateRequestBody](docs/UserCreateRequestBody.md)
151
+ - [Atrium::UserResponseBody](docs/UserResponseBody.md)
152
+ - [Atrium::UserUpdateRequestBody](docs/UserUpdateRequestBody.md)
153
+ - [Atrium::UsersResponseBody](docs/UsersResponseBody.md)
87
154
 
88
- Bug reports and pull requests are welcome on GitHub at https://github.com/mxenabled/atrium-ruby.
data/Rakefile CHANGED
@@ -1,5 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ begin
2
+ require 'rspec/core/rake_task'
3
3
 
4
- RSpec::Core::RakeTask.new(:spec)
5
- task :default => :spec
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task default: :spec
6
+ rescue LoadError
7
+ # no rspec available
8
+ end
@@ -1,33 +1,41 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path("../lib", __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "atrium/version"
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "atrium-ruby"
9
- spec.version = ::Atrium::VERSION
10
- spec.authors = ["Jon Carstens, Dan Jones, Zach Toolson"]
11
- spec.email = ["jon.carstens@mx.com, dan.jones@mx.com, zach.toolson@mx.com"]
12
- spec.summary = "Ruby wrapper for the Atrium API by MX"
13
- spec.description = "Ruby wrapper for the Atrium API by MX"
14
- spec.homepage = "http://github.com/mxenabled/atrium-ruby"
15
- spec.license = "MIT"
16
-
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = "exe"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_runtime_dependency "active_attr"
23
- spec.add_runtime_dependency "httpclient"
24
-
25
- spec.add_development_dependency "bundler", "~> 1.12"
26
- spec.add_development_dependency "pry"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rspec"
29
- spec.add_development_dependency "simplecov"
30
- spec.add_development_dependency "vcr"
31
- spec.add_development_dependency "webmock"
32
- spec.add_development_dependency "mad_rubocop"
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #MX API
5
+
6
+ #The MX Atrium API supports over 48,000 data connections to thousands of financial institutions. It provides secure access to your users' accounts and transactions with industry-leading cleansing, categorization, and classification. Atrium is designed according to resource-oriented REST architecture and responds with JSON bodies and HTTP response codes. Use Atrium's development environment, vestibule.mx.com, to quickly get up and running. The development environment limits are 100 users, 25 members per user, and access to the top 15 institutions. Contact MX to purchase production access.
7
+
8
+
9
+ =end
10
+
11
+ $:.push File.expand_path("../lib", __FILE__)
12
+ require "atrium-ruby/version"
13
+
14
+ Gem::Specification.new do |s|
15
+ s.name = "atrium-ruby"
16
+ s.version = Atrium::VERSION
17
+ s.platform = Gem::Platform::RUBY
18
+ s.authors = ["MX"]
19
+ s.email = ["atrium.api@mx.com"]
20
+ s.homepage = "https://atrium.mx.com"
21
+ s.summary = "Ruby wrapper for the Atrium API by MX"
22
+ s.description = "A ruby wrapper for the MX API."
23
+ s.license = 'MIT'
24
+ s.required_ruby_version = ">= 1.9"
25
+
26
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
27
+ s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
28
+
29
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
30
+ s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
31
+ s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
32
+ s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
33
+ s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
34
+ s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
35
+ s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
36
+
37
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
38
+ s.test_files = `find spec/*`.split("\n")
39
+ s.executables = []
40
+ s.require_paths = ["lib"]
33
41
  end
@@ -0,0 +1,35 @@
1
+ # Atrium::Account
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **apr** | **Float** | | [optional]
7
+ **apy** | **Float** | | [optional]
8
+ **available_balance** | **Float** | | [optional]
9
+ **available_credit** | **Float** | | [optional]
10
+ **balance** | **Float** | | [optional]
11
+ **created_at** | **String** | | [optional]
12
+ **credit_limit** | **Float** | | [optional]
13
+ **currency_code** | **String** | | [optional]
14
+ **day_payment_is_due** | **Integer** | | [optional]
15
+ **guid** | **String** | | [optional]
16
+ **institution_code** | **String** | | [optional]
17
+ **interest_rate** | **Float** | | [optional]
18
+ **is_closed** | **BOOLEAN** | | [optional]
19
+ **last_payment** | **Float** | | [optional]
20
+ **matures_on** | **String** | | [optional]
21
+ **member_guid** | **String** | | [optional]
22
+ **minimum_balance** | **Float** | | [optional]
23
+ **minimum_payment** | **Float** | | [optional]
24
+ **name** | **String** | | [optional]
25
+ **original_balance** | **Float** | | [optional]
26
+ **payment_due_at** | **String** | | [optional]
27
+ **payoff_balance** | **Float** | | [optional]
28
+ **started_on** | **String** | | [optional]
29
+ **subtype** | **String** | | [optional]
30
+ **total_account_value** | **Float** | | [optional]
31
+ **type** | **String** | | [optional]
32
+ **updated_at** | **String** | | [optional]
33
+ **user_guid** | **String** | | [optional]
34
+
35
+
@@ -0,0 +1,12 @@
1
+ # Atrium::AccountNumber
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account_guid** | **String** | | [optional]
7
+ **account_number** | **String** | | [optional]
8
+ **member_guid** | **String** | | [optional]
9
+ **routing_number** | **String** | | [optional]
10
+ **user_guid** | **String** | | [optional]
11
+
12
+
@@ -0,0 +1,8 @@
1
+ # Atrium::AccountNumbersResponseBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account_numbers** | [**Array<AccountNumber>**](AccountNumber.md) | | [optional]
7
+
8
+
@@ -0,0 +1,18 @@
1
+ # Atrium::AccountOwner
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account_guid** | **String** | | [optional]
7
+ **address** | **String** | | [optional]
8
+ **city** | **String** | | [optional]
9
+ **country** | **String** | | [optional]
10
+ **email** | **String** | | [optional]
11
+ **guid** | **String** | | [optional]
12
+ **member_guid** | **String** | | [optional]
13
+ **owner_name** | **String** | | [optional]
14
+ **postal_code** | **String** | | [optional]
15
+ **state** | **String** | | [optional]
16
+ **user_guid** | **String** | | [optional]
17
+
18
+
@@ -0,0 +1,8 @@
1
+ # Atrium::AccountOwnersResponseBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account_owners** | [**Array<AccountOwner>**](AccountOwner.md) | | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # Atrium::AccountResponseBody
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **account** | [**Account**](Account.md) | | [optional]
7
+
8
+
@@ -0,0 +1,174 @@
1
+ # Atrium::AccountsApi
2
+
3
+ Method | HTTP request | Description
4
+ ------------- | ------------- | -------------
5
+ [**list_account_transactions**](AccountsApi.md#list_account_transactions) | **GET** /users/{user_guid}/accounts/{account_guid}/transactions | List account transactions
6
+ [**list_user_accounts**](AccountsApi.md#list_user_accounts) | **GET** /users/{user_guid}/accounts | List accounts for a user
7
+ [**read_account**](AccountsApi.md#read_account) | **GET** /users/{user_guid}/accounts/{account_guid} | Read an account
8
+ [**read_account_by_member_guid**](AccountsApi.md#read_account_by_member_guid) | **GET** /users/{user_guid}/members/{member_guid}/accounts/{account_guid} | Read an account
9
+
10
+
11
+ # **list_account_transactions**
12
+ > TransactionsResponseBody list_account_transactions(account_guid, user_guid, opts)
13
+
14
+ List account transactions
15
+
16
+ This endpoint allows you to see every transaction that belongs to a specific account. The default from_date is 90 days prior to the request, and the default to_date is 5 days from the time of the request.<br> The from_date and to_date parameters can optionally be appended to the request.
17
+
18
+ ### Example
19
+ ```ruby
20
+ # load the gem
21
+ require 'atrium-ruby'
22
+
23
+ client = Atrium::AtriumClient.new("YOUR_API_KEY", "YOUR_CLIENT_ID")
24
+
25
+ account_guid = "ACT-123" # String | The unique identifier for an `account`.
26
+ user_guid = "USR-123" # String | The unique identifier for a `user`.
27
+ opts = {
28
+ from_date: "2016-09-20", # String | Filter transactions from this date.
29
+ to_date: "2016-10-20" # String | Filter transactions to this date.
30
+ page: 1, # Integer | Specify current page.
31
+ records_per_page: 12, # Integer | Specify records per page.
32
+ }
33
+
34
+ begin
35
+ #List account transactions
36
+ response = client.accounts.list_account_transactions(account_guid, user_guid, opts)
37
+ p response
38
+ rescue Atrium::ApiError => e
39
+ puts "Exception when calling AccountsApi->list_account_transactions: #{e}"
40
+ end
41
+ ```
42
+
43
+ ### Parameters
44
+
45
+ Name | Type | Description | Notes
46
+ ------------- | ------------- | ------------- | -------------
47
+ **account_guid** | **String**| The unique identifier for an &#x60;account&#x60;. |
48
+ **user_guid** | **String**| The unique identifier for a &#x60;user&#x60;. |
49
+ **from_date** | **String**| Filter transactions from this date. | [optional]
50
+ **to_date** | **String**| Filter transactions to this date. | [optional]
51
+ **page** | **Integer**| Specify current page. | [optional]
52
+ **records_per_page** | **Integer**| Specify records per page. | [optional]
53
+
54
+ ### Return type
55
+
56
+ [**TransactionsResponseBody**](TransactionsResponseBody.md)
57
+
58
+ # **list_user_accounts**
59
+ > AccountsResponseBody list_user_accounts(user_guid, opts)
60
+
61
+ List accounts for a user
62
+
63
+ Use this endpoint to view information about every account that belongs to a user. You'll need the user's GUID to access this list. The information will include the account type — e.g., CHECKING, MONEY_MARKET, or PROPERTY — the account balance, the date the account was started, etc.
64
+
65
+ ### Example
66
+ ```ruby
67
+ # load the gem
68
+ require 'atrium-ruby'
69
+
70
+ client = Atrium::AtriumClient.new("YOUR_API_KEY", "YOUR_CLIENT_ID")
71
+
72
+ user_guid = "USR-123" # String | The unique identifier for a `user`.
73
+ opts = {
74
+ page: 1, # Integer | Specify current page.
75
+ records_per_page: 12, # Integer | Specify records per page.
76
+ }
77
+
78
+ begin
79
+ #List accounts for a user
80
+ response = client.accounts.list_user_accounts(user_guid, opts)
81
+ p response
82
+ rescue Atrium::ApiError => e
83
+ puts "Exception when calling AccountsApi->list_user_accounts: #{e}"
84
+ end
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ Name | Type | Description | Notes
90
+ ------------- | ------------- | ------------- | -------------
91
+ **user_guid** | **String**| The unique identifier for a &#x60;user&#x60;. |
92
+ **page** | **Integer**| Specify current page. | [optional]
93
+ **records_per_page** | **Integer**| Specify records per page. | [optional]
94
+
95
+ ### Return type
96
+
97
+ [**AccountsResponseBody**](AccountsResponseBody.md)
98
+
99
+ # **read_account**
100
+ > AccountResponseBody read_account(account_guid, user_guid)
101
+
102
+ Read an account
103
+
104
+ Reading an account allows you to get information about a specific account that belongs to a user. That includes the account type — e.g., CHECKING, MONEY_MARKET, or PROPERTY — the balance, the date the account was started, and much more.<br> There are two endpoints for reading an account. Both will return the same information.<br> It's important to remember that balance and available_balance will normally be positive numbers — for all account types. But this should be interpreted differently for debt accounts and asset accounts.<br> An asset account, e.g., CHECKING, SAVINGS, or INVESTMENT, will have a positive balance unless it is in an overdraft condition, in which case the balance will be negative.<br> On the other hand, a debt account, e.g., CREDIT CARD, LOAN, MORTGAGE, would have a positivebalance when the user owes money on the account. It would have a negative balance if the account has been overpaid.
105
+
106
+ ### Example
107
+ ```ruby
108
+ # load the gem
109
+ require 'atrium-ruby'
110
+
111
+ client = Atrium::AtriumClient.new("YOUR_API_KEY", "YOUR_CLIENT_ID")
112
+
113
+ account_guid = "ACT-123" # String | The unique identifier for an `account`.
114
+ user_guid = "USR-123" # String | The unique identifier for a `user`.
115
+
116
+ begin
117
+ #Read an account
118
+ response = client.accounts.read_account(account_guid, user_guid)
119
+ p response
120
+ rescue Atrium::ApiError => e
121
+ puts "Exception when calling AccountsApi->read_account: #{e}"
122
+ end
123
+ ```
124
+
125
+ ### Parameters
126
+
127
+ Name | Type | Description | Notes
128
+ ------------- | ------------- | ------------- | -------------
129
+ **account_guid** | **String**| The unique identifier for an &#x60;account&#x60;. |
130
+ **user_guid** | **String**| The unique identifier for a &#x60;user&#x60;. |
131
+
132
+ ### Return type
133
+
134
+ [**AccountResponseBody**](AccountResponseBody.md)
135
+
136
+ # **read_account_by_member_guid**
137
+ > AccountResponseBody read_account_by_member_guid(account_guid, member_guid, user_guid)
138
+
139
+ Read an account
140
+
141
+ Reading an account allows you to get information about a specific account that belongs to a user. That includes the account type — e.g., CHECKING, MONEY_MARKET, or PROPERTY — the balance, the date the account was started, and much more.<br> There are two endpoints for reading an account. Both will return the same information.<br> It's important to remember that balance and available_balance will normally be positive numbers — for all account types. But this should be interpreted differently for debt accounts and asset accounts.<br> An asset account, e.g., CHECKING, SAVINGS, or INVESTMENT, will have a positive balance unless it is in an overdraft condition, in which case the balance will be negative.<br> On the other hand, a debt account, e.g., CREDIT CARD, LOAN, MORTGAGE, would have a positivebalance when the user owes money on the account. It would have a negative balance if the account has been overpaid.
142
+
143
+ ### Example
144
+ ```ruby
145
+ # load the gem
146
+ require 'atrium-ruby'
147
+
148
+ client = Atrium::AtriumClient.new("YOUR_API_KEY", "YOUR_CLIENT_ID")
149
+
150
+ account_guid = "ACT-123" # String | The unique identifier for an `account`.
151
+ member_guid = "MBR-123" # String | The unique identifier for a `member`.
152
+ user_guid = "USR-123" # String | The unique identifier for a `user`.
153
+
154
+ begin
155
+ #Read an account
156
+ response = client.accounts.read_account_by_member_guid(account_guid, member_guid, user_guid)
157
+ p response
158
+ rescue Atrium::ApiError => e
159
+ puts "Exception when calling AccountsApi->read_account_by_member_guid: #{e}"
160
+ end
161
+ ```
162
+
163
+ ### Parameters
164
+
165
+ Name | Type | Description | Notes
166
+ ------------- | ------------- | ------------- | -------------
167
+ **account_guid** | **String**| The unique identifier for an &#x60;account&#x60;. |
168
+ **member_guid** | **String**| The unique identifier for a &#x60;member&#x60;. |
169
+ **user_guid** | **String**| The unique identifier for a &#x60;user&#x60;. |
170
+
171
+ ### Return type
172
+
173
+ [**AccountResponseBody**](AccountResponseBody.md)
174
+