ynab 0.6.0 → 0.7.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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +24 -24
  4. data/Rakefile +1 -1
  5. data/config.json +1 -1
  6. data/docs/AccountsApi.md +0 -76
  7. data/docs/BudgetsApi.md +0 -74
  8. data/docs/CategoriesApi.md +0 -76
  9. data/docs/CurrencyFormat.md +8 -1
  10. data/docs/DateFormat.md +1 -1
  11. data/docs/HybridTransaction.md +3 -0
  12. data/docs/MonthsApi.md +0 -76
  13. data/docs/PayeeLocationsApi.md +0 -115
  14. data/docs/PayeesApi.md +0 -76
  15. data/docs/ScheduledTransactionsApi.md +0 -76
  16. data/docs/TransactionsApi.md +0 -325
  17. data/docs/UserApi.md +0 -34
  18. data/lib/ynab/api/accounts_api.rb +8 -10
  19. data/lib/ynab/api/budgets_api.rb +8 -10
  20. data/lib/ynab/api/categories_api.rb +8 -10
  21. data/lib/ynab/api/months_api.rb +8 -10
  22. data/lib/ynab/api/payee_locations_api.rb +11 -14
  23. data/lib/ynab/api/payees_api.rb +8 -10
  24. data/lib/ynab/api/scheduled_transactions_api.rb +8 -10
  25. data/lib/ynab/api/transactions_api.rb +26 -34
  26. data/lib/ynab/api/user_api.rb +5 -6
  27. data/lib/ynab/api_client.rb +1 -1
  28. data/lib/ynab/api_error.rb +1 -1
  29. data/lib/ynab/configuration.rb +2 -2
  30. data/lib/ynab/models/account.rb +18 -22
  31. data/lib/ynab/models/account_response.rb +7 -12
  32. data/lib/ynab/models/account_wrapper.rb +7 -12
  33. data/lib/ynab/models/accounts_response.rb +7 -12
  34. data/lib/ynab/models/accounts_wrapper.rb +7 -12
  35. data/lib/ynab/models/budget_detail.rb +8 -13
  36. data/lib/ynab/models/budget_detail_response.rb +7 -12
  37. data/lib/ynab/models/budget_detail_wrapper.rb +8 -13
  38. data/lib/ynab/models/budget_summary.rb +8 -13
  39. data/lib/ynab/models/budget_summary_response.rb +7 -12
  40. data/lib/ynab/models/budget_summary_wrapper.rb +7 -12
  41. data/lib/ynab/models/bulk_id_wrapper.rb +7 -12
  42. data/lib/ynab/models/bulk_ids.rb +8 -13
  43. data/lib/ynab/models/bulk_response.rb +7 -12
  44. data/lib/ynab/models/bulk_transactions.rb +7 -12
  45. data/lib/ynab/models/categories_response.rb +7 -12
  46. data/lib/ynab/models/category.rb +14 -19
  47. data/lib/ynab/models/category_group.rb +9 -14
  48. data/lib/ynab/models/category_group_with_categories.rb +10 -15
  49. data/lib/ynab/models/category_groups_wrapper.rb +7 -12
  50. data/lib/ynab/models/category_response.rb +7 -12
  51. data/lib/ynab/models/category_wrapper.rb +7 -12
  52. data/lib/ynab/models/currency_format.rb +112 -19
  53. data/lib/ynab/models/date_format.rb +16 -21
  54. data/lib/ynab/models/error_detail.rb +9 -14
  55. data/lib/ynab/models/error_response.rb +7 -12
  56. data/lib/ynab/models/hybrid_transaction.rb +74 -36
  57. data/lib/ynab/models/hybrid_transactions_response.rb +7 -12
  58. data/lib/ynab/models/hybrid_transactions_wrapper.rb +7 -12
  59. data/lib/ynab/models/month_detail.rb +11 -16
  60. data/lib/ynab/models/month_detail_response.rb +7 -12
  61. data/lib/ynab/models/month_detail_wrapper.rb +7 -12
  62. data/lib/ynab/models/month_summaries_response.rb +7 -12
  63. data/lib/ynab/models/month_summaries_wrapper.rb +7 -12
  64. data/lib/ynab/models/month_summary.rb +10 -15
  65. data/lib/ynab/models/payee.rb +9 -14
  66. data/lib/ynab/models/payee_location.rb +10 -15
  67. data/lib/ynab/models/payee_location_response.rb +7 -12
  68. data/lib/ynab/models/payee_location_wrapper.rb +7 -12
  69. data/lib/ynab/models/payee_locations_response.rb +7 -12
  70. data/lib/ynab/models/payee_locations_wrapper.rb +7 -12
  71. data/lib/ynab/models/payee_response.rb +7 -12
  72. data/lib/ynab/models/payee_wrapper.rb +7 -12
  73. data/lib/ynab/models/payees_response.rb +7 -12
  74. data/lib/ynab/models/payees_wrapper.rb +7 -12
  75. data/lib/ynab/models/save_transaction.rb +15 -19
  76. data/lib/ynab/models/save_transaction_wrapper.rb +7 -12
  77. data/lib/ynab/models/scheduled_sub_transaction.rb +13 -18
  78. data/lib/ynab/models/scheduled_transaction_detail.rb +27 -31
  79. data/lib/ynab/models/scheduled_transaction_response.rb +7 -12
  80. data/lib/ynab/models/scheduled_transaction_summary.rb +23 -27
  81. data/lib/ynab/models/scheduled_transaction_wrapper.rb +7 -12
  82. data/lib/ynab/models/scheduled_transactions_response.rb +7 -12
  83. data/lib/ynab/models/scheduled_transactions_wrapper.rb +7 -12
  84. data/lib/ynab/models/sub_transaction.rb +13 -18
  85. data/lib/ynab/models/transaction_detail.rb +28 -32
  86. data/lib/ynab/models/transaction_response.rb +7 -12
  87. data/lib/ynab/models/transaction_summary.rb +24 -28
  88. data/lib/ynab/models/transaction_wrapper.rb +7 -12
  89. data/lib/ynab/models/transactions_response.rb +7 -12
  90. data/lib/ynab/models/transactions_wrapper.rb +7 -12
  91. data/lib/ynab/models/user.rb +7 -12
  92. data/lib/ynab/models/user_response.rb +7 -12
  93. data/lib/ynab/models/user_wrapper.rb +7 -12
  94. data/lib/ynab/version.rb +2 -2
  95. data/spec-v1-swagger.json +50 -5
  96. data/swagger-templates/api_doc.mustache +32 -0
  97. data/ynab.gemspec +1 -1
  98. metadata +4 -3
