six_saferpay 1.16.2.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.test.env +1 -1
  4. data/.travis.yml +2 -4
  5. data/Gemfile.lock +85 -70
  6. data/README.md +0 -18
  7. data/lib/six_saferpay/api/six_batch/responses/close_response.rb +2 -2
  8. data/lib/six_saferpay/api/six_payment_page/requests/initialize.rb +0 -4
  9. data/lib/six_saferpay/api/six_payment_page/responses/assert_response.rb +2 -11
  10. data/lib/six_saferpay/api/six_payment_page/responses/{initialize_response.rb → initalize_response.rb} +0 -0
  11. data/lib/six_saferpay/api/six_transaction/requests/alternative_payment.rb +0 -4
  12. data/lib/six_saferpay/api/six_transaction/requests/authorize_direct.rb +0 -4
  13. data/lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb +0 -4
  14. data/lib/six_saferpay/api/six_transaction/requests/capture.rb +2 -11
  15. data/lib/six_saferpay/api/six_transaction/requests/initialize.rb +0 -4
  16. data/lib/six_saferpay/api/six_transaction/responses/authorize_direct_response.rb +2 -11
  17. data/lib/six_saferpay/api/six_transaction/responses/authorize_response.rb +3 -11
  18. data/lib/six_saferpay/api/six_transaction/responses/cancel_response.rb +1 -1
  19. data/lib/six_saferpay/api.rb +1 -1
  20. data/lib/six_saferpay/client.rb +2 -8
  21. data/lib/six_saferpay/models/address.rb +4 -4
  22. data/lib/six_saferpay/models/check_result.rb +2 -6
  23. data/lib/six_saferpay/models/payment_methods_options.rb +2 -4
  24. data/lib/six_saferpay/models/registration_result.rb +2 -11
  25. data/lib/six_saferpay/models/request_payment_means.rb +2 -6
  26. data/lib/six_saferpay/version.rb +1 -1
  27. data/six_saferpay.gemspec +8 -8
  28. metadata +25 -41
  29. data/lib/six_saferpay/api/six_secure_pay_gate_offer/requests/create_offer.rb +0 -61
  30. data/lib/six_saferpay/api/six_secure_pay_gate_offer/responses/create_offer_response.rb +0 -26
  31. data/lib/six_saferpay/clients/secure_pay_gate_api/client.rb +0 -23
  32. data/lib/six_saferpay/models/authentication.rb +0 -36
  33. data/lib/six_saferpay/models/authentication_result.rb +0 -20
  34. data/lib/six_saferpay/models/bankcontact.rb +0 -21
  35. data/lib/six_saferpay/models/chosen_plan.rb +0 -62
  36. data/lib/six_saferpay/models/custom_plan.rb +0 -4
  37. data/lib/six_saferpay/models/first_installment_amount.rb +0 -4
  38. data/lib/six_saferpay/models/ideal.rb +0 -18
  39. data/lib/six_saferpay/models/installment_fee.rb +0 -4
  40. data/lib/six_saferpay/models/installment_plans.rb +0 -73
  41. data/lib/six_saferpay/models/mastercard_issuer_installments.rb +0 -49
  42. data/lib/six_saferpay/models/payment_method_options.rb +0 -18
  43. data/lib/six_saferpay/models/saferpay_fields.rb +0 -18
  44. data/lib/six_saferpay/models/subsequent_installment_amount.rb +0 -4
  45. data/lib/six_saferpay/models/total_amont_due.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acfb2585b43dd7064f81b0485286f48e2c4b554c7f2d0fe1025bc5eb0cbd4c64
4
- data.tar.gz: 904a6c58a9da762f04bc601292d89a6dfa27722678f3bcb9ca4146612142184d
3
+ metadata.gz: 116c30e63df6945bd76a8f0fc0e608e3aac14037f66d0f1629c45434ead8c1a4
4
+ data.tar.gz: 4783e055be5621ad8030db250a04c874d5e1b1a724a194f7c6a30939959a1deb
5
5
  SHA512:
