ynab 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,9 @@ module YnabApi
30
30
  # If a transfer, the account_id which the subtransaction transfers to
31
31
  attr_accessor :transfer_account_id
32
32
 
33
+ # Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
34
+ attr_accessor :deleted
35
+
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
@@ -39,7 +42,8 @@ module YnabApi
39
42
  :'memo' => :'memo',
40
43
  :'payee_id' => :'payee_id',
41
44
  :'category_id' => :'category_id',
42
- :'transfer_account_id' => :'transfer_account_id'
45
+ :'transfer_account_id' => :'transfer_account_id',
46
+ :'deleted' => :'deleted'
43
47
  }
44
48
  end
45
49
 
@@ -52,7 +56,8 @@ module YnabApi
52
56
  :'memo' => :'String',
53
57
  :'payee_id' => :'String',
54
58
  :'category_id' => :'String',
55
- :'transfer_account_id' => :'String'
59
+ :'transfer_account_id' => :'String',
60
+ :'deleted' => :'BOOLEAN'
56
61
  }
57
62
  end
58
63
 
@@ -91,6 +96,10 @@ module YnabApi
91
96
  if attributes.has_key?(:'transfer_account_id')
92
97
  self.transfer_account_id = attributes[:'transfer_account_id']
93
98
  end
99
+
100
+ if attributes.has_key?(:'deleted')
101
+ self.deleted = attributes[:'deleted']
102
+ end
94
103
  end
95
104
 
96
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -125,6 +134,10 @@ module YnabApi
125
134
  invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
126
135
  end
127
136
 
137
+ if @deleted.nil?
138
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
139
+ end
140
+
128
141
  invalid_properties
129
142
  end
130
143
 
@@ -138,6 +151,7 @@ module YnabApi
138
151
  return false if @payee_id.nil?
139
152
  return false if @category_id.nil?
140
153
  return false if @transfer_account_id.nil?
154
+ return false if @deleted.nil?
141
155
  true
142
156
  end
143
157
 
@@ -152,7 +166,8 @@ module YnabApi
152
166
  memo == o.memo &&
153
167
  payee_id == o.payee_id &&
154
168
  category_id == o.category_id &&
155
- transfer_account_id == o.transfer_account_id
169
+ transfer_account_id == o.transfer_account_id &&
170
+ deleted == o.deleted
156
171
  end
157
172
 
158
173
  # @see the `==` method
@@ -164,7 +179,7 @@ module YnabApi
164
179
  # Calculates hash code according to all attributes.
165
180
  # @return [Fixnum] Hash code
166
181
  def hash
167
- [id, transaction_id, amount, memo, payee_id, category_id, transfer_account_id].hash
182
+ [id, transaction_id, amount, memo, payee_id, category_id, transfer_account_id, deleted].hash
168
183
  end
169
184
 
170
185
  # Builds the object from hash
@@ -43,6 +43,9 @@ module YnabApi
43
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
+ # Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
47
+ attr_accessor :deleted
48
+
46
49
  attr_accessor :account_name
47
50
 
48
51
  attr_accessor :payee_name
@@ -89,6 +92,7 @@ module YnabApi
89
92
  :'category_id' => :'category_id',
90
93
  :'transfer_account_id' => :'transfer_account_id',
91
94
  :'import_id' => :'import_id',
95
+ :'deleted' => :'deleted',
92
96
  :'account_name' => :'account_name',
93
97
  :'payee_name' => :'payee_name',
94
98
  :'category_name' => :'category_name',
@@ -111,6 +115,7 @@ module YnabApi
111
115
  :'category_id' => :'String',
112
116
  :'transfer_account_id' => :'String',
113
117
  :'import_id' => :'String',
118
+ :'deleted' => :'BOOLEAN',
114
119
  :'account_name' => :'String',
115
120
  :'payee_name' => :'String',
116
121
  :'category_name' => :'String',
@@ -174,6 +179,10 @@ module YnabApi
174
179
  self.import_id = attributes[:'import_id']
175
180
  end
176
181
 
