anz_bank_client 0.1.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 789009701c348b1e64086bd88dae60afe4996cf28db004c961bed1315446eee9
4
- data.tar.gz: 4ce36e7f8226f3a6a27039876d4823fcadff870aea2b706a15fd05c76269b41e
3
+ metadata.gz: 216c40177f3517dff2b1ff113b18c77c4df4526306f1d8e5143403500bc11498
4
+ data.tar.gz: a957dbd10b7af784b091a3fb460f194d4303d2f73c50bad8489a7268ead79a21
5
5
  SHA512:
6
- metadata.gz: 66a318dddddd8d660bb0d61490c1a9283c43fcdb84f22c840f1bc12e825958b417f154ebf4defaca3f42e73e5613136edb5dc3ad23a9f5bec6e1e545837f073c
7
- data.tar.gz: 1a2400bad089bf8aedc3eea4c221b138ec115193d9f075f36f5504a36745381c364ceaf4d16eafa4740ec9c7e71913eaf13236f11fcba89bfe1a0711936fdec2
6
+ metadata.gz: 6b0da2d8e69590454849505c0b02eaac4b441fbe5e66cc2bb19e95935d9ad198f22f49d2d7f5a4bb62e33cca2d3fd71b9e84d222af25816026c9aeba56ab2c26
7
+ data.tar.gz: 01143ac8dccd5847caf485360cff1ab390a9d9e4cfe843d0624aa8e1fbcd39b48681de7f43a22ae3a67521860e8e34c7e23b6465f958a032e1f3b479c5c5cc27
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- anz_bank_client (0.1.3)
4
+ anz_bank_client (0.1.4)
5
5
  faraday (~> 2.7)
6
6
  faraday-cookie_jar (~> 0.0.7)
7
7
  faraday-follow_redirects (~> 0.3.0)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AnzBankClient
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -160,7 +160,10 @@ module AnzBankClient
160
160
  raise "Error getting transactions: #{response.status}\n\n#{response.body}" unless response.status == 200
161
161
 
162
162
  response_json = JSON.parse(response.body)
163
- response_json["transactions"].map do |transaction|
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|
164
167
  {
165
168
  date: transaction["date"],
166
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.3
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-03-02 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday