ynab 3.2.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/Rakefile +6 -5
- data/config.yaml +11 -0
- data/docs/ExistingTransaction.md +1 -1
- data/docs/NewTransaction.md +1 -1
- data/docs/PostScheduledTransactionWrapper.md +8 -0
- data/docs/SaveScheduledTransaction.md +16 -0
- data/docs/SaveTransactionWithIdOrImportId.md +1 -1
- data/docs/SaveTransactionWithOptionalFields.md +1 -1
- data/docs/{SaveTransactionWithIdAllOf.md → ScheduledTransactionFrequency.md} +1 -2
- data/docs/ScheduledTransactionsApi.md +21 -0
- data/docs/TransactionsApi.md +25 -1
- data/lib/ynab/api/accounts_api.rb +1 -4
- data/lib/ynab/api/budgets_api.rb +1 -4
- data/lib/ynab/api/categories_api.rb +1 -4
- data/lib/ynab/api/months_api.rb +1 -4
- data/lib/ynab/api/payee_locations_api.rb +1 -4
- data/lib/ynab/api/payees_api.rb +1 -4
- data/lib/ynab/api/scheduled_transactions_api.rb +75 -4
- data/lib/ynab/api/transactions_api.rb +81 -6
- data/lib/ynab/api/user_api.rb +1 -4
- data/lib/ynab/api_client.rb +1 -4
- data/lib/ynab/api_error.rb +0 -12
- data/lib/ynab/configuration.rb +11 -4
- data/lib/ynab/models/account.rb +1 -4
- data/lib/ynab/models/account_response.rb +1 -4
- data/lib/ynab/models/account_response_data.rb +1 -4
- data/lib/ynab/models/account_type.rb +1 -4
- data/lib/ynab/models/accounts_response.rb +1 -4
- data/lib/ynab/models/accounts_response_data.rb +1 -4
- data/lib/ynab/models/budget_detail.rb +1 -4
- data/lib/ynab/models/budget_detail_response.rb +1 -4
- data/lib/ynab/models/budget_detail_response_data.rb +1 -4
- data/lib/ynab/models/budget_settings.rb +1 -4
- data/lib/ynab/models/budget_settings_response.rb +1 -4
- data/lib/ynab/models/budget_settings_response_data.rb +1 -4
- data/lib/ynab/models/budget_summary.rb +1 -4
- data/lib/ynab/models/budget_summary_response.rb +1 -4
- data/lib/ynab/models/budget_summary_response_data.rb +1 -4
- data/lib/ynab/models/bulk_response.rb +1 -4
- data/lib/ynab/models/bulk_response_data.rb +1 -4
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -4
- data/lib/ynab/models/bulk_transactions.rb +1 -4
- data/lib/ynab/models/categories_response.rb +1 -4
- data/lib/ynab/models/categories_response_data.rb +1 -4
- data/lib/ynab/models/category.rb +1 -4
- data/lib/ynab/models/category_group.rb +1 -4
- data/lib/ynab/models/category_group_with_categories.rb +1 -4
- data/lib/ynab/models/category_response.rb +1 -4
- data/lib/ynab/models/category_response_data.rb +1 -4
- data/lib/ynab/models/currency_format.rb +1 -4
- data/lib/ynab/models/date_format.rb +1 -4
- data/lib/ynab/models/error_detail.rb +1 -4
- data/lib/ynab/models/error_response.rb +1 -4
- data/lib/ynab/models/existing_transaction.rb +2 -5
- data/lib/ynab/models/hybrid_transaction.rb +1 -4
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -4
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -4
- data/lib/ynab/models/month_detail.rb +1 -4
- data/lib/ynab/models/month_detail_response.rb +1 -4
- data/lib/ynab/models/month_detail_response_data.rb +1 -4
- data/lib/ynab/models/month_summaries_response.rb +1 -4
- data/lib/ynab/models/month_summaries_response_data.rb +1 -4
- data/lib/ynab/models/month_summary.rb +1 -4
- data/lib/ynab/models/new_transaction.rb +2 -5
- data/lib/ynab/models/patch_category_wrapper.rb +1 -4
- data/lib/ynab/models/patch_month_category_wrapper.rb +1 -4
- data/lib/ynab/models/patch_payee_wrapper.rb +1 -4
- data/lib/ynab/models/patch_transactions_wrapper.rb +1 -4
- data/lib/ynab/models/payee.rb +1 -4
- data/lib/ynab/models/payee_location.rb +1 -4
- data/lib/ynab/models/payee_location_response.rb +1 -4
- data/lib/ynab/models/payee_location_response_data.rb +1 -4
- data/lib/ynab/models/payee_locations_response.rb +1 -4
- data/lib/ynab/models/payee_locations_response_data.rb +1 -4
- data/lib/ynab/models/payee_response.rb +1 -4
- data/lib/ynab/models/payee_response_data.rb +1 -4
- data/lib/ynab/models/payees_response.rb +1 -4
- data/lib/ynab/models/payees_response_data.rb +1 -4
- data/lib/ynab/models/post_account_wrapper.rb +1 -4
- data/lib/ynab/models/{save_transaction_with_id_all_of.rb → post_scheduled_transaction_wrapper.rb} +23 -32
- data/lib/ynab/models/post_transactions_wrapper.rb +1 -4
- data/lib/ynab/models/put_transaction_wrapper.rb +1 -4
- data/lib/ynab/models/save_account.rb +1 -4
- data/lib/ynab/models/save_category.rb +1 -4
- data/lib/ynab/models/save_category_response.rb +1 -4
- data/lib/ynab/models/save_category_response_data.rb +1 -4
- data/lib/ynab/models/save_month_category.rb +1 -4
- data/lib/ynab/models/save_payee.rb +1 -4
- data/lib/ynab/models/save_payee_response.rb +1 -4
- data/lib/ynab/models/save_payee_response_data.rb +1 -4
- data/lib/ynab/models/{hybrid_transaction_all_of.rb → save_scheduled_transaction.rb} +99 -62
- data/lib/ynab/models/save_sub_transaction.rb +1 -4
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +2 -5
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +2 -5
- data/lib/ynab/models/save_transactions_response.rb +1 -4
- data/lib/ynab/models/save_transactions_response_data.rb +1 -4
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_frequency.rb +48 -0
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -4
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -4
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -4
- data/lib/ynab/models/sub_transaction.rb +1 -4
- data/lib/ynab/models/transaction_cleared_status.rb +1 -4
- data/lib/ynab/models/transaction_detail.rb +1 -4
- data/lib/ynab/models/transaction_flag_color.rb +1 -4
- data/lib/ynab/models/transaction_response.rb +1 -4
- data/lib/ynab/models/transaction_response_data.rb +1 -4
- data/lib/ynab/models/transaction_summary.rb +1 -4
- data/lib/ynab/models/transactions_import_response.rb +1 -4
- data/lib/ynab/models/transactions_import_response_data.rb +1 -4
- data/lib/ynab/models/transactions_response.rb +1 -4
- data/lib/ynab/models/transactions_response_data.rb +1 -4
- data/lib/ynab/models/user.rb +1 -4
- data/lib/ynab/models/user_response.rb +1 -4
- data/lib/ynab/models/user_response_data.rb +1 -4
- data/lib/ynab/overrides/transactions_api.rb +0 -12
- data/lib/ynab/version.rb +1 -13
- data/lib/ynab.rb +4 -4
- data/open_api_spec.yaml +190 -4
- data/spec/api/scheduled_transactions_spec.rb +20 -2
- data/spec/api/transactions_spec.rb +10 -0
- data/spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml +63 -0
- data/spec/fixtures/vcr_cassettes/month_transactions.yml +46 -0
- data/templates/README.md +3 -0
- data/templates/api_info.mustache +9 -0
- data/templates/gemspec.mustache +41 -0
- data/ynab.gemspec +3 -6
- metadata +50 -84
- data/docs/AccountWrapper.md +0 -8
- data/docs/AccountsWrapper.md +0 -9
- data/docs/BudgetDetailAllOf.md +0 -17
- data/docs/BudgetDetailWrapper.md +0 -9
- data/docs/BudgetSettingsWrapper.md +0 -8
- data/docs/BudgetSummaryWrapper.md +0 -9
- data/docs/BulkIdWrapper.md +0 -8
- data/docs/BulkIds.md +0 -9
- data/docs/BulkTransactionCreateResponse.md +0 -8
- data/docs/BulkTransactionIds.md +0 -8
- data/docs/CategoryGroupWithCategoriesAllOf.md +0 -8
- data/docs/CategoryGroupsWrapper.md +0 -9
- data/docs/CategoryWrapper.md +0 -9
- data/docs/DeprecatedApi.md +0 -28
- data/docs/HybridTransactionAllOf.md +0 -12
- data/docs/HybridTransactionsWrapper.md +0 -8
- data/docs/LoanAccountPeriodicValue.md +0 -7
- data/docs/MonthDetailAllOf.md +0 -8
- data/docs/MonthDetailWrapper.md +0 -8
- data/docs/MonthSummariesWrapper.md +0 -9
- data/docs/PayeeLocationWrapper.md +0 -8
- data/docs/PayeeLocationsWrapper.md +0 -8
- data/docs/PayeeWrapper.md +0 -8
- data/docs/PayeesWrapper.md +0 -9
- data/docs/SaveAccountWrapper.md +0 -8
- data/docs/SaveMonthCategoryWrapper.md +0 -8
- data/docs/SaveTransaction.md +0 -19
- data/docs/SaveTransactionWithId.md +0 -20
- data/docs/SaveTransactionWrapper.md +0 -8
- data/docs/SaveTransactionsWrapper.md +0 -9
- data/docs/ScheduledTransactionDetailAllOf.md +0 -11
- data/docs/ScheduledTransactionWrapper.md +0 -8
- data/docs/ScheduledTransactionsWrapper.md +0 -8
- data/docs/TransactionDetailAllOf.md +0 -11
- data/docs/TransactionWrapper.md +0 -8
- data/docs/TransactionsWrapper.md +0 -9
- data/docs/UpdateTransaction.md +0 -20
- data/docs/UpdateTransactionsWrapper.md +0 -8
- data/docs/UserWrapper.md +0 -8
- data/lib/ynab/models/budget_detail_all_of.rb +0 -320
- data/lib/ynab/models/category_group_with_categories_all_of.rb +0 -223
- data/lib/ynab/models/month_detail_all_of.rb +0 -223
- data/lib/ynab/models/save_transaction.rb +0 -401
- data/lib/ynab/models/save_transaction_with_id.rb +0 -411
- data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +0 -254
- data/lib/ynab/models/transaction_detail_all_of.rb +0 -254
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 6.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -14,19 +11,29 @@ require 'date'
|
|
14
11
|
require 'time'
|
15
12
|
|
16
13
|
module YNAB
|
17
|
-
class
|
18
|
-
|
19
|
-
|
14
|
+
class SaveScheduledTransaction
|
15
|
+
attr_accessor :account_id
|
16
|
+
|
17
|
+
# The scheduled transaction date in ISO format (e.g. 2016-12-01).
|
18
|
+
attr_accessor :date
|
20
19
|
|
21
|
-
#
|
22
|
-
attr_accessor :
|
20
|
+
# The scheduled transaction amount in milliunits format.
|
21
|
+
attr_accessor :amount
|
23
22
|
|
24
|
-
|
23
|
+
# The payee for the scheduled transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
|
24
|
+
attr_accessor :payee_id
|
25
25
|
|
26
|
+
# The payee name for the the scheduled transaction. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a payee with the same name or (2) creation of a new payee.
|
26
27
|
attr_accessor :payee_name
|
27
28
|
|
28
|
-
# The
|
29
|
-
attr_accessor :
|
29
|
+
# The category for the scheduled transaction. Credit Card Payment categories are not permitted. Creating a split scheduled transaction is not currently supported.
|
30
|
+
attr_accessor :category_id
|
31
|
+
|
32
|
+
attr_accessor :memo
|
33
|
+
|
34
|
+
attr_accessor :flag_color
|
35
|
+
|
36
|
+
attr_accessor :frequency
|
30
37
|
|
31
38
|
class EnumAttributeValidator
|
32
39
|
attr_reader :datatype
|
@@ -53,11 +60,15 @@ module YNAB
|
|
53
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
61
|
def self.attribute_map
|
55
62
|
{
|
56
|
-
:'
|
57
|
-
:'
|
58
|
-
:'
|
63
|
+
:'account_id' => :'account_id',
|
64
|
+
:'date' => :'date',
|
65
|
+
:'amount' => :'amount',
|
66
|
+
:'payee_id' => :'payee_id',
|
59
67
|
:'payee_name' => :'payee_name',
|
60
|
-
:'
|
68
|
+
:'category_id' => :'category_id',
|
69
|
+
:'memo' => :'memo',
|
70
|
+
:'flag_color' => :'flag_color',
|
71
|
+
:'frequency' => :'frequency'
|
61
72
|
}
|
62
73
|
end
|
63
74
|
|
@@ -69,19 +80,26 @@ module YNAB
|
|
69
80
|
# Attribute type mapping.
|
70
81
|
def self.openapi_types
|
71
82
|
{
|
72
|
-
:'
|
73
|
-
:'
|
74
|
-
:'
|
83
|
+
:'account_id' => :'String',
|
84
|
+
:'date' => :'Date',
|
85
|
+
:'amount' => :'Integer',
|
86
|
+
:'payee_id' => :'String',
|
75
87
|
:'payee_name' => :'String',
|
76
|
-
:'
|
88
|
+
:'category_id' => :'String',
|
89
|
+
:'memo' => :'String',
|
90
|
+
:'flag_color' => :'TransactionFlagColor',
|
91
|
+
:'frequency' => :'ScheduledTransactionFrequency'
|
77
92
|
}
|
78
93
|
end
|
79
94
|
|
80
95
|
# List of attributes with nullable: true
|
81
96
|
def self.openapi_nullable
|
82
97
|
Set.new([
|
83
|
-
:'
|
98
|
+
:'payee_id',
|
84
99
|
:'payee_name',
|
100
|
+
:'category_id',
|
101
|
+
:'memo',
|
102
|
+
:'flag_color',
|
85
103
|
])
|
86
104
|
end
|
87
105
|
|
@@ -89,35 +107,51 @@ module YNAB
|
|
89
107
|
# @param [Hash] attributes Model attributes in the form of hash
|
90
108
|
def initialize(attributes = {})
|
91
109
|
if (!attributes.is_a?(Hash))
|
92
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `YNAB::
|
110
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `YNAB::SaveScheduledTransaction` initialize method"
|
93
111
|
end
|
94
112
|
|
95
113
|
# check to see if the attribute exists and convert string to symbol for hash key
|
96
114
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
97
115
|
if (!self.class.attribute_map.key?(k.to_sym))
|
98
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `YNAB::SaveScheduledTransaction`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
99
117
|
end
|
100
118
|
h[k.to_sym] = v
|
101
119
|
}
|
102
120
|
|
103
|
-
if attributes.key?(:'
|
104
|
-
self.
|
121
|
+
if attributes.key?(:'account_id')
|
122
|
+
self.account_id = attributes[:'account_id']
|
105
123
|
end
|
106
124
|
|
107
|
-
if attributes.key?(:'
|
108
|
-
self.
|
125
|
+
if attributes.key?(:'date')
|
126
|
+
self.date = attributes[:'date']
|
109
127
|
end
|
110
128
|
|
111
|
-
if attributes.key?(:'
|
112
|
-
self.
|
129
|
+
if attributes.key?(:'amount')
|
130
|
+
self.amount = attributes[:'amount']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'payee_id')
|
134
|
+
self.payee_id = attributes[:'payee_id']
|
113
135
|
end
|
114
136
|
|
115
137
|
if attributes.key?(:'payee_name')
|
116
138
|
self.payee_name = attributes[:'payee_name']
|
117
139
|
end
|
118
140
|
|
119
|
-
if attributes.key?(:'
|
120
|
-
self.
|
141
|
+
if attributes.key?(:'category_id')
|
142
|
+
self.category_id = attributes[:'category_id']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.key?(:'memo')
|
146
|
+
self.memo = attributes[:'memo']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.key?(:'flag_color')
|
150
|
+
self.flag_color = attributes[:'flag_color']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'frequency')
|
154
|
+
self.frequency = attributes[:'frequency']
|
121
155
|
end
|
122
156
|
end
|
123
157
|
|
@@ -131,17 +165,23 @@ module YNAB
|
|
131
165
|
# Check to see if the all the properties in the model are valid
|
132
166
|
# @return true if the model is valid
|
133
167
|
def valid?
|
134
|
-
return false if @
|
135
|
-
|
136
|
-
return false
|
137
|
-
return false if
|
168
|
+
return false if @account_id.nil?
|
169
|
+
return false if @date.nil?
|
170
|
+
return false if !@payee_name.nil? && @payee_name.to_s.length > 50
|
171
|
+
return false if !@memo.nil? && @memo.to_s.length > 200
|
138
172
|
true
|
139
173
|
end
|
140
174
|
|
141
|
-
# Custom attribute writer method
|
142
|
-
# @param [Object]
|
143
|
-
def
|
144
|
-
@
|
175
|
+
# Custom attribute writer method with validation
|
176
|
+
# @param [Object] payee_name Value to be assigned
|
177
|
+
def payee_name=(payee_name)
|
178
|
+
@payee_name = payee_name
|
179
|
+
end
|
180
|
+
|
181
|
+
# Custom attribute writer method with validation
|
182
|
+
# @param [Object] memo Value to be assigned
|
183
|
+
def memo=(memo)
|
184
|
+
@memo = memo
|
145
185
|
end
|
146
186
|
|
147
187
|
# Checks equality by comparing each attribute.
|
@@ -149,11 +189,15 @@ module YNAB
|
|
149
189
|
def ==(o)
|
150
190
|
return true if self.equal?(o)
|
151
191
|
self.class == o.class &&
|
152
|
-
|
153
|
-
|
154
|
-
|
192
|
+
account_id == o.account_id &&
|
193
|
+
date == o.date &&
|
194
|
+
amount == o.amount &&
|
195
|
+
payee_id == o.payee_id &&
|
155
196
|
payee_name == o.payee_name &&
|
156
|
-
|
197
|
+
category_id == o.category_id &&
|
198
|
+
memo == o.memo &&
|
199
|
+
flag_color == o.flag_color &&
|
200
|
+
frequency == o.frequency
|
157
201
|
end
|
158
202
|
|
159
203
|
# @see the `==` method
|
@@ -165,44 +209,37 @@ module YNAB
|
|
165
209
|
# Calculates hash code according to all attributes.
|
166
210
|
# @return [Integer] Hash code
|
167
211
|
def hash
|
168
|
-
[
|
212
|
+
[account_id, date, amount, payee_id, payee_name, category_id, memo, flag_color, frequency].hash
|
169
213
|
end
|
170
214
|
|
171
215
|
# Builds the object from hash
|
172
216
|
# @param [Hash] attributes Model attributes in the form of hash
|
173
217
|
# @return [Object] Returns the model itself
|
174
218
|
def self.build_from_hash(attributes)
|
175
|
-
new.build_from_hash(attributes)
|
176
|
-
end
|
177
|
-
|
178
|
-
# Builds the object from hash
|
179
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
180
|
-
# @return [Object] Returns the model itself
|
181
|
-
def build_from_hash(attributes)
|
182
219
|
return nil unless attributes.is_a?(Hash)
|
183
220
|
attributes = attributes.transform_keys(&:to_sym)
|
184
|
-
|
185
|
-
|
186
|
-
|
221
|
+
transformed_hash = {}
|
222
|
+
openapi_types.each_pair do |key, type|
|
223
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
224
|
+
transformed_hash["#{key}"] = nil
|
187
225
|
elsif type =~ /\AArray<(.*)>/i
|
188
226
|
# check to ensure the input is an array given that the attribute
|
189
227
|
# is documented as an array but the input is not
|
190
|
-
if attributes[
|
191
|
-
|
228
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
229
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
192
230
|
end
|
193
|
-
elsif !attributes[
|
194
|
-
|
231
|
+
elsif !attributes[attribute_map[key]].nil?
|
232
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
195
233
|
end
|
196
234
|
end
|
197
|
-
|
198
|
-
self
|
235
|
+
new(transformed_hash)
|
199
236
|
end
|
200
237
|
|
201
238
|
# Deserializes the data based on type
|
202
239
|
# @param string type Data type
|
203
240
|
# @param string value Value to be deserialized
|
204
241
|
# @return [Object] Deserialized data
|
205
|
-
def _deserialize(type, value)
|
242
|
+
def self._deserialize(type, value)
|
206
243
|
case type.to_sym
|
207
244
|
when :Time
|
208
245
|
Time.parse(value)
|
@@ -237,7 +274,7 @@ module YNAB
|
|
237
274
|
else # model
|
238
275
|
# models (e.g. Pet) or oneOf
|
239
276
|
klass = YNAB.const_get(type)
|
240
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
277
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
241
278
|
end
|
242
279
|
end
|
243
280
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -23,7 +20,7 @@ module YNAB
|
|
23
20
|
# The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
|
24
21
|
attr_accessor :amount
|
25
22
|
|
26
|
-
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `
|
23
|
+
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
|
27
24
|
attr_accessor :payee_id
|
28
25
|
|
29
26
|
# The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -23,7 +20,7 @@ module YNAB
|
|
23
20
|
# The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
|
24
21
|
attr_accessor :amount
|
25
22
|
|
26
|
-
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `
|
23
|
+
# The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource.
|
27
24
|
attr_accessor :payee_id
|
28
25
|
|
29
26
|
# The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee.
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -0,0 +1,48 @@
|
|
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.ynab.com
|
5
|
+
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
7
|
+
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'date'
|
11
|
+
require 'time'
|
12
|
+
|
13
|
+
module YNAB
|
14
|
+
class ScheduledTransactionFrequency
|
15
|
+
NEVER = "never".freeze
|
16
|
+
DAILY = "daily".freeze
|
17
|
+
WEEKLY = "weekly".freeze
|
18
|
+
EVERY_OTHER_WEEK = "everyOtherWeek".freeze
|
19
|
+
TWICE_A_MONTH = "twiceAMonth".freeze
|
20
|
+
EVERY4_WEEKS = "every4Weeks".freeze
|
21
|
+
MONTHLY = "monthly".freeze
|
22
|
+
EVERY_OTHER_MONTH = "everyOtherMonth".freeze
|
23
|
+
EVERY3_MONTHS = "every3Months".freeze
|
24
|
+
EVERY4_MONTHS = "every4Months".freeze
|
25
|
+
TWICE_A_YEAR = "twiceAYear".freeze
|
26
|
+
YEARLY = "yearly".freeze
|
27
|
+
EVERY_OTHER_YEAR = "everyOtherYear".freeze
|
28
|
+
|
29
|
+
def self.all_vars
|
30
|
+
@all_vars ||= [NEVER, DAILY, WEEKLY, EVERY_OTHER_WEEK, TWICE_A_MONTH, EVERY4_WEEKS, MONTHLY, EVERY_OTHER_MONTH, EVERY3_MONTHS, EVERY4_MONTHS, TWICE_A_YEAR, YEARLY, EVERY_OTHER_YEAR].freeze
|
31
|
+
end
|
32
|
+
|
33
|
+
# Builds the enum from string
|
34
|
+
# @param [String] The enum value in the form of the string
|
35
|
+
# @return [String] The enum value
|
36
|
+
def self.build_from_hash(value)
|
37
|
+
new.build_from_hash(value)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Builds the enum from string
|
41
|
+
# @param [String] The enum value in the form of the string
|
42
|
+
# @return [String] The enum value
|
43
|
+
def build_from_hash(value)
|
44
|
+
return value if ScheduledTransactionFrequency.all_vars.include?(value)
|
45
|
+
raise "Invalid ENUM value #{value} for class #ScheduledTransactionFrequency"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
3
3
|
|
4
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.ynab.com
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|