acquiring-sdk-ruby 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/acquiring-sdk-ruby.gemspec +1 -1
  3. data/lib/worldline/acquiring/sdk/communication/metadata_provider.rb +1 -1
  4. data/lib/worldline/acquiring/sdk/v1/acquirer/merchant/balanceinquiries/balance_inquiries_client.rb +60 -0
  5. data/lib/worldline/acquiring/sdk/v1/acquirer/merchant/balanceinquiries.rb +4 -0
  6. data/lib/worldline/acquiring/sdk/v1/acquirer/merchant/merchant_client.rb +8 -0
  7. data/lib/worldline/acquiring/sdk/v1/domain/api_account_verification_request.rb +9 -0
  8. data/lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_request.rb +79 -0
  9. data/lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb +87 -0
  10. data/lib/worldline/acquiring/sdk/v1/domain/api_capture_request.rb +18 -0
  11. data/lib/worldline/acquiring/sdk/v1/domain/api_capture_request_for_refund.rb +18 -0
  12. data/lib/worldline/acquiring/sdk/v1/domain/api_increment_request.rb +9 -0
  13. data/lib/worldline/acquiring/sdk/v1/domain/api_payment_refund_request.rb +9 -0
  14. data/lib/worldline/acquiring/sdk/v1/domain/api_payment_request.rb +9 -0
  15. data/lib/worldline/acquiring/sdk/v1/domain/api_payment_response.rb +12 -0
  16. data/lib/worldline/acquiring/sdk/v1/domain/api_payment_reversal_request.rb +9 -0
  17. data/lib/worldline/acquiring/sdk/v1/domain/api_refund_response.rb +12 -0
  18. data/lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb +9 -0
  19. data/lib/worldline/acquiring/sdk/v1/domain/card_data_for_dcc.rb +7 -0
  20. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data.rb +7 -0
  21. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_balance_inquiry.rb +89 -0
  22. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb +14 -9
  23. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource.rb +0 -9
  24. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_response.rb +3 -3
  25. data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_verification.rb +16 -0
  26. data/lib/worldline/acquiring/sdk/v1/domain/emv_data_item.rb +41 -0
  27. data/lib/worldline/acquiring/sdk/v1/domain/payment_references.rb +0 -7
  28. data/lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data.rb +45 -5
  29. data/lib/worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response.rb +41 -0
  30. data/lib/worldline/acquiring/sdk/v1/domain/terminal_data.rb +80 -0
  31. metadata +10 -2
@@ -7,6 +7,7 @@ require 'worldline/acquiring/sdk/domain/data_object'
7
7
  require 'worldline/acquiring/sdk/v1/domain/amount_data'
8
8
  require 'worldline/acquiring/sdk/v1/domain/api_references_for_responses'
9
9
  require 'worldline/acquiring/sdk/v1/domain/card_payment_data_for_resource'
10
+ require 'worldline/acquiring/sdk/v1/domain/emv_data_item'
10
11
 
11
12
  module Worldline
12
13
  module Acquiring
@@ -15,6 +16,7 @@ module Worldline
15
16
  module Domain
16
17
  # @attr [String] authorization_code
17
18
  # @attr [Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResource] card_payment_data
19
+ # @attr [Array<Worldline::Acquiring::SDK::V1::Domain::EmvDataItem>] emv_data
18
20
  # @attr [String] operation_id
19
21
  # @attr [String] referenced_payment_id
20
22
  # @attr [Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses] references
@@ -33,6 +35,8 @@ module Worldline
33
35
 
34
36
  attr_accessor :card_payment_data
35
37
 
38
+ attr_accessor :emv_data
39
+
36
40
  attr_accessor :operation_id
37
41
 
38
42
  attr_accessor :referenced_payment_id
@@ -62,6 +66,7 @@ module Worldline
62
66
  hash = super
63
67
  hash['authorizationCode'] = @authorization_code unless @authorization_code.nil?
64
68
  hash['cardPaymentData'] = @card_payment_data.to_h unless @card_payment_data.nil?
69
+ hash['emvData'] = @emv_data.collect{|val| val.to_h} unless @emv_data.nil?
65
70
  hash['operationId'] = @operation_id unless @operation_id.nil?