6
- metadata.gz: 835973e42bb94eba81cc077a63318b195c89f4f0c35e287fdb38371b641f62317891b9781070199948454047050af115874b8500ca7f5a5b022906743647241f
7
- data.tar.gz: 542f2e7bcd9781054756cd5e623030cecbc0d98b31201e10d3c2f27055101a1e765c7c92483fbb91e7ee163eea3c67f8bf49bb875a8df248617c17a30dfa05f6
6
+ metadata.gz: 64329f2aeb9520861f9ec3a9d37e8f43d3520fbdbba179db4e88015a28c57d98bc260c028a0222d18f3839ca2847b8f8c7533bf8da8f02c1ca3f3f3bcf90f1f1
7
+ data.tar.gz: f8b74dddd3054ea29d2f5b0b05b864b6299546e5344db571e2fc19856f23c2e91ee170b67ee6c6a1aa85edb1ab8d3c77b0dc43b441726c390a36e29c46b831ff
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.5.1
data/.test.env CHANGED
@@ -1,5 +1,5 @@
1
1
  SIX_SAFERPAY_CUSTOMER_ID='245294'
2
- SIX_SAFERPAY_TERMINAL_ID='17925578'
2
+ SIX_SAFERPAY_TERMINAL_ID='17925560'
3
3
  SIX_SAFERPAY_USERNAME='API_245294_08700063'
4
4
  SIX_SAFERPAY_PASSWORD='mei4Xoozle4doi0A'
5
5
  SIX_SAFERPAY_FAIL_URL='http://localhost:3004'
data/.travis.yml CHANGED
@@ -3,10 +3,8 @@ sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.7.2
7
-
8
- before_install:
9
- - gem install bundler:2.2.8
6
+ - 2.5.0
7
+ before_install: gem install bundler -v 2.0.1
10
8
 
11
9
  notifications:
12
10
  slack: fadendaten:tWoet2mtObvbwSZSyUAY93jl