182
+ if attributes.has_key?(:'deleted')
183
+ self.deleted = attributes[:'deleted']
184
+ end
185
+
177
186
  if attributes.has_key?(:'account_name')
178
187
  self.account_name = attributes[:'account_name']
179
188
  end
@@ -245,6 +254,10 @@ module YnabApi
245
254
  invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
246
255
  end
247
256
 
257
+ if @deleted.nil?
258
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
259
+ end
260
+
248
261
  if @account_name.nil?
249
262
  invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
250
263
  end
@@ -283,6 +296,7 @@ module YnabApi
283
296
  return false if @category_id.nil?
284
297
  return false if @transfer_account_id.nil?
285
298
  return false if @import_id.nil?
299
+ return false if @deleted.nil?
286
300
  return false if @account_name.nil?
287
301
  return false if @payee_name.nil?
288
302
  return false if @category_name.nil?
@@ -327,6 +341,7 @@ module YnabApi
327
341
  category_id == o.category_id &&
328
342
  transfer_account_id == o.transfer_account_id &&
329
343
  import_id == o.import_id &&
344
+ deleted == o.deleted &&
330
345
  account_name == o.account_name &&
331
346
  payee_name == o.payee_name &&
332
347
  category_name == o.category_name &&
@@ -342,7 +357,7 @@ module YnabApi
342
357
  # Calculates hash code according to all attributes.
343
358
  # @return [Fixnum] Hash code
344
359
  def hash
345
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, account_name, payee_name, category_name, subtransactions].hash
360
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, deleted, account_name, payee_name, category_name, subtransactions].hash
346
361
  end
347
362
 
348
363
  # Builds the object from hash
@@ -43,6 +43,9 @@ module YnabApi
43
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
+ # Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
47
+ attr_accessor :deleted
48
+
46
49
  class EnumAttributeValidator
47
50
  attr_reader :datatype
48
51
  attr_reader :allowable_values
@@ -79,7 +82,8 @@ module YnabApi
79
82
  :'payee_id' => :'payee_id',
80
83
  :'category_id' => :'category_id',
81
84
  :'transfer_account_id' => :'transfer_account_id',
82
- :'import_id' => :'import_id'
85
+ :'import_id' => :'import_id',
86
+ :'deleted' => :'deleted'
83
87
  }
84
88
  end
85
89
 
@@ -97,7 +101,8 @@ module YnabApi
97
101
  :'payee_id' => :'String',
98
102
  :'category_id' => :'String',
99
103
  :'transfer_account_id' => :'String',
100
- :'import_id' => :'String'
104
+ :'import_id' => :'String',
105
+ :'deleted' => :'BOOLEAN'
101
106
  }
102
107
  end
103
108
 
@@ -156,6 +161,10 @@ module YnabApi
156
161
  if attributes.has_key?(:'import_id')
157
162
  self.import_id = attributes[:'import_id']
158
163
  end
164
+
165
+ if attributes.has_key?(:'deleted')
166
+ self.deleted = attributes[:'deleted']
167
+ end
159
168
  end
160
169
 
161
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -210,6 +219,10 @@ module YnabApi
210
219
  invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
211
220
  end
212
221
 
222
+ if @deleted.nil?
223
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
224
+ end
225
+
213
226
  invalid_properties
214
227
  end
215
228
 
@@ -232,6 +245,7 @@ module YnabApi
232
245
  return false if @category_id.nil?
233
246
  return false if @transfer_account_id.nil?
234
247
  return false if @import_id.nil?
248
+ return false if @deleted.nil?
235
249
  true
236
250
  end
237
251
 
@@ -271,7 +285,8 @@ module YnabApi
271
285
  payee_id == o.payee_id &&
272
286
  category_id == o.category_id &&
273
287
  transfer_account_id == o.transfer_account_id &&
274
- import_id == o.import_id
288
+ import_id == o.import_id &&
289
+ deleted == o.deleted
275
290
  end
276
291
 
277
292
  # @see the `==` method
@@ -283,7 +298,7 @@ module YnabApi
283
298
  # Calculates hash code according to all attributes.
284
299
  # @return [Fixnum] Hash code
