ynab 2.0.0.rc1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +1 -1
  4. data/lib/ynab/api/transactions_api.rb +0 -16
  5. data/lib/ynab/models/account.rb +0 -36
  6. data/lib/ynab/models/account_response.rb +0 -4
  7. data/lib/ynab/models/account_response_data.rb +0 -4
  8. data/lib/ynab/models/accounts_response.rb +0 -4
  9. data/lib/ynab/models/accounts_response_data.rb +0 -8
  10. data/lib/ynab/models/budget_detail.rb +0 -8
  11. data/lib/ynab/models/budget_detail_response.rb +0 -4
  12. data/lib/ynab/models/budget_detail_response_data.rb +0 -8
  13. data/lib/ynab/models/budget_settings_response.rb +0 -4
  14. data/lib/ynab/models/budget_settings_response_data.rb +0 -4
  15. data/lib/ynab/models/budget_summary.rb +0 -8
  16. data/lib/ynab/models/budget_summary_response.rb +0 -4
  17. data/lib/ynab/models/budget_summary_response_data.rb +0 -4
  18. data/lib/ynab/models/bulk_response.rb +0 -4
  19. data/lib/ynab/models/bulk_response_data.rb +0 -4
  20. data/lib/ynab/models/bulk_response_data_bulk.rb +0 -8
  21. data/lib/ynab/models/bulk_transactions.rb +0 -4
  22. data/lib/ynab/models/categories_response.rb +0 -4
  23. data/lib/ynab/models/categories_response_data.rb +0 -8
  24. data/lib/ynab/models/category.rb +0 -36
  25. data/lib/ynab/models/category_group.rb +0 -16
  26. data/lib/ynab/models/category_group_with_categories.rb +0 -20
  27. data/lib/ynab/models/category_group_with_categories_all_of.rb +0 -4
  28. data/lib/ynab/models/category_response.rb +0 -4
  29. data/lib/ynab/models/category_response_data.rb +0 -4
  30. data/lib/ynab/models/currency_format.rb +0 -32
  31. data/lib/ynab/models/date_format.rb +0 -4
  32. data/lib/ynab/models/error_detail.rb +0 -12
  33. data/lib/ynab/models/error_response.rb +0 -4
  34. data/lib/ynab/models/hybrid_transaction.rb +0 -52
  35. data/lib/ynab/models/hybrid_transaction_all_of.rb +0 -12
  36. data/lib/ynab/models/hybrid_transactions_response.rb +0 -4
  37. data/lib/ynab/models/hybrid_transactions_response_data.rb +0 -4
  38. data/lib/ynab/models/month_detail.rb +0 -28
  39. data/lib/ynab/models/month_detail_all_of.rb +0 -4
  40. data/lib/ynab/models/month_detail_response.rb +0 -4
  41. data/lib/ynab/models/month_detail_response_data.rb +0 -4
  42. data/lib/ynab/models/month_summaries_response.rb +0 -4
  43. data/lib/ynab/models/month_summaries_response_data.rb +0 -8
  44. data/lib/ynab/models/month_summary.rb +0 -24
  45. data/lib/ynab/models/patch_month_category_wrapper.rb +0 -4
  46. data/lib/ynab/models/patch_transactions_wrapper.rb +0 -4
  47. data/lib/ynab/models/payee.rb +0 -12
  48. data/lib/ynab/models/payee_location.rb +0 -20
  49. data/lib/ynab/models/payee_location_response.rb +0 -4
  50. data/lib/ynab/models/payee_location_response_data.rb +0 -4
  51. data/lib/ynab/models/payee_locations_response.rb +0 -4
  52. data/lib/ynab/models/payee_locations_response_data.rb +0 -4
  53. data/lib/ynab/models/payee_response.rb +0 -4
  54. data/lib/ynab/models/payee_response_data.rb +0 -4
  55. data/lib/ynab/models/payees_response.rb +0 -4
  56. data/lib/ynab/models/payees_response_data.rb +0 -8
  57. data/lib/ynab/models/post_account_wrapper.rb +0 -4
  58. data/lib/ynab/models/put_transaction_wrapper.rb +0 -4
  59. data/lib/ynab/models/save_account.rb +0 -12
  60. data/lib/ynab/models/save_category_response.rb +0 -4
  61. data/lib/ynab/models/save_category_response_data.rb +0 -8
  62. data/lib/ynab/models/save_month_category.rb +0 -4
  63. data/lib/ynab/models/save_sub_transaction.rb +0 -20
  64. data/lib/ynab/models/save_transaction.rb +0 -32
  65. data/lib/ynab/models/save_transaction_with_id.rb +0 -32
  66. data/lib/ynab/models/save_transaction_with_optional_fields.rb +0 -32
  67. data/lib/ynab/models/save_transactions_response.rb +0 -4
  68. data/lib/ynab/models/save_transactions_response_data.rb +0 -8
  69. data/lib/ynab/models/scheduled_sub_transaction.rb +0 -16
  70. data/lib/ynab/models/scheduled_transaction_detail.rb +0 -44
  71. data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +0 -8
  72. data/lib/ynab/models/scheduled_transaction_response.rb +0 -4
  73. data/lib/ynab/models/scheduled_transaction_response_data.rb +0 -4
  74. data/lib/ynab/models/scheduled_transaction_summary.rb +0 -36
  75. data/lib/ynab/models/scheduled_transactions_response.rb +0 -4
  76. data/lib/ynab/models/scheduled_transactions_response_data.rb +0 -8
  77. data/lib/ynab/models/sub_transaction.rb +0 -16
  78. data/lib/ynab/models/transaction_detail.rb +0 -48
  79. data/lib/ynab/models/transaction_detail_all_of.rb +0 -8
  80. data/lib/ynab/models/transaction_response.rb +0 -4
  81. data/lib/ynab/models/transaction_response_data.rb +0 -4
  82. data/lib/ynab/models/transaction_summary.rb +0 -40
  83. data/lib/ynab/models/transactions_import_response.rb +0 -4
  84. data/lib/ynab/models/transactions_import_response_data.rb +0 -4
  85. data/lib/ynab/models/transactions_response.rb +0 -4
  86. data/lib/ynab/models/transactions_response_data.rb +0 -8
  87. data/lib/ynab/models/user.rb +0 -4
  88. data/lib/ynab/models/user_response.rb +0 -4
  89. data/lib/ynab/models/user_response_data.rb +0 -4
  90. data/lib/ynab/version.rb +1 -1
  91. data/templates/api.mustache +213 -0
  92. data/templates/partial_model_generic.mustache +305 -0
  93. metadata +6 -4
