Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.12.0
7.14.0
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ynab (3.7.0)
ynab (3.8.0)
typhoeus (~> 1.0, >= 1.0.1)

GEM
Expand Down
1 change: 1 addition & 0 deletions docs/Category.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | |

1 change: 1 addition & 0 deletions docs/TransactionResponseData.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **transaction** | [**TransactionDetail**](TransactionDetail.md) | | |
| **server_knowledge** | **Integer** | The knowledge of the server | |

13 changes: 12 additions & 1 deletion lib/ynab/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -184,6 +189,7 @@ def self.openapi_nullable
:'goal_under_funded',
:'goal_overall_funded',
:'goal_overall_left',
:'goal_snoozed_at',
])
end

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/ynab/models/transaction_flag_color.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 15 additions & 4 deletions lib/ynab/models/transaction_response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -29,7 +33,8 @@ def self.acceptable_attributes
# Attribute type mapping.
def self.openapi_types
{
:'transaction' => :'TransactionDetail'
:'transaction' => :'TransactionDetail',
:'server_knowledge' => :'Integer'
}
end

Expand Down Expand Up @@ -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?
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down
15 changes: 14 additions & 1 deletion open_api_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3380,6 +3392,7 @@ components:
- green
- blue
- purple
- ""
- null
nullable: true
TransactionFlagName:
Expand Down
2 changes: 1 addition & 1 deletion spec/api/transactions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ynab.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
s.email = ["[email protected]"]
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 = {}
Expand Down