ynab 1.11.0 → 1.12.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.rb +23 -21
- data/lib/ynab/api/categories_api.rb +3 -3
- data/lib/ynab/models/account_response.rb +1 -1
- data/lib/ynab/models/{account_wrapper.rb → account_response_data.rb} +1 -1
- data/lib/ynab/models/accounts_response.rb +1 -1
- data/lib/ynab/models/{accounts_wrapper.rb → accounts_response_data.rb} +1 -1
- data/lib/ynab/models/budget_detail_response.rb +1 -1
- data/lib/ynab/models/{budget_detail_wrapper.rb → budget_detail_response_data.rb} +1 -1
- data/lib/ynab/models/budget_settings_response.rb +1 -1
- data/lib/ynab/models/{budget_settings_wrapper.rb → budget_settings_response_data.rb} +1 -1
- data/lib/ynab/models/budget_summary_response.rb +1 -1
- data/lib/ynab/models/{budget_summary_wrapper.rb → budget_summary_response_data.rb} +1 -1
- data/lib/ynab/models/bulk_response.rb +1 -1
- data/lib/ynab/models/{bulk_id_wrapper.rb → bulk_response_data.rb} +2 -2
- data/lib/ynab/models/{bulk_ids.rb → bulk_response_data_bulk.rb} +1 -1
- data/lib/ynab/models/categories_response.rb +1 -1
- data/lib/ynab/models/{category_groups_wrapper.rb → categories_response_data.rb} +1 -1
- data/lib/ynab/models/category_response.rb +1 -1
- data/lib/ynab/models/category_response_data.rb +188 -0
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -1
- data/lib/ynab/models/{hybrid_transactions_wrapper.rb → hybrid_transactions_response_data.rb} +1 -1
- data/lib/ynab/models/month_detail_response.rb +1 -1
- data/lib/ynab/models/{month_detail_wrapper.rb → month_detail_response_data.rb} +1 -1
- data/lib/ynab/models/month_summaries_response.rb +1 -1
- data/lib/ynab/models/{month_summaries_wrapper.rb → month_summaries_response_data.rb} +1 -1
- data/lib/ynab/models/payee_location_response.rb +1 -1
- data/lib/ynab/models/{payee_location_wrapper.rb → payee_location_response_data.rb} +1 -1
- data/lib/ynab/models/payee_locations_response.rb +1 -1
- data/lib/ynab/models/{payee_locations_wrapper.rb → payee_locations_response_data.rb} +1 -1
- data/lib/ynab/models/payee_response.rb +1 -1
- data/lib/ynab/models/{payee_wrapper.rb → payee_response_data.rb} +1 -1
- data/lib/ynab/models/payees_response.rb +1 -1
- data/lib/ynab/models/{payees_wrapper.rb → payees_response_data.rb} +1 -1
- data/lib/ynab/models/save_category_response.rb +188 -0
- data/lib/ynab/models/{category_wrapper.rb → save_category_response_data.rb} +1 -1
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -1
- data/lib/ynab/models/{scheduled_transaction_wrapper.rb → scheduled_transaction_response_data.rb} +1 -1
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -1
- data/lib/ynab/models/{scheduled_transactions_wrapper.rb → scheduled_transactions_response_data.rb} +1 -1
- data/lib/ynab/models/transaction_response.rb +1 -1
- data/lib/ynab/models/{transaction_wrapper.rb → transaction_response_data.rb} +1 -1
- data/lib/ynab/models/transactions_response.rb +1 -1
- data/lib/ynab/models/{transactions_wrapper.rb → transactions_response_data.rb} +1 -1
- data/lib/ynab/models/user_response.rb +1 -1
- data/lib/ynab/models/{user_wrapper.rb → user_response_data.rb} +1 -1
- data/lib/ynab/version.rb +1 -1
- metadata +26 -27
- data/lib/ynab/models/bulk_transaction_create_response.rb +0 -193
- data/lib/ynab/models/bulk_transaction_ids.rb +0 -195
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '088c17220a46804e4e8f2f6cc7970bd517e6d9d7b039f92f936419127544d913'
|
4
|
+
data.tar.gz: cb36aac50f59d983dd2138ff3e58a38a65df2d2f0657d72d42c9538b857265be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8c0fb26a5bd32f0775a2877936fb8c794fb65c6a32f8b9b7465bcbac326f922661e6e47cc11cba40c4455d395c15f10e12898f56b2996632331b6e4923f22fb
|
7
|
+
data.tar.gz: 2b813fb13d736b9f6238e90b48ba50d9974d9e5c04860e361c706db23b9c84b4f9ea998ad3dcb69077e2d3c8a63c737b6dbc64c5877a2f877562fe4550762f79
|
data/lib/ynab.rb
CHANGED
@@ -19,48 +19,50 @@ require 'ynab/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'ynab/models/account'
|
21
21
|
require 'ynab/models/account_response'
|
22
|
-
require 'ynab/models/
|
22
|
+
require 'ynab/models/account_response_data'
|
23
23
|
require 'ynab/models/accounts_response'
|
24
|
-
require 'ynab/models/
|
24
|
+
require 'ynab/models/accounts_response_data'
|
25
25
|
require 'ynab/models/budget_detail_response'
|
26
|
-
require 'ynab/models/
|
26
|
+
require 'ynab/models/budget_detail_response_data'
|
27
27
|
require 'ynab/models/budget_settings'
|
28
28
|
require 'ynab/models/budget_settings_response'
|
29
|
-
require 'ynab/models/
|
29
|
+
require 'ynab/models/budget_settings_response_data'
|
30
30
|
require 'ynab/models/budget_summary'
|
31
31
|
require 'ynab/models/budget_summary_response'
|
32
|
-
require 'ynab/models/
|
33
|
-
require 'ynab/models/bulk_id_wrapper'
|
34
|
-
require 'ynab/models/bulk_ids'
|
32
|
+
require 'ynab/models/budget_summary_response_data'
|
35
33
|
require 'ynab/models/bulk_response'
|
34
|
+
require 'ynab/models/bulk_response_data'
|
35
|
+
require 'ynab/models/bulk_response_data_bulk'
|
36
36
|
require 'ynab/models/bulk_transactions'
|
37
37
|
require 'ynab/models/categories_response'
|
38
|
+
require 'ynab/models/categories_response_data'
|
38
39
|
require 'ynab/models/category'
|
39
40
|
require 'ynab/models/category_group'
|
40
|
-
require 'ynab/models/category_groups_wrapper'
|
41
41
|
require 'ynab/models/category_response'
|
42
|
-
require 'ynab/models/
|
42
|
+
require 'ynab/models/category_response_data'
|
43
43
|
require 'ynab/models/currency_format'
|
44
44
|
require 'ynab/models/date_format'
|
45
45
|
require 'ynab/models/error_detail'
|
46
46
|
require 'ynab/models/error_response'
|
47
47
|
require 'ynab/models/hybrid_transactions_response'
|
48
|
-
require 'ynab/models/
|
48
|
+
require 'ynab/models/hybrid_transactions_response_data'
|
49
49
|
require 'ynab/models/month_detail_response'
|
50
|
-
require 'ynab/models/
|
50
|
+
require 'ynab/models/month_detail_response_data'
|
51
51
|
require 'ynab/models/month_summaries_response'
|
52
|
-
require 'ynab/models/
|
52
|
+
require 'ynab/models/month_summaries_response_data'
|
53
53
|
require 'ynab/models/month_summary'
|
54
54
|
require 'ynab/models/payee'
|
55
55
|
require 'ynab/models/payee_location'
|
56
56
|
require 'ynab/models/payee_location_response'
|
57
|
-
require 'ynab/models/
|
57
|
+
require 'ynab/models/payee_location_response_data'
|
58
58
|
require 'ynab/models/payee_locations_response'
|
59
|
-
require 'ynab/models/
|
59
|
+
require 'ynab/models/payee_locations_response_data'
|
60
60
|
require 'ynab/models/payee_response'
|
61
|
-
require 'ynab/models/
|
61
|
+
require 'ynab/models/payee_response_data'
|
62
62
|
require 'ynab/models/payees_response'
|
63
|
-
require 'ynab/models/
|
63
|
+
require 'ynab/models/payees_response_data'
|
64
|
+
require 'ynab/models/save_category_response'
|
65
|
+
require 'ynab/models/save_category_response_data'
|
64
66
|
require 'ynab/models/save_month_category'
|
65
67
|
require 'ynab/models/save_month_category_wrapper'
|
66
68
|
require 'ynab/models/save_transaction'
|
@@ -70,19 +72,19 @@ require 'ynab/models/save_transactions_response_data'
|
|
70
72
|
require 'ynab/models/save_transactions_wrapper'
|
71
73
|
require 'ynab/models/scheduled_sub_transaction'
|
72
74
|
require 'ynab/models/scheduled_transaction_response'
|
75
|
+
require 'ynab/models/scheduled_transaction_response_data'
|
73
76
|
require 'ynab/models/scheduled_transaction_summary'
|
74
|
-
require 'ynab/models/scheduled_transaction_wrapper'
|
75
77
|
require 'ynab/models/scheduled_transactions_response'
|
76
|
-
require 'ynab/models/
|
78
|
+
require 'ynab/models/scheduled_transactions_response_data'
|
77
79
|
require 'ynab/models/sub_transaction'
|
78
80
|
require 'ynab/models/transaction_response'
|
81
|
+
require 'ynab/models/transaction_response_data'
|
79
82
|
require 'ynab/models/transaction_summary'
|
80
|
-
require 'ynab/models/transaction_wrapper'
|
81
83
|
require 'ynab/models/transactions_response'
|
82
|
-
require 'ynab/models/
|
84
|
+
require 'ynab/models/transactions_response_data'
|
83
85
|
require 'ynab/models/user'
|
84
86
|
require 'ynab/models/user_response'
|
85
|
-
require 'ynab/models/
|
87
|
+
require 'ynab/models/user_response_data'
|
86
88
|
require 'ynab/models/budget_detail'
|
87
89
|
require 'ynab/models/category_group_with_categories'
|
88
90
|
require 'ynab/models/hybrid_transaction'
|
@@ -203,7 +203,7 @@ module YNAB
|
|
203
203
|
# @param category_id The id of the category
|
204
204
|
# @param data The category to update
|
205
205
|
# @param [Hash] opts the optional parameters
|
206
|
-
# @return [
|
206
|
+
# @return [SaveCategoryResponse]
|
207
207
|
def update_month_category(budget_id, month, category_id, data, opts = {})
|
208
208
|
data, _status_code, _headers = update_month_category_with_http_info(budget_id, month, category_id, data, opts)
|
209
209
|
data
|
@@ -216,7 +216,7 @@ module YNAB
|
|
216
216
|
# @param category_id The id of the category
|
217
217
|
# @param data The category to update
|
218
218
|
# @param [Hash] opts the optional parameters
|
219
|
-
# @return [Array<(
|
219
|
+
# @return [Array<(SaveCategoryResponse, Fixnum, Hash)>] SaveCategoryResponse data, response status code and response headers
|
220
220
|
def update_month_category_with_http_info(budget_id, month, category_id, data, opts = {})
|
221
221
|
if @api_client.config.debugging
|
222
222
|
@api_client.config.logger.debug 'Calling API: CategoriesApi.update_month_category ...'
|
@@ -260,7 +260,7 @@ module YNAB
|
|
260
260
|
:form_params => form_params,
|
261
261
|
:body => post_body,
|
262
262
|
:auth_names => auth_names,
|
263
|
-
:return_type => '
|
263
|
+
:return_type => 'SaveCategoryResponse')
|
264
264
|
if @api_client.config.debugging
|
265
265
|
@api_client.config.logger.debug "API called: CategoriesApi#update_month_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
266
266
|
end
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YNAB
|
16
|
-
class
|
16
|
+
class BudgetSummaryResponseData
|
17
17
|
attr_accessor :budgets
|
18
18
|
|
19
19
|
# The default budget, if the associated application is configured to support specifying it
|
@@ -13,7 +13,7 @@ Swagger Codegen version: 2.4.0-SNAPSHOT
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module YNAB
|
16
|
-
class
|
16
|
+
class BulkResponseData
|
17
17
|
attr_accessor :bulk
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -26,7 +26,7 @@ module YNAB
|
|
26
26
|
# Attribute type mapping.
|
27
27
|
def self.swagger_types
|
28
28
|
{
|
29
|
-
:'bulk' => :'
|
29
|
+
:'bulk' => :'BulkResponseDataBulk'
|
30
30
|
}
|
31
31
|
end
|
32
32
|
|
@@ -0,0 +1,188 @@
|
|
1
|
+
=begin
|
2
|
+
#YNAB API Endpoints
|
3
|
+
|
4
|
+
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module YNAB
|
16
|
+
class CategoryResponseData
|
17
|
+
attr_accessor :category
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'category' => :'category'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'category' => :'Category'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'category')
|
42
|
+
self.category = attributes[:'category']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properties with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
if @category.nil?
|
51
|
+
invalid_properties.push('invalid value for "category", category cannot be nil.')
|
52
|
+
end
|
53
|
+
|
54
|
+
invalid_properties
|
55
|
+
end
|
56
|
+
|
57
|
+
# Check to see if the all the properties in the model are valid
|
58
|
+
# @return true if the model is valid
|
59
|
+
def valid?
|
60
|
+
return false if @category.nil?
|
61
|
+
true
|
62
|
+
end
|
63
|
+
|
64
|
+
# Checks equality by comparing each attribute.
|
65
|
+
# @param [Object] Object to be compared
|
66
|
+
def ==(o)
|
67
|
+
return true if self.equal?(o)
|
68
|
+
self.class == o.class &&
|
69
|
+
category == o.category
|
70
|
+
end
|
71
|
+
|
72
|
+
# @see the `==` method
|
73
|
+
# @param [Object] Object to be compared
|
74
|
+
def eql?(o)
|
75
|
+
self == o
|
76
|
+
end
|
77
|
+
|
78
|
+
# Calculates hash code according to all attributes.
|
79
|
+
# @return [Fixnum] Hash code
|
80
|
+
def hash
|
81
|
+
[category].hash
|
82
|
+
end
|
83
|
+
|
84
|
+
# Builds the object from hash
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
# @return [Object] Returns the model itself
|
87
|
+
def build_from_hash(attributes)
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
89
|
+
self.class.swagger_types.each_pair do |key, type|
|
90
|
+
if type =~ /\AArray<(.*)>/i
|
91
|
+
# check to ensure the input is an array given that the the attribute
|
92
|
+
# is documented as an array but the input is not
|
93
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
95
|
+
end
|
96
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
97
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
98
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
99
|
+
end
|
100
|
+
|
101
|
+
self
|
102
|
+
end
|
103
|
+
|
104
|
+
# Deserializes the data based on type
|
105
|
+
# @param string type Data type
|
106
|
+
# @param string value Value to be deserialized
|
107
|
+
# @return [Object] Deserialized data
|
108
|
+
def _deserialize(type, value)
|
109
|
+
case type.to_sym
|
110
|
+
when :DateTime
|
111
|
+
DateTime.parse(value)
|
112
|
+
when :Date
|
113
|
+
Date.parse(value)
|
114
|
+
when :String
|
115
|
+
value.to_s
|
116
|
+
when :Integer
|
117
|
+
value.to_i
|
118
|
+
when :Float
|
119
|
+
value.to_f
|
120
|
+
when :BOOLEAN
|
121
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
122
|
+
true
|
123
|
+
else
|
124
|
+
false
|
125
|
+
end
|
126
|
+
when :Object
|
127
|
+
# generic object (usually a Hash), return directly
|
128
|
+
value
|
129
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
130
|
+
inner_type = Regexp.last_match[:inner_type]
|
131
|
+
value.map { |v| _deserialize(inner_type, v) }
|
132
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
133
|
+
k_type = Regexp.last_match[:k_type]
|
134
|
+
v_type = Regexp.last_match[:v_type]
|
135
|
+
{}.tap do |hash|
|
136
|
+
value.each do |k, v|
|
137
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
else # model
|
141
|
+
temp_model = YNAB.const_get(type).new
|
142
|
+
temp_model.build_from_hash(value)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
# Returns the string representation of the object
|
147
|
+
# @return [String] String presentation of the object
|
148
|
+
def to_s
|
149
|
+
to_hash.to_s
|
150
|
+
end
|
151
|
+
|
152
|
+
# to_body is an alias to to_hash (backward compatibility)
|
153
|
+
# @return [Hash] Returns the object in the form of hash
|
154
|
+
def to_body
|
155
|
+
to_hash
|
156
|
+
end
|
157
|
+
|
158
|
+
# Returns the object in the form of hash
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_hash
|
161
|
+
hash = {}
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
163
|
+
value = self.send(attr)
|
164
|
+
next if value.nil?
|
165
|
+
hash[param] = _to_hash(value)
|
166
|
+
end
|
167
|
+
hash
|
168
|
+
end
|
169
|
+
|
170
|
+
# Outputs non-array value in the form of hash
|
171
|
+
# For object, use to_hash. Otherwise, just return the value
|
172
|
+
# @param [Object] value Any valid value
|
173
|
+
# @return [Hash] Returns the value in the form of hash
|
174
|
+
def _to_hash(value)
|
175
|
+
if value.is_a?(Array)
|
176
|
+
value.compact.map { |v| _to_hash(v) }
|
177
|
+
elsif value.is_a?(Hash)
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
180
|
+
end
|
181
|
+
elsif value.respond_to? :to_hash
|
182
|
+
value.to_hash
|
183
|
+
else
|
184
|
+
value
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|