66
71
  hash['referencedPaymentId'] = @referenced_payment_id unless @referenced_payment_id.nil?
67
72
  hash['references'] = @references.to_h unless @references.nil?
@@ -86,6 +91,13 @@ module Worldline
86
91
  raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentData']] unless hash['cardPaymentData'].is_a? Hash
87
92
  @card_payment_data = Worldline::Acquiring::SDK::V1::Domain::CardPaymentDataForResource.new_from_hash(hash['cardPaymentData'])
88
93
  end
94
+ if hash.has_key? 'emvData'
95
+ raise TypeError, "value '%s' is not an Array" % [hash['emvData']] unless hash['emvData'].is_a? Array
96
+ @emv_data = []
97
+ hash['emvData'].each do |e|
98
+ @emv_data << Worldline::Acquiring::SDK::V1::Domain::EmvDataItem.new_from_hash(e)
99
+ end
100
+ end
89
101
  if hash.has_key? 'operationId'
90
102
  @operation_id = hash['operationId']
91
103
  end
@@ -4,6 +4,7 @@
4
4
  require 'date'
5
5
 
6
6
  require 'worldline/acquiring/sdk/domain/data_object'
7
+ require 'worldline/acquiring/sdk/v1/domain/terminal_data'
7
8
 
8
9
  module Worldline
9
10
  module Acquiring
@@ -12,6 +13,7 @@ module Worldline
12
13
  module Domain
13
14
  # @attr [String] operation_id
14
15
  # @attr [String] reason
16
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::TerminalData] terminal_data
15
17
  # @attr [DateTime] transaction_timestamp
16
18
  class ApiTechnicalReversalRequest < Worldline::Acquiring::SDK::Domain::DataObject
17
19
 
@@ -19,6 +21,8 @@ module Worldline
19
21
 
20
22
  attr_accessor :reason
21
23
 
24
+ attr_accessor :terminal_data
25
+
22
26
  attr_accessor :transaction_timestamp
23
27
 
24
28
  # @return (Hash)
@@ -26,6 +30,7 @@ module Worldline
26
30
  hash = super
27
31
  hash['operationId'] = @operation_id unless @operation_id.nil?
28
32
  hash['reason'] = @reason unless @reason.nil?
33
+ hash['terminalData'] = @terminal_data.to_h unless @terminal_data.nil?
29
34
  hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil?
30
35
  hash
31
36
  end
@@ -38,6 +43,10 @@ module Worldline
38
43
  if hash.has_key? 'reason'
39
44
  @reason = hash['reason']
40
45
  end
46
+ if hash.has_key? 'terminalData'
47
+ raise TypeError, "value '%s' is not a Hash" % [hash['terminalData']] unless hash['terminalData'].is_a? Hash
48
+ @terminal_data = Worldline::Acquiring::SDK::V1::Domain::TerminalData.new_from_hash(hash['terminalData'])
49
+ end
41
50
  if hash.has_key? 'transactionTimestamp'
42
51
  @transaction_timestamp = DateTime.parse(hash['transactionTimestamp'])
43
52
  end
@@ -11,6 +11,7 @@ module Worldline
11
11
  # @attr [String] bin
12
12
  # @attr [String] brand
13
13
  # @attr [String] card_country_code
14
+ # @attr [String] card_entry_mode
14
15
  class CardDataForDcc < Worldline::Acquiring::SDK::Domain::DataObject
15
16
 
16
17
  attr_accessor :bin
@@ -19,12 +20,15 @@ module Worldline
19
20
 
20
21
  attr_accessor :card_country_code
21
22
 
23
+ attr_accessor :card_entry_mode
24
+
22
25
  # @return (Hash)
23
26
  def to_h
24
27
  hash = super
25
28
  hash['bin'] = @bin unless @bin.nil?
26
29
  hash['brand'] = @brand unless @brand.nil?
27
30
  hash['cardCountryCode'] = @card_country_code unless @card_country_code.nil?
31
+ hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
28
32
  hash
29
33
  end
30
34
 
@@ -39,6 +43,9 @@ module Worldline
39
43
  if hash.has_key? 'cardCountryCode'
