ynab 0.6.0 → 0.7.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/README.md +24 -24
- data/Rakefile +1 -1
- data/config.json +1 -1
- data/docs/AccountsApi.md +0 -76
- data/docs/BudgetsApi.md +0 -74
- data/docs/CategoriesApi.md +0 -76
- data/docs/CurrencyFormat.md +8 -1
- data/docs/DateFormat.md +1 -1
- data/docs/HybridTransaction.md +3 -0
- data/docs/MonthsApi.md +0 -76
- data/docs/PayeeLocationsApi.md +0 -115
- data/docs/PayeesApi.md +0 -76
- data/docs/ScheduledTransactionsApi.md +0 -76
- data/docs/TransactionsApi.md +0 -325
- data/docs/UserApi.md +0 -34
- data/lib/ynab/api/accounts_api.rb +8 -10
- data/lib/ynab/api/budgets_api.rb +8 -10
- data/lib/ynab/api/categories_api.rb +8 -10
- data/lib/ynab/api/months_api.rb +8 -10
- data/lib/ynab/api/payee_locations_api.rb +11 -14
- data/lib/ynab/api/payees_api.rb +8 -10
- data/lib/ynab/api/scheduled_transactions_api.rb +8 -10
- data/lib/ynab/api/transactions_api.rb +26 -34
- data/lib/ynab/api/user_api.rb +5 -6
- data/lib/ynab/api_client.rb +1 -1
- data/lib/ynab/api_error.rb +1 -1
- data/lib/ynab/configuration.rb +2 -2
- data/lib/ynab/models/account.rb +18 -22
- data/lib/ynab/models/account_response.rb +7 -12
- data/lib/ynab/models/account_wrapper.rb +7 -12
- data/lib/ynab/models/accounts_response.rb +7 -12
- data/lib/ynab/models/accounts_wrapper.rb +7 -12
- data/lib/ynab/models/budget_detail.rb +8 -13
- data/lib/ynab/models/budget_detail_response.rb +7 -12
- data/lib/ynab/models/budget_detail_wrapper.rb +8 -13
- data/lib/ynab/models/budget_summary.rb +8 -13
- data/lib/ynab/models/budget_summary_response.rb +7 -12
- data/lib/ynab/models/budget_summary_wrapper.rb +7 -12
- data/lib/ynab/models/bulk_id_wrapper.rb +7 -12
- data/lib/ynab/models/bulk_ids.rb +8 -13
- data/lib/ynab/models/bulk_response.rb +7 -12
- data/lib/ynab/models/bulk_transactions.rb +7 -12
- data/lib/ynab/models/categories_response.rb +7 -12
- data/lib/ynab/models/category.rb +14 -19
- data/lib/ynab/models/category_group.rb +9 -14
- data/lib/ynab/models/category_group_with_categories.rb +10 -15
- data/lib/ynab/models/category_groups_wrapper.rb +7 -12
- data/lib/ynab/models/category_response.rb +7 -12
- data/lib/ynab/models/category_wrapper.rb +7 -12
- data/lib/ynab/models/currency_format.rb +112 -19
- data/lib/ynab/models/date_format.rb +16 -21
- data/lib/ynab/models/error_detail.rb +9 -14
- data/lib/ynab/models/error_response.rb +7 -12
- data/lib/ynab/models/hybrid_transaction.rb +74 -36
- data/lib/ynab/models/hybrid_transactions_response.rb +7 -12
- data/lib/ynab/models/hybrid_transactions_wrapper.rb +7 -12
- data/lib/ynab/models/month_detail.rb +11 -16
- data/lib/ynab/models/month_detail_response.rb +7 -12
- data/lib/ynab/models/month_detail_wrapper.rb +7 -12
- data/lib/ynab/models/month_summaries_response.rb +7 -12
- data/lib/ynab/models/month_summaries_wrapper.rb +7 -12
- data/lib/ynab/models/month_summary.rb +10 -15
- data/lib/ynab/models/payee.rb +9 -14
- data/lib/ynab/models/payee_location.rb +10 -15
- data/lib/ynab/models/payee_location_response.rb +7 -12
- data/lib/ynab/models/payee_location_wrapper.rb +7 -12
- data/lib/ynab/models/payee_locations_response.rb +7 -12
- data/lib/ynab/models/payee_locations_wrapper.rb +7 -12
- data/lib/ynab/models/payee_response.rb +7 -12
- data/lib/ynab/models/payee_wrapper.rb +7 -12
- data/lib/ynab/models/payees_response.rb +7 -12
- data/lib/ynab/models/payees_wrapper.rb +7 -12
- data/lib/ynab/models/save_transaction.rb +15 -19
- data/lib/ynab/models/save_transaction_wrapper.rb +7 -12
- data/lib/ynab/models/scheduled_sub_transaction.rb +13 -18
- data/lib/ynab/models/scheduled_transaction_detail.rb +27 -31
- data/lib/ynab/models/scheduled_transaction_response.rb +7 -12
- data/lib/ynab/models/scheduled_transaction_summary.rb +23 -27
- data/lib/ynab/models/scheduled_transaction_wrapper.rb +7 -12
- data/lib/ynab/models/scheduled_transactions_response.rb +7 -12
- data/lib/ynab/models/scheduled_transactions_wrapper.rb +7 -12
- data/lib/ynab/models/sub_transaction.rb +13 -18
- data/lib/ynab/models/transaction_detail.rb +28 -32
- data/lib/ynab/models/transaction_response.rb +7 -12
- data/lib/ynab/models/transaction_summary.rb +24 -28
- data/lib/ynab/models/transaction_wrapper.rb +7 -12
- data/lib/ynab/models/transactions_response.rb +7 -12
- data/lib/ynab/models/transactions_wrapper.rb +7 -12
- data/lib/ynab/models/user.rb +7 -12
- data/lib/ynab/models/user_response.rb +7 -12
- data/lib/ynab/models/user_wrapper.rb +7 -12
- data/lib/ynab/version.rb +2 -2
- data/spec-v1-swagger.json +50 -5
- data/swagger-templates/api_doc.mustache +32 -0
- data/ynab.gemspec +1 -1
- metadata +4 -3
@@ -6,29 +6,27 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class DateFormat
|
18
|
-
attr_accessor :
|
19
|
-
|
17
|
+
attr_accessor :format
|
20
18
|
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
24
|
-
:'
|
22
|
+
:'format' => :'format'
|
25
23
|
}
|
26
24
|
end
|
27
25
|
|
28
26
|
# Attribute type mapping.
|
29
27
|
def self.swagger_types
|
30
28
|
{
|
31
|
-
:'
|
29
|
+
:'format' => :'String'
|
32
30
|
}
|
33
31
|
end
|
34
32
|
|
@@ -38,30 +36,29 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
|
-
if attributes.has_key?(:'
|
44
|
-
self.
|
41
|
+
if attributes.has_key?(:'format')
|
42
|
+
self.format = attributes[:'format']
|
45
43
|
end
|
46
|
-
|
47
44
|
end
|
48
45
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
50
47
|
# @return Array for valid properties with the reasons
|
51
48
|
def list_invalid_properties
|
52
49
|
invalid_properties = Array.new
|
53
|
-
if @
|
54
|
-
invalid_properties.push(
|
50
|
+
if @format.nil?
|
51
|
+
invalid_properties.push('invalid value for "format", format cannot be nil.')
|
55
52
|
end
|
56
53
|
|
57
|
-
|
54
|
+
invalid_properties
|
58
55
|
end
|
59
56
|
|
60
57
|
# Check to see if the all the properties in the model are valid
|
61
58
|
# @return true if the model is valid
|
62
59
|
def valid?
|
63
|
-
return false if @
|
64
|
-
|
60
|
+
return false if @format.nil?
|
61
|
+
true
|
65
62
|
end
|
66
63
|
|
67
64
|
# Checks equality by comparing each attribute.
|
@@ -69,7 +66,7 @@ module YnabApi
|
|
69
66
|
def ==(o)
|
70
67
|
return true if self.equal?(o)
|
71
68
|
self.class == o.class &&
|
72
|
-
|
69
|
+
format == o.format
|
73
70
|
end
|
74
71
|
|
75
72
|
# @see the `==` method
|
@@ -81,7 +78,7 @@ module YnabApi
|
|
81
78
|
# Calculates hash code according to all attributes.
|
82
79
|
# @return [Fixnum] Hash code
|
83
80
|
def hash
|
84
|
-
[
|
81
|
+
[format].hash
|
85
82
|
end
|
86
83
|
|
87
84
|
# Builds the object from hash
|
@@ -94,7 +91,7 @@ module YnabApi
|
|
94
91
|
# check to ensure the input is an array given that the the attribute
|
95
92
|
# is documented as an array but the input is not
|
96
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
95
|
end
|
99
96
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
97
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -176,7 +173,7 @@ module YnabApi
|
|
176
173
|
# @return [Hash] Returns the value in the form of hash
|
177
174
|
def _to_hash(value)
|
178
175
|
if value.is_a?(Array)
|
179
|
-
value.compact.map{ |v| _to_hash(v) }
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
180
177
|
elsif value.is_a?(Hash)
|
181
178
|
{}.tap do |hash|
|
182
179
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -187,7 +184,5 @@ module YnabApi
|
|
187
184
|
value
|
188
185
|
end
|
189
186
|
end
|
190
|
-
|
191
187
|
end
|
192
|
-
|
193
188
|
end
|
@@ -6,14 +6,13 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ErrorDetail
|
18
17
|
attr_accessor :id
|
19
18
|
|
@@ -21,7 +20,6 @@ module YnabApi
|
|
21
20
|
|
22
21
|
attr_accessor :detail
|
23
22
|
|
24
|
-
|
25
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
24
|
def self.attribute_map
|
27
25
|
{
|
@@ -46,7 +44,7 @@ module YnabApi
|
|
46
44
|
return unless attributes.is_a?(Hash)
|
47
45
|
|
48
46
|
# convert string to symbol for hash key
|
49
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
50
48
|
|
51
49
|
if attributes.has_key?(:'id')
|
52
50
|
self.id = attributes[:'id']
|
@@ -59,7 +57,6 @@ module YnabApi
|
|
59
57
|
if attributes.has_key?(:'detail')
|
60
58
|
self.detail = attributes[:'detail']
|
61
59
|
end
|
62
|
-
|
63
60
|
end
|
64
61
|
|
65
62
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -67,18 +64,18 @@ module YnabApi
|
|
67
64
|
def list_invalid_properties
|
68
65
|
invalid_properties = Array.new
|
69
66
|
if @id.nil?
|
70
|
-
invalid_properties.push(
|
67
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
71
68
|
end
|
72
69
|
|
73
70
|
if @name.nil?
|
74
|
-
invalid_properties.push(
|
71
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
75
72
|
end
|
76
73
|
|
77
74
|
if @detail.nil?
|
78
|
-
invalid_properties.push(
|
75
|
+
invalid_properties.push('invalid value for "detail", detail cannot be nil.')
|
79
76
|
end
|
80
77
|
|
81
|
-
|
78
|
+
invalid_properties
|
82
79
|
end
|
83
80
|
|
84
81
|
# Check to see if the all the properties in the model are valid
|
@@ -87,7 +84,7 @@ module YnabApi
|
|
87
84
|
return false if @id.nil?
|
88
85
|
return false if @name.nil?
|
89
86
|
return false if @detail.nil?
|
90
|
-
|
87
|
+
true
|
91
88
|
end
|
92
89
|
|
93
90
|
# Checks equality by comparing each attribute.
|
@@ -122,7 +119,7 @@ module YnabApi
|
|
122
119
|
# check to ensure the input is an array given that the the attribute
|
123
120
|
# is documented as an array but the input is not
|
124
121
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
125
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
126
123
|
end
|
127
124
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
125
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -204,7 +201,7 @@ module YnabApi
|
|
204
201
|
# @return [Hash] Returns the value in the form of hash
|
205
202
|
def _to_hash(value)
|
206
203
|
if value.is_a?(Array)
|
207
|
-
value.compact.map{ |v| _to_hash(v) }
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
208
205
|
elsif value.is_a?(Hash)
|
209
206
|
{}.tap do |hash|
|
210
207
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -215,7 +212,5 @@ module YnabApi
|
|
215
212
|
value
|
216
213
|
end
|
217
214
|
end
|
218
|
-
|
219
215
|
end
|
220
|
-
|
221
216
|
end
|
@@ -6,18 +6,16 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class ErrorResponse
|
18
17
|
attr_accessor :error
|
19
18
|
|
20
|
-
|
21
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
20
|
def self.attribute_map
|
23
21
|
{
|
@@ -38,12 +36,11 @@ module YnabApi
|
|
38
36
|
return unless attributes.is_a?(Hash)
|
39
37
|
|
40
38
|
# convert string to symbol for hash key
|
41
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
40
|
|
43
41
|
if attributes.has_key?(:'error')
|
44
42
|
self.error = attributes[:'error']
|
45
43
|
end
|
46
|
-
|
47
44
|
end
|
48
45
|
|
49
46
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -51,17 +48,17 @@ module YnabApi
|
|
51
48
|
def list_invalid_properties
|
52
49
|
invalid_properties = Array.new
|
53
50
|
if @error.nil?
|
54
|
-
invalid_properties.push(
|
51
|
+
invalid_properties.push('invalid value for "error", error cannot be nil.')
|
55
52
|
end
|
56
53
|
|
57
|
-
|
54
|
+
invalid_properties
|
58
55
|
end
|
59
56
|
|
60
57
|
# Check to see if the all the properties in the model are valid
|
61
58
|
# @return true if the model is valid
|
62
59
|
def valid?
|
63
60
|
return false if @error.nil?
|
64
|
-
|
61
|
+
true
|
65
62
|
end
|
66
63
|
|
67
64
|
# Checks equality by comparing each attribute.
|
@@ -94,7 +91,7 @@ module YnabApi
|
|
94
91
|
# check to ensure the input is an array given that the the attribute
|
95
92
|
# is documented as an array but the input is not
|
96
93
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
95
|
end
|
99
96
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
97
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -176,7 +173,7 @@ module YnabApi
|
|
176
173
|
# @return [Hash] Returns the value in the form of hash
|
177
174
|
def _to_hash(value)
|
178
175
|
if value.is_a?(Array)
|
179
|
-
value.compact.map{ |v| _to_hash(v) }
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
180
177
|
elsif value.is_a?(Hash)
|
181
178
|
{}.tap do |hash|
|
182
179
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -187,7 +184,5 @@ module YnabApi
|
|
187
184
|
value
|
188
185
|
end
|
189
186
|
end
|
190
|
-
|
191
187
|
end
|
192
|
-
|
193
188
|
end
|
@@ -6,14 +6,13 @@
|
|
6
6
|
OpenAPI spec version: 1.0.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YnabApi
|
16
|
-
|
17
16
|
class HybridTransaction
|
18
17
|
attr_accessor :id
|
19
18
|
|
@@ -50,6 +49,12 @@ module YnabApi
|
|
50
49
|
# For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
|
51
50
|
attr_accessor :parent_transaction_id
|
52
51
|
|
52
|
+
attr_accessor :account_name
|
53
|
+
|
54
|
+
attr_accessor :payee_name
|
55
|
+
|
56
|
+
attr_accessor :category_name
|
57
|
+
|
53
58
|
class EnumAttributeValidator
|
54
59
|
attr_reader :datatype
|
55
60
|
attr_reader :allowable_values
|
@@ -88,7 +93,10 @@ module YnabApi
|
|
88
93
|
:'transfer_account_id' => :'transfer_account_id',
|
89
94
|
:'import_id' => :'import_id',
|
90
95
|
:'type' => :'type',
|
91
|
-
:'parent_transaction_id' => :'parent_transaction_id'
|
96
|
+
:'parent_transaction_id' => :'parent_transaction_id',
|
97
|
+
:'account_name' => :'account_name',
|
98
|
+
:'payee_name' => :'payee_name',
|
99
|
+
:'category_name' => :'category_name'
|
92
100
|
}
|
93
101
|
end
|
94
102
|
|
@@ -108,7 +116,10 @@ module YnabApi
|
|
108
116
|
:'transfer_account_id' => :'String',
|
109
117
|
:'import_id' => :'String',
|
110
118
|
:'type' => :'String',
|
111
|
-
:'parent_transaction_id' => :'String'
|
119
|
+
:'parent_transaction_id' => :'String',
|
120
|
+
:'account_name' => :'String',
|
121
|
+
:'payee_name' => :'String',
|
122
|
+
:'category_name' => :'String'
|
112
123
|
}
|
113
124
|
end
|
114
125
|
|
@@ -118,7 +129,7 @@ module YnabApi
|
|
118
129
|
return unless attributes.is_a?(Hash)
|
119
130
|
|
120
131
|
# convert string to symbol for hash key
|
121
|
-
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
122
133
|
|
123
134
|
if attributes.has_key?(:'id')
|
124
135
|
self.id = attributes[:'id']
|
@@ -176,6 +187,17 @@ module YnabApi
|
|
176
187
|
self.parent_transaction_id = attributes[:'parent_transaction_id']
|
177
188
|
end
|
178
189
|
|
190
|
+
if attributes.has_key?(:'account_name')
|
191
|
+
self.account_name = attributes[:'account_name']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'payee_name')
|
195
|
+
self.payee_name = attributes[:'payee_name']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'category_name')
|
199
|
+
self.category_name = attributes[:'category_name']
|
200
|
+
end
|
179
201
|
end
|
180
202
|
|
181
203
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -183,62 +205,74 @@ module YnabApi
|
|
183
205
|
def list_invalid_properties
|
184
206
|
invalid_properties = Array.new
|
185
207
|
if @id.nil?
|
186
|
-
invalid_properties.push(
|
208
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
187
209
|
end
|
188
210
|
|
189
211
|
if @date.nil?
|
190
|
-
invalid_properties.push(
|
212
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
191
213
|
end
|
192
214
|
|
193
215
|
if @amount.nil?
|
194
|
-
invalid_properties.push(
|
216
|
+
invalid_properties.push('invalid value for "amount", amount cannot be nil.')
|
195
217
|
end
|
196
218
|
|
197
219
|
if @memo.nil?
|
198
|
-
invalid_properties.push(
|
220
|
+
invalid_properties.push('invalid value for "memo", memo cannot be nil.')
|
199
221
|
end
|
200
222
|
|
201
223
|
if @cleared.nil?
|
202
|
-
invalid_properties.push(
|
224
|
+
invalid_properties.push('invalid value for "cleared", cleared cannot be nil.')
|
203
225
|
end
|
204
226
|
|
205
227
|
if @approved.nil?
|
206
|
-
invalid_properties.push(
|
228
|
+
invalid_properties.push('invalid value for "approved", approved cannot be nil.')
|
207
229
|
end
|
208
230
|
|
209
231
|
if @flag_color.nil?
|
210
|
-
invalid_properties.push(
|
232
|
+
invalid_properties.push('invalid value for "flag_color", flag_color cannot be nil.')
|
211
233
|
end
|
212
234
|
|
213
235
|
if @account_id.nil?
|
214
|
-
invalid_properties.push(
|
236
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
215
237
|
end
|
216
238
|
|
217
239
|
if @payee_id.nil?
|
218
|
-
invalid_properties.push(
|
240
|
+
invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
|
219
241
|
end
|
220
242
|
|
221
243
|
if @category_id.nil?
|
222
|
-
invalid_properties.push(
|
244
|
+
invalid_properties.push('invalid value for "category_id", category_id cannot be nil.')
|
223
245
|
end
|
224
246
|
|
225
247
|
if @transfer_account_id.nil?
|
226
|
-
invalid_properties.push(
|
248
|
+
invalid_properties.push('invalid value for "transfer_account_id", transfer_account_id cannot be nil.')
|
227
249
|
end
|
228
250
|
|
229
251
|
if @import_id.nil?
|
230
|
-
invalid_properties.push(
|
252
|
+
invalid_properties.push('invalid value for "import_id", import_id cannot be nil.')
|
231
253
|
end
|
232
254
|
|
233
255
|
if @type.nil?
|
234
|
-
invalid_properties.push(
|
256
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
235
257
|
end
|
236
258
|
|
237
259
|
if @parent_transaction_id.nil?
|
238
|
-
invalid_properties.push(
|
260
|
+
invalid_properties.push('invalid value for "parent_transaction_id", parent_transaction_id cannot be nil.')
|
239
261
|
end
|
240
262
|
|
241
|
-
|
263
|
+
if @account_name.nil?
|
264
|
+
invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
|
265
|
+
end
|
266
|
+
|
267
|
+
if @payee_name.nil?
|
268
|
+
invalid_properties.push('invalid value for "payee_name", payee_name cannot be nil.')
|
269
|
+
end
|
270
|
+
|
271
|
+
if @category_name.nil?
|
272
|
+
invalid_properties.push('invalid value for "category_name", category_name cannot be nil.')
|
273
|
+
end
|
274
|
+
|
275
|
+
invalid_properties
|
242
276
|
end
|
243
277
|
|
244
278
|
# Check to see if the all the properties in the model are valid
|
@@ -249,11 +283,11 @@ module YnabApi
|
|
249
283
|
return false if @amount.nil?
|
250
284
|
return false if @memo.nil?
|
251
285
|
return false if @cleared.nil?
|
252
|
-
cleared_validator = EnumAttributeValidator.new('String', [
|
286
|
+
cleared_validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
|
253
287
|
return false unless cleared_validator.valid?(@cleared)
|
254
288
|
return false if @approved.nil?
|
255
289
|
return false if @flag_color.nil?
|
256
|
-
flag_color_validator = EnumAttributeValidator.new('String', [
|
290
|
+
flag_color_validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
257
291
|
return false unless flag_color_validator.valid?(@flag_color)
|
258
292
|
return false if @account_id.nil?
|
259
293
|
return false if @payee_id.nil?
|
@@ -261,18 +295,21 @@ module YnabApi
|
|
261
295
|
return false if @transfer_account_id.nil?
|
262
296
|
return false if @import_id.nil?
|
263
297
|
return false if @type.nil?
|
264
|
-
type_validator = EnumAttributeValidator.new('String', [
|
298
|
+
type_validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
|
265
299
|
return false unless type_validator.valid?(@type)
|
266
300
|
return false if @parent_transaction_id.nil?
|
267
|
-
return
|
301
|
+
return false if @account_name.nil?
|
302
|
+
return false if @payee_name.nil?
|
303
|
+
return false if @category_name.nil?
|
304
|
+
true
|
268
305
|
end
|
269
306
|
|
270
307
|
# Custom attribute writer method checking allowed values (enum).
|
271
308
|
# @param [Object] cleared Object to be assigned
|
272
309
|
def cleared=(cleared)
|
273
|
-
validator = EnumAttributeValidator.new('String', [
|
310
|
+
validator = EnumAttributeValidator.new('String', ['cleared', 'uncleared', 'reconciled'])
|
274
311
|
unless validator.valid?(cleared)
|
275
|
-
fail ArgumentError,
|
312
|
+
fail ArgumentError, 'invalid value for "cleared", must be one of #{validator.allowable_values}.'
|
276
313
|
end
|
277
314
|
@cleared = cleared
|
278
315
|
end
|
@@ -280,9 +317,9 @@ module YnabApi
|
|
280
317
|
# Custom attribute writer method checking allowed values (enum).
|
281
318
|
# @param [Object] flag_color Object to be assigned
|
282
319
|
def flag_color=(flag_color)
|
283
|
-
validator = EnumAttributeValidator.new('String', [
|
320
|
+
validator = EnumAttributeValidator.new('String', ['red', 'orange', 'yellow', 'green', 'blue', 'purple'])
|
284
321
|
unless validator.valid?(flag_color)
|
285
|
-
fail ArgumentError,
|
322
|
+
fail ArgumentError, 'invalid value for "flag_color", must be one of #{validator.allowable_values}.'
|
286
323
|
end
|
287
324
|
@flag_color = flag_color
|
288
325
|
end
|
@@ -290,9 +327,9 @@ module YnabApi
|
|
290
327
|
# Custom attribute writer method checking allowed values (enum).
|
291
328
|
# @param [Object] type Object to be assigned
|
292
329
|
def type=(type)
|
293
|
-
validator = EnumAttributeValidator.new('String', [
|
330
|
+
validator = EnumAttributeValidator.new('String', ['transaction', 'subtransaction'])
|
294
331
|
unless validator.valid?(type)
|
295
|
-
fail ArgumentError,
|
332
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
296
333
|
end
|
297
334
|
@type = type
|
298
335
|
end
|
@@ -315,7 +352,10 @@ module YnabApi
|
|
315
352
|
transfer_account_id == o.transfer_account_id &&
|
316
353
|
import_id == o.import_id &&
|
317
354
|
type == o.type &&
|
318
|
-
parent_transaction_id == o.parent_transaction_id
|
355
|
+
parent_transaction_id == o.parent_transaction_id &&
|
356
|
+
account_name == o.account_name &&
|
357
|
+
payee_name == o.payee_name &&
|
358
|
+
category_name == o.category_name
|
319
359
|
end
|
320
360
|
|
321
361
|
# @see the `==` method
|
@@ -327,7 +367,7 @@ module YnabApi
|
|
327
367
|
# Calculates hash code according to all attributes.
|
328
368
|
# @return [Fixnum] Hash code
|
329
369
|
def hash
|
330
|
-
[id, date, amount, memo, cleared, approved, flag_color, account_id, payee_id, category_id, transfer_account_id, import_id, type, parent_transaction_id].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
|
331
371
|
end
|
332
372
|
|
333
373
|
# Builds the object from hash
|
@@ -340,7 +380,7 @@ module YnabApi
|
|
340
380
|
# check to ensure the input is an array given that the the attribute
|
341
381
|
# is documented as an array but the input is not
|
342
382
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
343
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) }
|
383
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
344
384
|
end
|
345
385
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
346
386
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
@@ -422,7 +462,7 @@ module YnabApi
|
|
422
462
|
# @return [Hash] Returns the value in the form of hash
|
423
463
|
def _to_hash(value)
|
424
464
|
if value.is_a?(Array)
|
425
|
-
value.compact.map{ |v| _to_hash(v) }
|
465
|
+
value.compact.map { |v| _to_hash(v) }
|
426
466
|
elsif value.is_a?(Hash)
|
427
467
|
{}.tap do |hash|
|
428
468
|
value.each { |k, v| hash[k] = _to_hash(v) }
|
@@ -433,7 +473,5 @@ module YnabApi
|
|
433
473
|
value
|
434
474
|
end
|
435
475
|
end
|
436
|
-
|
437
476
|
end
|
438
|
-
|
439
477
|
end
|