bs2_api 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bs2_api/payment/confirmation.rb +9 -1
- data/lib/bs2_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92386deadc6c231d882caac48d3092acab5c69ab50a176757768ab074635a5e4
|
4
|
+
data.tar.gz: 90896ecd3a4dd6d60dcd3c69bcd6b56697ba5e33ab6a0e909c4dd7cf63ddae44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2be2b78bbcedb9af38193898d62f7fa0cd0bf5e6217fefd39ed2e84db47bf7d2a604b3e2e88af338706936067f5baf290de268e32e7114d803809656df85325
|
7
|
+
data.tar.gz: c5e8632080a64039a8d99e6a9ca112b5dad3cf766dd08387c5341427da3a055144417feeb44f7bbc7f409092f46d966076aedf1aa29a7520c01371e428cde853
|
@@ -3,7 +3,15 @@ module Bs2Api
|
|
3
3
|
class Confirmation < Base
|
4
4
|
attr_reader :success
|
5
5
|
|
6
|
-
def initialize
|
6
|
+
def initialize(
|
7
|
+
payment,
|
8
|
+
value: nil,
|
9
|
+
client_id: Bs2Api.configuration.client_id,
|
10
|
+
client_secret: Bs2Api.configuration.client_secret
|
11
|
+
)
|
12
|
+
@client_id = client_id
|
13
|
+
@client_secret = client_secret
|
14
|
+
|
7
15
|
raise Bs2Api::Errors::ConfirmationError, 'invalid payment' unless payment.present? && payment.is_a?(Bs2Api::Entities::Payment)
|
8
16
|
raise Bs2Api::Errors::ConfirmationError, 'invalid value' unless value.to_f.positive?
|
9
17
|
@payment = payment
|
data/lib/bs2_api/version.rb
CHANGED