ynab 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,7 @@ module YnabApi
49
49
  {
50
50
  :'iso_code' => :'String',
51
51
  :'example_format' => :'String',
52
- :'decimal_digits' => :'String',
52
+ :'decimal_digits' => :'Float',
53
53
  :'decimal_separator' => :'String',
54
54
  :'symbol_first' => :'BOOLEAN',
55
55
  :'group_separator' => :'String',
@@ -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
  # Whether the hybrid transaction represents a regular transaction or a subtransaction
47
50
  attr_accessor :type
48
51
 
@@ -92,6 +95,7 @@ module YnabApi
92
95
  :'category_id' => :'category_id',
93
96
  :'transfer_account_id' => :'transfer_account_id',
94
97
  :'import_id' => :'import_id',
98
+ :'deleted' => :'deleted',
95
99
  :'type' => :'type',
96
100
  :'parent_transaction_id' => :'parent_transaction_id',
97
101
  :'account_name' => :'account_name',
@@ -115,6 +119,7 @@ module YnabApi
115
119
  :'category_id' => :'String',
116
120
  :'transfer_account_id' => :'String',
117
121
  :'import_id' => :'String',
122
+ :'deleted' => :'BOOLEAN',
118
123
  :'type' => :'String',
119
124
  :'parent_transaction_id' => :'String',
120
125
  :'account_name' => :'String',
@@ -179,6 +184,10 @@ module YnabApi
179
184
  self.import_id = attributes[:'import_id']
180
185
  end
181
186
 
187
+ if attributes.has_key?(:'deleted')
188
+ self.deleted = attributes[:'deleted']
189
+ end
190
+
182
191
  if attributes.has_key?(:'type')
183
192
  self.type = attributes[:'type']
184
193
  end
@@ -252,6 +261,10 @@ module YnabApi
252
261
  invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
253
262
  end
254
263
 
264
+ if @deleted.nil?
265
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
266
+ end
267
+
255
268
  if @type.nil?
256
269
  invalid_properties.push('invalid value for "type", type cannot be nil.')
257
270
  end
@@ -294,6 +307,7 @@ module YnabApi
294
307
  return false if @category_id.nil?
295
308
  return false if @transfer_account_id.nil?
296
309
  return false if @import_id.nil?
310
+ return false if @deleted.nil?
297
311
  return false if @type.nil?
298
312
  type_validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
299
313
  return false unless type_validator.valid?(@type)
@@ -351,6 +365,7 @@ module YnabApi
351
365
  category_id == o.category_id &&
352
366
  transfer_account_id == o.transfer_account_id &&
353
367
  import_id == o.import_id &&
368
+ deleted == o.deleted &&
354
369
  type == o.type &&
355
370
  parent_transaction_id == o.parent_transaction_id &&
356
371
  account_name == o.account_name &&
@@ -367,7 +382,7 @@ module YnabApi
367
382
  # Calculates hash code according to all attributes.
368
383
  # @return [Fixnum] Hash code
369
384
  def hash
370
- [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, type, parent_transaction_id, account_name, payee_name, category_name].hash
385
+ [id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, deleted, type, parent_transaction_id, account_name, payee_name, category_name].hash
371
386
  end
372
387
 
373
388
  # Builds the object from hash
@@ -21,12 +21,16 @@ module YnabApi
21
21
  # If a transfer payee, the account_id to which this payee transfers to
22
22
  attr_accessor :transfer_account_id
23
23
 
24
+ # Whether or not the payee has been deleted. Deleted payees will only be included in delta requests.
25
+ attr_accessor :deleted
26
+
24
27
  # Attribute mapping from ruby-style variable name to JSON key.
25
28
  def self.attribute_map
26
29
  {
27
30
  :'id' => :'id',
28
31
  :'name' => :'name',
29
- :'transfer_account_id' => :'transfer_account_id'
32
+ :'transfer_account_id' => :'transfer_account_id',
33
+ :'deleted' => :'deleted'
30
34
  }
31
35
  end
32
36
 
@@ -35,7 +39,8 @@ module YnabApi
35
39
  {
36
40
  :'id' => :'String',
37
41
  :'name' => :'String',
38
- :'transfer_account_id' => :'String'
42
+ :'transfer_account_id' => :'String',
43
+ :'deleted' => :'BOOLEAN'
39
44
  }
40
45
  end
41
46
 
@@ -58,6 +63,10 @@ module YnabApi
58
63
  if attributes.has_key?(:'transfer_account_id')
59
64
  self.transfer_account_id = attributes[:'transfer_account_id']
60
65
  end
66
+
67
+ if attributes.has_key?(:'deleted')
68
+ self.deleted = attributes[:'deleted']
69
+ end
61
70
  end
62
71
 
63
72
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -76,6 +85,10 @@ module YnabApi
76
85
  invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
77
86
  end
78
87
 
88
+ if @deleted.nil?
89
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
90
+ end
91
+
79
92
  invalid_properties
80
93
  end
81
94
 
@@ -85,6 +98,7 @@ module YnabApi
85
98
  return false if @id.nil?
86
99
  return false if @name.nil?
87
100
  return false if @transfer_account_id.nil?
101
+ return false if @deleted.nil?
88
102
  true
89
103
  end
90
104
 
@@ -95,7 +109,8 @@ module YnabApi
95
109
  self.class == o.class &&
96
110
  id == o.id &&
97
111
  name == o.name &&
98
- transfer_account_id == o.transfer_account_id
112
+ transfer_account_id == o.transfer_account_id &&
113
+ deleted == o.deleted
99
114
  end
100
115
 
101
116
  # @see the `==` method
@@ -107,7 +122,7 @@ module YnabApi
107
122
  # Calculates hash code according to all attributes.
108
123
  # @return [Fixnum] Hash code
109
124
  def hash
110
- [id, name, transfer_account_id].hash
125
+ [id, name, transfer_account_id, deleted].hash
111
126
  end
112
127
 
113
128
  # Builds the object from hash
@@ -22,13 +22,17 @@ module YnabApi
22
22
 
23
23
  attr_accessor :longitude
24
24
 
25
+ # Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests.
26
+ attr_accessor :deleted
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'id' => :'id',
29
32
  :'payee_id' => :'payee_id',
30
33
  :'latitude' => :'latitude',
31
- :'longitude' => :'longitude'
34
+ :'longitude' => :'longitude',
35
+ :'deleted' => :'deleted'
32
36
  }
