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
@@ -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 SaveCategoryResponse
|
17
|
+
attr_accessor :data
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'data' => :'data'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'data' => :'SaveCategoryResponseData'
|
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?(:'data')
|
42
|
+
self.data = attributes[:'data']
|
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 @data.nil?
|
51
|
+
invalid_properties.push('invalid value for "data", data 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 @data.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
|
+
data == o.data
|
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
|
+
[data].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
|
data/lib/ynab/models/{scheduled_transaction_wrapper.rb → scheduled_transaction_response_data.rb}
RENAMED
@@ -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 ScheduledTransactionResponseData
|
17
17
|
attr_accessor :scheduled_transaction
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/ynab/models/{scheduled_transactions_wrapper.rb → scheduled_transactions_response_data.rb}
RENAMED
@@ -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 ScheduledTransactionsResponseData
|
17
17
|
attr_accessor :scheduled_transactions
|
18
18
|
|
19
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/ynab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ynab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- You Need A Budget, LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -115,54 +115,54 @@ files:
|
|
115
115
|
- lib/ynab/configuration.rb
|
116
116
|
- lib/ynab/models/account.rb
|
117
117
|
- lib/ynab/models/account_response.rb
|
118
|
-
- lib/ynab/models/
|
118
|
+
- lib/ynab/models/account_response_data.rb
|
119
119
|
- lib/ynab/models/accounts_response.rb
|
120
|
-
- lib/ynab/models/
|
120
|
+
- lib/ynab/models/accounts_response_data.rb
|
121
121
|
- lib/ynab/models/budget_detail.rb
|
122
122
|
- lib/ynab/models/budget_detail_response.rb
|
123
|
-
- lib/ynab/models/
|
123
|
+
- lib/ynab/models/budget_detail_response_data.rb
|
124
124
|
- lib/ynab/models/budget_settings.rb
|
125
125
|
- lib/ynab/models/budget_settings_response.rb
|
126
|
-
- lib/ynab/models/
|
126
|
+
- lib/ynab/models/budget_settings_response_data.rb
|
127
127
|
- lib/ynab/models/budget_summary.rb
|
128
128
|
- lib/ynab/models/budget_summary_response.rb
|
129
|
-
- lib/ynab/models/
|
130
|
-
- lib/ynab/models/bulk_id_wrapper.rb
|
131
|
-
- lib/ynab/models/bulk_ids.rb
|
129
|
+
- lib/ynab/models/budget_summary_response_data.rb
|
132
130
|
- lib/ynab/models/bulk_response.rb
|
133
|
-
- lib/ynab/models/
|
134
|
-
- lib/ynab/models/
|
131
|
+
- lib/ynab/models/bulk_response_data.rb
|
132
|
+
- lib/ynab/models/bulk_response_data_bulk.rb
|
135
133
|
- lib/ynab/models/bulk_transactions.rb
|
136
134
|
- lib/ynab/models/categories_response.rb
|
135
|
+
- lib/ynab/models/categories_response_data.rb
|
137
136
|
- lib/ynab/models/category.rb
|
138
137
|
- lib/ynab/models/category_group.rb
|
139
138
|
- lib/ynab/models/category_group_with_categories.rb
|
140
|
-
- lib/ynab/models/category_groups_wrapper.rb
|
141
139
|
- lib/ynab/models/category_response.rb
|
142
|
-
- lib/ynab/models/
|
140
|
+
- lib/ynab/models/category_response_data.rb
|
143
141
|
- lib/ynab/models/currency_format.rb
|
144
142
|
- lib/ynab/models/date_format.rb
|
145
143
|
- lib/ynab/models/error_detail.rb
|
146
144
|
- lib/ynab/models/error_response.rb
|
147
145
|
- lib/ynab/models/hybrid_transaction.rb
|
148
146
|
- lib/ynab/models/hybrid_transactions_response.rb
|
149
|
-
- lib/ynab/models/
|
147
|
+
- lib/ynab/models/hybrid_transactions_response_data.rb
|
150
148
|
- lib/ynab/models/month_detail.rb
|
151
149
|
- lib/ynab/models/month_detail_response.rb
|
152
|
-
- lib/ynab/models/
|
150
|
+
- lib/ynab/models/month_detail_response_data.rb
|
153
151
|
- lib/ynab/models/month_summaries_response.rb
|
154
|
-
- lib/ynab/models/
|
152
|
+
- lib/ynab/models/month_summaries_response_data.rb
|
155
153
|
- lib/ynab/models/month_summary.rb
|
156
154
|
- lib/ynab/models/payee.rb
|
157
155
|
- lib/ynab/models/payee_location.rb
|
158
156
|
- lib/ynab/models/payee_location_response.rb
|
159
|
-
- lib/ynab/models/
|
157
|
+
- lib/ynab/models/payee_location_response_data.rb
|
160
158
|
- lib/ynab/models/payee_locations_response.rb
|
161
|
-
- lib/ynab/models/
|
159
|
+
- lib/ynab/models/payee_locations_response_data.rb
|
162
160
|
- lib/ynab/models/payee_response.rb
|
163
|
-
- lib/ynab/models/
|
161
|
+
- lib/ynab/models/payee_response_data.rb
|
164
162
|
- lib/ynab/models/payees_response.rb
|
165
|
-
- lib/ynab/models/
|
163
|
+
- lib/ynab/models/payees_response_data.rb
|
164
|
+
- lib/ynab/models/save_category_response.rb
|
165
|
+
- lib/ynab/models/save_category_response_data.rb
|
166
166
|
- lib/ynab/models/save_month_category.rb
|
167
167
|
- lib/ynab/models/save_month_category_wrapper.rb
|
168
168
|
- lib/ynab/models/save_transaction.rb
|
@@ -173,20 +173,20 @@ files:
|
|
173
173
|
- lib/ynab/models/scheduled_sub_transaction.rb
|
174
174
|
- lib/ynab/models/scheduled_transaction_detail.rb
|
175
175
|
- lib/ynab/models/scheduled_transaction_response.rb
|
176
|
+
- lib/ynab/models/scheduled_transaction_response_data.rb
|
176
177
|
- lib/ynab/models/scheduled_transaction_summary.rb
|
177
|
-
- lib/ynab/models/scheduled_transaction_wrapper.rb
|
178
178
|
- lib/ynab/models/scheduled_transactions_response.rb
|
179
|
-
- lib/ynab/models/
|
179
|
+
- lib/ynab/models/scheduled_transactions_response_data.rb
|
180
180
|
- lib/ynab/models/sub_transaction.rb
|
181
181
|
- lib/ynab/models/transaction_detail.rb
|
182
182
|
- lib/ynab/models/transaction_response.rb
|
183
|
+
- lib/ynab/models/transaction_response_data.rb
|
183
184
|
- lib/ynab/models/transaction_summary.rb
|
184
|
-
- lib/ynab/models/transaction_wrapper.rb
|
185
185
|
- lib/ynab/models/transactions_response.rb
|
186
|
-
- lib/ynab/models/
|
186
|
+
- lib/ynab/models/transactions_response_data.rb
|
187
187
|
- lib/ynab/models/user.rb
|
188
188
|
- lib/ynab/models/user_response.rb
|
189
|
-
- lib/ynab/models/
|
189
|
+
- lib/ynab/models/user_response_data.rb
|
190
190
|
- lib/ynab/overrides/transactions_api.rb
|
191
191
|
- lib/ynab/version.rb
|
192
192
|
- spec/api/accounts_spec.rb
|
@@ -251,8 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
|
255
|
-
rubygems_version: 2.7.9
|
254
|
+
rubygems_version: 3.0.3
|
256
255
|
signing_key:
|
257
256
|
specification_version: 4
|
258
257
|
summary: YNAB API Endpoints Ruby Gem
|