diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 5f84a81..e465da4 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.12.0 +7.14.0 diff --git a/Gemfile.lock b/Gemfile.lock index b0f1105..382851a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ynab (3.7.0) + ynab (3.8.0) typhoeus (~> 1.0, >= 1.0.1) GEM diff --git a/docs/Category.md b/docs/Category.md index 541b5f0..481114e 100644 --- a/docs/Category.md +++ b/docs/Category.md @@ -27,5 +27,6 @@ | **goal_under_funded** | **Integer** | The amount of funding still needed in the current month to stay on track towards completing the goal within the current goal period. This amount will generally correspond to the 'Underfunded' amount in the web and mobile clients except when viewing a category with a Needed for Spending Goal in a future month. The web and mobile clients will ignore any funding from a prior goal period when viewing category with a Needed for Spending Goal in a future month. | [optional] | | **goal_overall_funded** | **Integer** | The total amount funded towards the goal within the current goal period. | [optional] | | **goal_overall_left** | **Integer** | The amount of funding still needed to complete the goal within the current goal period. | [optional] | +| **goal_snoozed_at** | **Time** | The date/time the goal was snoozed. If the goal is not snoozed, this will be null. | [optional] | | **deleted** | **Boolean** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. | | diff --git a/docs/TransactionResponseData.md b/docs/TransactionResponseData.md index db7bc21..d474689 100644 --- a/docs/TransactionResponseData.md +++ b/docs/TransactionResponseData.md @@ -5,4 +5,5 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **transaction** | [**TransactionDetail**](TransactionDetail.md) | | | +| **server_knowledge** | **Integer** | The knowledge of the server | | diff --git a/lib/ynab/models/category.rb b/lib/ynab/models/category.rb index 98fff09..4461e9b 100644 --- a/lib/ynab/models/category.rb +++ b/lib/ynab/models/category.rb @@ -76,6 +76,9 @@ class Category # The amount of funding still needed to complete the goal within the current goal period. attr_accessor :goal_overall_left + # The date/time the goal was snoozed. If the goal is not snoozed, this will be null. + attr_accessor :goal_snoozed_at + # Whether or not the category has been deleted. Deleted categories will only be included in delta requests. attr_accessor :deleted @@ -127,6 +130,7 @@ def self.attribute_map :'goal_under_funded' => :'goal_under_funded', :'goal_overall_funded' => :'goal_overall_funded', :'goal_overall_left' => :'goal_overall_left', + :'goal_snoozed_at' => :'goal_snoozed_at', :'deleted' => :'deleted' } end @@ -162,6 +166,7 @@ def self.openapi_types :'goal_under_funded' => :'Integer', :'goal_overall_funded' => :'Integer', :'goal_overall_left' => :'Integer', + :'goal_snoozed_at' => :'Time', :'deleted' => :'Boolean' } end @@ -184,6 +189,7 @@ def self.openapi_nullable :'goal_under_funded', :'goal_overall_funded', :'goal_overall_left', + :'goal_snoozed_at', ]) end @@ -294,6 +300,10 @@ def initialize(attributes = {}) self.goal_overall_left = attributes[:'goal_overall_left'] end + if attributes.key?(:'goal_snoozed_at') + self.goal_snoozed_at = attributes[:'goal_snoozed_at'] + end + if attributes.key?(:'deleted') self.deleted = attributes[:'deleted'] end @@ -356,6 +366,7 @@ def ==(o) goal_under_funded == o.goal_under_funded && goal_overall_funded == o.goal_overall_funded && goal_overall_left == o.goal_overall_left && + goal_snoozed_at == o.goal_snoozed_at && deleted == o.deleted end @@ -368,7 +379,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [id, category_group_id, category_group_name, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_needs_whole_amount, goal_day, goal_cadence, goal_cadence_frequency, goal_creation_month, goal_target, goal_target_month, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, deleted].hash + [id, category_group_id, category_group_name, name, hidden, original_category_group_id, note, budgeted, activity, balance, goal_type, goal_needs_whole_amount, goal_day, goal_cadence, goal_cadence_frequency, goal_creation_month, goal_target, goal_target_month, goal_percentage_complete, goal_months_to_budget, goal_under_funded, goal_overall_funded, goal_overall_left, goal_snoozed_at, deleted].hash end # Builds the object from hash diff --git a/lib/ynab/models/transaction_flag_color.rb b/lib/ynab/models/transaction_flag_color.rb index aa55c77..4174b09 100644 --- a/lib/ynab/models/transaction_flag_color.rb +++ b/lib/ynab/models/transaction_flag_color.rb @@ -18,9 +18,10 @@ class TransactionFlagColor GREEN = "green".freeze BLUE = "blue".freeze PURPLE = "purple".freeze + EMPTY = "".freeze def self.all_vars - @all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE].freeze + @all_vars ||= [RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE, EMPTY].freeze end # Builds the enum from string diff --git a/lib/ynab/models/transaction_response_data.rb b/lib/ynab/models/transaction_response_data.rb index 525778c..7208370 100644 --- a/lib/ynab/models/transaction_response_data.rb +++ b/lib/ynab/models/transaction_response_data.rb @@ -14,10 +14,14 @@ module YNAB class TransactionResponseData attr_accessor :transaction + # The knowledge of the server + attr_accessor :server_knowledge + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'transaction' => :'transaction' + :'transaction' => :'transaction', + :'server_knowledge' => :'server_knowledge' } end @@ -29,7 +33,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'transaction' => :'TransactionDetail' + :'transaction' => :'TransactionDetail', + :'server_knowledge' => :'Integer' } end @@ -57,6 +62,10 @@ def initialize(attributes = {}) if attributes.key?(:'transaction') self.transaction = attributes[:'transaction'] end + + if attributes.key?(:'server_knowledge') + self.server_knowledge = attributes[:'server_knowledge'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -70,6 +79,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @transaction.nil? + return false if @server_knowledge.nil? true end @@ -78,7 +88,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - transaction == o.transaction + transaction == o.transaction && + server_knowledge == o.server_knowledge end # @see the `==` method @@ -90,7 +101,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [transaction].hash + [transaction, server_knowledge].hash end # Builds the object from hash diff --git a/open_api_spec.yaml b/open_api_spec.yaml index e5496d2..6173be3 100644 --- a/open_api_spec.yaml +++ b/open_api_spec.yaml @@ -6,7 +6,7 @@ info: 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 - version: 1.74.0 + version: 1.76.0 servers: - url: https://api.ynab.com/v1 security: @@ -2304,6 +2304,13 @@ components: current goal period. format: int64 nullable: true + goal_snoozed_at: + type: string + description: >- + The date/time the goal was snoozed. If the goal is not snoozed, this + will be null. + format: date-time + nullable: true deleted: type: boolean description: >- @@ -2715,10 +2722,15 @@ components: data: required: - transaction + - server_knowledge type: object properties: transaction: $ref: "#/components/schemas/TransactionDetail" + server_knowledge: + type: integer + description: The knowledge of the server + format: int64 TransactionSummary: required: - account_id @@ -3380,6 +3392,7 @@ components: - green - blue - purple + - "" - null nullable: true TransactionFlagName: diff --git a/spec/api/transactions_spec.rb b/spec/api/transactions_spec.rb index a51a91e..a9cc6e4 100644 --- a/spec/api/transactions_spec.rb +++ b/spec/api/transactions_spec.rb @@ -52,7 +52,7 @@ expect(client.last_request.response.options[:code]).to be 200 expect(response.data.transactions.length).to be 2 # We expect the flag_color to have been converted to nil for these transactions - expect(response.data.transactions[0].flag_color).to be_nil + expect(response.data.transactions[0].flag_color).to eq "" expect(response.data.transactions[1].flag_color).to be_nil end end diff --git a/ynab.gemspec b/ynab.gemspec index 8bbc28c..2ebd92f 100644 --- a/ynab.gemspec +++ b/ynab.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |s| s.email = ["api@ynab.com"] s.homepage = "https://github.com/ynab/ynab-sdk-ruby" s.summary = "Official Ruby client for the YNAB API" - s.description = "Official Ruby client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.74.0." + s.description = "Official Ruby client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.76.0." s.license = "Apache-2.0" s.required_ruby_version = ">= 3.3" s.metadata = {}