33
37
  end
34
38
 
@@ -38,7 +42,8 @@ module YnabApi
38
42
  :'id' => :'String',
39
43
  :'payee_id' => :'String',
40
44
  :'latitude' => :'String',
41
- :'longitude' => :'String'
45
+ :'longitude' => :'String',
46
+ :'deleted' => :'BOOLEAN'
42
47
  }
43
48
  end
44
49
 
@@ -65,6 +70,10 @@ module YnabApi
65
70
  if attributes.has_key?(:'longitude')
66
71
  self.longitude = attributes[:'longitude']
67
72
  end
73
+
74
+ if attributes.has_key?(:'deleted')
75
+ self.deleted = attributes[:'deleted']
76
+ end
68
77
  end
69
78
 
70
79
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -87,6 +96,10 @@ module YnabApi
87
96
  invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
88
97
  end
89
98
 
99
+ if @deleted.nil?
100
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
101
+ end
102
+
90
103
  invalid_properties
91
104
  end
92
105
 
@@ -97,6 +110,7 @@ module YnabApi
97
110
  return false if @payee_id.nil?
98
111
  return false if @latitude.nil?
99
112
  return false if @longitude.nil?
113
+ return false if @deleted.nil?
100
114
  true
101
115
  end
102
116
 
@@ -108,7 +122,8 @@ module YnabApi
108
122
  id == o.id &&
109
123
  payee_id == o.payee_id &&
110
124
  latitude == o.latitude &&
111
- longitude == o.longitude
125
+ longitude == o.longitude &&
126
+ deleted == o.deleted
112
127
  end
113
128
 
114
129
  # @see the `==` method
@@ -120,7 +135,7 @@ module YnabApi
120
135
  # Calculates hash code according to all attributes.
121
136
  # @return [Fixnum] Hash code
122
137
  def hash
123
- [id, payee_id, latitude, longitude].hash
138
+ [id, payee_id, latitude, longitude, deleted].hash
124
139
  end
125
140
 
126
141
  # Builds the object from hash
@@ -27,9 +27,12 @@ module YnabApi
27
27
 
28
28
  attr_accessor :category_id
29
29
 
30
- # If a transfer, the account_id which the scheduled sub transaction transfers to
30
+ # If a transfer, the account_id which the scheduled subtransaction transfers to
31
31
  attr_accessor :transfer_account_id
32
32
 