40
44
  @card_country_code = hash['cardCountryCode']
41
45
  end
46
+ if hash.has_key? 'cardEntryMode'
47
+ @card_entry_mode = hash['cardEntryMode']
48
+ end
42
49
  end
43
50
  end
44
51
  end
@@ -15,6 +15,7 @@ module Worldline
15
15
  module Domain
16
16
  # @attr [true/false] allow_partial_approval
17
17
  # @attr [String] brand
18
+ # @attr [String] brand_selector
18
19
  # @attr [true/false] capture_immediately
19
20
  # @attr [Worldline::Acquiring::SDK::V1::Domain::PlainCardData] card_data
20
21
  # @attr [String] card_entry_mode
@@ -30,6 +31,8 @@ module Worldline
30
31
 
31
32
  attr_accessor :brand
32
33
 
34
+ attr_accessor :brand_selector
35
+
33
36
  attr_accessor :capture_immediately
34
37
 
35
38
  attr_accessor :card_data
@@ -53,6 +56,7 @@ module Worldline
53
56
  hash = super
54
57
  hash['allowPartialApproval'] = @allow_partial_approval unless @allow_partial_approval.nil?
55
58
  hash['brand'] = @brand unless @brand.nil?
59
+ hash['brandSelector'] = @brand_selector unless @brand_selector.nil?
56
60
  hash['captureImmediately'] = @capture_immediately unless @capture_immediately.nil?
57
61
  hash['cardData'] = @card_data.to_h unless @card_data.nil?
58
62
  hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
@@ -73,6 +77,9 @@ module Worldline
73
77
  if hash.has_key? 'brand'
74
78
  @brand = hash['brand']
75
79
  end
80
+ if hash.has_key? 'brandSelector'
81
+ @brand_selector = hash['brandSelector']
82
+ end
76
83
  if hash.has_key? 'captureImmediately'
77
84
  @capture_immediately = hash['captureImmediately']
78
85
  end
@@ -0,0 +1,89 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'worldline/acquiring/sdk/domain/data_object'
5
+ require 'worldline/acquiring/sdk/v1/domain/e_commerce_data'
6
+ require 'worldline/acquiring/sdk/v1/domain/plain_card_data'
7
+ require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
8
+
9
+ module Worldline
10
+ module Acquiring
11
+ module SDK
12
+ module V1
13
+ module Domain
14
+ # @attr [String] brand
15
+ # @attr [String] brand_selector
16
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::PlainCardData] card_data
17
+ # @attr [String] card_entry_mode
18
+ # @attr [String] cardholder_verification_method
19
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::ECommerceData] ecommerce_data
20
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
21
+ # @attr [String] wallet_id
22
+ class CardPaymentDataForBalanceInquiry < Worldline::Acquiring::SDK::Domain::DataObject
23
+
24
+ attr_accessor :brand
25
+
26
+ attr_accessor :brand_selector
27
+
28
+ attr_accessor :card_data
29
+
30
+ attr_accessor :card_entry_mode
31
+
32
+ attr_accessor :cardholder_verification_method
33
+
34
+ attr_accessor :ecommerce_data
35
+
36
+ attr_accessor :point_of_sale_data
37
+
38
+ attr_accessor :wallet_id
39
+
40
+ # @return (Hash)
41
+ def to_h
42
+ hash = super
43
+ hash['brand'] = @brand unless @brand.nil?
44
+ hash['brandSelector'] = @brand_selector unless @brand_selector.nil?
45
+ hash['cardData'] = @card_data.to_h unless @card_data.nil?
46
+ hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
47
+ hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil?
48
+ hash['ecommerceData'] = @ecommerce_data.to_h unless @ecommerce_data.nil?
49
+ hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
50
+ hash['walletId'] = @wallet_id unless @wallet_id.nil?
51
+ hash
52
+ end
53
+
54
+ def from_hash(hash)
55
+ super
56
+ if hash.has_key? 'brand'
57
+ @brand = hash['brand']
58
+ end
59
+ if hash.has_key? 'brandSelector'
60
+ @brand_selector = hash['brandSelector']
61
+ end
62
+ if hash.has_key? 'cardData'
63
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardData']] unless hash['cardData'].is_a? Hash
64
+ @card_data = Worldline::Acquiring::SDK::V1::Domain::PlainCardData.new_from_hash(hash['cardData'])
65
+ end
66
+ if hash.has_key? 'cardEntryMode'
67
+ @card_entry_mode = hash['cardEntryMode']
68
+ end
69
+ if hash.has_key? 'cardholderVerificationMethod'
70
+ @cardholder_verification_method = hash['cardholderVerificationMethod']
71
+ end
72
+ if hash.has_key? 'ecommerceData'
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['ecommerceData']] unless hash['ecommerceData'].is_a? Hash
74
+ @ecommerce_data = Worldline::Acquiring::SDK::V1::Domain::ECommerceData.new_from_hash(hash['ecommerceData'])
75
+ end
76
+ if hash.has_key? 'pointOfSaleData'
77
+ raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
78
+ @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
79
+ end
80
+ if hash.has_key? 'walletId'
81
+ @wallet_id = hash['walletId']
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
89
+ end
@@ -4,7 +4,6 @@
4
4
  require 'worldline/acquiring/sdk/domain/data_object'