@@ -301,42 +301,6 @@ module YNAB
301
301
  # @return Array for valid properties with the reasons
302
302
  def list_invalid_properties
303
303
  invalid_properties = Array.new
304
- if @id.nil?
305
- invalid_properties.push('invalid value for "id", id cannot be nil.')
306
- end
307
-
308
- if @date.nil?
309
- invalid_properties.push('invalid value for "date", date cannot be nil.')
310
- end
311
-
312
- if @amount.nil?
313
- invalid_properties.push('invalid value for "amount", amount cannot be nil.')
314
- end
315
-
316
- if @cleared.nil?
317
- invalid_properties.push('invalid value for "cleared", cleared cannot be nil.')
318
- end
319
-
320
- if @approved.nil?
321
- invalid_properties.push('invalid value for "approved", approved cannot be nil.')
322
- end
323
-
324
- if @account_id.nil?
325
- invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
326
- end
327
-
328
- if @deleted.nil?
329
- invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
330
- end
331
-
332
- if @type.nil?
333
- invalid_properties.push('invalid value for "type", type cannot be nil.')
334
- end
335
-
336
- if @account_name.nil?
337
- invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
338
- end
339
-
340
304
  invalid_properties
341
305
  end
342
306
 
@@ -366,40 +330,24 @@ module YNAB
366
330
  # Custom attribute writer method checking allowed values (enum).
