ynab 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/config.json +1 -1
- data/docs/AccountsApi.md +1 -1
- data/docs/BudgetsApi.md +1 -1
- data/docs/CategoriesApi.md +1 -1
- data/docs/MonthsApi.md +1 -1
- data/docs/PayeeLocationsApi.md +1 -1
- data/docs/PayeesApi.md +1 -1
- data/docs/SaveTransaction.md +1 -1
- data/docs/ScheduledTransactionsApi.md +1 -1
- data/docs/TransactionDetail.md +1 -1
- data/docs/TransactionSummary.md +1 -1
- data/docs/TransactionsApi.md +1 -1
- data/lib/ynab/configuration.rb +1 -1
- data/lib/ynab/models/account.rb +2 -2
- data/lib/ynab/models/save_transaction.rb +3 -3
- data/lib/ynab/models/transaction_detail.rb +1 -1
- data/lib/ynab/models/transaction_summary.rb +1 -1
- data/lib/ynab/version.rb +1 -1
- data/pkg/ynab-0.1.0.gem +0 -0
- data/pkg/ynab-0.2.0.gem +0 -0
- data/spec-v1-swagger.json +5 -5
- data/spec/fixtures/vcr_cassettes/account.yml +1 -1
- data/spec/fixtures/vcr_cassettes/accounts.yml +1 -1
- data/spec/fixtures/vcr_cassettes/budget.yml +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 106c09fac8b8fd8ff6ba374c41f5b7b8a758d5fc
|
4
|
+
data.tar.gz: c0cd9ae29591b000e8c899c96a83c6fbe2606989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5a9e803094834e5d568ce0c931502ecd9008722c33bbcb1d5ac419dedcaa456e8f74f13206cab5124a93ea123ace2041d25112a6a2d8fa1faebcc18f0e56913
|
7
|
+
data.tar.gz: 22ea1370cec511ac9e2cf7534ebe3899d2b58920b0b34eaa6fd529fb68f4bba78f6d193ada531e6d13eaa5aca70495996eb80acdc15b2e6670e442d16826a913
|
data/Gemfile.lock
CHANGED
data/config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"gemName": "ynab",
|
3
3
|
"moduleName": "YnabApi",
|
4
|
-
"gemVersion": "0.
|
4
|
+
"gemVersion": "0.2.0",
|
5
5
|
"gemDescription": "Ruby gem wrapper for the YNAB API. Read the documentation at https://api.youneedabudget.com",
|
6
6
|
"gemHomepage": "https://github.com/ynab/ynab-sdk-ruby",
|
7
7
|
"gemLicense": "Apache-2.0",
|
data/docs/AccountsApi.md
CHANGED
data/docs/BudgetsApi.md
CHANGED
data/docs/CategoriesApi.md
CHANGED
data/docs/MonthsApi.md
CHANGED
data/docs/PayeeLocationsApi.md
CHANGED
data/docs/PayeesApi.md
CHANGED
data/docs/SaveTransaction.md
CHANGED
@@ -13,6 +13,6 @@ Name | Type | Description | Notes
|
|
13
13
|
**cleared** | **String** | The cleared status of the transaction | [optional]
|
14
14
|
**approved** | **BOOLEAN** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional]
|
15
15
|
**flag_color** | **String** | The transaction flag | [optional]
|
16
|
-
**import_id** | **String** | If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
16
|
+
**import_id** | **String** | If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import. If import_id is specified as null, the transaction will be treated as a user entered transaction. | [optional]
|
17
17
|
|
18
18
|
|
data/docs/TransactionDetail.md
CHANGED
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
|
14
14
|
**payee_id** | **String** | |
|
15
15
|
**category_id** | **String** | |
|
16
16
|
**transfer_account_id** | **String** | |
|
17
|
-
**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
17
|
+
**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. |
|
18
18
|
**subtransactions** | [**Array<SubTransaction>**](SubTransaction.md) | If a split transaction, the sub-transactions. |
|
19
19
|
|
20
20
|
|
data/docs/TransactionSummary.md
CHANGED
@@ -14,6 +14,6 @@ Name | Type | Description | Notes
|
|
14
14
|
**payee_id** | **String** | |
|
15
15
|
**category_id** | **String** | |
|
16
16
|
**transfer_account_id** | **String** | |
|
17
|
-
**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
17
|
+
**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. |
|
18
18
|
|
19
19
|
|
data/docs/TransactionsApi.md
CHANGED
data/lib/ynab/configuration.rb
CHANGED
data/lib/ynab/models/account.rb
CHANGED
@@ -185,7 +185,7 @@ module YnabApi
|
|
185
185
|
return false if @id.nil?
|
186
186
|
return false if @name.nil?
|
187
187
|
return false if @type.nil?
|
188
|
-
type_validator = EnumAttributeValidator.new('String', ["
|
188
|
+
type_validator = EnumAttributeValidator.new('String', ["checking", "savings", "creditCard"])
|
189
189
|
return false unless type_validator.valid?(@type)
|
190
190
|
return false if @on_budget.nil?
|
191
191
|
return false if @closed.nil?
|
@@ -199,7 +199,7 @@ module YnabApi
|
|
199
199
|
# Custom attribute writer method checking allowed values (enum).
|
200
200
|
# @param [Object] type Object to be assigned
|
201
201
|
def type=(type)
|
202
|
-
validator = EnumAttributeValidator.new('String', ["
|
202
|
+
validator = EnumAttributeValidator.new('String', ["checking", "savings", "creditCard"])
|
203
203
|
unless validator.valid?(type)
|
204
204
|
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
|
205
205
|
end
|
@@ -42,7 +42,7 @@ module YnabApi
|
|
42
42
|
# The transaction flag
|
43
43
|
attr_accessor :flag_color
|
44
44
|
|
45
|
-
# If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
45
|
+
# If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import. If import_id is specified as null, the transaction will be treated as a user entered transaction.
|
46
46
|
attr_accessor :import_id
|
47
47
|
|
48
48
|
class EnumAttributeValidator
|
@@ -180,7 +180,7 @@ module YnabApi
|
|
180
180
|
return false if @account_id.nil?
|
181
181
|
return false if @date.nil?
|
182
182
|
return false if @amount.nil?
|
183
|
-
cleared_validator = EnumAttributeValidator.new('String', ["
|
183
|
+
cleared_validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
|
184
184
|
return false unless cleared_validator.valid?(@cleared)
|
185
185
|
flag_color_validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple"])
|
186
186
|
return false unless flag_color_validator.valid?(@flag_color)
|
@@ -190,7 +190,7 @@ module YnabApi
|
|
190
190
|
# Custom attribute writer method checking allowed values (enum).
|
191
191
|
# @param [Object] cleared Object to be assigned
|
192
192
|
def cleared=(cleared)
|
193
|
-
validator = EnumAttributeValidator.new('String', ["
|
193
|
+
validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
|
194
194
|
unless validator.valid?(cleared)
|
195
195
|
fail ArgumentError, "invalid value for 'cleared', must be one of #{validator.allowable_values}."
|
196
196
|
end
|
@@ -40,7 +40,7 @@ module YnabApi
|
|
40
40
|
|
41
41
|
attr_accessor :transfer_account_id
|
42
42
|
|
43
|
-
# If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
43
|
+
# If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
|
44
44
|
attr_accessor :import_id
|
45
45
|
|
46
46
|
# If a split transaction, the sub-transactions.
|
@@ -40,7 +40,7 @@ module YnabApi
|
|
40
40
|
|
41
41
|
attr_accessor :transfer_account_id
|
42
42
|
|
43
|
-
# If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
43
|
+
# If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'.
|
44
44
|
attr_accessor :import_id
|
45
45
|
|
46
46
|
class EnumAttributeValidator
|
data/lib/ynab/version.rb
CHANGED
data/pkg/ynab-0.1.0.gem
CHANGED
Binary file
|
data/pkg/ynab-0.2.0.gem
ADDED
Binary file
|
data/spec-v1-swagger.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
},
|
9
9
|
"schemes": ["https"],
|
10
10
|
"host": "api.youneedabudget.com",
|
11
|
-
"basePath": "/
|
11
|
+
"basePath": "/v1",
|
12
12
|
"tags": [
|
13
13
|
{
|
14
14
|
"name": "Budgets"
|
@@ -1294,7 +1294,7 @@
|
|
1294
1294
|
},
|
1295
1295
|
"type": {
|
1296
1296
|
"type": "string",
|
1297
|
-
"enum": ["
|
1297
|
+
"enum": ["checking", "savings", "creditCard"]
|
1298
1298
|
},
|
1299
1299
|
"on_budget": {
|
1300
1300
|
"type": "boolean",
|
@@ -1666,7 +1666,7 @@
|
|
1666
1666
|
"import_id": {
|
1667
1667
|
"type": "string",
|
1668
1668
|
"description":
|
1669
|
-
"If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
1669
|
+
"If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'."
|
1670
1670
|
}
|
1671
1671
|
}
|
1672
1672
|
},
|
@@ -1737,7 +1737,7 @@
|
|
1737
1737
|
},
|
1738
1738
|
"cleared": {
|
1739
1739
|
"type": "string",
|
1740
|
-
"enum": ["
|
1740
|
+
"enum": ["cleared", "uncleared", "reconciled"],
|
1741
1741
|
"description": "The cleared status of the transaction"
|
1742
1742
|
},
|
1743
1743
|
"approved": {
|
@@ -1753,7 +1753,7 @@
|
|
1753
1753
|
"import_id": {
|
1754
1754
|
"type": "string",
|
1755
1755
|
"description":
|
1756
|
-
"If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[
|
1756
|
+
"If specified for a new transaction, the transaction will be treated as Imported and assigned this import_id. If another transaction on the same account with this same import_id is later attempted to be created, it will be skipped to prevent duplication. Transactions imported through File Based Import or Direct Import and not through the API, are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import. If import_id is specified as null, the transaction will be treated as a user entered transaction."
|
1757
1757
|
}
|
1758
1758
|
}
|
1759
1759
|
},
|
@@ -38,7 +38,7 @@ http_interactions:
|
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"data":{"account":{"id":"5982e895-98e5-41ca-9681-0b6de1036a1c","name":"Checking","type":"
|
41
|
+
string: '{"data":{"account":{"id":"5982e895-98e5-41ca-9681-0b6de1036a1c","name":"Checking","type":"checking","on_budget":true,"closed":false,"note":null,"balance":998000,"cleared_balance":1000000,"uncleared_balance":-2000}}}'
|
42
42
|
http_version: '1.1'
|
43
43
|
adapter_metadata:
|
44
44
|
effective_url: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/accounts/5982e895-98e5-41ca-9681-0b6de1036a1c
|
@@ -38,7 +38,7 @@ http_interactions:
|
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: '{"data":{"accounts":[{"id":"5982e895-98e5-41ca-9681-0b6de1036a1c","name":"Checking","type":"
|
41
|
+
string: '{"data":{"accounts":[{"id":"5982e895-98e5-41ca-9681-0b6de1036a1c","name":"Checking","type":"checking","on_budget":true,"closed":false,"note":null,"balance":998000,"cleared_balance":1000000,"uncleared_balance":-2000}]}}'
|
42
42
|
http_version: '1.1'
|
43
43
|
adapter_metadata:
|
44
44
|
effective_url: http://api.localhost:3000/v1/budgets/f419ac25-6217-4175-88dc-c3136ff5f6fd/accounts
|
@@ -38,7 +38,7 @@ http_interactions:
|
|
38
38
|
- chunked
|
39
39
|
body:
|
40
40
|
encoding: UTF-8
|
41
|
-
string: "{\"data\" : {\"budget\" : {\"id\":\"f419ac25-6217-4175-88dc-c3136ff5f6fd\",\"name\":\"ABC\",\"last_modified_on\":\"2018-02-15T06:53:19+00:00\",\"date_format\":{\"format\":\"MM/DD/YYYY\"},\"currency_format\":{\"iso_code\":\"USD\",\"example_format\":\"123,456.78\",\"decimal_digits\":2,\"decimal_separator\":\".\",\"symbol_first\":true,\"group_separator\":\",\",\"currency_symbol\":\"$\",\"display_symbol\":true},\"first_month\":\"2018-02-01\",\"last_month\":\"2018-02-01\",\"accounts\":[{\"id\":\"5982e895-98e5-41ca-9681-0b6de1036a1c\",\"name\":\"Checking\",\"type\":\"
|
41
|
+
string: "{\"data\" : {\"budget\" : {\"id\":\"f419ac25-6217-4175-88dc-c3136ff5f6fd\",\"name\":\"ABC\",\"last_modified_on\":\"2018-02-15T06:53:19+00:00\",\"date_format\":{\"format\":\"MM/DD/YYYY\"},\"currency_format\":{\"iso_code\":\"USD\",\"example_format\":\"123,456.78\",\"decimal_digits\":2,\"decimal_separator\":\".\",\"symbol_first\":true,\"group_separator\":\",\",\"currency_symbol\":\"$\",\"display_symbol\":true},\"first_month\":\"2018-02-01\",\"last_month\":\"2018-02-01\",\"accounts\":[{\"id\":\"5982e895-98e5-41ca-9681-0b6de1036a1c\",\"name\":\"Checking\",\"type\":\"checking\",\"on_budget\":true,\"closed\":false,\"note\":null,\"balance\":998000,\"cleared_balance\":1000000,\"uncleared_balance\":-2000}],\"payees\":[{\"id\":\"2141b5d8-5b9b-4a17-be45-3f4a9ac397ec\",\"name\":\"Starting
|
42
42
|
Balance\",\"transfer_account_id\":null}, \n {\"id\":\"7f786732-10c1-4618-aa0b-56199b2cea26\",\"name\":\"Manual
|
43
43
|
Balance Adjustment\",\"transfer_account_id\":null}, \n {\"id\":\"f0c12109-c27a-4739-adc5-e598e33dd1dd\",\"name\":\"Reconciliation
|
44
44
|
Balance Adjustment\",\"transfer_account_id\":null}, \n {\"id\":\"8a9a08ae-416d-436c-870a-a25e2d8f24cd\",\"name\":\"Transfer
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ynab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- You Need A Budget, LLC
|
@@ -248,6 +248,7 @@ files:
|
|
248
248
|
- lib/ynab/models/transactions_wrapper.rb
|
249
249
|
- lib/ynab/version.rb
|
250
250
|
- pkg/ynab-0.1.0.gem
|
251
|
+
- pkg/ynab-0.2.0.gem
|
251
252
|
- spec-v1-swagger.json
|
252
253
|
- spec/api/accounts_spec.rb
|
253
254
|
- spec/api/budgets_spec.rb
|