5
5
  require 'worldline/acquiring/sdk/v1/domain/network_token_data'
6
6
  require 'worldline/acquiring/sdk/v1/domain/plain_card_data'
7
- require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
8
7
 
9
8
  module Worldline
10
9
  module Acquiring
@@ -12,25 +11,28 @@ module Worldline
12
11
  module V1
13
12
  module Domain
14
13
  # @attr [String] brand
14
+ # @attr [String] brand_selector
15
15
  # @attr [true/false] capture_immediately
16
16
  # @attr [Worldline::Acquiring::SDK::V1::Domain::PlainCardData] card_data
17
17
  # @attr [String] card_entry_mode
18
+ # @attr [String] cardholder_verification_method
18
19
  # @attr [Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData] network_token_data
19
- # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
20
20
  # @attr [String] wallet_id
21
21
  class CardPaymentDataForRefund < Worldline::Acquiring::SDK::Domain::DataObject
22
22
 
23
23
  attr_accessor :brand
24
24
 
25
+ attr_accessor :brand_selector
26
+
25
27
  attr_accessor :capture_immediately
26
28
 
27
29
  attr_accessor :card_data
28
30
 
29
31
  attr_accessor :card_entry_mode
30
32
 
31
- attr_accessor :network_token_data
33
+ attr_accessor :cardholder_verification_method
32
34
 
33
- attr_accessor :point_of_sale_data
35
+ attr_accessor :network_token_data
34
36
 
35
37
  attr_accessor :wallet_id
36
38
 
@@ -38,11 +40,12 @@ module Worldline
38
40
  def to_h
39
41
  hash = super
40
42
  hash['brand'] = @brand unless @brand.nil?
43
+ hash['brandSelector'] = @brand_selector unless @brand_selector.nil?
41
44
  hash['captureImmediately'] = @capture_immediately unless @capture_immediately.nil?
42
45
  hash['cardData'] = @card_data.to_h unless @card_data.nil?
43
46
  hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
47
+ hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil?
44
48
  hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
45
- hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
46
49
  hash['walletId'] = @wallet_id unless @wallet_id.nil?
47
50
  hash
48
51
  end
@@ -52,6 +55,9 @@ module Worldline
52
55
  if hash.has_key? 'brand'
53
56
  @brand = hash['brand']
54
57
  end
58
+ if hash.has_key? 'brandSelector'
59
+ @brand_selector = hash['brandSelector']
60
+ end
55
61
  if hash.has_key? 'captureImmediately'
56
62
  @capture_immediately = hash['captureImmediately']
57
63
  end
@@ -62,14 +68,13 @@ module Worldline
62
68
  if hash.has_key? 'cardEntryMode'
63
69
  @card_entry_mode = hash['cardEntryMode']
64
70
  end
71
+ if hash.has_key? 'cardholderVerificationMethod'
72
+ @cardholder_verification_method = hash['cardholderVerificationMethod']
73
+ end
65
74
  if hash.has_key? 'networkTokenData'
66
75
  raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
67
76
  @network_token_data = Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
68
77
  end
