mastercard_psp_payment 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
  SHA1:
3
- metadata.gz: 5c9e7bf04c39bd6f7a95228ec447c528f67aa9e9
4
- data.tar.gz: 1a7cfbede76410a4911ca4d870c5364b611d0f87
3
+ metadata.gz: 182c09a742f553a662d38af665edb571de22924e
4
+ data.tar.gz: d72c89036beece93a2e79bf9ff46125cebda16c4
5
5
  SHA512:
6
- metadata.gz: 4f05c82a35e0973a2f59c21ed032071f9adee747fa43a3195e06e3ac0d49a4403b90e83280fa8f072576a4f44a8e8f3d4de3c62afeb203b72c9d9c60e8be55e5
7
- data.tar.gz: 1b9d43ed6c71e64354800efe968df788fde0f6535da20a9bac67d9e2aaf42f90fb47ef002574848b2432890088154680512ed71f6a1c098a39a84ab367c39f74
6
+ metadata.gz: 84e8322d58f8c83e27ad0d334865c8ff72d2f663f180352f2d0bb7731b7f4a88e023d692c3b858213ad692c35c4268908c1ecf1d78c15fbfb25de0433a1fe30c
7
+ data.tar.gz: d35667f1249486e73243bdbad0601308a4272dac40f54c5a8198826152752cc7f3b8a4deb4a9a1d8902afa9dfaf7f8a59a3a1295ee5f45d549b704273d42b276
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018, MasterCard International Incorporated
1
+ Copyright (c) 2018, Mastercard International Incorporated
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are
@@ -12,8 +12,9 @@ module MastercardPspPayment
12
12
 
13
13
 
14
14
  # PSP PaymentData Service
15
- # This service is used by PSP to retrieve the consumer's payment, shipping address, and personal information.
15
+ # This service is used by PSP to retrieve the consumer's payment, shipping address, and personal information.
16
16
  # @param transaction_id This is a transaction identifier.
17
+
17
18
  # @param api_config Optional ApiConfig object specifying configuration : consumer key, private key, host URL.
18
19
  # @return [PaymentData]
19
20
  def self.show(transaction_id, api_config = nil)
@@ -161,6 +161,8 @@ module MastercardPspPayment
161
161
  DateTime.parse(value)
162
162
  when :Date
163
163
  Date.parse(value)
164
+ when :Object
165
+ value
164
166
  when :String
165
167
  value.to_s
166
168
  when :Integer
@@ -181,7 +183,7 @@ module MastercardPspPayment
181
183
  v_type = Regexp.last_match[:v_type]
182
184
  {}.tap do |hash|
183
185
  value.each do |k, v|
184
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
185
187
  end
186
188
  end
187
189
  else # model
@@ -194,7 +196,7 @@ module MastercardPspPayment
194
196
  to_hash.to_s
195
197
  end
196
198
 
197
- # to_body is an alias to to_body (backward compatibility)
199
+ # to_body is an alias to to_body (backward compatibility))
198
200
  def to_body
199
201
  to_hash
200
202
  end
@@ -45,6 +45,18 @@ module MastercardPspPayment
45
45
  # @return [String] the transaction identifier resulting from authentication processing.
46
46
  xml_accessor :xid, :from =>"xid"
47
47
 
48
+ # @!attribute aav
49
+ # @return [String] the accountholder authentication value resulting from authentication processing.
50
+ xml_accessor :aav, :from =>"aav"
51
+
52
+ # @!attribute sli
53
+ # @return [String] the security level indicator resulting from authentication processing.
54
+ xml_accessor :sli, :from =>"sli"
55
+
56
+ # @!attribute card_verification_status
57
+ # @return [String] the card verification status resulting from authentication processing.
58
+ xml_accessor :card_verification_status, :from =>"cardVerificationStatus"
59
+
48
60
 
49
61
  # Attribute mapping from ruby-style variable name to JSON key.
50
62
  def self.attribute_map
@@ -57,7 +69,10 @@ module MastercardPspPayment
57
69
  :pa_res_status => :paResStatus ,
58
70
  :sc_enrollment_status => :scEnrollmentStatus ,
59
71
  :signature_verification => :signatureVerification ,
60
- :xid => :xid
72
+ :xid => :xid ,
73
+ :aav => :aav ,
74
+ :sli => :sli ,
75
+ :card_verification_status => :cardVerificationStatus
61
76
 