data/Gemfile.lock CHANGED
@@ -1,97 +1,112 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- six_saferpay (1.16.2.4.0)
5
- activesupport (~> 6.1, >= 6.1.3)
4
+ six_saferpay (1.5.0)
5
+ activesupport (~> 5.0, >= 5.0.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (6.1.3)
10
+ activesupport (5.2.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (>= 1.6, < 2)
13
- minitest (>= 5.1)
14
- tzinfo (~> 2.0)
15
- zeitwerk (~> 2.3)
16
- addressable (2.7.0)
17
- public_suffix (>= 2.0.2, < 5.0)
18
- coderay (1.1.3)
19
- concurrent-ruby (1.1.8)
20
- crack (0.4.5)
21
- rexml
22
- diff-lcs (1.4.4)
23
- docile (1.3.5)
24
- dotenv (2.7.6)
25
- hashdiff (1.0.1)
26
- i18n (1.8.9)
12
+ i18n (>= 0.7, < 2)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ addressable (2.6.0)
16
+ public_suffix (>= 2.0.2, < 4.0)
17
+ coderay (1.1.2)
18
+ concurrent-ruby (1.1.5)
19
+ crack (0.4.3)
20
+ safe_yaml (~> 1.0.0)
21
+ diff-lcs (1.3)
22
+ docile (1.3.1)
23
+ dotenv (2.7.1)
24
+ equatable (0.5.0)
25
+ ffi (1.10.0-java)
26
+ hashdiff (0.3.8)
27
+ i18n (1.6.0)
27
28
  concurrent-ruby (~> 1.0)
28
- method_source (1.0.0)
29
- minitest (5.14.3)
30
- pastel (0.8.0)
31
- tty-color (~> 0.5)
32
- pry (0.14.0)
33
- coderay (~> 1.1)
34
- method_source (~> 1.0)
35
- public_suffix (4.0.6)
36
- rake (13.0.3)
37
- rexml (3.2.4)
38
- rspec (3.10.0)
39
- rspec-core (~> 3.10.0)
40
- rspec-expectations (~> 3.10.0)
41
- rspec-mocks (~> 3.10.0)
42
- rspec-core (3.10.1)
43
- rspec-support (~> 3.10.0)
44
- rspec-expectations (3.10.1)
29
+ json (2.2.0)
30
+ json (2.2.0-java)
31
+ method_source (0.9.2)
32
+ minitest (5.11.3)
33
+ necromancer (0.4.0)
34
+ pastel (0.7.2)
35
+ equatable (~> 0.5.0)
36
+ tty-color (~> 0.4.0)
37
+ pry (0.12.2)
38
+ coderay (~> 1.1.0)
39
+ method_source (~> 0.9.0)
40
+ pry (0.12.2-java)
41
+ coderay (~> 1.1.0)
42
+ method_source (~> 0.9.0)
43
+ spoon (~> 0.0)
44
+ public_suffix (3.0.3)
45
+ rake (10.5.0)
46
+ rspec (3.8.0)
47
+ rspec-core (~> 3.8.0)
48
+ rspec-expectations (~> 3.8.0)
49
+ rspec-mocks (~> 3.8.0)
50
+ rspec-core (3.8.0)
51
+ rspec-support (~> 3.8.0)
52
+ rspec-expectations (3.8.2)
45
53
  diff-lcs (>= 1.2.0, < 2.0)
46
- rspec-support (~> 3.10.0)
47
- rspec-mocks (3.10.2)
54
+ rspec-support (~> 3.8.0)
55
+ rspec-mocks (3.8.0)
48
56
  diff-lcs (>= 1.2.0, < 2.0)
49
- rspec-support (~> 3.10.0)
50
- rspec-support (3.10.2)
51
- simplecov (0.21.2)
57
+ rspec-support (~> 3.8.0)
58
+ rspec-support (3.8.0)
59
+ safe_yaml (1.0.5)
60
+ simplecov (0.16.1)
52
61
  docile (~> 1.1)
53
- simplecov-html (~> 0.11)
54
- simplecov_json_formatter (~> 0.1)
55
- simplecov-html (0.12.3)
56
- simplecov_json_formatter (0.1.2)
57
- spinning_wheel (0.2.2)
58
- activesupport (>= 5.2.4.3)
59
- tty-color (0.6.0)
60
- tty-cursor (0.7.1)
61
- tty-prompt (0.23.0)
62
- pastel (~> 0.8)
63
- tty-reader (~> 0.8)
64
- tty-reader (0.9.0)
65
- tty-cursor (~> 0.7)
66
- tty-screen (~> 0.8)
67
- wisper (~> 2.0)
68
- tty-screen (0.8.1)
69
- tzinfo (2.0.4)
70
- concurrent-ruby (~> 1.0)
62
+ json (>= 1.8, < 3)
63
+ simplecov-html (~> 0.10.0)
64
+ simplecov-html (0.10.2)
65
+ spinning_wheel (0.2.0)
66
+ activesupport (~> 5.0, >= 5.0.0.0)
67
+ spoon (0.0.6)
68
+ ffi
69
+ thread_safe (0.3.6)
70
+ thread_safe (0.3.6-java)
71
+ timers (4.3.0)
72
+ tty-color (0.4.3)
73
+ tty-cursor (0.6.1)
74
+ tty-prompt (0.18.1)
75
+ necromancer (~> 0.4.0)
76
+ pastel (~> 0.7.0)
77
+ timers (~> 4.0)
78
+ tty-cursor (~> 0.6.0)
79
+ tty-reader (~> 0.5.0)
80
+ tty-reader (0.5.0)
81
+ tty-cursor (~> 0.6.0)
82
+ tty-screen (~> 0.6.4)
83
+ wisper (~> 2.0.0)
84
+ tty-screen (0.6.5)
85
+ tzinfo (1.2.5)
86
+ thread_safe (~> 0.1)
71
87
  vcr (4.0.0)
72
- webmock (3.11.2)
88
+ webmock (3.5.1)
73
89
  addressable (>= 2.3.6)
74
90
  crack (>= 0.3.2)
75
- hashdiff (>= 0.4.0, < 2.0.0)
76
- wisper (2.0.1)
77
- zeitwerk (2.4.2)
91
+ hashdiff
92
+ wisper (2.0.0)
78
93
 
79
94
  PLATFORMS
80
95
  java
81
96
  ruby
82
97
 
83
98
  DEPENDENCIES
84
- bundler (~> 2.1)
99
+ bundler (~> 2.0)
85
100
  dotenv (~> 2.7, >= 2.7)
86
- pry (~> 0.13)
87
- rake (~> 13.0)
101
+ pry (~> 0.12.0)
102
+ rake (~> 10.0)
88
103
  rspec (~> 3.0)
89
- simplecov (~> 0.19)
104
+ simplecov (~> 0.16)
90
105
  six_saferpay!
91
- spinning_wheel (~> 0.2.2)
92
- tty-prompt (~> 0.22)
106
+ spinning_wheel (~> 0.1)
107
+ tty-prompt (~> 0.18)
93
108
  vcr (~> 4.0, >= 4.0.0)
94
- webmock (~> 3.10, >= 3.10)
109
+ webmock (~> 3.5, >= 3.5.1)
95
110
 
96
111
  BUNDLED WITH
97
- 2.2.8
112
+ 2.0.1
data/README.md CHANGED
@@ -4,10 +4,6 @@
4
4
 
5
5
  # SixSaferpay
6
6
 
7
- ## Current API Version
8
-
9
- This gem is compatible with the SIX API version: `1.16`
10
-
11
7
  ## Installation
12
8
 
13
9
  Add this line to your application's Gemfile:
@@ -83,15 +79,6 @@ You will find for all the other requests an predefined object. Feel free to use
83
79
 
84
80
  TODO
85
81
 
86
- #### SIX Secure PayGate API
87
-
88
- If you want to use the SIX Secure PayGate API, you have to use an other Client:
89
-
90
- ```ruby
91
- create_offer_request = SixSaferpay::SecurePayGateOffer.new(...)
92
- create_offer_response = SixSaferpay::SecurePayGateApi::Client.new(create_offer_request)
93
- ```
94
-
95
82
  ## Documentation
96
83
 
97
84
  [SIX Saferpay JSON API](https://saferpay.github.io/jsonapi)
@@ -149,11 +136,6 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
149
136
  - [x] InsertAlias
150
137
  - [x] AcquireTransaction
151
138
 
152
- #### Secure PayGate API
153
-
154
- - [x] CreateOffer
155
-
156
139
  ## License
157
140
 
158
141
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
159
-
@@ -5,12 +5,12 @@ module SixSaferpay
5
5
  attr_accessor(:response_header)
6
6
 
7
7
  def initialize(response_header:)
8
- @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h)
8
+ @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
9
9
  end
10
10
 
11
11
  def to_hash
12
12
  hash = Hash.new
13
- hash.merge!(response_header: @response_header.to_h)
13
+ hash.merge!(response_header: @response_header.to_h) if @response_header
14
14
  hash
15
15
  end
16
16
  alias_method :to_h, :to_hash
@@ -9,7 +9,6 @@ module SixSaferpay
9
9
  :payment,
10
10
  :payment_methods,
11
11
  :payment_methods_options,
12
- :authentication,
13
12
  :wallets,
14
13
  :payer,
15
14
  :register_alias,
@@ -28,7 +27,6 @@ module SixSaferpay
28
27
  payment:,
29
28
  payment_methods: nil,
30
29
  payment_methods_options: nil,
31
- authentication: nil,
32
30
  wallets: nil,
33
31
  payer: nil,
34
32
  register_alias: nil,
@@ -46,7 +44,6 @@ module SixSaferpay
46
44
  @payment = SixSaferpay::Payment.new(payment.to_h) if payment
47
45
  @payment_methods = payment_methods
48
46
  @payment_methods_options = SixSaferpay::PaymentMethodsOptions.new(payment_methods_options.to_h) if payment_methods_options
49
- @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
50
47
  @wallets = wallets
51
48
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
52
49
  @register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
@@ -67,7 +64,6 @@ module SixSaferpay
67
64
  hash.merge!(payment: @payment.to_h)
68
65
  hash.merge!(payment_methods: @payment_methods) if @payment_methods
69
66
  hash.merge!(payment_methods_options: @payment_methods_options.to_h) if @payment_methods_options
70
- hash.merge!(authentication: @authentication.to_h) if @authentication
71
67
  hash.merge!(wallets: @wallets) if @wallets
72
68
  hash.merge!(payer: @payer.to_h) if @payer
73
69
  hash.merge!(register_alias: @register_alias.to_h) if @register_alias
@@ -8,8 +8,7 @@ module SixSaferpay
8
8
  :payer,
9
9
  :registration_result,
10
10
  :liability,
11
- :dcc,
12
- :mastercard_issuer_installments
11
+ :dcc
13
12
  )
14
13
 
15
14
  def initialize(response_header:,
@@ -18,8 +17,7 @@ module SixSaferpay
18
17
  payer: nil,
19
18
  registration_result: nil,
20
19
  liability: nil,
21
- dcc: nil,
22
- mastercard_issuer_installments: nil
20
+ dcc: nil
23
21
  )
24
22
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h)
25
23
  @transaction = SixSaferpay::Transaction.new(transaction.to_h)