367
331
  # @param [Object] cleared Object to be assigned
368
332
  def cleared=(cleared)
369
- validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
370
- unless validator.valid?(cleared)
371
- fail ArgumentError, "invalid value for \"cleared\", must be one of #{validator.allowable_values}."
372
- end
373
333
  @cleared = cleared
374
334
  end
375
335
 
376
336
  # Custom attribute writer method checking allowed values (enum).
377
337
  # @param [Object] flag_color Object to be assigned
378
338
  def flag_color=(flag_color)
379
- validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple", "null"])
380
- unless validator.valid?(flag_color)
381
- fail ArgumentError, "invalid value for \"flag_color\", must be one of #{validator.allowable_values}."
382
- end
383
339
  @flag_color = flag_color
384
340
  end
385
341
 
386
342
  # Custom attribute writer method checking allowed values (enum).
387
343
  # @param [Object] debt_transaction_type Object to be assigned
388
344
  def debt_transaction_type=(debt_transaction_type)
389
- validator = EnumAttributeValidator.new('String', ["payment", "refund", "fee", "interest", "escrow", "balancedAdjustment", "credit", "charge", "null"])
390
- unless validator.valid?(debt_transaction_type)
391
- fail ArgumentError, "invalid value for \"debt_transaction_type\", must be one of #{validator.allowable_values}."
392
- end
393
345
  @debt_transaction_type = debt_transaction_type
394
346
  end
395
347
 
396
348
  # Custom attribute writer method checking allowed values (enum).
397
349
  # @param [Object] type Object to be assigned
398
350
  def type=(type)
399
- validator = EnumAttributeValidator.new('String', ["transaction", "subtransaction"])
400
- unless validator.valid?(type)
401
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
402
- end
403
351
  @type = type
404
352
  end
405
353
 
@@ -125,14 +125,6 @@ module YNAB
125
125
  # @return Array for valid properties with the reasons
126
126
  def list_invalid_properties
127
127
  invalid_properties = Array.new
128
- if @type.nil?
129
- invalid_properties.push('invalid value for "type", type cannot be nil.')
130
- end
131
-
132
- if @account_name.nil?
133
- invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
134
- end
135
-
136
128
  invalid_properties
137
129
  end
138
130
 
@@ -149,10 +141,6 @@ module YNAB
149
141
  # Custom attribute writer method checking allowed values (enum).
150
142
  # @param [Object] type Object to be assigned
151
143
  def type=(type)
152
- validator = EnumAttributeValidator.new('String', ["transaction", "subtransaction"])
153
- unless validator.valid?(type)
154
- fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
155
- end
156
144
  @type = type
157
145
  end
158
146
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -77,10 +77,6 @@ module YNAB
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
79
  invalid_properties = Array.new
80
- if @transactions.nil?
81
- invalid_properties.push('invalid value for "transactions", transactions cannot be nil.')
82
- end
83
-
84
80
  invalid_properties
85
81
  end
86
82
 
@@ -149,34 +149,6 @@ module YNAB
149
149
  # @return Array for valid properties with the reasons
150
150
  def list_invalid_properties
151
151
  invalid_properties = Array.new
152
- if @month.nil?
153
- invalid_properties.push('invalid value for "month", month cannot be nil.')
154
- end
155
-
156
- if @income.nil?
157
- invalid_properties.push('invalid value for "income", income cannot be nil.')
158
- end
159
-
160
- if @budgeted.nil?
161
- invalid_properties.push('invalid value for "budgeted", budgeted cannot be nil.')
162
- end
163
-
164
- if @activity.nil?
165
- invalid_properties.push('invalid value for "activity", activity cannot be nil.')
166
- end
167
-
168
- if @to_be_budgeted.nil?
169
- invalid_properties.push('invalid value for "to_be_budgeted", to_be_budgeted cannot be nil.')
170
- end
171
-
172
- if @deleted.nil?
173
- invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
174
- end
175
-
176
- if @categories.nil?
177
- invalid_properties.push('invalid value for "categories", categories cannot be nil.')
178
- end
179
-
180
152
  invalid_properties