69
- if hash.has_key? 'pointOfSaleData'
70
- raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
71
- @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
72
- end
73
78
  if hash.has_key? 'walletId'
74
79
  @wallet_id = hash['walletId']
75
80
  end
@@ -2,7 +2,6 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'worldline/acquiring/sdk/domain/data_object'
5
- require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
6
5
 
7
6
  module Worldline
8
7
  module Acquiring
@@ -10,18 +9,14 @@ module Worldline
10
9
  module V1
11
10
  module Domain
12
11
  # @attr [String] brand
13
- # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
14
12
  class CardPaymentDataForResource < Worldline::Acquiring::SDK::Domain::DataObject
15
13
 
16
14
  attr_accessor :brand
17
15
 
18
- attr_accessor :point_of_sale_data
19
-
20
16
  # @return (Hash)
21
17
  def to_h
22
18
  hash = super
23
19
  hash['brand'] = @brand unless @brand.nil?
24
- hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
25
20
  hash
26
21
  end
27
22
 
@@ -30,10 +25,6 @@ module Worldline
30
25
  if hash.has_key? 'brand'
31
26
  @brand = hash['brand']
32
27
  end
33
- if hash.has_key? 'pointOfSaleData'
34
- raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
35
- @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
36
- end
37
28
  end
38
29
  end
39
30
  end
@@ -3,7 +3,7 @@
3
3
  #
4
4
  require 'worldline/acquiring/sdk/domain/data_object'
5
5
  require 'worldline/acquiring/sdk/v1/domain/e_commerce_data_for_response'
6
- require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
6
+ require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data_for_response'
7
7
 
8
8
  module Worldline
9
9
  module Acquiring
@@ -12,7 +12,7 @@ module Worldline
12
12
  module Domain
13
13
  # @attr [String] brand
14
14
  # @attr [Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForResponse] ecommerce_data
15
- # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
15
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse] point_of_sale_data
16
16
  class CardPaymentDataForResponse < Worldline::Acquiring::SDK::Domain::DataObject
17
17
 
18
18
  attr_accessor :brand
@@ -41,7 +41,7 @@ module Worldline
41
41
  end
42
42
  if hash.has_key? 'pointOfSaleData'
43
43
  raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
44
- @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
44
+ @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleDataForResponse.new_from_hash(hash['pointOfSaleData'])
45
45
  end
46
46
  end
47
47
  end
@@ -6,6 +6,7 @@ require 'worldline/acquiring/sdk/v1/domain/card_on_file_data'
6
6
  require 'worldline/acquiring/sdk/v1/domain/e_commerce_data_for_account_verification'
7
7
  require 'worldline/acquiring/sdk/v1/domain/network_token_data'
8
8
  require 'worldline/acquiring/sdk/v1/domain/plain_card_data'
9
+ require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
9
10
 
10
11
  module Worldline
11
12
  module Acquiring
@@ -13,17 +14,21 @@ module Worldline
13
14
  module V1
14
15
  module Domain
15
16
  # @attr [String] brand
17
+ # @attr [String] brand_selector
16
18
  # @attr [Worldline::Acquiring::SDK::V1::Domain::PlainCardData] card_data
17
19
  # @attr [String] card_entry_mode
18
20
  # @attr [Worldline::Acquiring::SDK::V1::Domain::CardOnFileData] card_on_file_data
19
21
  # @attr [String] cardholder_verification_method
20
22
  # @attr [Worldline::Acquiring::SDK::V1::Domain::ECommerceDataForAccountVerification] ecommerce_data
21
23
  # @attr [Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData] network_token_data
24
+ # @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
22
25
  # @attr [String] wallet_id
23
26
  class CardPaymentDataForVerification < Worldline::Acquiring::SDK::Domain::DataObject
24
27
 
25
28
  attr_accessor :brand
26
29
 
30
+ attr_accessor :brand_selector
31
+
27
32
  attr_accessor :card_data
28
33
 
29
34
  attr_accessor :card_entry_mode
@@ -36,18 +41,22 @@ module Worldline
36
41
 
37
42
  attr_accessor :network_token_data
38
43
 
44
+ attr_accessor :point_of_sale_data
45
+
39
46
  attr_accessor :wallet_id
