Skip to content

Commit

Permalink
Release 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrebocchini committed Apr 12, 2023
1 parent fdb111f commit 3b301eb
Show file tree
Hide file tree
Showing 124 changed files with 3,339 additions and 234 deletions.
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ruby '2.7.6'
source 'https://rubygems.org'

gem 'jazzy', '~> 0.14.2'
gem 'jazzy', '~> 0.14.3'
51 changes: 24 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.5)
CFPropertyList (3.0.6)
rexml
activesupport (6.1.6)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.11.3)
cocoapods (1.12.0)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.11.3)
cocoapods-core (= 1.12.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 1.0, < 3.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.11.3)
activesupport (>= 5.0, < 7)
cocoapods-core (1.12.0)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
Expand All @@ -54,18 +53,18 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
escape (0.0.4)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jazzy (0.14.2)
jazzy (0.14.3)
cocoapods (~> 1.5)
mustache (~> 1.1)
open4 (~> 1.3)
Expand All @@ -75,26 +74,27 @@ GEM
sassc (~> 2.1)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
json (2.6.2)
json (2.6.3)
liferaft (0.0.6)
minitest (5.16.2)
minitest (5.18.0)
molinillo (0.8.0)
mustache (1.1.1)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
open4 (1.3.4)
public_suffix (4.0.7)
redcarpet (3.5.1)
redcarpet (3.6.0)
rexml (3.2.5)
rouge (3.29.0)
rouge (3.30.0)
ruby-macho (2.5.1)
sassc (2.4.0)
ffi (~> 1.9)
sqlite3 (1.4.4)
sqlite3 (1.6.2-arm64-darwin)
sqlite3 (1.6.2-x86_64-darwin)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
Expand All @@ -105,17 +105,14 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.0)

PLATFORMS
arm64-darwin-21
arm64-darwin-22
x86_64-darwin-21

DEPENDENCIES
jazzy (~> 0.14.2)

RUBY VERSION
ruby 2.7.6p219
jazzy (~> 0.14.3)

