pfs 0.0.8 → 0.0.9

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: 8a085d9259e3eb98f2fe1b761e4c3017d5e078847ebaf196978c36df5b575284
4
- data.tar.gz: b5ad378234d9522e3f07a44095876d0f505058c6a122f6a41d78d3976f69f303
3
+ metadata.gz: a5d767fd77f4197e4e37308089598ee0a6210efc4d47d72de905618f1645987b
4
+ data.tar.gz: 743d75b51e50384555dc10db3ff7d1c63db174f336c5df0d8712edcb6d4ae5ed
5
5
  SHA512:
6
- metadata.gz: 63e7bce0ba36f33b5afc7885ba39ebe1e40222fceec9a78235f6f19d69f0a3541ed48d171a874e5dc4de5887130b3a01dfe27d83f051ed3e58f68bbe1d4aca8d
7
- data.tar.gz: 8403be7bfe84d11f8ebe5038c3a197587a500fcbc1d0b4305251f1d5cb01d20dd807da4cb076b4c530c01456cddc5cbd4cd634e348a5b44fc932da4d0a08ae23
6
+ metadata.gz: 94ab1c0ab01e5db40f256be7579c88ba059cc292aa147111f8b7cb2d2f351285138b3d6c2e2584c43fe1981fe316b5675ee21c0863b10c3263ef077466f421a9
7
+ data.tar.gz: a852b6fa49501d1bc865d9d61f2650d18323059de58af48867ce958f28f06083a8606ce3d6f97599d0e604532c4e3e5c8f138be40af1dd8b38401e6ad1f663d4
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PFS
2
4
  module API
3
5
  class StatementsService < Service
@@ -7,6 +9,13 @@ module PFS
7
9
  )
8
10
  Resources::Statements::Statement.new(response, response.body.dig(:data, :transaction))
9
11
  end
12
+
13
+ def history(account_id:, start_date:, end_date:, inward_outward:, processor:)
14
+ response = client.get(
15
+ "/BankPayment/#{account_id}/Statement?StartDate=#{start_date}&EndDate=#{end_date}&InwardOutward=#{inward_outward}&Processor=#{processor}"
16
+ )
17
+ Resources::Statements::Statements.new(response, response.body.dig(:data, :transactions))
18
+ end
10
19
  end
11
20
  end
12
- end
21
+ end
@@ -5,7 +5,6 @@ module PFS
5
5
  class TransactionsService < Service
6
6
  def history(account_id:, start_date:, end_date:)
7
7
  response = client.get("/Account/#{account_id}/Transactions?StartDate=#{start_date}&EndDate=#{end_date}")
8
- transactions_raw = response.body.dig(:data, :transactions)
9
8
  Resources::Transactions::Transactions.new(response, response.body.dig(:data, :transactions))
10
9
  end
11
10
  end
@@ -40,3 +40,4 @@ require_relative "transfers/internal_transfer_to"
40
40
  require_relative "transactions/transaction"
41
41
  require_relative "transactions/transactions"
42
42
  require_relative "statements/statement"
43
+ require_relative "statements/statements"
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PFS
4
+ module Resources
5
+ module Statements
6
+ class Statements < Collection
7
+ def initialize(response, attributes_collection)
8
+ super(response, Statement, attributes_collection)
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -49,7 +49,7 @@ module PFS
49
49
  :walletId
50
50
 
51
51
  alias available availableBalance
52
- alias ledger availableBalance
52
+ alias ledger ledgerBalance
53
53
  alias transaction_origin transactionOrigin
54
54
  alias transaction_type transactionType
55
55
  alias transaction_description transactionDescription
data/lib/pfs/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PFS
4
- VERSION = "0.0.8"
4
+ VERSION = "0.0.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aitor García Rey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-08 00:00:00.000000000 Z
11
+ date: 2022-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -111,7 +111,6 @@ files:
111
111
  - CODE_OF_CONDUCT.md
112
112
  - Gemfile
113
113
  - Guardfile
114
- - LICENSE
115
114
  - LICENSE.txt
116
115
  - README.md
117
116
  - Rakefile
@@ -137,6 +136,7 @@ files:
137
136
  - lib/pfs/resources/base.rb
138
137
  - lib/pfs/resources/collection.rb
139
138
  - lib/pfs/resources/statements/statement.rb
139
+ - lib/pfs/resources/statements/statements.rb
140
140
  - lib/pfs/resources/transactions/transaction.rb
141
141
  - lib/pfs/resources/transactions/transactions.rb
142
142
  - lib/pfs/resources/transfers/internal_transfer.rb
data/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Aitor García Rey
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.