62
77
  }
63
78
  end
@@ -105,6 +120,18 @@ module MastercardPspPayment
105
120
  self.xid = attributes[:xid]
106
121
  end
107
122
 
123
+ if attributes.has_key?(:aav)
124
+ self.aav = attributes[:aav]
125
+ end
126
+
127
+ if attributes.has_key?(:sli)
128
+ self.sli = attributes[:sli]
129
+ end
130
+
131
+ if attributes.has_key?(:card_verification_status)
132
+ self.card_verification_status = attributes[:card_verification_status]
133
+ end
134
+
108
135
  end
109
136
 
110
137
 
@@ -122,7 +149,10 @@ module MastercardPspPayment
122
149
  pa_res_status == o.pa_res_status &&
123
150
  sc_enrollment_status == o.sc_enrollment_status &&
124
151
  signature_verification == o.signature_verification &&
125
- xid == o.xid
152
+ xid == o.xid &&
153
+ aav == o.aav &&
154
+ sli == o.sli &&
155
+ card_verification_status == o.card_verification_status
126
156
  end
127
157
 
128
158
  # @see the `==` method
@@ -132,7 +162,7 @@ module MastercardPspPayment
132
162
 
133
163
  # Calculate hash code according to all attributes.
134
164
  def hash
135
- [authenticate_method, card_enrollment_method, c_avv, eci_flag, master_card_assigned_id, pa_res_status, sc_enrollment_status, signature_verification, xid].hash
165
+ [authenticate_method, card_enrollment_method, c_avv, eci_flag, master_card_assigned_id, pa_res_status, sc_enrollment_status, signature_verification, xid, aav, sli, card_verification_status].hash
136
166
  end
137
167
 
138
168
  # build the object from hash
@@ -161,6 +191,8 @@ module MastercardPspPayment
161
191
  DateTime.parse(value)
162
192
  when :Date
163
193
  Date.parse(value)
194
+ when :Object
195
+ value
164
196
  when :String
165
197
  value.to_s
166
198
  when :Integer
@@ -181,7 +213,7 @@ module MastercardPspPayment
181
213
  v_type = Regexp.last_match[:v_type]
182
214
  {}.tap do |hash|
183
215
  value.each do |k, v|
184
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
216
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
185
217
  end
186
218
  end
187
219
  else # model
@@ -194,7 +226,7 @@ module MastercardPspPayment
194
226
  to_hash.to_s
195
227
  end
196
228
 
197
- # to_body is an alias to to_body (backward compatibility)
229
+ # to_body is an alias to to_body (backward compatibility))
198
230
  def to_body
199
231
  to_hash
200
232
  end
@@ -245,7 +277,10 @@ module MastercardPspPayment
245
277
  :pa_res_status => 'String',
246
278
  :sc_enrollment_status => 'String',
247
279
  :signature_verification => 'String',
248
- :xid => 'String'
280
+ :xid => 'String',
281
+ :aav => 'String',
282
+ :sli => 'String',
283
+ :card_verification_status => 'String'
249
284
 
250
285
  }
251
286
  end
@@ -46,6 +46,10 @@ module MastercardPspPayment
46
46
  # @return [String] the card type (CREDIT/DEBIT) used in checkout. Available only for combo card transactions.
47
47
  xml_accessor :card_type, :from =>"cardType"
48
48
 
49
+ # @!attribute cvc
50
+ # @return [String] the card verification code.
51
+ xml_accessor :cvc, :from =>"cvc"
52
+
49
53
 
50
54
  # Attribute mapping from ruby-style variable name to JSON key.
51
55
  def self.attribute_map
@@ -58,7 +62,8 @@ module MastercardPspPayment
58
62
  :expiry_year => :expiryYear ,
59
63
  :billing_address => :billingAddress ,
60
64
  :last_four => :lastFour ,
61
- :card_type => :cardType
65
+ :card_type => :cardType ,
66
+ :cvc => :cvc
62
67
 
63
68
  }
64
69
  end
@@ -106,6 +111,10 @@ module MastercardPspPayment
106
111
  self.card_type = attributes[:card_type]
107
112
  end
108
113
 
114
+ if attributes.has_key?(:cvc)
115
+ self.cvc = attributes[:cvc]
116
+ end
117
+
109
118
  end
110
119
 
111
120
 
