six_saferpay 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -7
- data/lib/six_saferpay/api/six_batch/requests/close.rb +37 -0
- data/lib/six_saferpay/api/six_batch/responses/close_response.rb +20 -0
- data/lib/six_saferpay/api/six_omni_channel/requests/acquire_transaction.rb +46 -0
- data/lib/six_saferpay/api/six_omni_channel/requests/insert_alias.rb +40 -0
- data/lib/six_saferpay/api/six_omni_channel/responses/acquire_transaction_response.rb +30 -0
- data/lib/six_saferpay/api/six_omni_channel/responses/insert_alias_response.rb +34 -0
- data/lib/six_saferpay/api/six_secure_card_data/requests/assert_insert.rb +37 -0
- data/lib/six_saferpay/api/six_secure_card_data/requests/delete.rb +37 -0
- data/lib/six_saferpay/api/six_secure_card_data/requests/insert.rb +66 -0
- data/lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb +46 -0
- data/lib/six_saferpay/api/six_secure_card_data/responses/assert_insert_response.rb +33 -0
- data/lib/six_saferpay/api/six_secure_card_data/responses/delete_response.rb +20 -0
- data/lib/six_saferpay/api/six_secure_card_data/responses/insert_direct_response.rb +33 -0
- data/lib/six_saferpay/api/six_secure_card_data/responses/insert_response.rb +33 -0
- data/lib/six_saferpay/api/six_transaction/requests/inquire.rb +36 -0
- data/lib/six_saferpay/api/six_transaction/requests/refund_direct.rb +46 -0
- data/lib/six_saferpay/api/six_transaction/responses/inquire_response.rb +44 -0
- data/lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb +34 -0
- data/lib/six_saferpay/models/alias.rb +22 -0
- data/lib/six_saferpay/models/check.rb +22 -0
- data/lib/six_saferpay/models/check_result.rb +23 -0
- data/lib/six_saferpay/version.rb +1 -1
- metadata +22 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c0277db98185e20238cc0eff1ee0f68b3206f5e1d3ca0a8e3c2ab5adcf9453d
|
4
|
+
data.tar.gz: 14bab1d73c8dad62a6b33c68bdab72cb41df80ebc2e839c0664291077f96bdfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29474738168cc9db1ca28495432c626cc61bd5d6109ecfad40594200158f8a5f8d985802e52ff2178f82982574a4f8e65465b4b40bb7fd0103cb7859a69834b7
|
7
|
+
data.tar.gz: 45a3d1698fe1f3e597fbecddfcb6135f28d00a71d4e576002a32dc0a657bb69097e95e3da6efb4d17d19244fa16d7e65041069711ae893d9c879682e52ff17df
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -122,19 +122,19 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
|
|
122
122
|
|
123
123
|
#### SIX Secure Care Data
|
124
124
|
|
125
|
-
- [
|
126
|
-
- [
|
127
|
-
- [
|
128
|
-
- [
|
125
|
+
- [x] Insert
|
126
|
+
- [x] AssertInsert
|
127
|
+
- [x] InsertDirect
|
128
|
+
- [x] Delete
|
129
129
|
|
130
130
|
#### SIX Batch
|
131
131
|
|
132
|
-
- [
|
132
|
+
- [x] Close
|
133
133
|
|
134
134
|
#### SIX OmniChannel
|
135
135
|
|
136
|
-
- [
|
137
|
-
- [
|
136
|
+
- [x] InsertAlias
|
137
|
+
- [x] AcquireTransaction
|
138
138
|
|
139
139
|
## License
|
140
140
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixBatch
|
3
|
+
class Close
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:terminal_id
|
7
|
+
)
|
8
|
+
|
9
|
+
def initialize(request_header: nil,
|
10
|
+
terminal_id: )
|
11
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
12
|
+
@terminal_id = terminal_id
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
hash = Hash.new
|
17
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
18
|
+
hash.merge!(terminal_id: @terminal_id) if @terminal_id
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
alias_method :to_h, :to_hash
|
22
|
+
|
23
|
+
def to_json
|
24
|
+
to_hash.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
'/Payment/v1/Batch/Close'
|
29
|
+
end
|
30
|
+
|
31
|
+
def response_class
|
32
|
+
SixSaferpay::SixBatch::CloseResponse
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixBatch
|
3
|
+
class CloseResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header)
|
6
|
+
|
7
|
+
def initialize(response_header:)
|
8
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_hash
|
12
|
+
hash = Hash.new
|
13
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
14
|
+
hash
|
15
|
+
end
|
16
|
+
alias_method :to_h, :to_hash
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixOmniChannel
|
3
|
+
class AcquireTransaction
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:terminal_id,
|
7
|
+
:order_id,
|
8
|
+
:six_transaction_reference
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(request_header: nil,
|
12
|
+
terminal_id:,
|
13
|
+
order_id: nil,
|
14
|
+
six_transaction_reference:
|
15
|
+
)
|
16
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
17
|
+
@terminal_id = terminal_id
|
18
|
+
@order_id = order_id
|
19
|
+
@six_transaction_reference = six_transaction_reference
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_hash
|
23
|
+
hash = Hash.new
|
24
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
25
|
+
hash.merge!(terminal_id: @terminal_id) if @terminal_id
|
26
|
+
hash.merge!(order_id: @order_id) if @order_id
|
27
|
+
hash.merge!(six_transaction_reference: @six_transaction_reference) if @six_transaction_reference
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
alias_method :to_h, :to_hash
|
31
|
+
|
32
|
+
def to_json
|
33
|
+
to_hash.to_json
|
34
|
+
end
|
35
|
+
|
36
|
+
def url
|
37
|
+
'/Payment/v1/OmniChannel/AcquireTransaction'
|
38
|
+
end
|
39
|
+
|
40
|
+
def response_class
|
41
|
+
SixSaferpay::SixOmniChannel::AcquireTransactionResponse
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixOmniChannel
|
3
|
+
class InsertAlias
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:register_alias,
|
7
|
+
:six_transaction_reference)
|
8
|
+
|
9
|
+
def initialize(request_header: nil,
|
10
|
+
register_alias:,
|
11
|
+
six_transaction_reference: )
|
12
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
13
|
+
@register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
|
14
|
+
@six_transaction_reference = six_transaction_reference
|
15
|
+
end
|
16
|
+
|
17
|
+
def to_hash
|
18
|
+
hash = Hash.new
|
19
|
+
hash.merge!(request_header: @request_header.to_h)
|
20
|
+
hash.merge!(register_alias: @register_alias.to_h) if @register_alias
|
21
|
+
hash.merge!(six_transaction_reference: @six_transaction_reference) if @six_transaction_reference
|
22
|
+
hash
|
23
|
+
end
|
24
|
+
alias_method :to_h, :to_hash
|
25
|
+
|
26
|
+
def to_json
|
27
|
+
to_hash.to_json
|
28
|
+
end
|
29
|
+
|
30
|
+
def url
|
31
|
+
'/Payment/v1/OmniChannel/InsertAssert'
|
32
|
+
end
|
33
|
+
|
34
|
+
def response_class
|
35
|
+
SixSaferpay::SixOmniChannel::InsertAssertResponse
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixOmniChannel
|
3
|
+
class AcquireTransactionResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:transaction,
|
7
|
+
:payment_means
|
8
|
+
)
|
9
|
+
|
10
|
+
def initialize(response_header:,
|
11
|
+
transaction:,
|
12
|
+
payment_means:
|
13
|
+
)
|
14
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
15
|
+
@transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
|
16
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
17
|
+
end
|
18
|
+
|
19
|
+
def to_hash
|
20
|
+
hash = Hash.new
|
21
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
22
|
+
hash.merge!(transaction: @transaction.to_h) if @transaction
|
23
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
alias_method :to_h, :to_hash
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixOmniChannel
|
3
|
+
class InsertAliasResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:fd_alias,
|
7
|
+
:payment_means,
|
8
|
+
:check_result
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(response_header:,
|
12
|
+
fd_alias:,
|
13
|
+
payment_means:,
|
14
|
+
check_result: nil
|
15
|
+
)
|
16
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
17
|
+
@fd_alias = SixSaferpay::Alias.new(fd_alias.to_h) if fd_alias
|
18
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
19
|
+
@check_result = SixSaferpay::CheckResult.new(check_result.to_h) if check_result
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_hash
|
23
|
+
hash = Hash.new
|
24
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
25
|
+
hash.merge!(fd_alias: @fd_alias.to_h) if @fd_alias
|
26
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
27
|
+
hash.merge!(check_result: @check_result.to_h) if @check_result
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
alias_method :to_h, :to_hash
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class AssertInsert
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:token
|
7
|
+
)
|
8
|
+
|
9
|
+
def initialize(request_header: nil,
|
10
|
+
token: )
|
11
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
12
|
+
@token = token
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
hash = Hash.new
|
17
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
18
|
+
hash.merge!(token: @token) if @token
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
alias_method :to_h, :to_hash
|
22
|
+
|
23
|
+
def to_json
|
24
|
+
to_hash.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
'/Payment/v1/Alias/AssertInsert'
|
29
|
+
end
|
30
|
+
|
31
|
+
def response_class
|
32
|
+
SixSaferpay::SixSecureData::AssertInsertResponse
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class Delete
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:alias_id
|
7
|
+
)
|
8
|
+
|
9
|
+
def initialize(request_header: nil,
|
10
|
+
alias_id: )
|
11
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
12
|
+
@alias_id = alias_id
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
hash = Hash.new
|
17
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
18
|
+
hash.merge!(alias_id: @alias_id) if @alias_id
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
alias_method :to_h, :to_hash
|
22
|
+
|
23
|
+
def to_json
|
24
|
+
to_hash.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
'/Payment/v1/Alias/Delete'
|
29
|
+
end
|
30
|
+
|
31
|
+
def response_class
|
32
|
+
SixSaferpay::SixSecureData::DeleteResponse
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class Insert
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:register_alias,
|
7
|
+
:type,
|
8
|
+
:return_urls,
|
9
|
+
:styling,
|
10
|
+
:language_code,
|
11
|
+
:check,
|
12
|
+
:payment_methods,
|
13
|
+
:card_form
|
14
|
+
)
|
15
|
+
|
16
|
+
def initialize(request_header: nil,
|
17
|
+
register_alias:,
|
18
|
+
type:,
|
19
|
+
return_urls:,
|
20
|
+
styling: nil,
|
21
|
+
language_code: nil,
|
22
|
+
check: nil,
|
23
|
+
payment_methods: nil,
|
24
|
+
card_form: nil
|
25
|
+
)
|
26
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
27
|
+
@register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
|
28
|
+
@type = type
|
29
|
+
@return_urls = SixSaferpay::ReturnUrls.new(return_urls.to_h) if return_urls
|
30
|
+
@styling = SixSaferpay::Styling.new(styling.to_h) if styling
|
31
|
+
@language_code = language_code
|
32
|
+
@check = SixSaferpay::Check.new(check.to_h) if check
|
33
|
+
@payment_methods = payment_methods
|
34
|
+
@card_form = SixSaferpay::CardForm.new(card_form.to_h) if card_form
|
35
|
+
end
|
36
|
+
|
37
|
+
def to_hash
|
38
|
+
hash = Hash.new
|
39
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
40
|
+
hash.merge!(register_alias: @register_alias.to_h) if @register_alias
|
41
|
+
hash.merge!(type: @type) if @type
|
42
|
+
hash.merge!(return_urls: @return_urls.to_h) if @return_urls
|
43
|
+
hash.merge!(styling: @styling.to_h) if @styling
|
44
|
+
hash.merge!(language_code: @language_code) if @language_code
|
45
|
+
hash.merge!(check: @check.to_h) if @check
|
46
|
+
hash.merge!(payment_methods: @payment_methods) if @payment_methods
|
47
|
+
hash.merge!(card_form: @card_form.to_h) if @card_form
|
48
|
+
hash
|
49
|
+
end
|
50
|
+
alias_method :to_h, :to_hash
|
51
|
+
|
52
|
+
def to_json
|
53
|
+
to_hash.to_json
|
54
|
+
end
|
55
|
+
|
56
|
+
def url
|
57
|
+
'/Payment/v1/Alias/Insert'
|
58
|
+
end
|
59
|
+
|
60
|
+
def response_class
|
61
|
+
SixSaferpay::SixSecureData::InsertResponse
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class InsertDirect
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:register_alias,
|
7
|
+
:payment_means,
|
8
|
+
:check
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(request_header: nil,
|
12
|
+
register_alias:,
|
13
|
+
payment_means:,
|
14
|
+
check: nil
|
15
|
+
)
|
16
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
17
|
+
@register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
|
18
|
+
@payment_means = SixSaferpay::RequestPaymentMeans.new(payment_means.to_h) if payment_means
|
19
|
+
@check = SixSaferpay::Check.new(check.to_h) if check
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_hash
|
23
|
+
hash = Hash.new
|
24
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
25
|
+
hash.merge!(register_alias: @register_alias.to_h) if @register_alias
|
26
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
27
|
+
hash.merge!(check: @check.to_h) if @check
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
alias_method :to_h, :to_hash
|
31
|
+
|
32
|
+
def to_json
|
33
|
+
to_hash.to_json
|
34
|
+
end
|
35
|
+
|
36
|
+
def url
|
37
|
+
'/Payment/v1/Alias/InsertDirect'
|
38
|
+
end
|
39
|
+
|
40
|
+
def response_class
|
41
|
+
SixSaferpay::SixSecureData::InsertDirectResponse
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class AssertInsertResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:fd_alias,
|
7
|
+
:payment_means,
|
8
|
+
:check_result
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(response_header:,
|
12
|
+
fd_alias:,
|
13
|
+
payment_means:,
|
14
|
+
check_result: nil)
|
15
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
16
|
+
@fd_alias = SixSaferpay::Alias.new(fd_alias.to_h) if fd_alias
|
17
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
18
|
+
@check_result = SixSaferpay::CheckResult.new(check_result.to_h) if check_result
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_hash
|
22
|
+
hash = Hash.new
|
23
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
24
|
+
hash.merge!(fd_alias: @fd_alias.to_h) if @fd_alias
|
25
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
26
|
+
hash.merge!(check_result: @check_result.to_h) if @check_result
|
27
|
+
hash
|
28
|
+
end
|
29
|
+
alias_method :to_h, :to_hash
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class DeleteResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header)
|
6
|
+
|
7
|
+
def initialize(response_header: )
|
8
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_hash
|
12
|
+
hash = Hash.new
|
13
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
14
|
+
hash
|
15
|
+
end
|
16
|
+
alias_method :to_h, :to_hash
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class InsertDirectResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:fd_alias,
|
7
|
+
:payment_means,
|
8
|
+
:check_result
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(response_header:,
|
12
|
+
fd_alias:,
|
13
|
+
payment_means:,
|
14
|
+
check_result: nil)
|
15
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
16
|
+
@fd_alias = SixSaferpay::Alias.new(fd_alias.to_h) if fd_alias
|
17
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
18
|
+
@check_result = SixSaferpay::CheckResult.new(check_result.to_h) if check_result
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_hash
|
22
|
+
hash = Hash.new
|
23
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
24
|
+
hash.merge!(fd_alias: @fd_alias.to_h) if @fd_alias
|
25
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
26
|
+
hash.merge!(check_result: @check_result.to_h) if @check_result
|
27
|
+
hash
|
28
|
+
end
|
29
|
+
alias_method :to_h, :to_hash
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixSecureData
|
3
|
+
class InsertResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:token,
|
7
|
+
:expiration,
|
8
|
+
:redirect_url
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(response_header:,
|
12
|
+
token:,
|
13
|
+
expiration:,
|
14
|
+
redirect_url: )
|
15
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
16
|
+
@token = token
|
17
|
+
@expiration = expiration
|
18
|
+
@redirect_url = redirect_url
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_hash
|
22
|
+
hash = Hash.new
|
23
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
24
|
+
hash.merge!(token: @token) if @token
|
25
|
+
hash.merge!(expiration: @expiration) if @expiration
|
26
|
+
hash.merge!(redirect_url: @redirect_url) if @redirect_url
|
27
|
+
hash
|
28
|
+
end
|
29
|
+
alias_method :to_h, :to_hash
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixTransaction
|
3
|
+
class Inquire
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:transaction_reference)
|
7
|
+
|
8
|
+
|
9
|
+
def initialize(request_header: nil,
|
10
|
+
transaction_reference: )
|
11
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
12
|
+
@transaction_reference = SixSaferpay::TransactionReference.new(transaction_reference.to_h) if transaction_reference
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_hash
|
16
|
+
hash = Hash.new
|
17
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
18
|
+
hash.merge!(transaction_reference: @transaction_reference.to_h) if @transaction_reference
|
19
|
+
hash
|
20
|
+
end
|
21
|
+
alias_method :to_h, :to_hash
|
22
|
+
|
23
|
+
def to_json
|
24
|
+
to_hash.to_json
|
25
|
+
end
|
26
|
+
|
27
|
+
def url
|
28
|
+
'/Payment/v1/Transaction/Inquire'
|
29
|
+
end
|
30
|
+
|
31
|
+
def response_class
|
32
|
+
SixSaferpay::SixTransaction::InquireResponse
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixTransaction
|
3
|
+
class RefundDirect
|
4
|
+
|
5
|
+
attr_accessor(:request_header,
|
6
|
+
:terminal_id,
|
7
|
+
:refund,
|
8
|
+
:payment_means
|
9
|
+
)
|
10
|
+
|
11
|
+
|
12
|
+
def initialize(request_header: nil,
|
13
|
+
terminal_id:,
|
14
|
+
refund:,
|
15
|
+
payment_means:
|
16
|
+
)
|
17
|
+
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
18
|
+
@terminal_id = terminal_id
|
19
|
+
@refund = SixSaferpay::Refund.new(refund.to_h) if refund
|
20
|
+
@payment_means = SixSaferpay::RequestPaymentMeans.new(payment_means.to_h) if payment_means
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_hash
|
24
|
+
hash = Hash.new
|
25
|
+
hash.merge!(request_header: @request_header.to_h) if @request_header
|
26
|
+
hash.merge!(terminal_id: @terminal_id) if @terminal_id
|
27
|
+
hash.merge!(refund: @refund.to_h) if @refund
|
28
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
29
|
+
hash
|
30
|
+
end
|
31
|
+
alias_method :to_h, :to_hash
|
32
|
+
|
33
|
+
def to_json
|
34
|
+
to_hash.to_json
|
35
|
+
end
|
36
|
+
|
37
|
+
def url
|
38
|
+
'/Payment/v1/Transaction/RefundDirect'
|
39
|
+
end
|
40
|
+
|
41
|
+
def response_class
|
42
|
+
SixSaferpay::SixTransaction::RefundDirectResponse
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixTransaction
|
3
|
+
class InquireResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:transaction,
|
7
|
+
:payment_means,
|
8
|
+
:payer,
|
9
|
+
:liability,
|
10
|
+
:dcc
|
11
|
+
)
|
12
|
+
|
13
|
+
|
14
|
+
def initialize(response_header:,
|
15
|
+
transaction:,
|
16
|
+
payment_means:,
|
17
|
+
payer: nil,
|
18
|
+
liability: nil,
|
19
|
+
dcc: nil
|
20
|
+
|
21
|
+
)
|
22
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
23
|
+
@transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
|
24
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
25
|
+
@payer = SixSaferpay::Payer.new(payer.to_h) if payer
|
26
|
+
@liability = SixSaferpay::Liability.new(liability.to_h) if liability
|
27
|
+
@dcc = SixSaferpay::Dcc.new(dcc.to_h) if dcc
|
28
|
+
end
|
29
|
+
|
30
|
+
def to_hash
|
31
|
+
hash = Hash.new
|
32
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
33
|
+
hash.merge!(transaction: @transaction.to_h) if @transaction
|
34
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
35
|
+
hash.merge!(payer: @payer.to_h) if @payer
|
36
|
+
hash.merge!(liability: @liability.to_h) if @liability
|
37
|
+
hash.merge!(dcc: @dcc.to_h) if @dcc
|
38
|
+
hash
|
39
|
+
end
|
40
|
+
alias_method :to_h, :to_hash
|
41
|
+
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
module SixTransaction
|
3
|
+
class RefundDirectResponse
|
4
|
+
|
5
|
+
attr_accessor(:response_header,
|
6
|
+
:transaction,
|
7
|
+
:payment_means,
|
8
|
+
:dcc
|
9
|
+
)
|
10
|
+
|
11
|
+
def initialize(response_header: ,
|
12
|
+
transaction:,
|
13
|
+
payment_means: ,
|
14
|
+
dcc: nil)
|
15
|
+
|
16
|
+
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
17
|
+
@transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
|
18
|
+
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
|
19
|
+
@dcc = SixSaferpay::Dcc.new(dcc.to_h) if dcc
|
20
|
+
end
|
21
|
+
|
22
|
+
def to_hash
|
23
|
+
hash = Hash.new
|
24
|
+
hash.merge!(response_header: @response_header.to_h) if @response_header
|
25
|
+
hash.merge!(transaction: @transaction.to_h) if @transaction
|
26
|
+
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
27
|
+
hash.merge!(dcc: @dcc.to_h) if @dcc
|
28
|
+
hash
|
29
|
+
end
|
30
|
+
alias_method :to_h, :to_hash
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class Alias
|
3
|
+
|
4
|
+
attr_accessor(:id,
|
5
|
+
:lifetime)
|
6
|
+
|
7
|
+
def initialize(id:,
|
8
|
+
lifetime: )
|
9
|
+
@id = id
|
10
|
+
@lifetime = lifetime
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_hash
|
14
|
+
hash = Hash.new
|
15
|
+
hash.merge!(id: @id) if @id
|
16
|
+
hash.merge!(lifetime: @lifetime) if @lifetime
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
alias_method :to_h, :to_hash
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class Check
|
3
|
+
|
4
|
+
attr_accessor(:type,
|
5
|
+
:terminal_id
|
6
|
+
)
|
7
|
+
|
8
|
+
def initialize(type:, terminal_id:)
|
9
|
+
@type = type
|
10
|
+
@terminal_id = terminal_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_hash
|
14
|
+
hash = Hash.new
|
15
|
+
hash.merge!(type: @type) if @type
|
16
|
+
hash.merge!(terminal_id: @terminal_id) if @terminal_id
|
17
|
+
hash
|
18
|
+
end
|
19
|
+
alias_method :to_h, :to_hash
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module SixSaferpay
|
2
|
+
class CheckResult
|
3
|
+
|
4
|
+
attr_accessor(:result,
|
5
|
+
:message
|
6
|
+
)
|
7
|
+
|
8
|
+
def initialize(result:,
|
9
|
+
message: )
|
10
|
+
@result = result
|
11
|
+
@message = message
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
hash = Hash.new
|
16
|
+
hash.merge!(result: @result) if @result
|
17
|
+
hash.merge!(message: @message) if @message
|
18
|
+
hash
|
19
|
+
end
|
20
|
+
alias_method :to_h, :to_hash
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/six_saferpay/version.rb
CHANGED
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.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fadendaten GmbH
|
@@ -212,10 +212,24 @@ files:
|
|
212
212
|
- bin/setup
|
213
213
|
- lib/six_saferpay.rb
|
214
214
|
- lib/six_saferpay/api.rb
|
215
|
+
- lib/six_saferpay/api/six_batch/requests/close.rb
|
216
|
+
- lib/six_saferpay/api/six_batch/responses/close_response.rb
|
217
|
+
- lib/six_saferpay/api/six_omni_channel/requests/acquire_transaction.rb
|
218
|
+
- lib/six_saferpay/api/six_omni_channel/requests/insert_alias.rb
|
219
|
+
- lib/six_saferpay/api/six_omni_channel/responses/acquire_transaction_response.rb
|
220
|
+
- lib/six_saferpay/api/six_omni_channel/responses/insert_alias_response.rb
|
215
221
|
- lib/six_saferpay/api/six_payment_page/requests/assert.rb
|
216
222
|
- lib/six_saferpay/api/six_payment_page/requests/initialize.rb
|
217
223
|
- lib/six_saferpay/api/six_payment_page/responses/assert_response.rb
|
218
224
|
- lib/six_saferpay/api/six_payment_page/responses/initalize_response.rb
|
225
|
+
- lib/six_saferpay/api/six_secure_card_data/requests/assert_insert.rb
|
226
|
+
- lib/six_saferpay/api/six_secure_card_data/requests/delete.rb
|
227
|
+
- lib/six_saferpay/api/six_secure_card_data/requests/insert.rb
|
228
|
+
- lib/six_saferpay/api/six_secure_card_data/requests/insert_direct.rb
|
229
|
+
- lib/six_saferpay/api/six_secure_card_data/responses/assert_insert_response.rb
|
230
|
+
- lib/six_saferpay/api/six_secure_card_data/responses/delete_response.rb
|
231
|
+
- lib/six_saferpay/api/six_secure_card_data/responses/insert_direct_response.rb
|
232
|
+
- lib/six_saferpay/api/six_secure_card_data/responses/insert_response.rb
|
219
233
|
- lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb
|
220
234
|
- lib/six_saferpay/api/six_transaction/requests/assert_capture.rb
|
221
235
|
- lib/six_saferpay/api/six_transaction/requests/assert_refund.rb
|
@@ -225,10 +239,12 @@ files:
|
|
225
239
|
- lib/six_saferpay/api/six_transaction/requests/cancel.rb
|
226
240
|
- lib/six_saferpay/api/six_transaction/requests/capture.rb
|
227
241
|
- lib/six_saferpay/api/six_transaction/requests/initialize.rb
|
242
|
+
- lib/six_saferpay/api/six_transaction/requests/inquire.rb
|
228
243
|
- lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb
|
229
244
|
- lib/six_saferpay/api/six_transaction/requests/multipart_finalize.rb
|
230
245
|
- lib/six_saferpay/api/six_transaction/requests/query_payment_means.rb
|
231
246
|
- lib/six_saferpay/api/six_transaction/requests/refund.rb
|
247
|
+
- lib/six_saferpay/api/six_transaction/requests/refund_direct.rb
|
232
248
|
- lib/six_saferpay/api/six_transaction/responses/adjust_amount_response.rb
|
233
249
|
- lib/six_saferpay/api/six_transaction/responses/assert_capture_response.rb
|
234
250
|
- lib/six_saferpay/api/six_transaction/responses/assert_refund_response.rb
|
@@ -238,14 +254,17 @@ files:
|
|
238
254
|
- lib/six_saferpay/api/six_transaction/responses/cancel_response.rb
|
239
255
|
- lib/six_saferpay/api/six_transaction/responses/capture_response.rb
|
240
256
|
- lib/six_saferpay/api/six_transaction/responses/initialize_response.rb
|
257
|
+
- lib/six_saferpay/api/six_transaction/responses/inquire_response.rb
|
241
258
|
- lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb
|
242
259
|
- lib/six_saferpay/api/six_transaction/responses/multipart_finalize_response.rb
|
243
260
|
- lib/six_saferpay/api/six_transaction/responses/query_payment_means_response.rb
|
261
|
+
- lib/six_saferpay/api/six_transaction/responses/refund_direct_response.rb
|
244
262
|
- lib/six_saferpay/api/six_transaction/responses/refund_response.rb
|
245
263
|
- lib/six_saferpay/client.rb
|
246
264
|
- lib/six_saferpay/errors/error.rb
|
247
265
|
- lib/six_saferpay/models/address.rb
|
248
266
|
- lib/six_saferpay/models/address_form.rb
|
267
|
+
- lib/six_saferpay/models/alias.rb
|
249
268
|
- lib/six_saferpay/models/alipay.rb
|
250
269
|
- lib/six_saferpay/models/amount.rb
|
251
270
|
- lib/six_saferpay/models/bank_account.rb
|
@@ -255,6 +274,8 @@ files:
|
|
255
274
|
- lib/six_saferpay/models/brand.rb
|
256
275
|
- lib/six_saferpay/models/capture_reference.rb
|
257
276
|
- lib/six_saferpay/models/card_form.rb
|
277
|
+
- lib/six_saferpay/models/check.rb
|
278
|
+
- lib/six_saferpay/models/check_result.rb
|
258
279
|
- lib/six_saferpay/models/client_info.rb
|
259
280
|
- lib/six_saferpay/models/dcc.rb
|
260
281
|
- lib/six_saferpay/models/delivery_address.rb
|