@@ -28,10 +26,6 @@ module SixSaferpay
28
26
  @registration_result = SixSaferpay::RegistrationResult.new(registration_result.to_h) if registration_result
29
27
  @liability = SixSaferpay::Liability.new(liability.to_h) if liability
30
28
  @dcc = SixSaferpay::Dcc.new(dcc.to_h) if dcc
31
- if mastercard_issuer_installments
32
- @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
33
- .new(mastercard_issuer_installments.to_h)
34
- end
35
29
  end
36
30
 
37
31
  def to_hash
@@ -43,9 +37,6 @@ module SixSaferpay
43
37
  hash.merge!(registration_result: @registration_result.to_h) if @registration_result
44
38
  hash.merge!(liability: @liability.to_h) if @liability
45
39
  hash.merge!(dcc: @dcc.to_h) if @dcc
46
- if @mastercard_issuer_installments
47
- hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
48
- end
49
40
  hash
50
41
  end
51
42
  alias_method :to_h, :to_hash
@@ -6,7 +6,6 @@ module SixSaferpay
6
6
  :terminal_id,
7
7
  :payment,
8
8
  :payment_method,
9
- :payment_method_options,
10
9
  :payer,
11
10
  :notification
12
11
  )
@@ -17,14 +16,12 @@ module SixSaferpay
17
16
  terminal_id:,
