six_saferpay 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70e06359c6806fd94b3ab3f5e46f1bfa8d660a9b5f659fe4c9248ae8e487d170
4
- data.tar.gz: 2e6dd57cc9485c52224c682a7f474bce2a56d1508ec7533a5867f3a8b156453a
3
+ metadata.gz: ac114e774d2605409d5c85b4b85b99cdf803f0e4c5d324f751a7bd38c5b83a22
4
+ data.tar.gz: 4905fe7c6eb7e1a6772641989ff07af762b299b6729d94fc467de3e4a5c1c3ab
5
5
  SHA512:
6
- metadata.gz: 0e8c2fbd5b3bdb4a1d35a3653b3889f05d74000a0223ef5c43f977e658a65994e601dc7dc9d057f208419585280d7da86952a0a5472460a82b62184fdd0f52b1
7
- data.tar.gz: 736462b7a21c93ef66dfe4652060f8a2ea399030b811210615be4a826cd1c9e92109b7f46e6b8450e0e77df7feeecc5a2e3406bc2495ef67f3f632c636c87ce9
6
+ metadata.gz: 65713d7713684450b83e7fbda8aad24c2b136117a20fb1a93122d4d801fab6e13cccf4404538bd4381b349ae35b944a80dbce7ce394d1a69dadde61ad855cc44
7
+ data.tar.gz: dfac5c5b93fdc64da351dbe2675b84e7b90a0f72dd8229e2f499789d231001f3611ac32f462d794e1991f64ff29972bac14a8da71fc096f5b520f293c642942d
@@ -30,13 +30,13 @@ module SixSaferpay
30
30
 
31
31
  def to_hash
32
32
  hash = Hash.new
33
- hash.merge!(ResponseHeader: @response_header.to_h) if @response_header
34
- hash.merge!(Transaction: @transaction.to_h) if @transaction
35
- hash.merge!(PaymentMeans: @payment_means.to_h) if @payment_means
36
- hash.merge!(Payer: @payer.to_h) if @payer
37
- hash.merge!(RegistrationResult: @registration_result.to_h) if @registration_result
38
- hash.merge!(Liability: @liability.to_h) if @liability
39
- hash.merge!(Dcc: @dcc.to_h) if @dcc
33
+ hash.merge!(response_header: @response_header.to_h) if @response_header
34
+ hash.merge!(transaction: @transaction.to_h) if @transaction
35
+ hash.merge!(payment_means: @payment_means.to_h) if @payment_means
36
+ hash.merge!(payer: @payer.to_h) if @payer
37
+ hash.merge!(registration_result: @registration_result.to_h) if @registration_result
38
+ hash.merge!(liability: @liability.to_h) if @liability
39
+ hash.merge!(dcc: @dcc.to_h) if @dcc
40
40
  hash
41
41
  end
42
42
  alias_method :to_h, :to_hash
@@ -10,8 +10,8 @@ module SixSaferpay
10
10
 
11
11
  def to_hash
12
12
  body = Hash.new
13
- body.merge!(PaymentMethod: @payment_method) if @payment_method
14
- body.merge!(Name: @name)
13
+ body.merge!(payment_method: @payment_method) if @payment_method
14
+ body.merge!(name: @name)
15
15
  body
16
16
  end
17
17
  alias_method :to_h, :to_hash
@@ -9,7 +9,7 @@ module SixSaferpay
9
9
 
10
10
  def to_hash
11
11
  hash = Hash.new
12
- hash.merge!(PayerAmount: @payer_amount.to_h) if @payer_amount
12
+ hash.merge!(payer_amount: @payer_amount.to_h) if @payer_amount
13
13
  hash
14
14
  end
15
15
  alias_method :to_h, :to_hash
@@ -23,11 +23,11 @@ module SixSaferpay
23
23
 
24
24
  def to_hash
25
25
  body = Hash.new
26
- body.merge!(LiabilityShift: @liability_shift)
27
- body.merge!(LiableEntry: @liable_entity)
28
- body.merge!(ThreeDs: @three_ds) if @three_ds
29
- body.merge!(FraudFree: @fraud_free) if @fraud_free
30
- body.merge!(Dcc: @dcc) if @dcc
26
+ body.merge!(liability_shift: @liability_shift)
27
+ body.merge!(liable_entity: @liable_entity)
28
+ body.merge!(three_ds: @three_ds) if @three_ds
29
+ body.merge!(fraud_free: @fraud_free) if @fraud_free
30
+ body.merge!(dcc: @dcc) if @dcc
31
31
  body
32
32
  end
33
33
  alias_method :to_h, :to_hash