285
300
  def hash
286
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id].hash
301
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, deleted].hash
287
302
  end
288
303
 
289
304
  # Builds the object from hash
data/lib/ynab/version.rb CHANGED
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module YnabApi
14
- VERSION = '0.7.0'
14
+ VERSION = '0.8.0'
15
15
  end
data/spec-v1-swagger.json CHANGED
@@ -720,14 +720,7 @@
720
720
  }
721
721
  },
722
722
  "400": {
723
- "description": "An error occurred.",
724
- "schema": {
725
- "$ref": "#/definitions/ErrorResponse"
726
- }
727
- },
728
- "422": {
729
- "description":
730
- "A transation with the same import_id already exists on the account so this transaction was not created.",
723
+ "description": "The request could not be understood due to malformed syntax or validation error(s).",
731
724
  "schema": {
732
725
  "$ref": "#/definitions/ErrorResponse"
733
726
  }
@@ -769,7 +762,7 @@
769
762
  }
770
763
  },
771
764
  "400": {
772
- "description": "An error occurred.",
765
+ "description": "The request could not be understood due to malformed syntax or validation error(s).",
773
766
  "schema": {
774
767
  "$ref": "#/definitions/ErrorResponse"
775
768
  }
@@ -1029,7 +1022,7 @@
1029
1022
  }
1030
1023
  },
1031
1024
  "400": {
1032
- "description": "An error occurred.",
1025
+ "description": "The request could not be understood due to malformed syntax or validation error(s).",
1033
1026
  "schema": {
1034
1027
  "$ref": "#/definitions/ErrorResponse"
1035
1028
  }
@@ -1184,6 +1177,54 @@
1184
1177
  }
1185
1178
  }
1186
1179
  },
1180
+ "DateFormat": {
1181
+ "type": "object",
1182
+ "required": ["format"],
1183
+ "properties": {
1184
+ "format": {
1185
+ "type": "string"
1186
+ }
1187
+ }
1188
+ },
1189
+ "CurrencyFormat": {
1190
+ "type": "object",
1191
+ "required": [
1192
+ "iso_code",
1193
+ "example_format",
1194
+ "decimal_digits",
1195
+ "decimal_separator",
1196
+ "symbol_first",
1197
+ "group_separator",
1198
+ "currency_symbol",
1199
+ "display_symbol"
1200
+ ],
1201
+ "properties": {
1202
+ "iso_code": {
1203
+ "type": "string"
1204
+ },
1205
+ "example_format": {
1206
+ "type": "string"
1207
+ },
1208
+ "decimal_digits": {
1209
+ "type": "number"
1210
+ },
1211
+ "decimal_separator": {
1212
+ "type": "string"
1213
+ },
1214
+ "symbol_first": {
1215
+ "type": "boolean"
1216
+ },
1217
+ "group_separator": {
1218
+ "type": "string"
1219
+ },
1220
+ "currency_symbol": {
1221
+ "type": "string"
1222
+ },
1223
+ "display_symbol": {
1224
+ "type": "boolean"
1225
+ }
1226
+ }
1227
+ },
1187
1228
  "BudgetSummaryResponse": {
1188
1229
  "type": "object",
1189
1230
  "required": ["data"],
@@ -1252,54 +1293,6 @@
1252
1293
  }
1253
1294
  }
1254
1295
  },