18
17
  payment:,
19
18
  payment_method:,
20
- payment_method_options: nil,
21
19
  payer: nil,
22
20
  notification: )
23
21
  @request_header = request_header || SixSaferpay::RequestHeader.new()
24
22
  @terminal_id = terminal_id
25
23
  @payment = SixSaferpay::Payment.new(payment.to_h)
26
24
  @payment_method = payment_method
27
- @payment_method_options = SixSaferpay::PaymentMethodOptions.new(payment_method_options.to_h) if payment_method_options
28
25
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
29
26
  @notification = SixSaferpay::Notification.new(notification.to_h)
30
27
  end
@@ -35,7 +32,6 @@ module SixSaferpay
35
32
  hash.merge!(terminal_id: @terminal_id)
36
33
  hash.merge!(payment: @payment.to_h)
37
34
  hash.merge!(payment_method: @payment_method)
38
- hash.merge!(payment_method_options: @payment_method_options.to_h) if @payment_method_options
39
35
  hash.merge!(payer: @payer.to_h) if @payer
40
36
  hash.merge!(notification: @notification.to_h)
41
37
  hash
@@ -6,7 +6,6 @@ module SixSaferpay
6
6
  :terminal_id,
7
7
  :payment,
8
8
  :payment_means,
9
- :authentication,
10
9
  :register_alias,
11
10
  :payer
12
11
  )
@@ -16,7 +15,6 @@ module SixSaferpay
16
15
  terminal_id: nil,
17
16
  payment:,
18
17
  payment_means:,
19
- authentication: nil,
20
18
  register_alias: nil,
21
19
  payer: nil
22
20
  )
@@ -24,7 +22,6 @@ module SixSaferpay
24
22
  @terminal_id = SixSaferpay.config.terminal_id || terminal_id
25
23
  @payment = SixSaferpay::Payment.new(payment.to_h) if payment
26
24
  @payment_means = SixSaferpay::RequestPaymentMeans.new(payment_means.to_h) if payment_means
27
- @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
28
25
  @register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
29
26
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
30
27
  end
@@ -35,7 +32,6 @@ module SixSaferpay
35
32
  hash.merge!(terminal_id: @terminal_id) if @terminal_id
36
33
  hash.merge!(payment: @payment.to_h) if @payment
37
34
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
38
- hash.merge!(authentication: @authentication.to_h) if @authentication
39
35
  hash.merge!(register_alias: @register_alias.to_h) if @register_alias
40
36
  hash.merge!(payer: @payer.to_h) if @payer
41
37
  hash
@@ -6,7 +6,6 @@ module SixSaferpay
6
6
  :terminal_id,
7
7
  :payment,
8
8
  :transaction_reference,
9
- :authentication,
10
9
  :suppress_dcc
11
10
  )
12
11
 
@@ -15,14 +14,12 @@ module SixSaferpay
15
14
  terminal_id: nil,
16
15
  payment:,
17
16
  transaction_reference:,
18
- authentication: nil,
19
17
  suppress_dcc:
20
18
  )
21
19
  @request_header = request_header || SixSaferpay::RequestHeader.new()
22
20
  @terminal_id = terminal_id || SixSaferpay.config.terminal_id
