burglar 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6156befb30e8d1ebd9fa1700eb0638352d42f3f80fad1acc448df7589ecc30d
4
- data.tar.gz: 71765092e9611b282234eaad2255e09ff085689c2c3c737f495096a3acca4823
3
+ metadata.gz: b846aada4fa7612866c15d3d11abdc0f9629e9679f81e397dd84bae18ab655a6
4
+ data.tar.gz: 80c9c452bd1dba8631ce2daf6beb011f2908e3ef52831e847c5f15d2b722f432
5
5
  SHA512:
6
- metadata.gz: 4d6e6af478622865c6e0f10013e3934d9de06b007df40994f8f377920cefa69101b220ca70fba93a537f4f56e00ae58a446cf260c8b1154ac1d1795e59a7a1cf
7
- data.tar.gz: a76ffc8de3e77afe19416efd922078d5b38d0313f3e60bbe02cee8472bb617c295053d28a6e71e559469e4a1a1d25078fd359339a8e42ee4303299b0ee1b67f8
6
+ metadata.gz: 0f915956900c13c26218358b9d2fe9af73b8a9d7d67cd9235fe39aa08d4dbce2b850b5e7b088fcacdca8372a988b620b01c3cf99e3eb961fcf274d26410d4d21
7
+ data.tar.gz: 95c69ba4bb1f0395a318760a9fe34d7eb788f045e7b61ceb7367a16ac0058c5facebc17dce2495f34a269f897c5dadb66a12dc94e4c5e144114b0bacddb02a39
@@ -10,6 +10,13 @@ module LogCabin
10
10
 
11
11
  PLAID_DOMAIN = 'https://plaid.com'.freeze
12
12
 
13
+ def self.load_accounts(client, access_token)
14
+ @accounts ||= {}
15
+ return @accounts[access_token] if @accounts[access_token]
16
+ req = ::Plaid::AccountsGetRequest.new(access_token: access_token)
17
+ @accounts[access_token] = client.accounts_get(req).accounts
18
+ end
19
+
13
20
  def raw_transactions # rubocop:disable Metrics/MethodLength
14
21
  @raw_transactions ||= all_transactions.map do |row|
15
22
  amount = format('$%.2f', row.amount)
@@ -100,7 +107,7 @@ module LogCabin
100
107
  end
101
108
 
102
109
  def accounts
103
- @accounts || client.accounts_get(::Plaid::AccountsGetRequest.new(access_token: access_token)).accounts
110
+ LogCabin::Modules::Plaid.load_accounts(client, access_token)
104
111
  end
105
112
 
106
113
  def account
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Set the version (needed for Mercenary -v)
3
3
  module Burglar
4
- VERSION = '0.3.1'.freeze
4
+ VERSION = '0.3.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burglar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-14 00:00:00.000000000 Z
11
+ date: 2023-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cymbal