1255
- "DateFormat": {
1256
- "type": "object",
1257
- "required": ["format"],
1258
- "properties": {
1259
- "format": {
1260
- "type": "string"
1261
- }
1262
- }
1263
- },
1264
- "CurrencyFormat": {
1265
- "type": "object",
1266
- "required": [
1267
- "iso_code",
1268
- "example_format",
1269
- "decimal_digits",
1270
- "decimal_separator",
1271
- "symbol_first",
1272
- "group_separator",
1273
- "currency_symbol",
1274
- "display_symbol"
1275
- ],
1276
- "properties": {
1277
- "iso_code": {
1278
- "type": "string"
1279
- },
1280
- "example_format": {
1281
- "type": "string"
1282
- },
1283
- "decimal_digits": {
1284
- "type": "string"
1285
- },
1286
- "decimal_separator": {
1287
- "type": "string"
1288
- },
1289
- "symbol_first": {
1290
- "type": "boolean"
1291
- },
1292
- "group_separator": {
1293
- "type": "string"
1294
- },
1295
- "currency_symbol": {
1296
- "type": "string"
1297
- },
1298
- "display_symbol": {
1299
- "type": "boolean"
1300
- }
1301
- }
1302
- },
1303
1296
  "BudgetDetail": {
1304
1297
  "allOf": [
1305
1298
  {
@@ -1422,7 +1415,8 @@
1422
1415
  "note",
1423
1416
  "balance",
1424
1417
  "cleared_balance",
1425
- "uncleared_balance"
1418
+ "uncleared_balance",
1419
+ "deleted"
1426
1420
  ],
1427
1421
  "properties": {
1428
1422
  "id": {
@@ -1434,18 +1428,19 @@
1434
1428
  },
1435
1429
  "type": {
1436
1430
  "type": "string",
1431
+ "description": "The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.",
1437
1432
  "enum": [
1438
1433
  "checking",
1439
1434
  "savings",
1440
- "creditCard",
1441
1435
  "cash",
1436
+ "creditCard",
1442
1437
  "lineOfCredit",
1443
- "merchantAccount",
1438
+ "otherAsset",
1439
+ "otherLiability",
1444
1440
  "payPal",
1441
+ "merchantAccount",
1445
1442
  "investmentAccount",
1446
- "mortgage",
1447
- "otherAsset",
1448
- "otherLiability"
1443
+ "mortgage"
1449
1444
  ]
1450
1445
  },
1451
1446
  "on_budget": {
@@ -1476,6 +1471,10 @@
1476
1471
  "format": "1234000",
1477
1472
  "description":
1478
1473
  "The current uncleared balance of the account in milliunits format"
1474
+ },
1475
+ "deleted": {
1476
+ "type": "boolean",
1477
+ "description": "Whether or not the account has been deleted. Deleted accounts will only be included in delta requests."
1479
1478
  }
1480
1479
  }
1481
1480
  },
@@ -1520,7 +1519,7 @@
1520
1519
  },
1521
1520
  "CategoryGroup": {
1522
1521
  "type": "object",
1523
- "required": ["id", "name", "hidden"],
1522
+ "required": ["id", "name", "hidden", "deleted"],
1524
1523
  "properties": {
1525
1524
  "id": {
1526
1525
  "type": "string",
@@ -1532,6 +1531,10 @@
1532
1531
  "hidden": {
1533
1532
  "description": "Whether or not the category group is hidden",
1534
1533
  "type": "boolean"
1534
+ },
1535
+ "deleted": {
1536
+ "type": "boolean",
1537
+ "description": "Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests."
1535
1538
  }
1536
1539
  }
1537
1540
  },
@@ -1563,9 +1566,10 @@
1563
1566
  "name",
1564
1567
  "hidden",
1565
1568
  "note",
1569
+ "budgeted",
1566
1570
  "activity",
1567
1571
  "balance",
1568
- "budgeted"
1572
+ "deleted"
1569
1573
  ],
1570
1574
  "properties": {
1571
1575
  "id": {
@@ -1597,6 +1601,10 @@
1597
1601
  "balance": {
1598
1602
  "type": "number",
1599
1603
  "description": "Balance in current month in milliunits format"
1604
+ },
1605
+ "deleted": {
1606
+ "type": "boolean",
1607
+ "description": "Whether or not the category has been deleted. Deleted categories will only be included in delta requests."
1600
1608
  }
1601
1609
  }
1602
1610
  },
@@ -1641,7 +1649,7 @@
1641
1649
  },
1642
1650
  "Payee": {
1643
1651
  "type": "object",
1644
- "required": ["id", "name", "transfer_account_id"],
1652
+ "required": ["id", "name", "transfer_account_id", "deleted"],
1645
1653
  "properties": {
1646
1654
  "id": {
1647
1655
  "type": "string",
@@ -1654,6 +1662,10 @@
1654
1662
  "description":
1655
1663
  "If a transfer payee, the account_id to which this payee transfers to",
1656
1664
  "type": "string"
1665
+ },
1666
+ "deleted": {
1667
+ "type": "boolean",
1668
+ "description": "Whether or not the payee has been deleted. Deleted payees will only be included in delta requests."
1657
1669
  }
1658
1670
  }
1659
1671
  },
@@ -1698,7 +1710,7 @@
1698
1710
  },
1699
1711
  "PayeeLocation": {
1700
1712
  "type": "object",
1701
- "required": ["id", "payee_id", "latitude", "longitude"],
1713
+ "required": ["id", "payee_id", "latitude", "longitude", "deleted"],
1702
1714
  "properties": {
1703
1715
  "id": {
1704
1716
  "type": "string",
@@ -1713,6 +1725,10 @@
1713
1725
  },
1714
1726
  "longitude": {
1715
1727
  "type": "string"
1728
+ },
1729
+ "deleted": {
1730
+ "type": "boolean",
1731
+ "description": "Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests."
1716
1732
  }
1717
1733
  }
1718
1734
  },
@@ -1790,7 +1806,8 @@
1790
1806
  "payee_id",
1791
1807
  "category_id",
1792
1808
  "transfer_account_id",
1793
- "import_id"
1809
+ "import_id",
1810
+ "deleted"
1794
1811
  ],
1795
1812
  "properties": {
1796
1813
  "id": {
@@ -1843,6 +1860,10 @@
1843
1860
  "type": "string",
1844
1861
  "description":
1845
1862
  "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'."
1863
+ },
1864
+ "deleted": {
1865
+ "type": "boolean",
1866
+ "description": "Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests."
1846
1867
  }
1847
1868
  }
1848
1869
  },
@@ -2048,7 +2069,8 @@
2048
2069
  "memo",
2049
2070
  "payee_id",
2050
2071
  "category_id",
2051
- "transfer_account_id"
2072
+ "transfer_account_id",
2073
+ "deleted"
2052
2074
  ],
2053
2075
  "properties": {
2054
2076
  "id": {
@@ -2080,6 +2102,10 @@
2080
2102
  "format": "uuid",
2081
2103
  "description":
2082
2104
  "If a transfer, the account_id which the subtransaction transfers to"
2105
+ },
2106
+ "deleted": {
2107
+ "type": "boolean",
2108
+ "description": "Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests."
2083
2109
  }
2084
2110
  }
2085
2111
  },
@@ -2135,7 +2161,8 @@
2135
2161
  "account_id",
2136
2162
  "payee_id",
2137
2163
  "category_id",
2138
- "transfer_account_id"
2164
+ "transfer_account_id",
2165
+ "deleted"
2139
2166
  ],
2140
2167
  "properties": {
2141
2168
  "id": {
@@ -2202,6 +2229,10 @@
2202
2229
  "format": "uuid",
2203
2230
  "description":
2204
2231
  "If a transfer, the account_id which the scheduled transaction transfers to"
2232
+ },
2233
+ "deleted": {
2234
+ "type": "boolean",
2235
+ "description": "Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests."
2205
2236
  }
2206
2237
  }
2207
2238
  },
@@ -2249,7 +2280,8 @@
2249
2280
  "memo",
2250
2281
  "payee_id",
2251
2282
  "category_id",
2252
- "transfer_account_id"
2283
+ "transfer_account_id",
2284
+ "deleted"
2253
2285
  ],
2254
2286
  "properties": {
2255
2287
  "id": {
@@ -2281,7 +2313,11 @@
2281
2313
  "type": "string",
2282
2314
  "format": "uuid",
2283
2315
  "description":
2284
- "If a transfer, the account_id which the scheduled sub transaction transfers to"
2316
+ "If a transfer, the account_id which the scheduled subtransaction transfers to"
2317
+ },
2318
+ "deleted": {
2319
+ "type": "boolean",
2320
+ "description": "Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests."
2285
2321
  }
2286
2322
  }
2287
2323
  },