23
21
  @payment = SixSaferpay::Payment.new(payment.to_h) if payment
24
22
  @transaction_reference = SixSaferpay::TransactionReference.new(transaction_reference.to_h) if transaction_reference
25
- @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
26
23
  @suppress_dcc = suppress_dcc
27
24
  end
28
25
 
@@ -32,7 +29,6 @@ module SixSaferpay
32
29
  hash.merge!(terminal_id: @terminal_id) if @terminal_id
33
30
  hash.merge!(payment: @payment.to_h) if @payment
34
31
  hash.merge!(transaction_reference: @transaction_reference.to_h) if @transaction_reference
35
- hash.merge!(authentication: @authentication.to_h) if @authentication
36
32
  hash.merge!(suppress_dcc: @suppress_dcc) if !@suppress_dcc.nil?
37
33
  hash
38
34
  end
@@ -7,8 +7,7 @@ module SixSaferpay
7
7
  :amount,
8
8
  :billpay,
9
9
  :pending_notification,
10
- :marketplace,
11
- :mastercard_issuer_installments
10
+ :marketplace
12
11
  )
13
12
 
14
13
 
@@ -17,8 +16,7 @@ module SixSaferpay
17
16
  amount: nil,
18
17
  billpay: nil,
19
18
  pending_notification: nil,
20
- marketplace: nil,
21
- mastercard_issuer_installments: nil
19
+ marketplace: nil
22
20
  )
23
21
  @request_header = request_header || SixSaferpay::RequestHeader.new()
24
22
  @transaction_reference = SixSaferpay::TransactionReference.new(transaction_reference.to_h) if transaction_reference
@@ -26,10 +24,6 @@ module SixSaferpay
26
24
  @billpay = SixSaferpay::Billpay.new(billpay.to_h) if billpay
27
25
  @pending_notification = SixSaferpay::PendingNotification.new(pending_notification.to_h) if pending_notification
28
26
  @marketplace = SixSaferpay::Marketplace.new(marketplace.to_h) if marketplace
29
- if mastercard_issuer_installments
30
- @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
31
- .new(mastercard_issuer_installments.to_h)
32
- end
33
27
  end
34
28
 
35
29
  def to_hash
@@ -40,9 +34,6 @@ module SixSaferpay
40
34
  hash.merge!(billpay: @billpay.to_h) if @billpay
41
35
  hash.merge!(pending_notification: @pending_notification.to_h) if @pending_notification
42
36
  hash.merge!(marketplace: @marketplace.to_h) if @marketplace
43
- if @mastercard_issuer_installments
44
- hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
45
- end
46
37
  hash
47
38
  end
48
39
  alias_method :to_h, :to_hash
@@ -8,7 +8,6 @@ module SixSaferpay
8
8
  :terminal_id,
9
9
  :payment,
10
10
  :payment_means,
11
- :authentication,
12
11
  :payer,
13
12
  :return_urls,
14
13
  :styling,
@@ -23,7 +22,6 @@ module SixSaferpay
23
22
  terminal_id: nil,
24
23
  payment:,
25
24
  payment_means: nil,
26
- authentication: nil,
27
25
  payer: nil,
28
26
  return_urls: nil,
29
27
  styling: nil,
@@ -36,7 +34,6 @@ module SixSaferpay
36
34
  @terminal_id = terminal_id || SixSaferpay.config.terminal_id
37
35
  @payment = SixSaferpay::Payment.new(payment.to_h) if payment
38
36
  @payment_means = SixSaferpay::RequestPaymentMeans.new(payment_means.to_h) if payment_means
39
- @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
40
37
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
41
38
  @return_urls = return_urls || SixSaferpay::ReturnUrls.new()
42
39
  @styling = SixSaferpay::Styling.new(styling.to_h) if styling
@@ -52,7 +49,6 @@ module SixSaferpay
52
49
  hash.merge!(terminal_id: @terminal_id) if @terminal_id
53
50
  hash.merge!(payment: @payment.to_h) if @payment
54
51
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
55
- hash.merge!(authentication: @authentication.to_h) if @authentication
56
52
  hash.merge!(payer: @payer.to_h) if @payer
57
53
  hash.merge!(return_urls: @return_urls.to_h ) if @return_urls
58
54
  hash.merge!(styling: @styling.to_h) if @styling
@@ -6,8 +6,7 @@ module SixSaferpay
6
6
  :transaction,