@@ -123,7 +132,8 @@ module MastercardPspPayment
123
132
  expiry_year == o.expiry_year &&
124
133
  billing_address == o.billing_address &&
125
134
  last_four == o.last_four &&
126
- card_type == o.card_type
135
+ card_type == o.card_type &&
136
+ cvc == o.cvc
127
137
  end
128
138
 
129
139
  # @see the `==` method
@@ -133,7 +143,7 @@ module MastercardPspPayment
133
143
 
134
144
  # Calculate hash code according to all attributes.
135
145
  def hash
136
- [brand_id, brand_name, account_number, card_holder_name, expiry_month, expiry_year, billing_address, last_four, card_type].hash
146
+ [brand_id, brand_name, account_number, card_holder_name, expiry_month, expiry_year, billing_address, last_four, card_type, cvc].hash
137
147
  end
138
148
 
139
149
  # build the object from hash
@@ -162,6 +172,8 @@ module MastercardPspPayment
162
172
  DateTime.parse(value)
163
173
  when :Date
164
174
  Date.parse(value)
175
+ when :Object
176
+ value
165
177
  when :String
166
178
  value.to_s
167
179
  when :Integer
@@ -182,7 +194,7 @@ module MastercardPspPayment
182
194
  v_type = Regexp.last_match[:v_type]
183
195
  {}.tap do |hash|
184
196
  value.each do |k, v|
185
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
186
198
  end
187
199
  end
188
200
  else # model
@@ -195,7 +207,7 @@ module MastercardPspPayment
195
207
  to_hash.to_s
196
208
  end
197
209
 
198
- # to_body is an alias to to_body (backward compatibility)
210
+ # to_body is an alias to to_body (backward compatibility))
199
211
  def to_body
200
212
  to_hash
201
213
  end
@@ -246,7 +258,8 @@ module MastercardPspPayment
246
258
  :expiry_year => 'Integer',
247
259
  :billing_address => 'Address',
248
260
  :last_four => 'String',
249
- :card_type => 'String'
261
+ :card_type => 'String',
262
+ :cvc => 'String'
250
263
 
251
264
  }
252
265
  end
@@ -120,6 +120,8 @@ module MastercardPspPayment
120
120
  DateTime.parse(value)
121
121
  when :Date
122
122
  Date.parse(value)
123
+ when :Object
124
+ value
123
125
  when :String
124
126
  value.to_s
125
127
  when :Integer
@@ -140,7 +142,7 @@ module MastercardPspPayment
140
142
  v_type = Regexp.last_match[:v_type]
141
143
  {}.tap do |hash|
142
144
  value.each do |k, v|
143
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
145
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
144
146
  end
145
147
  end
146
148
  else # model
@@ -153,7 +155,7 @@ module MastercardPspPayment
153
155
  to_hash.to_s
154
156
  end
155
157
 
156
- # to_body is an alias to to_body (backward compatibility)
158
+ # to_body is an alias to to_body (backward compatibility))
157
159
  def to_body
158
160
  to_hash
159
161
  end
@@ -28,6 +28,8 @@ module MastercardPspPayment
28
28
  # @return [AuthenticationOptions] the tokenized card information.
29
29
  xml_accessor :authentication_options, :from =>"authenticationOptions",:as => AuthenticationOptions
30
30
 
31
+ xml_accessor :external_data, :from =>"externalData", :as =>[]
32
+
31
33
 
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
@@ -35,7 +37,8 @@ module MastercardPspPayment
35
37
  :card => :card ,
36
38
  :tokenization => :tokenization ,
37
39
  :wallet_id => :walletId ,
38
- :authentication_options => :authenticationOptions
40
+ :authentication_options => :authenticationOptions ,
41
+ :external_data => :externalData
39
42
 
40
43
  }
41
44
  end
@@ -63,6 +66,10 @@ module MastercardPspPayment
63
66
  self.authentication_options = attributes[:authentication_options]
64
67
  end
65
68
 
69
+ if attributes.has_key?(:external_data)
70
+ self.external_data = attributes[:external_data]
71
+ end
72
+
66
73
  end
67
74
 
68
75
 
@@ -75,7 +82,8 @@ module MastercardPspPayment
75
82
  card == o.card &&
76
83
  tokenization == o.tokenization &&
77
84
  wallet_id == o.wallet_id &&