33
+ # Whether or not the scheduled subtransaction has been deleted. Deleted scheduled 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, scheduled_transaction_id, amount, memo, payee_id, category_id, transfer_account_id].hash
182
+ [id, scheduled_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
@@ -41,6 +41,9 @@ module YnabApi
41
41
  # If a transfer, the account_id which the scheduled transaction transfers to
42
42
  attr_accessor :transfer_account_id
43
43
 
44
+ # Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
45
+ attr_accessor :deleted
46
+
44
47
  attr_accessor :account_name
45
48
 
46
49
  attr_accessor :payee_name
@@ -86,6 +89,7 @@ module YnabApi
86
89
  :'payee_id' => :'payee_id',
87
90
  :'category_id' => :'category_id',
88
91
  :'transfer_account_id' => :'transfer_account_id',
92
+ :'deleted' => :'deleted',
89
93
  :'account_name' => :'account_name',
90
94
  :'payee_name' => :'payee_name',
91
95
  :'category_name' => :'category_name',
@@ -107,6 +111,7 @@ module YnabApi
107
111
  :'payee_id' => :'String',
108
112
  :'category_id' => :'String',
109
113
  :'transfer_account_id' => :'String',
114
+ :'deleted' => :'BOOLEAN',
110
115
  :'account_name' => :'String',
111
116
  :'payee_name' => :'String',
112
117
  :'category_name' => :'String',
@@ -166,6 +171,10 @@ module YnabApi
166
171
  self.transfer_account_id = attributes[:'transfer_account_id']
167
172
  end
168
173
 
174
+ if attributes.has_key?(:'deleted')
175
+ self.deleted = attributes[:'deleted']
176
+ end
177
+
169
178
  if attributes.has_key?(:'account_name')
170
179
  self.account_name = attributes[:'account_name']
171
180
  end
@@ -233,6 +242,10 @@ module YnabApi
233
242
  invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
234
243
  end
235
244
 
245
+ if @deleted.nil?
246
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
247
+ end
248
+
236
249
  if @account_name.nil?
237
250
  invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
238
251
  end
@@ -270,6 +283,7 @@ module YnabApi
270
283
  return false if @payee_id.nil?
271
284
  return false if @category_id.nil?
272
285
  return false if @transfer_account_id.nil?
286
+ return false if @deleted.nil?
273
287
  return false if @account_name.nil?
274
288
  return false if @payee_name.nil?
275
289
  return false if @category_name.nil?
@@ -313,6 +327,7 @@ module YnabApi
313
327
  payee_id == o.payee_id &&
314
328
  category_id == o.category_id &&
315
329
  transfer_account_id == o.transfer_account_id &&
330
+ deleted == o.deleted &&
316
331
  account_name == o.account_name &&
317
332
  payee_name == o.payee_name &&
318
333
  category_name == o.category_name &&
@@ -328,7 +343,7 @@ module YnabApi
328
343
  # Calculates hash code according to all attributes.
329
344
  # @return [Fixnum] Hash code
330
345
  def hash
331
- [id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id, account_name, payee_name, category_name, subtransactions].hash
346
+ [id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id, deleted, account_name, payee_name, category_name, subtransactions].hash
332
347
  end
333
348
 
334
349
  # Builds the object from hash
@@ -41,6 +41,9 @@ module YnabApi
41
41
  # If a transfer, the account_id which the scheduled transaction transfers to
42
42
  attr_accessor :transfer_account_id
43
43
 
44
+ # Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
45
+ attr_accessor :deleted
46
+
44
47
  class EnumAttributeValidator
45
48
  attr_reader :datatype
46
49
  attr_reader :allowable_values
@@ -76,7 +79,8 @@ module YnabApi
76
79
  :'account_id' => :'account_id',
77
80
  :'payee_id' => :'payee_id',
78
81
  :'category_id' => :'category_id',
79
- :'transfer_account_id' => :'transfer_account_id'
82
+ :'transfer_account_id' => :'transfer_account_id',
83
+ :'deleted' => :'deleted'
80
84
  }
81
85
  end
82
86
 
@@ -93,7 +97,8 @@ module YnabApi
93
97
  :'account_id' => :'String',
94
98
  :'payee_id' => :'String',
95
99
  :'category_id' => :'String',
96
- :'transfer_account_id' => :'String'
100
+ :'transfer_account_id' => :'String',
101
+ :'deleted' => :'BOOLEAN'
97
102
  }
98
103
  end
99
104
 
@@ -148,6 +153,10 @@ module YnabApi
148
153
  if attributes.has_key?(:'transfer_account_id')
149
154
  self.transfer_account_id = attributes[:'transfer_account_id']
150
155
  end
156
+
157
+ if attributes.has_key?(:'deleted')
158
+ self.deleted = attributes[:'deleted']
159
+ end
151
160
  end
152
161
 
153
162
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -198,6 +207,10 @@ module YnabApi
198
207
  invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
199
208
  end
200
209
 
210
+ if @deleted.nil?
211
+ invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
212
+ end
213
+
201
214
  invalid_properties
202
215
  end
203
216
 
@@ -219,6 +232,7 @@ module YnabApi
219
232
  return false if @payee_id.nil?
220
233
  return false if @category_id.nil?
221
234
  return false if @transfer_account_id.nil?
235
+ return false if @deleted.nil?
222
236
  true
223
237
  end
224
238
 
@@ -257,7 +271,8 @@ module YnabApi
257
271
  account_id == o.account_id &&
258
272
  payee_id == o.payee_id &&
259
273
  category_id == o.category_id &&
260
- transfer_account_id == o.transfer_account_id
274
+ transfer_account_id == o.transfer_account_id &&
275
+ deleted == o.deleted
261
276
  end
262
277
 
263
278
  # @see the `==` method
@@ -269,7 +284,7 @@ module YnabApi
269
284
  # Calculates hash code according to all attributes.
270
285
  # @return [Fixnum] Hash code
271
286
  def hash
272
- [id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id].hash
287
+ [id, date_first, date_next, frequency, amount, memo, flag_color, account_id, payee_id, category_id, transfer_account_id, deleted].hash
273
288
  end
274
289
 
275
290
  # Builds the object from hash