Skip to content

Commit 67dc5ae

Browse files
Merge pull request #39 from mxenabled/bm/readme_and_openapi_updates
README and OpenAPI updates
2 parents 3fa6722 + 0df8a4b commit 67dc5ae

13 files changed

Lines changed: 268 additions & 48 deletions

README.md

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-ruby/issues) to report issues using the MX Platform API Ruby Library.*
1+
*This project is currently in **Beta**. Please open up an issue [here](https://github.com/mxenabled/mx-platform-ruby/issues) to report issues using the MX Platform Ruby library.*
22

3-
*This project was automatically generated by the [OpenAPI Generator](https://openapi-generator.tech).*
3+
# MX Platform Ruby
44

5-
# MX Platform Ruby - v0.6.2
5+
The [MX Platform API](https://www.mx.com/products/platform-api) is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
66

7-
The Ruby gem for the MX Platform API.
7+
## Documentation
8+
9+
Examples for the API endpoints can be found [here.](https://docs.mx.com/api)
10+
11+
## Requirements
812

9-
The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions.
13+
- Ruby >= 2.6
1014

1115
## Installation
1216

@@ -18,31 +22,28 @@ gem 'mx-platform-ruby'
1822

1923
And then execute:
2024
```shell
21-
$ bundle
25+
bundle
2226
```
2327

2428
Or install it yourself with:
2529
```shell
26-
$ gem install mx-platform-ruby
30+
gem install mx-platform-ruby
2731
```
2832

2933
## Getting Started
3034

3135
In order to make requests, you will need to [sign up](https://dashboard.mx.com/sign_up) for the MX Platform API and get a `Client ID` and `API Key`.
3236

33-
Please follow the [installation](#installation) procedure and then run the following code:
34-
37+
Please follow the [installation](#installation) procedure and then run the following code to create your first User:
3538
```ruby
36-
# Load the gem
3739
require 'mx-platform-ruby'
3840

39-
# setup authorization
4041
MxPlatformRuby.configure do |config|
41-
# Configure HTTP basic authorization
42-
config.username = 'Your Client ID from https://dashboard.mx.com'
43-
config.password = 'Your API Key from https://dashboard.mx.com'
42+
# Configure with your Client ID/API Key from https://dashboard.mx.com
43+
config.username = 'Your Client ID'
44+
config.password = 'Your API Key'
4445

45-
# Configure server. 0 for production, 1 for development
46+
# Configure environment. 0 for production, 1 for development
4647
config.server_index = 1
4748
end
4849

@@ -54,14 +55,26 @@ user_create_request_body = MxPlatformRuby::UserCreateRequestBody.new(
5455
)
5556

5657
begin
57-
# Create user
5858
result = api_instance.create_user(user_create_request_body)
5959
p result
6060
rescue MxPlatformRuby::ApiError => e
6161
puts "Error when calling MxPlatformApi->create_user: #{e}"
6262
end
6363
```
6464

65-
## Documentation
65+
## Development
66+
67+
This project was generated by the [OpenAPI Generator](https://openapi-generator.tech). To generate this library, verify you have the latest version of the `openapi-generator-cli` found [here.](https://github.com/OpenAPITools/openapi-generator#17---npm)
68+
69+
Running the following command in this repo's directory will generate this library using the [MX Platform API OpenAPI spec](https://github.com/mxenabled/openapi/blob/master/openapi/mx_platform_api_beta.yml) with our [configuration and templates.](https://github.com/mxenabled/mx-platform-ruby/tree/master/openapi)
70+
```shell
71+
openapi-generator-cli generate \
72+
-i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api_beta.yml \
73+
-g ruby \
74+
-c ./openapi/config.yml \
75+
-t ./openapi/templates
76+
```
77+
78+
## Contributing
6679

67-
Additional examples for the API endpoints can be found [here](docs/MxPlatformApi.md).
80+
Please [open an issue](https://github.com/mxenabled/mx-platform-java/issues) or [submit a pull request.](https://github.com/mxenabled/mx-platform-java/pulls)

docs/EnhanceTransactionResponse.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
| Name | Type | Description | Notes |
66
| ---- | ---- | ----------- | ----- |
77
| **amount** | **Float** | | [optional] |
8+
| **categorized_by** | **Integer** | | [optional] |
89
| **category** | **String** | | [optional] |
10+
| **category_guid** | **String** | | [optional] |
11+
| **described_by** | **Integer** | | [optional] |
912
| **description** | **String** | | [optional] |
13+
| **extended_transaction_type** | **String** | | [optional] |
1014
| **id** | **String** | | [optional] |
1115
| **is_bill_pay** | **Boolean** | | [optional] |
1216
| **is_direct_deposit** | **Boolean** | | [optional] |
@@ -16,8 +20,11 @@
1620
| **is_international** | **Boolean** | | [optional] |
1721
| **is_overdraft_fee** | **Boolean** | | [optional] |
1822
| **is_payroll_advance** | **Boolean** | | [optional] |
23+
| **is_subscription** | **Boolean** | | [optional] |
24+
| **memo** | **String** | | [optional] |
1925
| **merchant_category_code** | **Integer** | | [optional] |
2026
| **merchant_guid** | **String** | | [optional] |
27+
| **merchant_location_guid** | **String** | | [optional] |
2128
| **original_description** | **String** | | [optional] |
2229
| **type** | **String** | | [optional] |
2330

@@ -28,8 +35,12 @@ require 'mx-platform-ruby'
2835

2936
instance = MxPlatformRuby::EnhanceTransactionResponse.new(
3037
amount: 21.33,
31-
category: Fast Food,
32-
description: IN-N-OUT BURGER,
38+
categorized_by: 13,
39+
category: Rental Car & Taxi,
40+
category_guid: CAT-9588eaad-90a4-bb5c-66c8-1812503d0db8,
41+
described_by: 6,
42+
description: Uber,
43+
extended_transaction_type: partner_transaction_type,
3344
id: ID-123,
3445
is_bill_pay: false,
3546
is_direct_deposit: false,
@@ -39,9 +50,12 @@ instance = MxPlatformRuby::EnhanceTransactionResponse.new(
3950
is_international: false,
4051
is_overdraft_fee: false,
4152
is_payroll_advance: false,
53+
is_subscription: false,
54+
memo: Additional-information*on_transaction,
4255
merchant_category_code: 5411,
43-
merchant_guid: MCH-7ed79542-884d-2b1b-dd74-501c5cc9d25b,
44-
original_description: IN-N-OUT BURGER,
56+
merchant_guid: MCH-14f25b63-ef47-a38e-b2b6-d02b280b6e4e,
57+
merchant_location_guid: MCL-00024e59-18b5-4d79-b879-2a7896726fea,
58+
original_description: ubr* pending.uber.com,
4559
type: DEBIT
4660
)
4761
```

docs/EnhanceTransactionsRequest.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
| ---- | ---- | ----------- | ----- |
77
| **amount** | **Float** | | [optional] |
88
| **description** | **String** | | |
9+
| **extended_transaction_type** | **String** | | [optional] |
910
| **id** | **String** | | |
11+
| **memo** | **String** | | [optional] |
1012
| **merchant_category_code** | **Integer** | | [optional] |
1113
| **type** | **String** | | [optional] |
1214

@@ -17,8 +19,10 @@ require 'mx-platform-ruby'
1719

1820
instance = MxPlatformRuby::EnhanceTransactionsRequest.new(
1921
amount: 21.33,
20-
description: IN-N-OUT BURGER,
22+
description: ubr* pending.uber.com,
23+
extended_transaction_type: partner_transaction_type,
2124
id: ID-123,
25+
memo: Additional-information*on_transaction,
2226
merchant_category_code: 123,
2327
type: DEBIT
2428
)

docs/TransactionResponse.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
| **account_id** | **String** | | [optional] |
99
| **amount** | **Float** | | [optional] |
1010
| **category** | **String** | | [optional] |
11+
| **category_guid** | **String** | | [optional] |
1112
| **check_number_string** | **String** | | [optional] |
1213
| **created_at** | **String** | | [optional] |
1314
| **currency_code** | **String** | | [optional] |
1415
| **date** | **String** | | [optional] |
1516
| **description** | **String** | | [optional] |
17+
| **extended_transaction_type** | **String** | | [optional] |
1618
| **guid** | **String** | | [optional] |
1719
| **id** | **String** | | [optional] |
1820
| **is_bill_pay** | **Boolean** | | [optional] |
@@ -56,11 +58,13 @@ instance = MxPlatformRuby::TransactionResponse.new(
5658
account_id: account123,
5759
amount: 61.11,
5860
category: Groceries,
61+
category_guid: CAT-9588eaad-90a4-bb5c-66c8-1812503d0db8,
5962
check_number_string: 6812,
6063
created_at: 2016-10-06T09:43:42.000Z,
6164
currency_code: USD,
6265
date: 2013-09-23T00:00:00.000Z,
6366
description: Whole foods,
67+
extended_transaction_type: partner_transaction_type,
6468
guid: TRN-265abee9-889b-af6a-c69b-25157db2bdd9,
6569
id: transaction-265abee9-889b-af6a-c69b-25157db2bdd9,
6670
is_bill_pay: false,

lib/mx-platform-ruby/models/enhance_transaction_response.rb

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,18 @@ module MxPlatformRuby
1717
class EnhanceTransactionResponse
1818
attr_accessor :amount
1919

20+
attr_accessor :categorized_by
21+
2022
attr_accessor :category
2123

24+
attr_accessor :category_guid
25+
26+
attr_accessor :described_by
27+
2228
attr_accessor :description
2329

30+
attr_accessor :extended_transaction_type
31+
2432
attr_accessor :id
2533

2634
attr_accessor :is_bill_pay
@@ -39,10 +47,16 @@ class EnhanceTransactionResponse
3947

4048
attr_accessor :is_payroll_advance
4149

50+
attr_accessor :is_subscription
51+
52+
attr_accessor :memo
53+
4254
attr_accessor :merchant_category_code
4355

4456
attr_accessor :merchant_guid
4557

58+
attr_accessor :merchant_location_guid
59+
4660
attr_accessor :original_description
4761

4862
attr_accessor :type
@@ -51,8 +65,12 @@ class EnhanceTransactionResponse
5165
def self.attribute_map
5266
{
5367
:'amount' => :'amount',
68+
:'categorized_by' => :'categorized_by',
5469
:'category' => :'category',
70+
:'category_guid' => :'category_guid',
71+
:'described_by' => :'described_by',
5572
:'description' => :'description',
73+
:'extended_transaction_type' => :'extended_transaction_type',
5674
:'id' => :'id',
5775
:'is_bill_pay' => :'is_bill_pay',
5876
:'is_direct_deposit' => :'is_direct_deposit',
@@ -62,8 +80,11 @@ def self.attribute_map
6280
:'is_international' => :'is_international',
6381
:'is_overdraft_fee' => :'is_overdraft_fee',
6482
:'is_payroll_advance' => :'is_payroll_advance',
83+
:'is_subscription' => :'is_subscription',
84+
:'memo' => :'memo',
6585
:'merchant_category_code' => :'merchant_category_code',
6686
:'merchant_guid' => :'merchant_guid',
87+
:'merchant_location_guid' => :'merchant_location_guid',
6788
:'original_description' => :'original_description',
6889
:'type' => :'type'
6990
}
@@ -78,8 +99,12 @@ def self.acceptable_attributes
7899
def self.openapi_types
79100
{
80101
:'amount' => :'Float',
102+
:'categorized_by' => :'Integer',
81103
:'category' => :'String',
104+
:'category_guid' => :'String',
105+
:'described_by' => :'Integer',
82106
:'description' => :'String',
107+
:'extended_transaction_type' => :'String',
83108
:'id' => :'String',
84109
:'is_bill_pay' => :'Boolean',
85110
:'is_direct_deposit' => :'Boolean',
@@ -89,8 +114,11 @@ def self.openapi_types
89114
:'is_international' => :'Boolean',
90115
:'is_overdraft_fee' => :'Boolean',
91116
:'is_payroll_advance' => :'Boolean',
117+
:'is_subscription' => :'Boolean',
118+
:'memo' => :'String',
92119
:'merchant_category_code' => :'Integer',
93120
:'merchant_guid' => :'String',
121+
:'merchant_location_guid' => :'String',
94122
:'original_description' => :'String',
95123
:'type' => :'String'
96124
}
@@ -100,8 +128,12 @@ def self.openapi_types
100128
def self.openapi_nullable
101129
Set.new([
102130
:'amount',
131+
:'categorized_by',
103132
:'category',
133+
:'category_guid',
134+
:'described_by',
104135
:'description',
136+
:'extended_transaction_type',
105137
:'id',
106138
:'is_bill_pay',
107139
:'is_direct_deposit',
@@ -111,7 +143,10 @@ def self.openapi_nullable
111143
:'is_international',
112144
:'is_overdraft_fee',
113145
:'is_payroll_advance',
146+
:'is_subscription',
147+
:'memo',
114148
:'merchant_category_code',
149+
:'merchant_location_guid',
115150
:'original_description',
116151
:'type'
117152
])
@@ -136,14 +171,30 @@ def initialize(attributes = {})
136171
self.amount = attributes[:'amount']
137172
end
138173

174+
if attributes.key?(:'categorized_by')
175+
self.categorized_by = attributes[:'categorized_by']
176+
end
177+
139178
if attributes.key?(:'category')
140179
self.category = attributes[:'category']
141180
end
142181

182+
if attributes.key?(:'category_guid')
183+
self.category_guid = attributes[:'category_guid']
184+
end
185+
186+
if attributes.key?(:'described_by')
187+
self.described_by = attributes[:'described_by']
188+
end
189+
143190
if attributes.key?(:'description')
144191
self.description = attributes[:'description']
145192
end
146193

194+
if attributes.key?(:'extended_transaction_type')
195+
self.extended_transaction_type = attributes[:'extended_transaction_type']
196+
end
197+
147198
if attributes.key?(:'id')
148199
self.id = attributes[:'id']
149200
end
@@ -180,6 +231,14 @@ def initialize(attributes = {})
180231
self.is_payroll_advance = attributes[:'is_payroll_advance']
181232
end
182233

234+
if attributes.key?(:'is_subscription')
235+
self.is_subscription = attributes[:'is_subscription']
236+
end
237+
238+
if attributes.key?(:'memo')
239+
self.memo = attributes[:'memo']
240+
end
241+
183242
if attributes.key?(:'merchant_category_code')
184243
self.merchant_category_code = attributes[:'merchant_category_code']
185244
end
@@ -188,6 +247,10 @@ def initialize(attributes = {})
188247
self.merchant_guid = attributes[:'merchant_guid']
189248
end
190249

250+
if attributes.key?(:'merchant_location_guid')
251+
self.merchant_location_guid = attributes[:'merchant_location_guid']
252+
end
253+
191254
if attributes.key?(:'original_description')
192255
self.original_description = attributes[:'original_description']
193256
end
@@ -216,8 +279,12 @@ def ==(o)
216279
return true if self.equal?(o)
217280
self.class == o.class &&
218281
amount == o.amount &&
282+
categorized_by == o.categorized_by &&
219283
category == o.category &&
284+
category_guid == o.category_guid &&
285+
described_by == o.described_by &&
220286
description == o.description &&
287+
extended_transaction_type == o.extended_transaction_type &&
221288
id == o.id &&
222289
is_bill_pay == o.is_bill_pay &&
223290
is_direct_deposit == o.is_direct_deposit &&
@@ -227,8 +294,11 @@ def ==(o)
227294
is_international == o.is_international &&
228295
is_overdraft_fee == o.is_overdraft_fee &&
229296
is_payroll_advance == o.is_payroll_advance &&
297+
is_subscription == o.is_subscription &&
298+
memo == o.memo &&
230299
merchant_category_code == o.merchant_category_code &&
231300
merchant_guid == o.merchant_guid &&
301+
merchant_location_guid == o.merchant_location_guid &&
232302
original_description == o.original_description &&
233303
type == o.type
234304
end
@@ -242,7 +312,7 @@ def eql?(o)
242312
# Calculates hash code according to all attributes.
243313
# @return [Integer] Hash code
244314
def hash
245-
[amount, category, description, id, is_bill_pay, is_direct_deposit, is_expense, is_fee, is_income, is_international, is_overdraft_fee, is_payroll_advance, merchant_category_code, merchant_guid, original_description, type].hash
315+
[amount, categorized_by, category, category_guid, described_by, description, extended_transaction_type, id, is_bill_pay, is_direct_deposit, is_expense, is_fee, is_income, is_international, is_overdraft_fee, is_payroll_advance, is_subscription, memo, merchant_category_code, merchant_guid, merchant_location_guid, original_description, type].hash
246316
end
247317

248318
# Builds the object from hash

0 commit comments

Comments
 (0)