181
153
  end
182
154
 
@@ -69,10 +69,6 @@ module YNAB
69
69
  # @return Array for valid properties with the reasons
70
70
  def list_invalid_properties
71
71
  invalid_properties = Array.new
72
- if @categories.nil?
73
- invalid_properties.push('invalid value for "categories", categories cannot be nil.')
74
- end
75
-
76
72
  invalid_properties
77
73
  end
78
74
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @month.nil?
70
- invalid_properties.push('invalid value for "month", month cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -77,14 +77,6 @@ module YNAB
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
79
  invalid_properties = Array.new
80
- if @months.nil?
81
- invalid_properties.push('invalid value for "months", months cannot be nil.')
82
- end
83
-
84
- if @server_knowledge.nil?
85
- invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
86
- end
87
-
88
80
  invalid_properties
89
81
  end
90
82
 
@@ -130,30 +130,6 @@ module YNAB
130
130
  # @return Array for valid properties with the reasons
131
131
  def list_invalid_properties
132
132
  invalid_properties = Array.new
133
- if @month.nil?
134
- invalid_properties.push('invalid value for "month", month cannot be nil.')
135
- end
136
-
137
- if @income.nil?
138
- invalid_properties.push('invalid value for "income", income cannot be nil.')
139
- end
140
-
141
- if @budgeted.nil?
142
- invalid_properties.push('invalid value for "budgeted", budgeted cannot be nil.')
143
- end
144
-
145
- if @activity.nil?
146
- invalid_properties.push('invalid value for "activity", activity cannot be nil.')
147
- end
148
-
149
- if @to_be_budgeted.nil?
150
- invalid_properties.push('invalid value for "to_be_budgeted", to_be_budgeted cannot be nil.')
151
- end
152
-
153
- if @deleted.nil?
154
- invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
155
- end
156
-
157
133
  invalid_properties
158
134
  end
159
135
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @category.nil?
70
- invalid_properties.push('invalid value for "category", category cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -68,10 +68,6 @@ module YNAB
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
70
  invalid_properties = Array.new
71
- if @transactions.nil?
72
- invalid_properties.push('invalid value for "transactions", transactions cannot be nil.')
73
- end
74
-
75
71
  invalid_properties
76
72
  end
77
73
 
@@ -93,18 +93,6 @@ module YNAB
93
93
  # @return Array for valid properties with the reasons
94
94
  def list_invalid_properties
95
95
  invalid_properties = Array.new
96
- if @id.nil?
97
- invalid_properties.push('invalid value for "id", id cannot be nil.')
98
- end
99
-
100
- if @name.nil?
101
- invalid_properties.push('invalid value for "name", name cannot be nil.')
102
- end
103
-
104
- if @deleted.nil?
105
- invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
106
- end
107
-
108
96
  invalid_properties
109
97
  end
110
98
 
@@ -99,26 +99,6 @@ module YNAB
99
99
  # @return Array for valid properties with the reasons
100
100
  def list_invalid_properties
101
101
  invalid_properties = Array.new
102
- if @id.nil?
103
- invalid_properties.push('invalid value for "id", id cannot be nil.')
104
- end
105
-
106
- if @payee_id.nil?
107
- invalid_properties.push('invalid value for "payee_id", payee_id cannot be nil.')
108
- end
109
-
110
- if @latitude.nil?
111
- invalid_properties.push('invalid value for "latitude", latitude cannot be nil.')
112
- end
113
-
114
- if @longitude.nil?
115
- invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
116
- end
117
-
118
- if @deleted.nil?
119
- invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
120
- end
121
-
122
102
  invalid_properties
123
103
  end
124
104
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @payee_location.nil?
70
- invalid_properties.push('invalid value for "payee_location", payee_location cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -68,10 +68,6 @@ module YNAB
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
70
  invalid_properties = Array.new
71
- if @payee_locations.nil?
72
- invalid_properties.push('invalid value for "payee_locations", payee_locations cannot be nil.')
73
- end
74
-
75
71
  invalid_properties
76
72
  end
77
73
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @payee.nil?
70
- invalid_properties.push('invalid value for "payee", payee cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -77,14 +77,6 @@ module YNAB
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
79
  invalid_properties = Array.new
80
- if @payees.nil?
81
- invalid_properties.push('invalid value for "payees", payees cannot be nil.')
82
- end
83
-
84
- if @server_knowledge.nil?
85
- invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
86
- end
87
-
88
80
  invalid_properties
89
81
  end
90
82
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @account.nil?
70
- invalid_properties.push('invalid value for "account", account cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @transaction.nil?
70
- invalid_properties.push('invalid value for "transaction", transaction cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -106,18 +106,6 @@ module YNAB
106
106
  # @return Array for valid properties with the reasons
107
107
  def list_invalid_properties
108
108
  invalid_properties = Array.new
109
- if @name.nil?
110
- invalid_properties.push('invalid value for "name", name cannot be nil.')
111
- end
112
-
113
- if @type.nil?
114
- invalid_properties.push('invalid value for "type", type cannot be nil.')
115
- end
116
-
117
- if @balance.nil?
118
- invalid_properties.push('invalid value for "balance", balance cannot be nil.')
119
- end
120
-
121
109
  invalid_properties
122
110
  end
123
111
 
@@ -66,10 +66,6 @@ module YNAB
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
68
  invalid_properties = Array.new
69
- if @data.nil?
70
- invalid_properties.push('invalid value for "data", data cannot be nil.')
71
- end
72
-
73
69
  invalid_properties
74
70
  end
75
71
 
@@ -75,14 +75,6 @@ module YNAB
75
75
  # @return Array for valid properties with the reasons
76
76
  def list_invalid_properties
77
77
  invalid_properties = Array.new
78
- if @category.nil?
79
- invalid_properties.push('invalid value for "category", category cannot be nil.')
80
- end
81
-
82
- if @server_knowledge.nil?
83
- invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
84
- end
85
-
86
78
  invalid_properties
87
79
  end
88
80
 
@@ -67,10 +67,6 @@ module YNAB
67
67
  # @return Array for valid properties with the reasons
68
68
  def list_invalid_properties
69
69
  invalid_properties = Array.new
70
- if @budgeted.nil?
71
- invalid_properties.push('invalid value for "budgeted", budgeted cannot be nil.')
72
- end
73
-
74
70
  invalid_properties
75
71
  end
76
72
 
@@ -106,18 +106,6 @@ module YNAB
106
106
  # @return Array for valid properties with the reasons
107
107
  def list_invalid_properties
108
108
  invalid_properties = Array.new
109
- if @amount.nil?
110
- invalid_properties.push('invalid value for "amount", amount cannot be nil.')
111
- end
112
-
113
- if !@payee_name.nil? && @payee_name.to_s.length > 50
114
- invalid_properties.push('invalid value for "payee_name", the character length must be smaller than or equal to 50.')
115
- end
116
-
117
- if !@memo.nil? && @memo.to_s.length > 200
118
- invalid_properties.push('invalid value for "memo", the character length must be smaller than or equal to 200.')
119
- end
120
-
121
109
  invalid_properties
122
110
  end
123
111
 
@@ -133,20 +121,12 @@ module YNAB
133
121
  # Custom attribute writer method with validation
134
122
  # @param [Object] payee_name Value to be assigned
135
123
  def payee_name=(payee_name)
136
- if !payee_name.nil? && payee_name.to_s.length > 50
137
- fail ArgumentError, 'invalid value for "payee_name", the character length must be smaller than or equal to 50.'
138
- end
139
-
140
124
  @payee_name = payee_name
141
125
  end
142
126
 
143
127
  # Custom attribute writer method with validation
144
128
  # @param [Object] memo Value to be assigned
145
129
  def memo=(memo)
146
- if !memo.nil? && memo.to_s.length > 200
147
- fail ArgumentError, 'invalid value for "memo", the character length must be smaller than or equal to 200.'
148
- end
149
-
150
130
  @memo = memo
151
131
  end
152
132
 
@@ -200,18 +200,6 @@ module YNAB
200
200
  # @return Array for valid properties with the reasons
201
201
  def list_invalid_properties
202
202
  invalid_properties = Array.new
203
- if !@payee_name.nil? && @payee_name.to_s.length > 50
204
- invalid_properties.push('invalid value for "payee_name", the character length must be smaller than or equal to 50.')
205
- end
206
-
207
- if !@memo.nil? && @memo.to_s.length > 200
208
- invalid_properties.push('invalid value for "memo", the character length must be smaller than or equal to 200.')
209
- end
210
-
211
- if !@import_id.nil? && @import_id.to_s.length > 36
212
- invalid_properties.push('invalid value for "import_id", the character length must be smaller than or equal to 36.')
213
- end
214
-
215
203
  invalid_properties
216
204
  end
217
205
 
@@ -231,50 +219,30 @@ module YNAB
231
219
  # Custom attribute writer method with validation
232
220
  # @param [Object] payee_name Value to be assigned
233
221
  def payee_name=(payee_name)
234
- if !payee_name.nil? && payee_name.to_s.length > 50
235
- fail ArgumentError, 'invalid value for "payee_name", the character length must be smaller than or equal to 50.'
236
- end
237
-
238
222
  @payee_name = payee_name
239
223
  end
240
224
 
241
225
  # Custom attribute writer method with validation
242
226
  # @param [Object] memo Value to be assigned
243
227
  def memo=(memo)
244
- if !memo.nil? && memo.to_s.length > 200
245
- fail ArgumentError, 'invalid value for "memo", the character length must be smaller than or equal to 200.'
246
- end
247
-
248
228
  @memo = memo
249
229
  end
250
230
 
251
231
  # Custom attribute writer method checking allowed values (enum).
252
232
  # @param [Object] cleared Object to be assigned
253
233
  def cleared=(cleared)
254
- validator = EnumAttributeValidator.new('String', ["cleared", "uncleared", "reconciled"])
255
- unless validator.valid?(cleared)
256
- fail ArgumentError, "invalid value for \"cleared\", must be one of #{validator.allowable_values}."
257
- end
258
234
  @cleared = cleared
259
235
  end
260
236
 
261
237
  # Custom attribute writer method checking allowed values (enum).
262
238
  # @param [Object] flag_color Object to be assigned
263
239
  def flag_color=(flag_color)
264
- validator = EnumAttributeValidator.new('String', ["red", "orange", "yellow", "green", "blue", "purple", "null"])
265
- unless validator.valid?(flag_color)
266
- fail ArgumentError, "invalid value for \"flag_color\", must be one of #{validator.allowable_values}."
267
- end
268
240
  @flag_color = flag_color
269
241
  end
270
242
 
271
243
  # Custom attribute writer method with validation
272
244
  # @param [Object] import_id Value to be assigned
273
245
  def import_id=(import_id)
274
- if !import_id.nil? && import_id.to_s.length > 36
275
- fail ArgumentError, 'invalid value for "import_id", the character length must be smaller than or equal to 36.'
276
- end
277
-
278
246
  @import_id = import_id
279
247
  end
280
248