anz_bank_client 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/anzcli +2 -1
- data/lib/anz_bank_client/version.rb +1 -1
- data/lib/anz_bank_client.rb +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 216c40177f3517dff2b1ff113b18c77c4df4526306f1d8e5143403500bc11498
|
4
|
+
data.tar.gz: a957dbd10b7af784b091a3fb460f194d4303d2f73c50bad8489a7268ead79a21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0da2d8e69590454849505c0b02eaac4b441fbe5e66cc2bb19e95935d9ad198f22f49d2d7f5a4bb62e33cca2d3fd71b9e84d222af25816026c9aeba56ab2c26
|
7
|
+
data.tar.gz: 01143ac8dccd5847caf485360cff1ab390a9d9e4cfe843d0624aa8e1fbcd39b48681de7f43a22ae3a67521860e8e34c7e23b6465f958a032e1f3b479c5c5cc27
|
data/Gemfile.lock
CHANGED
data/exe/anzcli
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
$LOAD_PATH.unshift(File.expand_path("../../lib", __FILE__))
|
2
3
|
require "anz_bank_client"
|
3
4
|
require "readline"
|
4
5
|
require "optparse"
|
@@ -65,7 +66,7 @@ class AnzCli < Thor
|
|
65
66
|
description1: t[:details][0],
|
66
67
|
description2: t[:details][1],
|
67
68
|
amount: "% 12.2f" % t[:amount],
|
68
|
-
balance: "% 12.2f" % t[:balance],
|
69
|
+
balance: t[:balance] ? ("% 12.2f" % t[:balance]) : nil,
|
69
70
|
}
|
70
71
|
end
|
71
72
|
tp txns
|
data/lib/anz_bank_client.rb
CHANGED
@@ -135,6 +135,8 @@ module AnzBankClient
|
|
135
135
|
accountBalance: normalised_balance,
|
136
136
|
availableFunds: account.dig("availableFunds", "amount"),
|
137
137
|
isLiabilityType: account["isLoan"] || account["isCreditCard"],
|
138
|
+
supportsTransactions: true,
|
139
|
+
dynamicBalance: account["isInvestment"],
|
138
140
|
}
|
139
141
|
end
|
140
142
|
end
|
@@ -158,7 +160,10 @@ module AnzBankClient
|
|
158
160
|
raise "Error getting transactions: #{response.status}\n\n#{response.body}" unless response.status == 200
|
159
161
|
|
160
162
|
response_json = JSON.parse(response.body)
|
161
|
-
response_json["transactions"]
|
163
|
+
transactions = response_json["transactions"]
|
164
|
+
# Ignore transactions without an amount - these can be informational messages like "Finance Charge Rate Changed Today"
|
165
|
+
transactions = transactions.filter{ |transaction| transaction["amount"] }
|
166
|
+
transactions.map do |transaction|
|
162
167
|
{
|
163
168
|
date: transaction["date"],
|
164
169
|
postedDate: transaction["postedDate"],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anz_bank_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- George Dewar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|