78
- authentication_options == o.authentication_options
85
+ authentication_options == o.authentication_options &&
86
+ external_data == o.external_data
79
87
  end
80
88
 
81
89
  # @see the `==` method
@@ -85,7 +93,7 @@ module MastercardPspPayment
85
93
 
86
94
  # Calculate hash code according to all attributes.
87
95
  def hash
88
- [card, tokenization, wallet_id, authentication_options].hash
96
+ [card, tokenization, wallet_id, authentication_options, external_data].hash
89
97
  end
90
98
 
91
99
  # build the object from hash
@@ -114,6 +122,8 @@ module MastercardPspPayment
114
122
  DateTime.parse(value)
115
123
  when :Date
116
124
  Date.parse(value)
125
+ when :Object
126
+ value
117
127
  when :String
118
128
  value.to_s
119
129
  when :Integer
@@ -134,7 +144,7 @@ module MastercardPspPayment
134
144
  v_type = Regexp.last_match[:v_type]
135
145
  {}.tap do |hash|
136
146
  value.each do |k, v|
137
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
138
148
  end
139
149
  end
140
150
  else # model
@@ -147,7 +157,7 @@ module MastercardPspPayment
147
157
  to_hash.to_s
148
158
  end
149
159
 
150
- # to_body is an alias to to_body (backward compatibility)
160
+ # to_body is an alias to to_body (backward compatibility))
151
161
  def to_body
152
162
  to_hash
153
163
  end
@@ -193,7 +203,8 @@ module MastercardPspPayment
193
203
  :card => 'Card',
194
204
  :tokenization => 'Tokenization',
195
205
  :wallet_id => 'String',
196
- :authentication_options => 'AuthenticationOptions'
206
+ :authentication_options => 'AuthenticationOptions',
207
+ :external_data => 'Hash<String, Object>'
197
208
 
198
209
  }
199
210
  end
@@ -122,6 +122,8 @@ module MastercardPspPayment
122
122
  DateTime.parse(value)
123
123
  when :Date
124
124
  Date.parse(value)
125
+ when :Object
126
+ value
125
127
  when :String
126
128
  value.to_s
127
129
  when :Integer
@@ -142,7 +144,7 @@ module MastercardPspPayment
142
144
  v_type = Regexp.last_match[:v_type]
143
145
  {}.tap do |hash|
144
146
  value.each do |k, v|
145
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
147
+ hash[_deserialize(k_type, k).to_sym] = _deserialize(v_type, v)
146
148
  end
147
149
  end
148
150
  else # model
@@ -155,7 +157,7 @@ module MastercardPspPayment
155
157
  to_hash.to_s
156
158
  end
157
159
 
158
- # to_body is an alias to to_body (backward compatibility)
160
+ # to_body is an alias to to_body (backward compatibility))
159
161
  def to_body
160
162
  to_hash
161
163
  end
@@ -1,3 +1,3 @@
1
1
  module MastercardPspPayment
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mastercard_psp_payment
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
  - Mastercard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mastercard_core_sdk
@@ -124,7 +124,7 @@ dependencies:
124
124
  - - "~>"
125
125
  - !ruby/object:Gem::Version
126
126
  version: '5.0'
127
- description: Mastercard Masterpass Checkout Integration SDK for Payment Service Provider(PSP).
127
+ description: SDK for Payment Service Provider(PSP) to make payments. See https://developer.mastercard.com
128
128
  email:
129
129
  - merchant_support@masterpass.com
130
130
  executables: []
@@ -145,7 +145,7 @@ files:
145
145
  - lib/mastercard_psp_payment/models/tokenization.rb
146
146
  - lib/mastercard_psp_payment/tracker/sdk_api_tracker.rb
147
147
  - lib/mastercard_psp_payment/version.rb
148
- homepage: https://developer.mastercard.com
148
+ homepage: https://developer.mastercard.com/documentation/masterpass-integration-psp/v7-Service-Providers
149
149
  licenses:
150
150
  - Mastercard
151
151
  metadata: {}
@@ -168,5 +168,5 @@ rubyforge_project:
168
168
  rubygems_version: 2.4.5.1
169
169
  signing_key:
170
170
  specification_version: 4
171
- summary: Masterpass Payment Service Provider(PSP) Payment SDK.
171
+ summary: Masterpass Payment Service Provider(PSP) Payment SDK
172
172
  test_files: []