40
47
 
41
48
  # @return (Hash)
42
49
  def to_h
43
50
  hash = super
44
51
  hash['brand'] = @brand unless @brand.nil?
52
+ hash['brandSelector'] = @brand_selector unless @brand_selector.nil?
45
53
  hash['cardData'] = @card_data.to_h unless @card_data.nil?
46
54
  hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
47
55
  hash['cardOnFileData'] = @card_on_file_data.to_h unless @card_on_file_data.nil?
48
56
  hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil?
49
57
  hash['ecommerceData'] = @ecommerce_data.to_h unless @ecommerce_data.nil?
50
58
  hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
59
+ hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
51
60
  hash['walletId'] = @wallet_id unless @wallet_id.nil?
52
61
  hash
53
62
  end
@@ -57,6 +66,9 @@ module Worldline
57
66
  if hash.has_key? 'brand'
58
67
  @brand = hash['brand']
59
68
  end
69
+ if hash.has_key? 'brandSelector'
70
+ @brand_selector = hash['brandSelector']
71
+ end
60
72
  if hash.has_key? 'cardData'
61
73
  raise TypeError, "value '%s' is not a Hash" % [hash['cardData']] unless hash['cardData'].is_a? Hash
62
74
  @card_data = Worldline::Acquiring::SDK::V1::Domain::PlainCardData.new_from_hash(hash['cardData'])
@@ -79,6 +91,10 @@ module Worldline
79
91
  raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
80
92
  @network_token_data = Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
81
93
  end
94
+ if hash.has_key? 'pointOfSaleData'
95
+ raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
96
+ @point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
97
+ end
82
98
  if hash.has_key? 'walletId'
83
99
  @wallet_id = hash['walletId']
84
100
  end
@@ -0,0 +1,41 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'worldline/acquiring/sdk/domain/data_object'
5
+
6
+ module Worldline
7
+ module Acquiring
8
+ module SDK
9
+ module V1
10
+ module Domain
11
+ # @attr [String] tag
12
+ # @attr [String] value
13
+ class EmvDataItem < Worldline::Acquiring::SDK::Domain::DataObject
14
+
15
+ attr_accessor :tag
16
+
17
+ attr_accessor :value
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['tag'] = @tag unless @tag.nil?
23
+ hash['value'] = @value unless @value.nil?
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key? 'tag'
30
+ @tag = hash['tag']
31
+ end
32
+ if hash.has_key? 'value'
33
+ @value = hash['value']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -10,21 +10,17 @@ module Worldline
10
10
  module Domain
11
11
  # @attr [String] dynamic_descriptor
12
12
  # @attr [String] merchant_reference
13
- # @attr [String] retrieval_reference_number
14
13
  class PaymentReferences < Worldline::Acquiring::SDK::Domain::DataObject
15
14
 
16
15
  attr_accessor :dynamic_descriptor
17
16
 
18
17
  attr_accessor :merchant_reference
19
18
 
20
- attr_accessor :retrieval_reference_number
21
-
22
19
  # @return (Hash)
23
20
  def to_h
24
21
  hash = super
25
22
  hash['dynamicDescriptor'] = @dynamic_descriptor unless @dynamic_descriptor.nil?
26
23
  hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
27
- hash['retrievalReferenceNumber'] = @retrieval_reference_number unless @retrieval_reference_number.nil?
28
24
  hash
29
25
  end
30
26
 
@@ -36,9 +32,6 @@ module Worldline
36
32
  if hash.has_key? 'merchantReference'
37
33
  @merchant_reference = hash['merchantReference']
38
34
  end
39
- if hash.has_key? 'retrievalReferenceNumber'
40
- @retrieval_reference_number = hash['retrievalReferenceNumber']
41
- end
42
35
  end
43
36
  end
44
37
  end
@@ -2,28 +2,68 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'worldline/acquiring/sdk/domain/data_object'
5
+ require 'worldline/acquiring/sdk/v1/domain/emv_data_item'
5
6
 
6
7
  module Worldline
7
8
  module Acquiring
8
9
  module SDK
9
10
  module V1
10
11
  module Domain