@@ -1,22 +1,4 @@
1
1
  module SixSaferpay
2
- class PayerAmount
3
-
4
- attr_accessor(:value,
5
- :currency_code
6
- )
7
-
8
- def initialize(value: , currency_code: )
9
- @value = value
10
- @currency_code = @currency_code
11
- end
12
-
13
- def to_hash
14
- hash = Hash.new
15
- hash.merge!(Value: @value) if @value
16
- hash.merge!(CurrencyCode: @currency_code) if @currency_code
17
- hash
18
- end
19
- alias_method :to_h, :to_hash
20
-
2
+ class PayerAmount < SixSaferpay::Amount
21
3
  end
22
4
  end
@@ -26,12 +26,12 @@ module SixSaferpay
26
26
 
27
27
  def to_hash
28
28
  body = Hash.new
29
- body.merge!(Brand: @brand.to_h)
30
- body.merge!(DisplayText: @display_text)
31
- body.merge!(Wallet: @wallet) if @wallet
32
- body.merge!(Card: @card.to_h) if @card
33
- body.merge!(BankAccount: @bank_account) if @bank_account
34
- body.merge!(Twint: @twint.to_h) if @twint
29
+ body.merge!(brand: @brand.to_h)
30
+ body.merge!(display_text: @display_text)
31
+ body.merge!(wallet: @wallet) if @wallet
32
+ body.merge!(card: @card.to_h) if @card
33
+ body.merge!(bank_account: @bank_account) if @bank_account
34
+ body.merge!(twint: @twint.to_h) if @twint
35
35
  body
36
36
  end
37
37
  alias_method :to_h, :to_hash
@@ -18,9 +18,9 @@ module SixSaferpay
18
18
 
19
19
  def to_hash
20
20
  hash = Hash.new
21
- hash.merge!(Success: @sucess) if @success
22
- hash.merge!(Alias: @alias.to_h) if @alias
23
- hash.merge!(Error: @error.to_h) if @error
21
+ hash.merge!(sucess: @sucess) if @success
22
+ hash.merge!(alias: @alias.to_h) if @alias
23
+ hash.merge!(error: @error.to_h) if @error
24
24
  end
25
25
 
26
26
  end
@@ -10,8 +10,8 @@ module SixSaferpay
10
10
 
11
11
  def to_hash
12
12
  body = Hash.new
13
- body.merge!(RequestId: @request_id)
14
- body.merge!(SpecVersion: @spec_version)
13
+ body.merge!(request_id: @request_id)
14
+ body.merge!(spec_version: @spec_version)
15
15
  body
16
16
  end
17
17
  alias_method :to_h, :to_hash
@@ -48,19 +48,19 @@ module SixSaferpay
48
48
 
49
49
  def to_hash
50
50
  body = Hash.new
51
- body.merge!(Type: @type)
52
- body.merge!(Status: @status)
53
- body.merge!(Id: @id)
54
- body.merge!(CaptureId: @capture_id) if @capture_id
55
- body.merge!(Date: @date)
56
- body.merge!(Amount: @amount.to_h)
57
- body.merge!(OrderId: @order_id) if @order_id
58
- body.merge!(AcquirerName: @acquirer_name) if @acquirer_name
59
- body.merge!(AcquirerReference: @acquirer_reference) if @acquirer_reference
60
- body.merge!(SixTransactionReference: @six_transaction_reference)
61
- body.merge!(ApprovalCode: @approval_code) if @approval_code
62
- body.merge!(DirectDebit: @direct_debit.to_h) if @direct_debit
63
- body.merge!(Invoice: @invoice.to_h) if @invoice
51
+ body.merge!(type: @type)
52
+ body.merge!(status: @status)
53
+ body.merge!(id: @id)
54
+ body.merge!(capture_id: @capture_id) if @capture_id
55
+ body.merge!(date: @date)
56
+ body.merge!(amount: @amount.to_h)
57
+ body.merge!(order_id: @order_id) if @order_id
58
+ body.merge!(acquirer_name: @acquirer_name) if @acquirer_name
59
+ body.merge!(acquirer_reference: @acquirer_reference) if @acquirer_reference
60
+ body.merge!(six_transaction_reference: @six_transaction_reference)
61
+ body.merge!(approval_code: @approval_code) if @approval_code
62
+ body.merge!(direct_debit: @direct_debit.to_h) if @direct_debit
63
+ body.merge!(invoice: @invoice.to_h) if @invoice
64
64
  body
65
65
  end
66
66
  alias_method :to_h, :to_hash
@@ -1,3 +1,3 @@
1
1
  module SixSaferpay
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
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: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Langenegger