7
7
  :payment_means,
8
8
  :payer,
9
- :registration_result,
10
- :mastercard_issuer_installments
9
+ :registration_result
11
10
  )
12
11
 
13
12
 
@@ -15,18 +14,13 @@ module SixSaferpay
15
14
  transaction:,
16
15
  payment_means:,
17
16
  payer: nil,
18
- registration_result: nil,
19
- mastercard_issuer_installments: nil
17
+ registration_result: nil
20
18
  )
21
19
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
22
20
  @transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
23
21
  @payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h) if payment_means
24
22
  @payer = SixSaferpay::Payer.new(payer.to_h) if payer
25
23
  @registration_result = SixSaferpay::RegistrationResult.new(registration_result.to_h) if registration_result
26
- if mastercard_issuer_installments
27
- @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
28
- .new(mastercard_issuer_installments.to_h)
29
- end
30
24
  end
31
25
 
32
26
  def to_hash
@@ -36,9 +30,6 @@ module SixSaferpay
36
30
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
37
31
  hash.merge!(payer: @payer.to_h) if @payer
38
32
  hash.merge!(registration_result: @registration_result.to_h) if @registration_result
39
- if @mastercard_issuer_installments
40
- hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
41
- end
42
33
  hash
43
34
  end
44
35
  alias_method :to_h, :to_hash
@@ -8,8 +8,7 @@ module SixSaferpay
8
8
  :payer,
9
9
  :registration_result,
10
10
  :liability,
11
- :dcc,
12
- :mastercard_issuer_installments
11
+ :dcc
13
12
  )
14
13
 
15
14
 
@@ -19,8 +18,8 @@ module SixSaferpay
19
18
  payer: nil,
20
19
  registration_result: nil,
21
20
  liability: nil,
22
- dcc: nil,
23
- mastercard_issuer_installments: nil
21
+ dcc: nil
22
+
24
23
  )
25
24
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
26
25
  @transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
@@ -29,10 +28,6 @@ module SixSaferpay
29
28
  @registration_result = SixSaferpay::RegistrationResult.new(registration_result.to_h) if registration_result
30
29
  @liability = SixSaferpay::Liability.new(liability.to_h) if liability
31
30
  @dcc = SixSaferpay::Dcc.new(dcc.to_h) if dcc
32
- if mastercard_issuer_installments
33
- @mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
34
- .new(mastercard_issuer_installments.to_h)
35
- end
36
31
  end
37
32
 
38
33
  def to_hash
@@ -44,9 +39,6 @@ module SixSaferpay
44
39
  hash.merge!(registration_result: @registration_result.to_h) if @registration_result
45
40
  hash.merge!(liability: @liability.to_h) if @liability
46
41
  hash.merge!(dcc: @dcc.to_h) if @dcc
47
- if @mastercard_issuer_installments
48
- hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
49
- end
50
42
  hash
51
43
  end
52
44
  alias_method :to_h, :to_hash
@@ -11,7 +11,7 @@ module SixSaferpay
11
11
  def initialize(response_header:,
12
12
  transaction_id:,
13
13
  order_id: nil,
14
- date: nil
14
+ date: nile
15
15
  )
16
16
  @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
17
17
  @transaction_id = transaction_id
@@ -1,5 +1,5 @@
1
1
  module SixSaferpay
2
2
  module API
3
- VERSION = '1.16'
3
+ VERSION = '1.12'
4
4
  end
5
5
  end
@@ -17,23 +17,17 @@ module SixSaferpay
17
17
  hash = @response.body
18
18
  hash = JSON.parse(hash, symbolize_names: true)
19
19
  hash = transform_response_hash(hash)
20
- if @response.code == '200'
20
+ if @response.code == "200"
21
21
  @object.response_class.new(hash)
22
22
  else
23
23
  raise SixSaferpay::Error.new(hash)
24
24
  end
25
25
  end
26
26
 
27
- protected
28
-
29
- def header
30
- {"Content-Type" => 'application/json'}
31
- end
32
-
33
27
  private
34
28
 
35
29
  def request
36
- request = Net::HTTP::Post.new(uri.path, header)
30
+ request = Net::HTTP::Post.new(uri.path, {'Content-Type' => 'application/json'})
37
31
  hash = @object.to_h
38
32
  hash = transform_request_hash(hash)
39
33
  hash = hash.to_json