@@ -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.3.1
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 CategoryGroup
18
17
  attr_accessor :id
19
18
 
@@ -22,7 +21,6 @@ module YnabApi
22
21
  # Whether or not the category group is hidden
23
22
  attr_accessor :hidden
24
23
 
25
-
26
24
  # Attribute mapping from ruby-style variable name to JSON key.
27
25
  def self.attribute_map
28
26
  {
@@ -47,7 +45,7 @@ module YnabApi
47
45
  return unless attributes.is_a?(Hash)
48
46
 
49
47
  # convert string to symbol for hash key
50
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
51
49
 
52
50
  if attributes.has_key?(:'id')
53
51
  self.id = attributes[:'id']
@@ -60,7 +58,6 @@ module YnabApi
60
58
  if attributes.has_key?(:'hidden')
61
59
  self.hidden = attributes[:'hidden']
62
60
  end
63
-
64
61
  end
65
62
 
66
63
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -68,18 +65,18 @@ module YnabApi
68
65
  def list_invalid_properties
69
66
  invalid_properties = Array.new
70
67
  if @id.nil?
71
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
68
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
72
69
  end
73
70
 
74
71
  if @name.nil?
75
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
72
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
76
73
  end
77
74
 
78
75
  if @hidden.nil?
79
- invalid_properties.push("invalid value for 'hidden', hidden cannot be nil.")
76
+ invalid_properties.push('invalid value for "hidden", hidden cannot be nil.')
80
77
  end
81
78
 
82
- return invalid_properties
79
+ invalid_properties
83
80
  end
84
81
 
85
82
  # Check to see if the all the properties in the model are valid
@@ -88,7 +85,7 @@ module YnabApi
88
85
  return false if @id.nil?
89
86
  return false if @name.nil?
90
87
  return false if @hidden.nil?
91
- return true
88
+ true
92
89
  end
93
90
 
94
91
  # Checks equality by comparing each attribute.
@@ -123,7 +120,7 @@ module YnabApi
123
120
  # check to ensure the input is an array given that the the attribute
124
121
  # is documented as an array but the input is not
125
122
  if attributes[self.class.attribute_map[key]].is_a?(Array)
126
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
123
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
124
  end
128
125
  elsif !attributes[self.class.attribute_map[key]].nil?
129
126
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -205,7 +202,7 @@ module YnabApi
205
202
  # @return [Hash] Returns the value in the form of hash
206
203
  def _to_hash(value)
207
204
  if value.is_a?(Array)
208
- value.compact.map{ |v| _to_hash(v) }
205
+ value.compact.map { |v| _to_hash(v) }
209
206
  elsif value.is_a?(Hash)
210
207
  {}.tap do |hash|
211
208
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -216,7 +213,5 @@ module YnabApi
216
213
  value
217
214
  end
218
215
  end
219
-
220
216
  end
221
-
222
217
  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.3.1
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 CategoryGroupWithCategories
18
17
  attr_accessor :id
19
18
 
@@ -25,7 +24,6 @@ module YnabApi
25
24
  # Category group categories
26
25
  attr_accessor :categories
27
26
 
28
-
29
27
  # Attribute mapping from ruby-style variable name to JSON key.
30
28
  def self.attribute_map
31
29
  {
@@ -52,7 +50,7 @@ module YnabApi
52
50
  return unless attributes.is_a?(Hash)
53
51
 
54
52
  # convert string to symbol for hash key
55
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
53
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
54
 
57
55
  if attributes.has_key?(:'id')
58
56
  self.id = attributes[:'id']
@@ -71,7 +69,6 @@ module YnabApi
71
69
  self.categories = value
72
70
  end
73
71
  end
74
-
75
72
  end
76
73
 
77
74
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -79,22 +76,22 @@ module YnabApi
79
76
  def list_invalid_properties
80
77
  invalid_properties = Array.new
81
78
  if @id.nil?
82
- invalid_properties.push("invalid value for 'id', id cannot be nil.")
79
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
83
80
  end
84
81
 
85
82
  if @name.nil?
86
- invalid_properties.push("invalid value for 'name', name cannot be nil.")
83
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
87
84
  end
88
85
 
89
86
  if @hidden.nil?
90
- invalid_properties.push("invalid value for 'hidden', hidden cannot be nil.")
87
+ invalid_properties.push('invalid value for "hidden", hidden cannot be nil.')
91
88
  end
92
89
 
93
90
  if @categories.nil?
94
- invalid_properties.push("invalid value for 'categories', categories cannot be nil.")
91
+ invalid_properties.push('invalid value for "categories", categories cannot be nil.')
95
92
  end
96
93
 
97
- return invalid_properties
94
+ invalid_properties
98
95
  end
99
96
 
100
97
  # Check to see if the all the properties in the model are valid
@@ -104,7 +101,7 @@ module YnabApi
104
101
  return false if @name.nil?
105
102
  return false if @hidden.nil?
106
103
  return false if @categories.nil?
107
- return true
104
+ true
108
105
  end
109
106
 
110
107
  # Checks equality by comparing each attribute.
@@ -140,7 +137,7 @@ module YnabApi
140
137
  # check to ensure the input is an array given that the the attribute
141
138
  # is documented as an array but the input is not
142
139
  if attributes[self.class.attribute_map[key]].is_a?(Array)
143
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
141
  end
145
142
  elsif !attributes[self.class.attribute_map[key]].nil?
146
143
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -222,7 +219,7 @@ module YnabApi
222
219
  # @return [Hash] Returns the value in the form of hash
223
220
  def _to_hash(value)
224
221
  if value.is_a?(Array)
225
- value.compact.map{ |v| _to_hash(v) }
222
+ value.compact.map { |v| _to_hash(v) }
226
223
  elsif value.is_a?(Hash)
227
224
  {}.tap do |hash|
228
225
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -233,7 +230,5 @@ module YnabApi
233
230
  value
234
231
  end
235
232
  end
236
-
237
233
  end
238
-
239
234
  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.3.1
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 CategoryGroupsWrapper
18
17
  attr_accessor :category_groups
19
18
 
20
-
21
19
  # Attribute mapping from ruby-style variable name to JSON key.
22
20
  def self.attribute_map
23
21
  {
@@ -38,14 +36,13 @@ 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?(:'category_groups')
44
42
  if (value = attributes[:'category_groups']).is_a?(Array)
45
43
  self.category_groups = value
46
44
  end
47
45
  end
48
-
49
46
  end
50
47
 
51
48
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -53,17 +50,17 @@ module YnabApi
53
50
  def list_invalid_properties
54
51
  invalid_properties = Array.new
55
52
  if @category_groups.nil?
56
- invalid_properties.push("invalid value for 'category_groups', category_groups cannot be nil.")
53
+ invalid_properties.push('invalid value for "category_groups", category_groups cannot be nil.')
57
54
  end
58
55
 
59
- return invalid_properties
56
+ invalid_properties
60
57
  end
61
58
 
62
59
  # Check to see if the all the properties in the model are valid
63
60
  # @return true if the model is valid
64
61
  def valid?
65
62
  return false if @category_groups.nil?
66
- return true
63
+ true
67
64
  end
68
65
 
69
66
  # Checks equality by comparing each attribute.
@@ -96,7 +93,7 @@ module YnabApi
96
93
  # check to ensure the input is an array given that the the attribute
97
94
  # is documented as an array but the input is not
98
95
  if attributes[self.class.attribute_map[key]].is_a?(Array)
99
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
96
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
100
97
  end
101
98
  elsif !attributes[self.class.attribute_map[key]].nil?
102
99
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -178,7 +175,7 @@ module YnabApi
178
175
  # @return [Hash] Returns the value in the form of hash
179
176
  def _to_hash(value)
180
177
  if value.is_a?(Array)
181
- value.compact.map{ |v| _to_hash(v) }
178
+ value.compact.map { |v| _to_hash(v) }
182
179
  elsif value.is_a?(Hash)
183
180
  {}.tap do |hash|
184
181
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -189,7 +186,5 @@ module YnabApi
189
186
  value
190
187
  end
191
188
  end
192
-
193
189
  end
194
-
195
190
  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.3.1
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 CategoryResponse
18
17
  attr_accessor :data
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?(:'data')
44
42
  self.data = attributes[:'data']
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 @data.nil?
54
- invalid_properties.push("invalid value for 'data', data cannot be nil.")
51
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
55
52
  end
56
53
 
57
- return invalid_properties
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 @data.nil?
64
- return true
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,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.3.1
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 CategoryWrapper
18
17
  attr_accessor :category
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?(:'category')
44
42
  self.category = attributes[:'category']
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 @category.nil?
54
- invalid_properties.push("invalid value for 'category', category cannot be nil.")
51
+ invalid_properties.push('invalid value for "category", category cannot be nil.')
55
52
  end
56
53
 
57
- return invalid_properties
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 @category.nil?
64
- return true
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,29 +6,55 @@
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.3.1
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 CurrencyFormat
18
- attr_accessor :locale
17
+ attr_accessor :iso_code
18
+
19
+ attr_accessor :example_format
20
+
21
+ attr_accessor :decimal_digits
22
+
23
+ attr_accessor :decimal_separator
24
+
25
+ attr_accessor :symbol_first
19
26
 
27
+ attr_accessor :group_separator
28
+
29
+ attr_accessor :currency_symbol
30
+
31
+ attr_accessor :display_symbol
20
32
 
21
33
  # Attribute mapping from ruby-style variable name to JSON key.
22
34
  def self.attribute_map
23
35
  {
24
- :'locale' => :'locale'
36
+ :'iso_code' => :'iso_code',
37
+ :'example_format' => :'example_format',
38
+ :'decimal_digits' => :'decimal_digits',
39
+ :'decimal_separator' => :'decimal_separator',
40
+ :'symbol_first' => :'symbol_first',
41
+ :'group_separator' => :'group_separator',
42
+ :'currency_symbol' => :'currency_symbol',
43
+ :'display_symbol' => :'display_symbol'
25
44
  }
26
45
  end
27
46
 
28
47
  # Attribute type mapping.
29
48
  def self.swagger_types
30
49
  {
31
- :'locale' => :'String'
50
+ :'iso_code' => :'String',
51
+ :'example_format' => :'String',
52
+ :'decimal_digits' => :'String',
53
+ :'decimal_separator' => :'String',
54
+ :'symbol_first' => :'BOOLEAN',
55
+ :'group_separator' => :'String',
56
+ :'currency_symbol' => :'String',
57
+ :'display_symbol' => :'BOOLEAN'
32
58
  }
33
59
  end
34
60
 
@@ -38,30 +64,92 @@ module YnabApi
38
64
  return unless attributes.is_a?(Hash)
39
65
 
40
66
  # convert string to symbol for hash key
41
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.has_key?(:'iso_code')
70
+ self.iso_code = attributes[:'iso_code']
71
+ end
72
+
73
+ if attributes.has_key?(:'example_format')
74
+ self.example_format = attributes[:'example_format']
75
+ end
76
+
77
+ if attributes.has_key?(:'decimal_digits')
78
+ self.decimal_digits = attributes[:'decimal_digits']
79
+ end
80
+
81
+ if attributes.has_key?(:'decimal_separator')
82
+ self.decimal_separator = attributes[:'decimal_separator']
83
+ end
84
+
85
+ if attributes.has_key?(:'symbol_first')
86
+ self.symbol_first = attributes[:'symbol_first']
87
+ end
88
+
89
+ if attributes.has_key?(:'group_separator')
90
+ self.group_separator = attributes[:'group_separator']
91
+ end
42
92
 
43
- if attributes.has_key?(:'locale')
44
- self.locale = attributes[:'locale']
93
+ if attributes.has_key?(:'currency_symbol')
94
+ self.currency_symbol = attributes[:'currency_symbol']
45
95
  end
46
96
 
97
+ if attributes.has_key?(:'display_symbol')
98
+ self.display_symbol = attributes[:'display_symbol']
99
+ end
47
100
  end
48
101
 
49
102
  # Show invalid properties with the reasons. Usually used together with valid?
50
103
  # @return Array for valid properties with the reasons
51
104
  def list_invalid_properties
52
105
  invalid_properties = Array.new
53
- if @locale.nil?
54
- invalid_properties.push("invalid value for 'locale', locale cannot be nil.")
106
+ if @iso_code.nil?
107
+ invalid_properties.push('invalid value for "iso_code", iso_code cannot be nil.')
108
+ end
109
+
110
+ if @example_format.nil?
111
+ invalid_properties.push('invalid value for "example_format", example_format cannot be nil.')
112
+ end
113
+
114
+ if @decimal_digits.nil?
115
+ invalid_properties.push('invalid value for "decimal_digits", decimal_digits cannot be nil.')
116
+ end
117
+
118
+ if @decimal_separator.nil?
119
+ invalid_properties.push('invalid value for "decimal_separator", decimal_separator cannot be nil.')
120
+ end
121
+
122
+ if @symbol_first.nil?
123
+ invalid_properties.push('invalid value for "symbol_first", symbol_first cannot be nil.')
124
+ end
125
+
126
+ if @group_separator.nil?
127
+ invalid_properties.push('invalid value for "group_separator", group_separator cannot be nil.')
128
+ end
129
+
130
+ if @currency_symbol.nil?
131
+ invalid_properties.push('invalid value for "currency_symbol", currency_symbol cannot be nil.')
55
132
  end
56
133
 
57
- return invalid_properties
134
+ if @display_symbol.nil?
135
+ invalid_properties.push('invalid value for "display_symbol", display_symbol cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
58
139
  end
59
140
 
60
141
  # Check to see if the all the properties in the model are valid
61
142
  # @return true if the model is valid
62
143
  def valid?
63
- return false if @locale.nil?
64
- return true
144
+ return false if @iso_code.nil?
145
+ return false if @example_format.nil?
146
+ return false if @decimal_digits.nil?
147
+ return false if @decimal_separator.nil?
148
+ return false if @symbol_first.nil?
149
+ return false if @group_separator.nil?
150
+ return false if @currency_symbol.nil?
151
+ return false if @display_symbol.nil?
152
+ true
65
153
  end
66
154
 
67
155
  # Checks equality by comparing each attribute.
@@ -69,7 +157,14 @@ module YnabApi
69
157
  def ==(o)
70
158
  return true if self.equal?(o)
71
159
  self.class == o.class &&
72
- locale == o.locale
160
+ iso_code == o.iso_code &&
161
+ example_format == o.example_format &&
162
+ decimal_digits == o.decimal_digits &&
163
+ decimal_separator == o.decimal_separator &&
164
+ symbol_first == o.symbol_first &&
165
+ group_separator == o.group_separator &&
166
+ currency_symbol == o.currency_symbol &&
167
+ display_symbol == o.display_symbol
73
168
  end
74
169
 
75
170
  # @see the `==` method
@@ -81,7 +176,7 @@ module YnabApi
81
176
  # Calculates hash code according to all attributes.
82
177
  # @return [Fixnum] Hash code
83
178
  def hash
84
- [locale].hash
179
+ [iso_code, example_format, decimal_digits, decimal_separator, symbol_first, group_separator, currency_symbol, display_symbol].hash
85
180
  end
86
181
 
87
182
  # Builds the object from hash
@@ -94,7 +189,7 @@ module YnabApi
94
189
  # check to ensure the input is an array given that the the attribute
95
190
  # is documented as an array but the input is not
96
191
  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) } )
192
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
98
193
  end
99
194
  elsif !attributes[self.class.attribute_map[key]].nil?
100
195
  self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
@@ -176,7 +271,7 @@ module YnabApi
176
271
  # @return [Hash] Returns the value in the form of hash
177
272
  def _to_hash(value)
178
273
  if value.is_a?(Array)
179
- value.compact.map{ |v| _to_hash(v) }
274
+ value.compact.map { |v| _to_hash(v) }
180
275
  elsif value.is_a?(Hash)
181
276
  {}.tap do |hash|
182
277
  value.each { |k, v| hash[k] = _to_hash(v) }
@@ -187,7 +282,5 @@ module YnabApi
187
282
  value
188
283
  end
189
284
  end
190
-
191
285
  end
192
-
193
286
  end