ynab 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ynab/api/accounts_api.rb +3 -0
- data/lib/ynab/api/categories_api.rb +16 -13
- data/lib/ynab/api/months_api.rb +3 -0
- data/lib/ynab/api/payees_api.rb +3 -0
- data/lib/ynab/models/accounts_wrapper.rb +19 -4
- data/lib/ynab/models/category_groups_wrapper.rb +19 -4
- data/lib/ynab/models/month_detail.rb +16 -1
- data/lib/ynab/models/month_summaries_wrapper.rb +19 -4
- data/lib/ynab/models/month_summary.rb +19 -4
- data/lib/ynab/models/payees_wrapper.rb +19 -4
- data/lib/ynab/models/save_month_category_wrapper.rb +10 -10
- data/lib/ynab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 809cd04501f07669f47f3464bfc5c1cd8e1403d908a01814fca2e6d555740b9e
|
4
|
+
data.tar.gz: 4aec40a3904777cf6207483526c5d38f5f1907dee548a10c105c5916466cfa24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdbb58416e66d2878caf9e73f5b60543f78a6117c1bc23ed91351063159237abf81656416e09c0da1ad14d867ac6361ee76d1b5e8345177d8ecbf08e0350028a
|
7
|
+
data.tar.gz: 5d6e9aaa912740f33b55cd9eb59bbf1ec5a778752942538eeb58d07ad455b61279c1103dc457fa70a2ae032665125db7dc56929f20814ae596071361e3a36145
|
@@ -81,6 +81,7 @@ module YNAB
|
|
81
81
|
# Returns all accounts
|
82
82
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
84
85
|
# @return [AccountsResponse]
|
85
86
|
def get_accounts(budget_id, opts = {})
|
86
87
|
data, _status_code, _headers = get_accounts_with_http_info(budget_id, opts)
|
@@ -91,6 +92,7 @@ module YNAB
|
|
91
92
|
# Returns all accounts
|
92
93
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
94
|
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
94
96
|
# @return [Array<(AccountsResponse, Fixnum, Hash)>] AccountsResponse data, response status code and response headers
|
95
97
|
def get_accounts_with_http_info(budget_id, opts = {})
|
96
98
|
if @api_client.config.debugging
|
@@ -105,6 +107,7 @@ module YNAB
|
|
105
107
|
|
106
108
|
# query parameters
|
107
109
|
query_params = {}
|
110
|
+
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
108
111
|
|
109
112
|
# header parameters
|
110
113
|
header_params = {}
|
@@ -23,6 +23,7 @@ module YNAB
|
|
23
23
|
# Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
24
24
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
26
27
|
# @return [CategoriesResponse]
|
27
28
|
def get_categories(budget_id, opts = {})
|
28
29
|
data, _status_code, _headers = get_categories_with_http_info(budget_id, opts)
|
@@ -33,6 +34,7 @@ module YNAB
|
|
33
34
|
# Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
|
34
35
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
35
36
|
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
36
38
|
# @return [Array<(CategoriesResponse, Fixnum, Hash)>] CategoriesResponse data, response status code and response headers
|
37
39
|
def get_categories_with_http_info(budget_id, opts = {})
|
38
40
|
if @api_client.config.debugging
|
@@ -47,6 +49,7 @@ module YNAB
|
|
47
49
|
|
48
50
|
# query parameters
|
49
51
|
query_params = {}
|
52
|
+
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
50
53
|
|
51
54
|
# header parameters
|
52
55
|
header_params = {}
|
@@ -193,28 +196,28 @@ module YNAB
|
|
193
196
|
end
|
194
197
|
return data, status_code, headers
|
195
198
|
end
|
196
|
-
# Update
|
197
|
-
# Update
|
199
|
+
# Update a category for a specific month
|
200
|
+
# Update a category for a specific month
|
198
201
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
199
202
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
200
203
|
# @param category_id The id of the category
|
201
|
-
# @param
|
204
|
+
# @param data The category to update
|
202
205
|
# @param [Hash] opts the optional parameters
|
203
206
|
# @return [CategoryResponse]
|
204
|
-
def update_month_category(budget_id, month, category_id,
|
205
|
-
data, _status_code, _headers = update_month_category_with_http_info(budget_id, month, category_id,
|
207
|
+
def update_month_category(budget_id, month, category_id, data, opts = {})
|
208
|
+
data, _status_code, _headers = update_month_category_with_http_info(budget_id, month, category_id, data, opts)
|
206
209
|
data
|
207
210
|
end
|
208
211
|
|
209
|
-
# Update
|
210
|
-
# Update
|
212
|
+
# Update a category for a specific month
|
213
|
+
# Update a category for a specific month
|
211
214
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
212
215
|
# @param month The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
213
216
|
# @param category_id The id of the category
|
214
|
-
# @param
|
217
|
+
# @param data The category to update
|
215
218
|
# @param [Hash] opts the optional parameters
|
216
219
|
# @return [Array<(CategoryResponse, Fixnum, Hash)>] CategoryResponse data, response status code and response headers
|
217
|
-
def update_month_category_with_http_info(budget_id, month, category_id,
|
220
|
+
def update_month_category_with_http_info(budget_id, month, category_id, data, opts = {})
|
218
221
|
if @api_client.config.debugging
|
219
222
|
@api_client.config.logger.debug 'Calling API: CategoriesApi.update_month_category ...'
|
220
223
|
end
|
@@ -230,9 +233,9 @@ module YNAB
|
|
230
233
|
if @api_client.config.client_side_validation && category_id.nil?
|
231
234
|
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.update_month_category"
|
232
235
|
end
|
233
|
-
# verify the required parameter '
|
234
|
-
if @api_client.config.client_side_validation &&
|
235
|
-
fail ArgumentError, "Missing the required parameter '
|
236
|
+
# verify the required parameter 'data' is set
|
237
|
+
if @api_client.config.client_side_validation && data.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_month_category"
|
236
239
|
end
|
237
240
|
# resource path
|
238
241
|
local_var_path = '/budgets/{budget_id}/months/{month}/categories/{category_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'month' + '}', month.to_s).sub('{' + 'category_id' + '}', category_id.to_s)
|
@@ -249,7 +252,7 @@ module YNAB
|
|
249
252
|
form_params = {}
|
250
253
|
|
251
254
|
# http body (model)
|
252
|
-
post_body = @api_client.object_to_http_body(
|
255
|
+
post_body = @api_client.object_to_http_body(data)
|
253
256
|
auth_names = ['bearer']
|
254
257
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
255
258
|
:header_params => header_params,
|
data/lib/ynab/api/months_api.rb
CHANGED
@@ -81,6 +81,7 @@ module YNAB
|
|
81
81
|
# Returns all budget months
|
82
82
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
84
85
|
# @return [MonthSummariesResponse]
|
85
86
|
def get_budget_months(budget_id, opts = {})
|
86
87
|
data, _status_code, _headers = get_budget_months_with_http_info(budget_id, opts)
|
@@ -91,6 +92,7 @@ module YNAB
|
|
91
92
|
# Returns all budget months
|
92
93
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
94
|
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
94
96
|
# @return [Array<(MonthSummariesResponse, Fixnum, Hash)>] MonthSummariesResponse data, response status code and response headers
|
95
97
|
def get_budget_months_with_http_info(budget_id, opts = {})
|
96
98
|
if @api_client.config.debugging
|
@@ -105,6 +107,7 @@ module YNAB
|
|
105
107
|
|
106
108
|
# query parameters
|
107
109
|
query_params = {}
|
110
|
+
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
108
111
|
|
109
112
|
# header parameters
|
110
113
|
header_params = {}
|
data/lib/ynab/api/payees_api.rb
CHANGED
@@ -81,6 +81,7 @@ module YNAB
|
|
81
81
|
# Returns all payees
|
82
82
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
83
83
|
# @param [Hash] opts the optional parameters
|
84
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
84
85
|
# @return [PayeesResponse]
|
85
86
|
def get_payees(budget_id, opts = {})
|
86
87
|
data, _status_code, _headers = get_payees_with_http_info(budget_id, opts)
|
@@ -91,6 +92,7 @@ module YNAB
|
|
91
92
|
# Returns all payees
|
92
93
|
# @param budget_id The id of the budget (\"last-used\" can also be used to specify the last used budget)
|
93
94
|
# @param [Hash] opts the optional parameters
|
95
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included.
|
94
96
|
# @return [Array<(PayeesResponse, Fixnum, Hash)>] PayeesResponse data, response status code and response headers
|
95
97
|
def get_payees_with_http_info(budget_id, opts = {})
|
96
98
|
if @api_client.config.debugging
|
@@ -105,6 +107,7 @@ module YNAB
|
|
105
107
|
|
106
108
|
# query parameters
|
107
109
|
query_params = {}
|
110
|
+
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
108
111
|
|
109
112
|
# header parameters
|
110
113
|
header_params = {}
|
@@ -16,17 +16,22 @@ module YNAB
|
|
16
16
|
class AccountsWrapper
|
17
17
|
attr_accessor :accounts
|
18
18
|
|
19
|
+
# The knowledge of the server
|
20
|
+
attr_accessor :server_knowledge
|
21
|
+
|
19
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
23
|
def self.attribute_map
|
21
24
|
{
|
22
|
-
:'accounts' => :'accounts'
|
25
|
+
:'accounts' => :'accounts',
|
26
|
+
:'server_knowledge' => :'server_knowledge'
|
23
27
|
}
|
24
28
|
end
|
25
29
|
|
26
30
|
# Attribute type mapping.
|
27
31
|
def self.swagger_types
|
28
32
|
{
|
29
|
-
:'accounts' => :'Array<Account>'
|
33
|
+
:'accounts' => :'Array<Account>',
|
34
|
+
:'server_knowledge' => :'Integer'
|
30
35
|
}
|
31
36
|
end
|
32
37
|
|
@@ -43,6 +48,10 @@ module YNAB
|
|
43
48
|
self.accounts = value
|
44
49
|
end
|
45
50
|
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'server_knowledge')
|
53
|
+
self.server_knowledge = attributes[:'server_knowledge']
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -53,6 +62,10 @@ module YNAB
|
|
53
62
|
invalid_properties.push('invalid value for "accounts", accounts cannot be nil.')
|
54
63
|
end
|
55
64
|
|
65
|
+
if @server_knowledge.nil?
|
66
|
+
invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
|
67
|
+
end
|
68
|
+
|
56
69
|
invalid_properties
|
57
70
|
end
|
58
71
|
|
@@ -60,6 +73,7 @@ module YNAB
|
|
60
73
|
# @return true if the model is valid
|
61
74
|
def valid?
|
62
75
|
return false if @accounts.nil?
|
76
|
+
return false if @server_knowledge.nil?
|
63
77
|
true
|
64
78
|
end
|
65
79
|
|
@@ -68,7 +82,8 @@ module YNAB
|
|
68
82
|
def ==(o)
|
69
83
|
return true if self.equal?(o)
|
70
84
|
self.class == o.class &&
|
71
|
-
accounts == o.accounts
|
85
|
+
accounts == o.accounts &&
|
86
|
+
server_knowledge == o.server_knowledge
|
72
87
|
end
|
73
88
|
|
74
89
|
# @see the `==` method
|
@@ -80,7 +95,7 @@ module YNAB
|
|
80
95
|
# Calculates hash code according to all attributes.
|
81
96
|
# @return [Fixnum] Hash code
|
82
97
|
def hash
|
83
|
-
[accounts].hash
|
98
|
+
[accounts, server_knowledge].hash
|
84
99
|
end
|
85
100
|
|
86
101
|
# Builds the object from hash
|
@@ -16,17 +16,22 @@ module YNAB
|
|
16
16
|
class CategoryGroupsWrapper
|
17
17
|
attr_accessor :category_groups
|
18
18
|
|
19
|
+
# The knowledge of the server
|
20
|
+
attr_accessor :server_knowledge
|
21
|
+
|
19
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
23
|
def self.attribute_map
|
21
24
|
{
|
22
|
-
:'category_groups' => :'category_groups'
|
25
|
+
:'category_groups' => :'category_groups',
|
26
|
+
:'server_knowledge' => :'server_knowledge'
|
23
27
|
}
|
24
28
|
end
|
25
29
|
|
26
30
|
# Attribute type mapping.
|
27
31
|
def self.swagger_types
|
28
32
|
{
|
29
|
-
:'category_groups' => :'Array<CategoryGroupWithCategories>'
|
33
|
+
:'category_groups' => :'Array<CategoryGroupWithCategories>',
|
34
|
+
:'server_knowledge' => :'Integer'
|
30
35
|
}
|
31
36
|
end
|
32
37
|
|
@@ -43,6 +48,10 @@ module YNAB
|
|
43
48
|
self.category_groups = value
|
44
49
|
end
|
45
50
|
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'server_knowledge')
|
53
|
+
self.server_knowledge = attributes[:'server_knowledge']
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -53,6 +62,10 @@ module YNAB
|
|
53
62
|
invalid_properties.push('invalid value for "category_groups", category_groups cannot be nil.')
|
54
63
|
end
|
55
64
|
|
65
|
+
if @server_knowledge.nil?
|
66
|
+
invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
|
67
|
+
end
|
68
|
+
|
56
69
|
invalid_properties
|
57
70
|
end
|
58
71
|
|
@@ -60,6 +73,7 @@ module YNAB
|
|
60
73
|
# @return true if the model is valid
|
61
74
|
def valid?
|
62
75
|
return false if @category_groups.nil?
|
76
|
+
return false if @server_knowledge.nil?
|
63
77
|
true
|
64
78
|
end
|
65
79
|
|
@@ -68,7 +82,8 @@ module YNAB
|
|
68
82
|
def ==(o)
|
69
83
|
return true if self.equal?(o)
|
70
84
|
self.class == o.class &&
|
71
|
-
category_groups == o.category_groups
|
85
|
+
category_groups == o.category_groups &&
|
86
|
+
server_knowledge == o.server_knowledge
|
72
87
|
end
|
73
88
|
|
74
89
|
# @see the `==` method
|
@@ -80,7 +95,7 @@ module YNAB
|
|
80
95
|
# Calculates hash code according to all attributes.
|
81
96
|
# @return [Fixnum] Hash code
|
82
97
|
def hash
|
83
|
-
[category_groups].hash
|
98
|
+
[category_groups, server_knowledge].hash
|
84
99
|
end
|
85
100
|
|
86
101
|
# Builds the object from hash
|
@@ -33,6 +33,9 @@ module YNAB
|
|
33
33
|
# The Age of Money as of the month
|
34
34
|
attr_accessor :age_of_money
|
35
35
|
|
36
|
+
# Whether or not the month has been deleted. Deleted months will only be included in delta requests.
|
37
|
+
attr_accessor :deleted
|
38
|
+
|
36
39
|
# The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
|
37
40
|
attr_accessor :categories
|
38
41
|
|
@@ -46,6 +49,7 @@ module YNAB
|
|
46
49
|
:'activity' => :'activity',
|
47
50
|
:'to_be_budgeted' => :'to_be_budgeted',
|
48
51
|
:'age_of_money' => :'age_of_money',
|
52
|
+
:'deleted' => :'deleted',
|
49
53
|
:'categories' => :'categories'
|
50
54
|
}
|
51
55
|
end
|
@@ -60,6 +64,7 @@ module YNAB
|
|
60
64
|
:'activity' => :'Integer',
|
61
65
|
:'to_be_budgeted' => :'Integer',
|
62
66
|
:'age_of_money' => :'Integer',
|
67
|
+
:'deleted' => :'BOOLEAN',
|
63
68
|
:'categories' => :'Array<Category>'
|
64
69
|
}
|
65
70
|
end
|
@@ -100,6 +105,10 @@ module YNAB
|
|
100
105
|
self.age_of_money = attributes[:'age_of_money']
|
101
106
|
end
|
102
107
|
|
108
|
+
if attributes.has_key?(:'deleted')
|
109
|
+
self.deleted = attributes[:'deleted']
|
110
|
+
end
|
111
|
+
|
103
112
|
if attributes.has_key?(:'categories')
|
104
113
|
if (value = attributes[:'categories']).is_a?(Array)
|
105
114
|
self.categories = value
|
@@ -139,6 +148,10 @@ module YNAB
|
|
139
148
|
invalid_properties.push('invalid value for "age_of_money", age_of_money cannot be nil.')
|
140
149
|
end
|
141
150
|
|
151
|
+
if @deleted.nil?
|
152
|
+
invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
|
153
|
+
end
|
154
|
+
|
142
155
|
if @categories.nil?
|
143
156
|
invalid_properties.push('invalid value for "categories", categories cannot be nil.')
|
144
157
|
end
|
@@ -156,6 +169,7 @@ module YNAB
|
|
156
169
|
return false if @activity.nil?
|
157
170
|
return false if @to_be_budgeted.nil?
|
158
171
|
return false if @age_of_money.nil?
|
172
|
+
return false if @deleted.nil?
|
159
173
|
return false if @categories.nil?
|
160
174
|
true
|
161
175
|
end
|
@@ -172,6 +186,7 @@ module YNAB
|
|
172
186
|
activity == o.activity &&
|
173
187
|
to_be_budgeted == o.to_be_budgeted &&
|
174
188
|
age_of_money == o.age_of_money &&
|
189
|
+
deleted == o.deleted &&
|
175
190
|
categories == o.categories
|
176
191
|
end
|
177
192
|
|
@@ -184,7 +199,7 @@ module YNAB
|
|
184
199
|
# Calculates hash code according to all attributes.
|
185
200
|
# @return [Fixnum] Hash code
|
186
201
|
def hash
|
187
|
-
[month, note, income, budgeted, activity, to_be_budgeted, age_of_money, categories].hash
|
202
|
+
[month, note, income, budgeted, activity, to_be_budgeted, age_of_money, deleted, categories].hash
|
188
203
|
end
|
189
204
|
|
190
205
|
# Builds the object from hash
|
@@ -16,17 +16,22 @@ module YNAB
|
|
16
16
|
class MonthSummariesWrapper
|
17
17
|
attr_accessor :months
|
18
18
|
|
19
|
+
# The knowledge of the server
|
20
|
+
attr_accessor :server_knowledge
|
21
|
+
|
19
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
23
|
def self.attribute_map
|
21
24
|
{
|
22
|
-
:'months' => :'months'
|
25
|
+
:'months' => :'months',
|
26
|
+
:'server_knowledge' => :'server_knowledge'
|
23
27
|
}
|
24
28
|
end
|
25
29
|
|
26
30
|
# Attribute type mapping.
|
27
31
|
def self.swagger_types
|
28
32
|
{
|
29
|
-
:'months' => :'Array<MonthSummary>'
|
33
|
+
:'months' => :'Array<MonthSummary>',
|
34
|
+
:'server_knowledge' => :'Integer'
|
30
35
|
}
|
31
36
|
end
|
32
37
|
|
@@ -43,6 +48,10 @@ module YNAB
|
|
43
48
|
self.months = value
|
44
49
|
end
|
45
50
|
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'server_knowledge')
|
53
|
+
self.server_knowledge = attributes[:'server_knowledge']
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -53,6 +62,10 @@ module YNAB
|
|
53
62
|
invalid_properties.push('invalid value for "months", months cannot be nil.')
|
54
63
|
end
|
55
64
|
|
65
|
+
if @server_knowledge.nil?
|
66
|
+
invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
|
67
|
+
end
|
68
|
+
|
56
69
|
invalid_properties
|
57
70
|
end
|
58
71
|
|
@@ -60,6 +73,7 @@ module YNAB
|
|
60
73
|
# @return true if the model is valid
|
61
74
|
def valid?
|
62
75
|
return false if @months.nil?
|
76
|
+
return false if @server_knowledge.nil?
|
63
77
|
true
|
64
78
|
end
|
65
79
|
|
@@ -68,7 +82,8 @@ module YNAB
|
|
68
82
|
def ==(o)
|
69
83
|
return true if self.equal?(o)
|
70
84
|
self.class == o.class &&
|
71
|
-
months == o.months
|
85
|
+
months == o.months &&
|
86
|
+
server_knowledge == o.server_knowledge
|
72
87
|
end
|
73
88
|
|
74
89
|
# @see the `==` method
|
@@ -80,7 +95,7 @@ module YNAB
|
|
80
95
|
# Calculates hash code according to all attributes.
|
81
96
|
# @return [Fixnum] Hash code
|
82
97
|
def hash
|
83
|
-
[months].hash
|
98
|
+
[months, server_knowledge].hash
|
84
99
|
end
|
85
100
|
|
86
101
|
# Builds the object from hash
|
@@ -33,6 +33,9 @@ module YNAB
|
|
33
33
|
# The Age of Money as of the month
|
34
34
|
attr_accessor :age_of_money
|
35
35
|
|
36
|
+
# Whether or not the month has been deleted. Deleted months will only be included in delta requests.
|
37
|
+
attr_accessor :deleted
|
38
|
+
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
40
|
def self.attribute_map
|
38
41
|
{
|
@@ -42,7 +45,8 @@ module YNAB
|
|
42
45
|
:'budgeted' => :'budgeted',
|
43
46
|
:'activity' => :'activity',
|
44
47
|
:'to_be_budgeted' => :'to_be_budgeted',
|
45
|
-
:'age_of_money' => :'age_of_money'
|
48
|
+
:'age_of_money' => :'age_of_money',
|
49
|
+
:'deleted' => :'deleted'
|
46
50
|
}
|
47
51
|
end
|
48
52
|
|
@@ -55,7 +59,8 @@ module YNAB
|
|
55
59
|
:'budgeted' => :'Integer',
|
56
60
|
:'activity' => :'Integer',
|
57
61
|
:'to_be_budgeted' => :'Integer',
|
58
|
-
:'age_of_money' => :'Integer'
|
62
|
+
:'age_of_money' => :'Integer',
|
63
|
+
:'deleted' => :'BOOLEAN'
|
59
64
|
}
|
60
65
|
end
|
61
66
|
|
@@ -94,6 +99,10 @@ module YNAB
|
|
94
99
|
if attributes.has_key?(:'age_of_money')
|
95
100
|
self.age_of_money = attributes[:'age_of_money']
|
96
101
|
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'deleted')
|
104
|
+
self.deleted = attributes[:'deleted']
|
105
|
+
end
|
97
106
|
end
|
98
107
|
|
99
108
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -128,6 +137,10 @@ module YNAB
|
|
128
137
|
invalid_properties.push('invalid value for "age_of_money", age_of_money cannot be nil.')
|
129
138
|
end
|
130
139
|
|
140
|
+
if @deleted.nil?
|
141
|
+
invalid_properties.push('invalid value for "deleted", deleted cannot be nil.')
|
142
|
+
end
|
143
|
+
|
131
144
|
invalid_properties
|
132
145
|
end
|
133
146
|
|
@@ -141,6 +154,7 @@ module YNAB
|
|
141
154
|
return false if @activity.nil?
|
142
155
|
return false if @to_be_budgeted.nil?
|
143
156
|
return false if @age_of_money.nil?
|
157
|
+
return false if @deleted.nil?
|
144
158
|
true
|
145
159
|
end
|
146
160
|
|
@@ -155,7 +169,8 @@ module YNAB
|
|
155
169
|
budgeted == o.budgeted &&
|
156
170
|
activity == o.activity &&
|
157
171
|
to_be_budgeted == o.to_be_budgeted &&
|
158
|
-
age_of_money == o.age_of_money
|
172
|
+
age_of_money == o.age_of_money &&
|
173
|
+
deleted == o.deleted
|
159
174
|
end
|
160
175
|
|
161
176
|
# @see the `==` method
|
@@ -167,7 +182,7 @@ module YNAB
|
|
167
182
|
# Calculates hash code according to all attributes.
|
168
183
|
# @return [Fixnum] Hash code
|
169
184
|
def hash
|
170
|
-
[month, note, income, budgeted, activity, to_be_budgeted, age_of_money].hash
|
185
|
+
[month, note, income, budgeted, activity, to_be_budgeted, age_of_money, deleted].hash
|
171
186
|
end
|
172
187
|
|
173
188
|
# Builds the object from hash
|
@@ -16,17 +16,22 @@ module YNAB
|
|
16
16
|
class PayeesWrapper
|
17
17
|
attr_accessor :payees
|
18
18
|
|
19
|
+
# The knowledge of the server
|
20
|
+
attr_accessor :server_knowledge
|
21
|
+
|
19
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
23
|
def self.attribute_map
|
21
24
|
{
|
22
|
-
:'payees' => :'payees'
|
25
|
+
:'payees' => :'payees',
|
26
|
+
:'server_knowledge' => :'server_knowledge'
|
23
27
|
}
|
24
28
|
end
|
25
29
|
|
26
30
|
# Attribute type mapping.
|
27
31
|
def self.swagger_types
|
28
32
|
{
|
29
|
-
:'payees' => :'Array<Payee>'
|
33
|
+
:'payees' => :'Array<Payee>',
|
34
|
+
:'server_knowledge' => :'Integer'
|
30
35
|
}
|
31
36
|
end
|
32
37
|
|
@@ -43,6 +48,10 @@ module YNAB
|
|
43
48
|
self.payees = value
|
44
49
|
end
|
45
50
|
end
|
51
|
+
|
52
|
+
if attributes.has_key?(:'server_knowledge')
|
53
|
+
self.server_knowledge = attributes[:'server_knowledge']
|
54
|
+
end
|
46
55
|
end
|
47
56
|
|
48
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -53,6 +62,10 @@ module YNAB
|
|
53
62
|
invalid_properties.push('invalid value for "payees", payees cannot be nil.')
|
54
63
|
end
|
55
64
|
|
65
|
+
if @server_knowledge.nil?
|
66
|
+
invalid_properties.push('invalid value for "server_knowledge", server_knowledge cannot be nil.')
|
67
|
+
end
|
68
|
+
|
56
69
|
invalid_properties
|
57
70
|
end
|
58
71
|
|
@@ -60,6 +73,7 @@ module YNAB
|
|
60
73
|
# @return true if the model is valid
|
61
74
|
def valid?
|
62
75
|
return false if @payees.nil?
|
76
|
+
return false if @server_knowledge.nil?
|
63
77
|
true
|
64
78
|
end
|
65
79
|
|
@@ -68,7 +82,8 @@ module YNAB
|
|
68
82
|
def ==(o)
|
69
83
|
return true if self.equal?(o)
|
70
84
|
self.class == o.class &&
|
71
|
-
payees == o.payees
|
85
|
+
payees == o.payees &&
|
86
|
+
server_knowledge == o.server_knowledge
|
72
87
|
end
|
73
88
|
|
74
89
|
# @see the `==` method
|
@@ -80,7 +95,7 @@ module YNAB
|
|
80
95
|
# Calculates hash code according to all attributes.
|
81
96
|
# @return [Fixnum] Hash code
|
82
97
|
def hash
|
83
|
-
[payees].hash
|
98
|
+
[payees, server_knowledge].hash
|
84
99
|
end
|
85
100
|
|
86
101
|
# Builds the object from hash
|
@@ -14,19 +14,19 @@ require 'date'
|
|
14
14
|
|
15
15
|
module YNAB
|
16
16
|
class SaveMonthCategoryWrapper
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :category
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
20
20
|
def self.attribute_map
|
21
21
|
{
|
22
|
-
:'
|
22
|
+
:'category' => :'category'
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
26
26
|
# Attribute type mapping.
|
27
27
|
def self.swagger_types
|
28
28
|
{
|
29
|
-
:'
|
29
|
+
:'category' => :'SaveMonthCategory'
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -38,8 +38,8 @@ module YNAB
|
|
38
38
|
# convert string to symbol for hash key
|
39
39
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
40
|
|
41
|
-
if attributes.has_key?(:'
|
42
|
-
self.
|
41
|
+
if attributes.has_key?(:'category')
|
42
|
+
self.category = attributes[:'category']
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -47,8 +47,8 @@ module YNAB
|
|
47
47
|
# @return Array for valid properties with the reasons
|
48
48
|
def list_invalid_properties
|
49
49
|
invalid_properties = Array.new
|
50
|
-
if @
|
51
|
-
invalid_properties.push('invalid value for "
|
50
|
+
if @category.nil?
|
51
|
+
invalid_properties.push('invalid value for "category", category cannot be nil.')
|
52
52
|
end
|
53
53
|
|
54
54
|
invalid_properties
|
@@ -57,7 +57,7 @@ module YNAB
|
|
57
57
|
# Check to see if the all the properties in the model are valid
|
58
58
|
# @return true if the model is valid
|
59
59
|
def valid?
|
60
|
-
return false if @
|
60
|
+
return false if @category.nil?
|
61
61
|
true
|
62
62
|
end
|
63
63
|
|
@@ -66,7 +66,7 @@ module YNAB
|
|
66
66
|
def ==(o)
|
67
67
|
return true if self.equal?(o)
|
68
68
|
self.class == o.class &&
|
69
|
-
|
69
|
+
category == o.category
|
70
70
|
end
|
71
71
|
|
72
72
|
# @see the `==` method
|
@@ -78,7 +78,7 @@ module YNAB
|
|
78
78
|
# Calculates hash code according to all attributes.
|
79
79
|
# @return [Fixnum] Hash code
|
80
80
|
def hash
|
81
|
-
[
|
81
|
+
[category].hash
|
82
82
|
end
|
83
83
|
|
84
84
|
# Builds the object from hash
|
data/lib/ynab/version.rb
CHANGED