11
- # @attr [String] terminal_id
12
+ # @attr [Array<Worldline::Acquiring::SDK::V1::Domain::EmvDataItem>] emv_data
13
+ # @attr [String] encrypted_pin_block
14
+ # @attr [true/false] is_response_to_pin_request
15
+ # @attr [true/false] is_retry_with_the_same_operation_id
16
+ # @attr [String] pin_master_key_reference
17
+ # @attr [String] track2_data
12
18
  class PointOfSaleData < Worldline::Acquiring::SDK::Domain::DataObject
13
19
 
14
- attr_accessor :terminal_id
20
+ attr_accessor :emv_data
21
+
22
+ attr_accessor :encrypted_pin_block
23
+
24
+ attr_accessor :is_response_to_pin_request
25
+
26
+ attr_accessor :is_retry_with_the_same_operation_id
27
+
28
+ attr_accessor :pin_master_key_reference
29
+
30
+ attr_accessor :track2_data
15
31
 
16
32
  # @return (Hash)
17
33
  def to_h
18
34
  hash = super
19
- hash['terminalId'] = @terminal_id unless @terminal_id.nil?
35
+ hash['emvData'] = @emv_data.collect{|val| val.to_h} unless @emv_data.nil?
36
+ hash['encryptedPinBlock'] = @encrypted_pin_block unless @encrypted_pin_block.nil?
37
+ hash['isResponseToPinRequest'] = @is_response_to_pin_request unless @is_response_to_pin_request.nil?
38
+ hash['isRetryWithTheSameOperationId'] = @is_retry_with_the_same_operation_id unless @is_retry_with_the_same_operation_id.nil?
39
+ hash['pinMasterKeyReference'] = @pin_master_key_reference unless @pin_master_key_reference.nil?
40
+ hash['track2Data'] = @track2_data unless @track2_data.nil?
20
41
  hash
21
42
  end
22
43
 
23
44
  def from_hash(hash)
24
45
  super
25
- if hash.has_key? 'terminalId'
26
- @terminal_id = hash['terminalId']
46
+ if hash.has_key? 'emvData'
47
+ raise TypeError, "value '%s' is not an Array" % [hash['emvData']] unless hash['emvData'].is_a? Array
48
+ @emv_data = []
49
+ hash['emvData'].each do |e|
50
+ @emv_data << Worldline::Acquiring::SDK::V1::Domain::EmvDataItem.new_from_hash(e)
51
+ end
52
+ end
53
+ if hash.has_key? 'encryptedPinBlock'
54
+ @encrypted_pin_block = hash['encryptedPinBlock']
55
+ end
56
+ if hash.has_key? 'isResponseToPinRequest'
57
+ @is_response_to_pin_request = hash['isResponseToPinRequest']
58
+ end
59
+ if hash.has_key? 'isRetryWithTheSameOperationId'
60
+ @is_retry_with_the_same_operation_id = hash['isRetryWithTheSameOperationId']
61
+ end
62
+ if hash.has_key? 'pinMasterKeyReference'
63
+ @pin_master_key_reference = hash['pinMasterKeyReference']
64
+ end
65
+ if hash.has_key? 'track2Data'
66
+ @track2_data = hash['track2Data']
27
67
  end
28
68
  end
29
69
  end
@@ -0,0 +1,41 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'worldline/acquiring/sdk/domain/data_object'
5
+
6
+ module Worldline
7
+ module Acquiring
8
+ module SDK
9
+ module V1
10
+ module Domain
11
+ # @attr [String] pan_last4_digits
12
+ # @attr [Integer] pin_retry_counter
13
+ class PointOfSaleDataForResponse < Worldline::Acquiring::SDK::Domain::DataObject
14
+
15
+ attr_accessor :pan_last4_digits
16
+
17
+ attr_accessor :pin_retry_counter
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['panLast4Digits'] = @pan_last4_digits unless @pan_last4_digits.nil?
23
+ hash['pinRetryCounter'] = @pin_retry_counter unless @pin_retry_counter.nil?
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key? 'panLast4Digits'
30
+ @pan_last4_digits = hash['panLast4Digits']
31
+ end
32
+ if hash.has_key? 'pinRetryCounter'
33
+ @pin_retry_counter = hash['pinRetryCounter']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end