paidy 0.0.4 → 0.0.5

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: ccaa567a87ad47723bc91dff6d84fd4b7ea4485da9eaa2f760c2389d3198c5a1
4
- data.tar.gz: 4421097c1ade907c9e9dbd5df8da87b57f123bbcddaabc96179415c648bc5190
3
+ metadata.gz: b598dcd67cc7e2f5ba91404c3fa6515ffe44702120c296d5751f574a53b6cc59
4
+ data.tar.gz: 040edc35501d9fe29610adec285a3ba3cab63649f0ec802956eeb3a9858f3394
5
5
  SHA512:
6
- metadata.gz: bf34a7aceef972e2dce2317ac35f377489df385998c75c7247da5157989f618e722cd22e61376c993675fffeffb35e430c4c792f9c1b9603e0e642ed66d4ebcb
7
- data.tar.gz: 496383e260ffb909976cc18ad33357e46f9f8f66be03d5580e2ca1b990e620cd52b5e513c9a62d56c1e309c350b66b9edc740e2d722d97f7e7c633fa5eed9097
6
+ metadata.gz: e381b27251118a69a41cbfcecb44532984fc9cca42d9b08711fd805ed3ff956f96786726c579e1614faccab00a0912bc7a0ed909e035b8dba58505e752b0171b
7
+ data.tar.gz: 10f52eeab0afd30af5c922dd845aa4a11749c35515fd502a9052db66e451a3ff004e1c829a30003f609eb3866a9a479e07f409d69fe6a28ef3644850fe7ae8da
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 3.2.1
data/Gemfile.lock CHANGED
@@ -1,26 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paidy (0.0.4)
4
+ paidy (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.3)
10
- rake (13.0.1)
11
- rspec (3.9.0)
12
- rspec-core (~> 3.9.0)
13
- rspec-expectations (~> 3.9.0)
14
- rspec-mocks (~> 3.9.0)
15
- rspec-core (3.9.2)
16
- rspec-support (~> 3.9.3)
17
- rspec-expectations (3.9.2)
9
+ diff-lcs (1.5.0)
10
+ rake (13.0.6)
11
+ rspec (3.12.0)
12
+ rspec-core (~> 3.12.0)
13
+ rspec-expectations (~> 3.12.0)
14
+ rspec-mocks (~> 3.12.0)
15
+ rspec-core (3.12.2)
16
+ rspec-support (~> 3.12.0)
17
+ rspec-expectations (3.12.3)
18
18
  diff-lcs (>= 1.2.0, < 2.0)
19
- rspec-support (~> 3.9.0)
20
- rspec-mocks (3.9.1)
19
+ rspec-support (~> 3.12.0)
20
+ rspec-mocks (3.12.6)
21
21
  diff-lcs (>= 1.2.0, < 2.0)
22
- rspec-support (~> 3.9.0)
23
- rspec-support (3.9.3)
22
+ rspec-support (~> 3.12.0)
23
+ rspec-support (3.12.1)
24
24
 
25
25
  PLATFORMS
26
26
  ruby
@@ -32,4 +32,4 @@ DEPENDENCIES
32
32
  rspec (~> 3.0)
33
33
 
34
34
  BUNDLED WITH
35
- 2.1.4
35
+ 2.4.19
data/lib/paidy/charge.rb CHANGED
@@ -18,9 +18,10 @@ module Paidy
18
18
  def initialize(id)
19
19
  @id = id
20
20
  @capture_id = nil
21
+ @amount = nil
21
22
  end
22
23
 
23
- attr_reader :id, :capture_id
24
+ attr_reader :id, :capture_id, :amount
24
25
 
25
26
  def capture
26
27
  res = Paidy.request(:post, "#{base_path}/captures", {}, {})
@@ -56,6 +57,8 @@ module Paidy
56
57
  def refresh
57
58
  res = Paidy.request(:get, "payments/#{id}")
58
59
 
60
+ @amount = res['amount']
61
+
59
62
  if res['status'] == 'closed' && res['captures'].present?
60
63
  @capture_id = res['captures'][0]['id']
61
64
  end
data/lib/paidy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Paidy
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paidy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - rn0rno
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-20 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -85,7 +85,7 @@ licenses:
85
85
  metadata:
86
86
  homepage_uri: https://github.com/rn0rno
87
87
  source_code_uri: https://github.com/rn0rno/paidy-ruby
88
- post_install_message:
88
+ post_install_message:
89
89
  rdoc_options: []
90
90
  require_paths:
91
91
  - lib
@@ -100,8 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  requirements: []
103
- rubygems_version: 3.0.3
104
- signing_key:
103
+ rubygems_version: 3.4.6
104
+ signing_key:
105
105
  specification_version: 4
106
106
  summary: Ruby bindings for the Paidy API
107
107
  test_files: []