six_saferpay 1.1.0 → 1.2.0

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: 6b301e45634eb8d65b0fca368b23c5fe5e06458b4cda1ee5a346324f9685d636
4
- data.tar.gz: 1540d244e96c044ac79d7c9ae23f6d9d12e4b76c12edc239d79ae214ab1deb6e
3
+ metadata.gz: c0a09beb92c31b97a988862d72b2ea08857ee8f14a87e958c4a900fcf8129a13
4
+ data.tar.gz: 8e9103b730d1f0fb4118a74bcc856817bd38810c074b9a3dc49579c45e7a1ac1
5
5
  SHA512:
6
- metadata.gz: 37cd5eeffbbb9578fc08ba551aa04581e34a9cb77cd0aaa04f4d6bfd8ed0f4f67ebd34455623bfd38f8811bde22b94efc25cf99c6a6cb136cf7df16bff2c5d1a
7
- data.tar.gz: bbc8353cc6846bf2c768c6339d1905090b94f35c036cb0b72b8ae26f21e485ad42d594101851f65c15508e1fdf450c0012486d4edb8191e8379909371d9b4241
6
+ metadata.gz: 779ae8e7888bac9635514303fcf85de9a9e15c5fcf350aee62fe489abe31e313058f35f6ceb33659dc52b7ea8abcba148e570679c63e46b1ce3633cfb307afc2
7
+ data.tar.gz: 4ab3bd29d7a3d26359d050fe6ada3216e2a5ac952182b6f18524194af5cd50a1f742040dece5db41aec19a8a90c69f519070f4727b6c37bdff8ee5f0d7b12451
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- six_saferpay (1.0.0)
4
+ six_saferpay (1.1.0)
5
5
  activesupport (~> 5.0, >= 5.0.0.0)
6
6
 
7
7
  GEM
@@ -33,6 +33,11 @@ module SixSaferpay
33
33
  def url
34
34
  '/Payment/v1/Transaction/AdjustAmount'
35
35
  end
36
+
37
+ def response_class
38
+ SixSaferpay::SixTransaction::AdjustAmountResponse
39
+ end
40
+
36
41
  end
37
42
  end
38
43
  end
@@ -0,0 +1,38 @@
1
+ module SixSaferpay
2
+ module SixTransaction
3
+ class AssertCapture
4
+
5
+ attr_accessor(:request_header,
6
+ :capture_reference
7
+ )
8
+
9
+
10
+ def initialize(request_header: nil,
11
+ capture_reference: )
12
+ @request_header = request_header || SixSaferpay::RequestHeader.new()
13
+ @capture_reference = SixSaferpay::CaptureReference.new(capture_reference.to_h) if capture_reference
14
+ end
15
+
16
+ def to_hash
17
+ hash = Hash.new
18
+ hash.merge!(request_header: @request_header.to_h) if @request_header
19
+ hash.merge!(capture_reference: @capture_reference.to_h) if @capture_reference
20
+ hash
21
+ end
22
+ alias_method :to_h, :to_hash
23
+
24
+ def to_json
25
+ to_hash.to_json
26
+ end
27
+
28
+ def url
29
+ '/Payment/v1/Transaction/AssertCapture'
30
+ end
31
+
32
+ def response_class
33
+ SixSaferpay::SixTransaction::AssertCaptureResponse
34
+ end
35
+
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,37 @@
1
+ module SixSaferpay
2
+ module SixTransaction
3
+ class AssertCaptureResponse
4
+
5
+ attr_accessor(:response_header,
6
+ :transaction_id,
7
+ :order_id,
8
+ :status,
9
+ :date
10
+ )
11
+
12
+ def initialize(response_header: ,
13
+ transaction_id: ,
14
+ order_id: nil,
15
+ status: ,
16
+ date: )
17
+ @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
18
+ @transaction_id = transaction_id
19
+ @order_id = order_id
20
+ @status = status
21
+ @date = date
22
+ end
23
+
24
+ def to_hash
25
+ hash = Hash.new
26
+ hash.merge!(response_header: @response_header.to_h) if @response_header
27
+ hash.merge!(transaction_id: @transaction_id) if @transaction_id
28
+ hash.merge!(order_id: @order_id) if @order_id
29
+ hash.merge!(status: @status) if @status
30
+ hash.merge!(date: @date) if @date
31
+ hash
32
+ end
33
+ alias_method :to_h, :to_hash
34
+
35
+ end
36
+ end
37
+ end
@@ -1,3 +1,3 @@
1
1
  module SixSaferpay
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: six_saferpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Langenegger
@@ -214,6 +214,7 @@ files:
214
214
  - lib/six_saferpay/api/six_payment_page/responses/assert_response.rb
215
215
  - lib/six_saferpay/api/six_payment_page/responses/initalize_response.rb
216
216
  - lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb
217
+ - lib/six_saferpay/api/six_transaction/requests/assert_capture.rb
217
218
  - lib/six_saferpay/api/six_transaction/requests/assert_refund.rb
218
219
  - lib/six_saferpay/api/six_transaction/requests/authorize.rb
219
220
  - lib/six_saferpay/api/six_transaction/requests/authorize_direct.rb
@@ -225,6 +226,7 @@ files:
225
226
  - lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb
226
227
  - lib/six_saferpay/api/six_transaction/requests/refund.rb
227
228
  - lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb
229
+ - lib/six_saferpay/api/six_transaction/responses/assert_capture_response.rb
228
230
  - lib/six_saferpay/api/six_transaction/responses/assert_refund_response.rb
229
231
  - lib/six_saferpay/api/six_transaction/responses/authorize_direct_response.rb
230
232
  - lib/six_saferpay/api/six_transaction/responses/authorize_response.rb