cybersource_rest_client 0.0.36 → 0.0.39
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +13 -6
- data/lib/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +13 -5
- data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +26 -11
- data/lib/AuthenticationSDK/authentication/oauth/OAuthToken.rb +11 -5
- data/lib/AuthenticationSDK/authentication/payloadDigest/digest.rb +2 -2
- data/lib/AuthenticationSDK/core/Authorization.rb +28 -20
- data/lib/AuthenticationSDK/core/MerchantConfig.rb +72 -78
- data/lib/AuthenticationSDK/logging/log_configuration.rb +71 -0
- data/lib/AuthenticationSDK/logging/log_factory.rb +65 -0
- data/lib/AuthenticationSDK/logging/sensitive_logging.rb +101 -0
- data/lib/AuthenticationSDK/util/Cache.rb +1 -1
- data/lib/AuthenticationSDK/util/Constants.rb +25 -17
- data/lib/AuthenticationSDK/util/ExceptionHandler.rb +26 -0
- data/lib/AuthenticationSDK/util/PropertiesUtil.rb +2 -2
- data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +46 -46
- data/lib/cybersource_rest_client/api/capture_api.rb +16 -16
- data/lib/cybersource_rest_client/api/chargeback_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +16 -16
- data/lib/cybersource_rest_client/api/conversion_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/credit_api.rb +16 -16
- data/lib/cybersource_rest_client/api/customer_api.rb +61 -61
- data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +76 -76
- data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +76 -76
- data/lib/cybersource_rest_client/api/decision_manager_api.rb +46 -46
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +16 -16
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +16 -16
- data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +91 -91
- data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/invoice_settings_api.rb +31 -31
- data/lib/cybersource_rest_client/api/invoices_api.rb +97 -97
- data/lib/cybersource_rest_client/api/key_generation_api.rb +16 -16
- data/lib/cybersource_rest_client/api/net_fundings_api.rb +16 -16
- data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +16 -16
- data/lib/cybersource_rest_client/api/payer_authentication_api.rb +46 -46
- data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +16 -16
- data/lib/cybersource_rest_client/api/payment_instrument_api.rb +61 -61
- data/lib/cybersource_rest_client/api/payments_api.rb +33 -33
- data/lib/cybersource_rest_client/api/payouts_api.rb +16 -16
- data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/refund_api.rb +31 -31
- data/lib/cybersource_rest_client/api/report_definitions_api.rb +31 -31
- data/lib/cybersource_rest_client/api/report_downloads_api.rb +16 -16
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +76 -76
- data/lib/cybersource_rest_client/api/reports_api.rb +46 -46
- data/lib/cybersource_rest_client/api/retrieval_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +16 -16
- data/lib/cybersource_rest_client/api/reversal_api.rb +31 -31
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +31 -31
- data/lib/cybersource_rest_client/api/secure_file_share_api.rb +31 -31
- data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +46 -46
- data/lib/cybersource_rest_client/api/taxes_api.rb +31 -31
- data/lib/cybersource_rest_client/api/tokenization_api.rb +16 -16
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +46 -46
- data/lib/cybersource_rest_client/api/transaction_details_api.rb +16 -16
- data/lib/cybersource_rest_client/api/user_management_api.rb +16 -16
- data/lib/cybersource_rest_client/api/user_management_search_api.rb +16 -16
- data/lib/cybersource_rest_client/api/verification_api.rb +31 -31
- data/lib/cybersource_rest_client/api/void_api.rb +76 -76
- data/lib/cybersource_rest_client/api_client.rb +7 -8
- data/lib/cybersource_rest_client/models/create_adhoc_report_request.rb +2 -5
- data/lib/cybersource_rest_client/models/create_payment_request.rb +19 -1
- data/lib/cybersource_rest_client/models/create_search_request.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +20 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_buyer_information.rb +243 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +10 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_issuer_information.rb +206 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +183 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +52 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +33 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +15 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information_strong_authentication.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +24 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_invoice_details.rb +191 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +65 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +33 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +14 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_e_wallet.rb +190 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +191 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +14 -5
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_bank.rb +215 -0
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +36 -4
- data/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +17 -1
- data/lib/cybersource_rest_client/models/reportingv3reports_report_filters.rb +218 -0
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +17 -1
- data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +17 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +17 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -11
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +10 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information_partner.rb +190 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb +14 -4
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +13 -4
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +32 -5
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +206 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_instrument_identifier.rb +190 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +36 -4
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_token_information.rb +210 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +13 -4
- data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +4 -4
- data/lib/cybersource_rest_client.rb +17 -3
- metadata +18 -4
- data/lib/AuthenticationSDK/core/Logger.rb +0 -26
- data/lib/AuthenticationSDK/util/ApiException.rb +0 -19
@@ -14,9 +14,15 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
class Ptsv2paymentsOrderInformationShipTo
|
17
|
+
# The title of the person receiving the product.
|
18
|
+
attr_accessor :title
|
19
|
+
|
17
20
|
# First name of the recipient. #### Litle Maximum length: 25 #### All other processors Maximum length: 60 Optional field.
|
18
21
|
attr_accessor :first_name
|
19
22
|
|
23
|
+
# Middle name of the recipient. #### Litle Maximum length: 25 #### All other processors Maximum length: 60 Optional field.
|
24
|
+
attr_accessor :middle_name
|
25
|
+
|
20
26
|
# Last name of the recipient. #### Litle Maximum length: 25 #### All other processors Maximum length: 60 Optional field.
|
21
27
|
attr_accessor :last_name
|
22
28
|
|
@@ -62,7 +68,9 @@ module CyberSource
|
|
62
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
69
|
def self.attribute_map
|
64
70
|
{
|
71
|
+
:'title' => :'title',
|
65
72
|
:'first_name' => :'firstName',
|
73
|
+
:'middle_name' => :'middleName',
|
66
74
|
:'last_name' => :'lastName',
|
67
75
|
:'address1' => :'address1',
|
68
76
|
:'address2' => :'address2',
|
@@ -83,7 +91,9 @@ module CyberSource
|
|
83
91
|
# Attribute type mapping.
|
84
92
|
def self.swagger_types
|
85
93
|
{
|
94
|
+
:'title' => :'String',
|
86
95
|
:'first_name' => :'String',
|
96
|
+
:'middle_name' => :'String',
|
87
97
|
:'last_name' => :'String',
|
88
98
|
:'address1' => :'String',
|
89
99
|
:'address2' => :'String',
|
@@ -109,10 +119,18 @@ module CyberSource
|
|
109
119
|
# convert string to symbol for hash key
|
110
120
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
111
121
|
|
122
|
+
if attributes.has_key?(:'title')
|
123
|
+
self.title = attributes[:'title']
|
124
|
+
end
|
125
|
+
|
112
126
|
if attributes.has_key?(:'firstName')
|
113
127
|
self.first_name = attributes[:'firstName']
|
114
128
|
end
|
115
129
|
|
130
|
+
if attributes.has_key?(:'middleName')
|
131
|
+
self.middle_name = attributes[:'middleName']
|
132
|
+
end
|
133
|
+
|
116
134
|
if attributes.has_key?(:'lastName')
|
117
135
|
self.last_name = attributes[:'lastName']
|
118
136
|
end
|
@@ -183,12 +201,24 @@ module CyberSource
|
|
183
201
|
true
|
184
202
|
end
|
185
203
|
|
204
|
+
# Custom attribute writer method with validation
|
205
|
+
# @param [Object] title Value to be assigned
|
206
|
+
def title=(title)
|
207
|
+
@title = title
|
208
|
+
end
|
209
|
+
|
186
210
|
# Custom attribute writer method with validation
|
187
211
|
# @param [Object] first_name Value to be assigned
|
188
212
|
def first_name=(first_name)
|
189
213
|
@first_name = first_name
|
190
214
|
end
|
191
215
|
|
216
|
+
# Custom attribute writer method with validation
|
217
|
+
# @param [Object] middle_name Value to be assigned
|
218
|
+
def middle_name=(middle_name)
|
219
|
+
@middle_name = middle_name
|
220
|
+
end
|
221
|
+
|
192
222
|
# Custom attribute writer method with validation
|
193
223
|
# @param [Object] last_name Value to be assigned
|
194
224
|
def last_name=(last_name)
|
@@ -272,7 +302,9 @@ module CyberSource
|
|
272
302
|
def ==(o)
|
273
303
|
return true if self.equal?(o)
|
274
304
|
self.class == o.class &&
|
305
|
+
title == o.title &&
|
275
306
|
first_name == o.first_name &&
|
307
|
+
middle_name == o.middle_name &&
|
276
308
|
last_name == o.last_name &&
|
277
309
|
address1 == o.address1 &&
|
278
310
|
address2 == o.address2 &&
|
@@ -298,7 +330,7 @@ module CyberSource
|
|
298
330
|
# Calculates hash code according to all attributes.
|
299
331
|
# @return [Fixnum] Hash code
|
300
332
|
def hash
|
301
|
-
[first_name, last_name, address1, address2, locality, administrative_area, postal_code, country, district, building_number, phone_number, company, destination_types, destination_code, method].hash
|
333
|
+
[title, first_name, middle_name, last_name, address1, address2, locality, administrative_area, postal_code, country, district, building_number, phone_number, company, destination_types, destination_code, method].hash
|
302
334
|
end
|
303
335
|
|
304
336
|
# Builds the object from hash
|
@@ -37,6 +37,8 @@ module CyberSource
|
|
37
37
|
# Mastercard-defined code that indicates how the account information was obtained. - `00` (default): Card - `01`: Removable secure element that is personalized for use with a mobile phone and controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `02`: Key fob - `03`: Watch - `04`: Mobile tag - `05`: Wristband - `06`: Mobile phone case or sleeve - `07`: Mobile phone with a non-removable, secure element that is controlled by the wireless service provider; for example, code division multiple access (CDMA) - `08`: Removable secure element that is personalized for use with a mobile phone and not controlled by the wireless service provider; example: memory card - `09`: Mobile phone with a non-removable, secure element that is not controlled by the wireless service provider - `10`: Removable secure element that is personalized for use with a tablet or e-book and is controlled by the wireless service provider; examples: subscriber identity module (SIM), universal integrated circuit card (UICC) - `11`: Tablet or e-book with a non-removable, secure element that is controlled by the wireless service provider - `12`: Removable secure element that is personalized for use with a tablet or e-book and is not controlled by the wireless service provider - `13`: Tablet or e-book with a non-removable, secure element that is not controlled by the wireless service provider This field is supported only for Mastercard on CyberSource through VisaNet. #### Used by **Authorization** Optional field.
|
38
38
|
attr_accessor :initiation_channel
|
39
39
|
|
40
|
+
attr_accessor :e_wallet
|
41
|
+
|
40
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
43
|
def self.attribute_map
|
42
44
|
{
|
@@ -50,7 +52,8 @@ module CyberSource
|
|
50
52
|
:'legacy_token' => :'legacyToken',
|
51
53
|
:'bank' => :'bank',
|
52
54
|
:'payment_type' => :'paymentType',
|
53
|
-
:'initiation_channel' => :'initiationChannel'
|
55
|
+
:'initiation_channel' => :'initiationChannel',
|
56
|
+
:'e_wallet' => :'eWallet'
|
54
57
|
}
|
55
58
|
end
|
56
59
|
|
@@ -67,7 +70,8 @@ module CyberSource
|
|
67
70
|
:'legacy_token' => :'Ptsv2paymentsPaymentInformationLegacyToken',
|
68
71
|
:'bank' => :'Ptsv2paymentsPaymentInformationBank',
|
69
72
|
:'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType',
|
70
|
-
:'initiation_channel' => :'String'
|
73
|
+
:'initiation_channel' => :'String',
|
74
|
+
:'e_wallet' => :'Ptsv2paymentsPaymentInformationEWallet'
|
71
75
|
}
|
72
76
|
end
|
73
77
|
|
@@ -122,6 +126,10 @@ module CyberSource
|
|
122
126
|
if attributes.has_key?(:'initiationChannel')
|
123
127
|
self.initiation_channel = attributes[:'initiationChannel']
|
124
128
|
end
|
129
|
+
|
130
|
+
if attributes.has_key?(:'eWallet')
|
131
|
+
self.e_wallet = attributes[:'eWallet']
|
132
|
+
end
|
125
133
|
end
|
126
134
|
|
127
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -158,7 +166,8 @@ module CyberSource
|
|
158
166
|
legacy_token == o.legacy_token &&
|
159
167
|
bank == o.bank &&
|
160
168
|
payment_type == o.payment_type &&
|
161
|
-
initiation_channel == o.initiation_channel
|
169
|
+
initiation_channel == o.initiation_channel &&
|
170
|
+
e_wallet == o.e_wallet
|
162
171
|
end
|
163
172
|
|
164
173
|
# @see the `==` method
|
@@ -170,7 +179,7 @@ module CyberSource
|
|
170
179
|
# Calculates hash code according to all attributes.
|
171
180
|
# @return [Fixnum] Hash code
|
172
181
|
def hash
|
173
|
-
[card, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, bank, payment_type, initiation_channel].hash
|
182
|
+
[card, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, bank, payment_type, initiation_channel, e_wallet].hash
|
174
183
|
end
|
175
184
|
|
176
185
|
# Builds the object from hash
|
@@ -22,12 +22,16 @@ module CyberSource
|
|
22
22
|
# International Bank Account Number (IBAN) for the bank account. For some countries you can provide this number instead of the traditional bank account information. You can use this field only when scoring a direct debit transaction. For all possible values, see the `bank_iban` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
|
23
23
|
attr_accessor :iban
|
24
24
|
|
25
|
+
# Bank’s SWIFT code. You can use this field only when scoring a direct debit transaction. Required only for crossborder transactions. For all possible values, see the `bank_swiftcode` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
|
26
|
+
attr_accessor :swift_code
|
27
|
+
|
25
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
26
29
|
def self.attribute_map
|
27
30
|
{
|
28
31
|
:'account' => :'account',
|
29
32
|
:'routing_number' => :'routingNumber',
|
30
|
-
:'iban' => :'iban'
|
33
|
+
:'iban' => :'iban',
|
34
|
+
:'swift_code' => :'swiftCode'
|
31
35
|
}
|
32
36
|
end
|
33
37
|
|
@@ -36,7 +40,8 @@ module CyberSource
|
|
36
40
|
{
|
37
41
|
:'account' => :'Ptsv2paymentsPaymentInformationBankAccount',
|
38
42
|
:'routing_number' => :'String',
|
39
|
-
:'iban' => :'String'
|
43
|
+
:'iban' => :'String',
|
44
|
+
:'swift_code' => :'String'
|
40
45
|
}
|
41
46
|
end
|
42
47
|
|
@@ -59,6 +64,10 @@ module CyberSource
|
|
59
64
|
if attributes.has_key?(:'iban')
|
60
65
|
self.iban = attributes[:'iban']
|
61
66
|
end
|
67
|
+
|
68
|
+
if attributes.has_key?(:'swiftCode')
|
69
|
+
self.swift_code = attributes[:'swiftCode']
|
70
|
+
end
|
62
71
|
end
|
63
72
|
|
64
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -93,7 +102,8 @@ module CyberSource
|
|
93
102
|
self.class == o.class &&
|
94
103
|
account == o.account &&
|
95
104
|
routing_number == o.routing_number &&
|
96
|
-
iban == o.iban
|
105
|
+
iban == o.iban &&
|
106
|
+
swift_code == o.swift_code
|
97
107
|
end
|
98
108
|
|
99
109
|
# @see the `==` method
|
@@ -105,7 +115,7 @@ module CyberSource
|
|
105
115
|
# Calculates hash code according to all attributes.
|
106
116
|
# @return [Fixnum] Hash code
|
107
117
|
def hash
|
108
|
-
[account, routing_number, iban].hash
|
118
|
+
[account, routing_number, iban, swift_code].hash
|
109
119
|
end
|
110
120
|
|
111
121
|
# Builds the object from hash
|
@@ -0,0 +1,190 @@
|
|
1
|
+
=begin
|
2
|
+
#CyberSource Merged Spec
|
3
|
+
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
class Ptsv2paymentsPaymentInformationEWallet
|
17
|
+
# The ID of the customer, passed in the return_url field by PayPal after customer approval.
|
18
|
+
attr_accessor :account_id
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'account_id' => :'accountId'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'account_id' => :'String'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'accountId')
|
43
|
+
self.account_id = attributes[:'accountId']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Custom attribute writer method with validation
|
61
|
+
# @param [Object] account_id Value to be assigned
|
62
|
+
def account_id=(account_id)
|
63
|
+
@account_id = account_id
|
64
|
+
end
|
65
|
+
|
66
|
+
# Checks equality by comparing each attribute.
|
67
|
+
# @param [Object] Object to be compared
|
68
|
+
def ==(o)
|
69
|
+
return true if self.equal?(o)
|
70
|
+
self.class == o.class &&
|
71
|
+
account_id == o.account_id
|
72
|
+
end
|
73
|
+
|
74
|
+
# @see the `==` method
|
75
|
+
# @param [Object] Object to be compared
|
76
|
+
def eql?(o)
|
77
|
+
self == o
|
78
|
+
end
|
79
|
+
|
80
|
+
# Calculates hash code according to all attributes.
|
81
|
+
# @return [Fixnum] Hash code
|
82
|
+
def hash
|
83
|
+
[account_id].hash
|
84
|
+
end
|
85
|
+
|
86
|
+
# Builds the object from hash
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
# @return [Object] Returns the model itself
|
89
|
+
def build_from_hash(attributes)
|
90
|
+
return nil unless attributes.is_a?(Hash)
|
91
|
+
self.class.swagger_types.each_pair do |key, type|
|
92
|
+
if type =~ /\AArray<(.*)>/i
|
93
|
+
# check to ensure the input is an array given that the the attribute
|
94
|
+
# is documented as an array but the input is not
|
95
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
96
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
97
|
+
end
|
98
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
99
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
100
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
101
|
+
end
|
102
|
+
|
103
|
+
self
|
104
|
+
end
|
105
|
+
|
106
|
+
# Deserializes the data based on type
|
107
|
+
# @param string type Data type
|
108
|
+
# @param string value Value to be deserialized
|
109
|
+
# @return [Object] Deserialized data
|
110
|
+
def _deserialize(type, value)
|
111
|
+
case type.to_sym
|
112
|
+
when :DateTime
|
113
|
+
DateTime.parse(value)
|
114
|
+
when :Date
|
115
|
+
Date.parse(value)
|
116
|
+
when :String
|
117
|
+
value.to_s
|
118
|
+
when :Integer
|
119
|
+
value.to_i
|
120
|
+
when :Float
|
121
|
+
value.to_f
|
122
|
+
when :BOOLEAN
|
123
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
124
|
+
true
|
125
|
+
else
|
126
|
+
false
|
127
|
+
end
|
128
|
+
when :Object
|
129
|
+
# generic object (usually a Hash), return directly
|
130
|
+
value
|
131
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
132
|
+
inner_type = Regexp.last_match[:inner_type]
|
133
|
+
value.map { |v| _deserialize(inner_type, v) }
|
134
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
135
|
+
k_type = Regexp.last_match[:k_type]
|
136
|
+
v_type = Regexp.last_match[:v_type]
|
137
|
+
{}.tap do |hash|
|
138
|
+
value.each do |k, v|
|
139
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
else # model
|
143
|
+
temp_model = CyberSource.const_get(type).new
|
144
|
+
temp_model.build_from_hash(value)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Returns the string representation of the object
|
149
|
+
# @return [String] String presentation of the object
|
150
|
+
def to_s
|
151
|
+
to_hash.to_s
|
152
|
+
end
|
153
|
+
|
154
|
+
# to_body is an alias to to_hash (backward compatibility)
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_body
|
157
|
+
to_hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Returns the object in the form of hash
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
162
|
+
def to_hash
|
163
|
+
hash = {}
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
165
|
+
value = self.send(attr)
|
166
|
+
next if value.nil?
|
167
|
+
hash[param] = _to_hash(value)
|
168
|
+
end
|
169
|
+
hash
|
170
|
+
end
|
171
|
+
|
172
|
+
# Outputs non-array value in the form of hash
|
173
|
+
# For object, use to_hash. Otherwise, just return the value
|
174
|
+
# @param [Object] value Any valid value
|
175
|
+
# @return [Hash] Returns the value in the form of hash
|
176
|
+
def _to_hash(value)
|
177
|
+
if value.is_a?(Array)
|
178
|
+
value.compact.map { |v| _to_hash(v) }
|
179
|
+
elsif value.is_a?(Hash)
|
180
|
+
{}.tap do |hash|
|
181
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
182
|
+
end
|
183
|
+
elsif value.respond_to? :to_hash
|
184
|
+
value.to_hash
|
185
|
+
else
|
186
|
+
value
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
@@ -0,0 +1,191 @@
|
|
1
|
+
=begin
|
2
|
+
#CyberSource Merged Spec
|
3
|
+
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
# Processor Information
|
17
|
+
class Ptsv2paymentsProcessorInformation
|
18
|
+
# Token received in original session service.
|
19
|
+
attr_accessor :pre_approval_token
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'pre_approval_token' => :'preApprovalToken'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'pre_approval_token' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
|
+
|
43
|
+
if attributes.has_key?(:'preApprovalToken')
|
44
|
+
self.pre_approval_token = attributes[:'preApprovalToken']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Custom attribute writer method with validation
|
62
|
+
# @param [Object] pre_approval_token Value to be assigned
|
63
|
+
def pre_approval_token=(pre_approval_token)
|
64
|
+
@pre_approval_token = pre_approval_token
|
65
|
+
end
|
66
|
+
|
67
|
+
# Checks equality by comparing each attribute.
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
pre_approval_token == o.pre_approval_token
|
73
|
+
end
|
74
|
+
|
75
|
+
# @see the `==` method
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def eql?(o)
|
78
|
+
self == o
|
79
|
+
end
|
80
|
+
|
81
|
+
# Calculates hash code according to all attributes.
|
82
|
+
# @return [Fixnum] Hash code
|
83
|
+
def hash
|
84
|
+
[pre_approval_token].hash
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def build_from_hash(attributes)
|
91
|
+
return nil unless attributes.is_a?(Hash)
|
92
|
+
self.class.swagger_types.each_pair do |key, type|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
94
|
+
# check to ensure the input is an array given that the the attribute
|
95
|
+
# is documented as an array but the input is not
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
|
+
end
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserializes the data based on type
|
108
|
+
# @param string type Data type
|
109
|
+
# @param string value Value to be deserialized
|
110
|
+
# @return [Object] Deserialized data
|
111
|
+
def _deserialize(type, value)
|
112
|
+
case type.to_sym
|
113
|
+
when :DateTime
|
114
|
+
DateTime.parse(value)
|
115
|
+
when :Date
|
116
|
+
Date.parse(value)
|
117
|
+
when :String
|
118
|
+
value.to_s
|
119
|
+
when :Integer
|
120
|
+
value.to_i
|
121
|
+
when :Float
|
122
|
+
value.to_f
|
123
|
+
when :BOOLEAN
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
125
|
+
true
|
126
|
+
else
|
127
|
+
false
|
128
|
+
end
|
129
|
+
when :Object
|
130
|
+
# generic object (usually a Hash), return directly
|
131
|
+
value
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each do |k, v|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else # model
|
144
|
+
temp_model = CyberSource.const_get(type).new
|
145
|
+
temp_model.build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
next if value.nil?
|
168
|
+
hash[param] = _to_hash(value)
|
169
|
+
end
|
170
|
+
hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Outputs non-array value in the form of hash
|
174
|
+
# For object, use to_hash. Otherwise, just return the value
|
175
|
+
# @param [Object] value Any valid value
|
176
|
+
# @return [Hash] Returns the value in the form of hash
|
177
|
+
def _to_hash(value)
|
178
|
+
if value.is_a?(Array)
|
179
|
+
value.compact.map { |v| _to_hash(v) }
|
180
|
+
elsif value.is_a?(Hash)
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
183
|
+
end
|
184
|
+
elsif value.respond_to? :to_hash
|
185
|
+
value.to_hash
|
186
|
+
else
|
187
|
+
value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -20,6 +20,9 @@ module CyberSource
|
|
20
20
|
# Recipient’s last name. This field is a _passthrough_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. For details, see the `recipient_lastname` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)
|
21
21
|
attr_accessor :last_name
|
22
22
|
|
23
|
+
# Recipient’s middle name. This field is a _passthrough_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. For details, see the `recipient_middlename` field description in the [Credit Card Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)
|
24
|
+
attr_accessor :middle_name
|
25
|
+
|
23
26
|
# Partial postal code for the recipient’s address. For example, if the postal code is **NN5 7SG**, the value for this field should be the first part of the postal code: **NN5**. This field is a _pass-through_, which means that CyberSource does not verify the value or modify it in any way before sending it to the processor. If the field is not required for the transaction, CyberSource does not forward it to the processor. For details, see the `recipient_postal_code` field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/)
|
24
27
|
attr_accessor :postal_code
|
25
28
|
|
@@ -28,6 +31,7 @@ module CyberSource
|
|
28
31
|
{
|
29
32
|
:'account_id' => :'accountId',
|
30
33
|
:'last_name' => :'lastName',
|
34
|
+
:'middle_name' => :'middleName',
|
31
35
|
:'postal_code' => :'postalCode'
|
32
36
|
}
|
33
37
|
end
|
@@ -37,6 +41,7 @@ module CyberSource
|
|
37
41
|
{
|
38
42
|
:'account_id' => :'String',
|
39
43
|
:'last_name' => :'String',
|
44
|
+
:'middle_name' => :'String',
|
40
45
|
:'postal_code' => :'String'
|
41
46
|
}
|
42
47
|
end
|
@@ -57,6 +62,10 @@ module CyberSource
|
|
57
62
|
self.last_name = attributes[:'lastName']
|
58
63
|
end
|
59
64
|
|
65
|
+
if attributes.has_key?(:'middleName')
|
66
|
+
self.middle_name = attributes[:'middleName']
|
67
|
+
end
|
68
|
+
|
60
69
|
if attributes.has_key?(:'postalCode')
|
61
70
|
self.postal_code = attributes[:'postalCode']
|
62
71
|
end
|
@@ -87,6 +96,12 @@ module CyberSource
|
|
87
96
|
@last_name = last_name
|
88
97
|
end
|
89
98
|
|
99
|
+
# Custom attribute writer method with validation
|
100
|
+
# @param [Object] middle_name Value to be assigned
|
101
|
+
def middle_name=(middle_name)
|
102
|
+
@middle_name = middle_name
|
103
|
+
end
|
104
|
+
|
90
105
|
# Custom attribute writer method with validation
|
91
106
|
# @param [Object] postal_code Value to be assigned
|
92
107
|
def postal_code=(postal_code)
|
@@ -100,6 +115,7 @@ module CyberSource
|
|
100
115
|
self.class == o.class &&
|
101
116
|
account_id == o.account_id &&
|
102
117
|
last_name == o.last_name &&
|
118
|
+
middle_name == o.middle_name &&
|
103
119
|
postal_code == o.postal_code
|
104
120
|
end
|
105
121
|
|
@@ -112,7 +128,7 @@ module CyberSource
|
|
112
128
|
# Calculates hash code according to all attributes.
|
113
129
|
# @return [Fixnum] Hash code
|
114
130
|
def hash
|
115
|
-
[account_id, last_name, postal_code].hash
|
131
|
+
[account_id, last_name, middle_name, postal_code].hash
|
116
132
|
end
|
117
133
|
|
118
134
|
# Builds the object from hash
|