BUNDLED WITH
2.3.17
2 changes: 1 addition & 1 deletion SwiftYNAB.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SwiftYNAB"
s.version = "2.0.1"
s.version = "2.1.0"
s.summary = "YNAB API Framework"
s.description = "SwiftYNAB is an iOS/macOS/tvOS/WatchOS framework for the You Need a Budget API"
s.homepage = "http://github.com/andrebocchini/swiftynab"
Expand Down
24 changes: 24 additions & 0 deletions SwiftYNAB/SwiftYNAB.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@
307350F82278CE8500456287 /* TransactionDetail.json in Resources */ = {isa = PBXBuildFile; fileRef = 307350F72278CE8500456287 /* TransactionDetail.json */; };
307350FC2278D22100456287 /* TransactionsResponse.json in Resources */ = {isa = PBXBuildFile; fileRef = 307350FB2278D22100456287 /* TransactionsResponse.json */; };
307350FE2278D27500456287 /* Serializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307350FD2278D27500456287 /* Serializer.swift */; };
3074C81529D3E0450068F00B /* DebtTransactionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3074C81429D3E0450068F00B /* DebtTransactionType.swift */; };
3076E6AA28B9C8A6006BAADC /* RequestMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3076E6A928B9C8A6006BAADC /* RequestMethod.swift */; };
3076E6AC28B9CC13006BAADC /* RequestMethodTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3076E6AB28B9CC13006BAADC /* RequestMethodTests.swift */; };
307EA3B12878794A00E380E7 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307EA3B02878794A00E380E7 /* Response.swift */; };
Expand All @@ -257,6 +258,11 @@
307EA3D728788EB300E380E7 /* SaveTransactionsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307EA3D628788EB300E380E7 /* SaveTransactionsResponse.swift */; };
307EA3D928788ECE00E380E7 /* HybridTransactionsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307EA3D828788ECE00E380E7 /* HybridTransactionsResponse.swift */; };
307EA3DB2878A13C00E380E7 /* SerializerType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 307EA3DA2878A13C00E380E7 /* SerializerType.swift */; };
3083131C29E6DB3700C33A45 /* DeleteTransactionRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3083131B29E6DB3700C33A45 /* DeleteTransactionRequest.swift */; };
3083131E29E6DD4200C33A45 /* DeleteTransactionResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3083131D29E6DD4200C33A45 /* DeleteTransactionResponse.swift */; };
3083132029E6E08D00C33A45 /* DeleteTransactionResponse.json in Resources */ = {isa = PBXBuildFile; fileRef = 3083131F29E6E08D00C33A45 /* DeleteTransactionResponse.json */; };
3083132229E6E1B000C33A45 /* DeleteTransactionResponseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3083132129E6E1B000C33A45 /* DeleteTransactionResponseTests.swift */; };
3083132429E6E22200C33A45 /* DeleteTransactionRequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3083132329E6E22200C33A45 /* DeleteTransactionRequestTests.swift */; };
308C2B42227B8377005C5477 /* ScheduledTransactionDetail.json in Resources */ = {isa = PBXBuildFile; fileRef = 308C2B41227B8377005C5477 /* ScheduledTransactionDetail.json */; };
308C2B48227B85B6005C5477 /* ScheduledTransactionDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308C2B47227B85B6005C5477 /* ScheduledTransactionDetail.swift */; };
308C2B4A227B85EB005C5477 /* ScheduledTransactionDetailTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308C2B49227B85EB005C5477 /* ScheduledTransactionDetailTests.swift */; };
Expand Down Expand Up @@ -553,6 +559,7 @@
307350F72278CE8500456287 /* TransactionDetail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = TransactionDetail.json; sourceTree = "<group>"; };
307350FB2278D22100456287 /* TransactionsResponse.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = TransactionsResponse.json; sourceTree = "<group>"; };
307350FD2278D27500456287 /* Serializer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Serializer.swift; sourceTree = "<group>"; };
3074C81429D3E0450068F00B /* DebtTransactionType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebtTransactionType.swift; sourceTree = "<group>"; };
3076E6A928B9C8A6006BAADC /* RequestMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequestMethod.swift; sourceTree = "<group>"; };
3076E6AB28B9CC13006BAADC /* RequestMethodTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequestMethodTests.swift; sourceTree = "<group>"; };
307EA3B02878794A00E380E7 /* Response.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Response.swift; sourceTree = "<group>"; };
Expand All @@ -577,6 +584,11 @@
307EA3D628788EB300E380E7 /* SaveTransactionsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SaveTransactionsResponse.swift; sourceTree = "<group>"; };
307EA3D828788ECE00E380E7 /* HybridTransactionsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HybridTransactionsResponse.swift; sourceTree = "<group>"; };
307EA3DA2878A13C00E380E7 /* SerializerType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SerializerType.swift; sourceTree = "<group>"; };
3083131B29E6DB3700C33A45 /* DeleteTransactionRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteTransactionRequest.swift; sourceTree = "<group>"; };
3083131D29E6DD4200C33A45 /* DeleteTransactionResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteTransactionResponse.swift; sourceTree = "<group>"; };
3083131F29E6E08D00C33A45 /* DeleteTransactionResponse.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = DeleteTransactionResponse.json; sourceTree = "<group>"; };
3083132129E6E1B000C33A45 /* DeleteTransactionResponseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteTransactionResponseTests.swift; sourceTree = "<group>"; };
3083132329E6E22200C33A45 /* DeleteTransactionRequestTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteTransactionRequestTests.swift; sourceTree = "<group>"; };
308C2B41227B8377005C5477 /* ScheduledTransactionDetail.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ScheduledTransactionDetail.json; sourceTree = "<group>"; };
308C2B47227B85B6005C5477 /* ScheduledTransactionDetail.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduledTransactionDetail.swift; sourceTree = "<group>"; };
308C2B49227B85EB005C5477 /* ScheduledTransactionDetailTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduledTransactionDetailTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -767,6 +779,7 @@
302F16C728793D6A00A336AD /* TransactionsByCategoryRequestTests.swift */,
302F16CB28793E3100A336AD /* TransactionsByPayeeRequestTests.swift */,
30EBB51822791C18000FE07D /* UserRequestTests.swift */,
3083132329E6E22200C33A45 /* DeleteTransactionRequestTests.swift */,
);
path = requests;
sourceTree = "<group>";
Expand Down Expand Up @@ -817,6 +830,7 @@
30EBB567227BC629000FE07D /* CategoryResponse.json */,
307350E92278CA5F00456287 /* CurrencyFormat.json */,
307350ED2278CCE500456287 /* DateFormat.json */,
3083131F29E6E08D00C33A45 /* DeleteTransactionResponse.json */,
307350F12278CDF800456287 /* ErrorDetail.json */,
307350F22278CDF800456287 /* ErrorResponse.json */,
308C2B4B227B870D005C5477 /* HybridTransaction.json */,
Expand Down Expand Up @@ -971,6 +985,7 @@
308C2B59227B8B82005C5477 /* TransactionSummary.swift */,
30DA1CA3227A27690005E34E /* TransactionType.swift */,
30EBB50A22791929000FE07D /* User.swift */,
3074C81429D3E0450068F00B /* DebtTransactionType.swift */,
);
path = models;
sourceTree = "<group>";
Expand Down Expand Up @@ -999,6 +1014,7 @@
302F16952879306A00A336AD /* CategoriesRequest.swift */,
302F1699287930F800A336AD /* CategoryByMonthRequest.swift */,
30EBB563227BC32C000FE07D /* CategoryRequest.swift */,
3083131B29E6DB3700C33A45 /* DeleteTransactionRequest.swift */,
302F16A92879359A00A336AD /* LocationsForPayeeRequest.swift */,
302F16A12879332100A336AD /* MonthRequest.swift */,
30BA9B6E227C962100BD4281 /* MonthsRequest.swift */,
Expand Down Expand Up @@ -1087,6 +1103,7 @@
307EA3B62878854100E380E7 /* BudgetSummaryResponse.swift */,
307EA3BC28788A7800E380E7 /* CategoriesResponse.swift */,
307EA3BE28788A9B00E380E7 /* CategoryResponse.swift */,
3083131D29E6DD4200C33A45 /* DeleteTransactionResponse.swift */,
30E1633D2277ED8D00A1222B /* ErrorResponse.swift */,
307EA3D828788ECE00E380E7 /* HybridTransactionsResponse.swift */,
307EA3C228788B3D00E380E7 /* MonthResponse.swift */,
Expand Down Expand Up @@ -1117,6 +1134,7 @@
3008B4492878AD420025034C /* BudgetSummaryResponseTests.swift */,
3008B44D2878AD9F0025034C /* CategoriesResponseTests.swift */,
30EBB55D227BC104000FE07D /* CategoryResponseTests.swift */,
3083132129E6E1B000C33A45 /* DeleteTransactionResponseTests.swift */,
30DA1CC3227A50AC0005E34E /* ErrorResponseTests.swift */,
3008B45D2878AF150025034C /* HybridTransactionsResponseTests.swift */,
30BA9B64227C94C600BD4281 /* MonthResponseTests.swift */,
Expand Down Expand Up @@ -1393,6 +1411,7 @@
30BA9B7F227CCB6C00BD4281 /* HybridTransactionsResponse.json in Resources */,
307350F82278CE8500456287 /* TransactionDetail.json in Resources */,
30307FB1227B50F600CBF404 /* Payee.json in Resources */,
3083132029E6E08D00C33A45 /* DeleteTransactionResponse.json in Resources */,
308C2B5C227B8CB1005C5477 /* TransactionSummary.json in Resources */,
30EBB56A227BC629000FE07D /* CategoryResponse.json in Resources */,
30EBB569227BC629000FE07D /* Category.json in Resources */,
Expand Down Expand Up @@ -1622,6 +1641,7 @@
302F16B62879392700A336AD /* SaveTransactionRequest.swift in Sources */,
3046F3DD227B6613007778A1 /* PayeeRequest.swift in Sources */,
3046A4EF2876A098006CB35A /* ClientType.swift in Sources */,
3083131C29E6DB3700C33A45 /* DeleteTransactionRequest.swift in Sources */,
307EA3D728788EB300E380E7 /* SaveTransactionsResponse.swift in Sources */,
302F16C628793D4900A336AD /* TransactionsByCategoryRequest.swift in Sources */,
3046F3EF227B7281007778A1 /* Category.swift in Sources */,
Expand All @@ -1647,7 +1667,9 @@
30E1633E2277ED8D00A1222B /* ErrorResponse.swift in Sources */,
302F169A287930F800A336AD /* CategoryByMonthRequest.swift in Sources */,
307EA3C128788B1C00E380E7 /* MonthsResponse.swift in Sources */,
3083131E29E6DD4200C33A45 /* DeleteTransactionResponse.swift in Sources */,
307EA3CB28788D1300E380E7 /* PayeesResponse.swift in Sources */,
3074C81529D3E0450068F00B /* DebtTransactionType.swift in Sources */,
307EA3C328788B3D00E380E7 /* MonthResponse.swift in Sources */,
307350CC2278A0D200456287 /* SaveTransaction.swift in Sources */,
307EA3D128788E4700E380E7 /* TransactionResponse.swift in Sources */,
Expand Down Expand Up @@ -1720,6 +1742,7 @@
302F169C2879311500A336AD /* CategoryByMonthRequestTests.swift in Sources */,
3046F3F1227B73DD007778A1 /* PayeeLocationTests.swift in Sources */,
308F59A328B8DBF500445343 /* MonthServiceTests.swift in Sources */,
3083132229E6E1B000C33A45 /* DeleteTransactionResponseTests.swift in Sources */,
307350DC2278BF8A00456287 /* BudgetSummaryTests.swift in Sources */,
308C2B4A227B85EB005C5477 /* ScheduledTransactionDetailTests.swift in Sources */,
302F16BC28793B3600A336AD /* SaveTransactionsRequestTests.swift in Sources */,
Expand All @@ -1740,6 +1763,7 @@
307350DE2278BFB600456287 /* JSONTools.swift in Sources */,
302F16B42879371E00A336AD /* ScheduledTransactionsRequestTests.swift in Sources */,
308F59A528B93ECF00445343 /* PayeeLocationServiceTests.swift in Sources */,
3083132429E6E22200C33A45 /* DeleteTransactionRequestTests.swift in Sources */,
30BA9B51227C84BE00BD4281 /* PayeeLocationResponseTests.swift in Sources */,
308F599F28B86D3C00445343 /* BudgetServiceTests.swift in Sources */,
30DA1CC4227A50AC0005E34E /* ErrorResponseTests.swift in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions SwiftYNAB/SwiftYNAB/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.1.0</string>
<key>CFBundleVersion</key>
<string>2.0.1</string>
<string>2.1.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion SwiftYNAB/SwiftYNAB/YNAB.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class YNAB {
/// - accessToken: Personal API access token, or token obtained via OAuth login
/// - urlSession: By default, it uses the default `URLSession.shared`, but allows the injection of a custom session
public init(accessToken: String, urlSession: URLSession = .shared) {
self.client = Client(
client = Client(
accessToken: accessToken,
urlSession: urlSession,
serializer: Serializer.shared
Expand Down
21 changes: 21 additions & 0 deletions SwiftYNAB/SwiftYNAB/models/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ public struct Account: Codable, Equatable {
/// Payee id for transfers
public let transferPayeeId: String

/// Indicates whether the account is linked via direct import
public let directImportLinked: Bool

/// Indicates whether direct import is in an error state
public let directImportInError: Bool

/// Date when account was last reconciled
public let lastReconciledAt: String?

/// Original balance for a debt account
public let debtOriginalBalance: Int?

/// Interest rate at different points in time
public let debtInterestRates: [String: Int]

/// Minimum payment at different points in time
public let debtMinimumPayments: [String: Int]

/// Escrow amount at different points in time
public let debtEscrowAmounts: [String: Int]

/// Deleted account or not
public let deleted: Bool
}
24 changes: 24 additions & 0 deletions SwiftYNAB/SwiftYNAB/models/Category.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public struct Category: Codable, Equatable {
/// Type of goal associated with this category
public let goalType: String?

/// The day of the goal
public let goalDay: Int?

/// The goal cadence
public let goalCadence: Int?

/// The goal cadence frequency
public let goalCadenceFrequency: Int?

/// Goal creation month
public let goalCreationMonth: String?

Expand All @@ -52,6 +61,21 @@ public struct Category: Codable, Equatable {
/// Goal percentage complete
public let goalPercentageComplete: Int?

/// The number of months, including the current month, left in the current goal period.
public let goalMonthsToBudget: Int?

/// 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.
public let goalUnderFunded: Int?

/// The total amount funded towards the goal within the current goal period.
public let goalOverallFunded: Int?

/// The amount of funding still needed to complete the goal within the current goal period.
public let goalOverallLeft: Int?

/// Whether or not the goal is deleted
public let deleted: Bool
}
20 changes: 20 additions & 0 deletions SwiftYNAB/SwiftYNAB/models/DebtTransactionType.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// DebtTransactionType.swift
// SwiftYNAB
//
// Created by Andre Bocchini on 3/28/23.
// Copyright © 2023 Andre Bocchini. All rights reserved.
//

import Foundation

public enum DebtTransactionType: String, Codable {
case payment
case refund
case fee
case interest
case escrow
case balancedAdjustment
case credit
case charge
}
Loading

0 comments on commit 3b301eb

Please sign in to comment.