cybersource_rest_client 0.0.37 → 0.0.38
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 +91 -91
- 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 +31 -31
- 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/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +20 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +36 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +33 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +17 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_invoice_details.rb +191 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +49 -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/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/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_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/utilities/flex/token_verification.rb +4 -4
- data/lib/cybersource_rest_client.rb +9 -2
- metadata +11 -4
- data/lib/AuthenticationSDK/core/Logger.rb +0 -26
- data/lib/AuthenticationSDK/util/ApiException.rb +0 -19
@@ -17,6 +17,9 @@ module CyberSource
|
|
17
17
|
# Grand total for the order. This value cannot be negative. You can include a decimal point (.), but no other special characters. CyberSource truncates the amount to the correct number of decimal places. **Note** For CTV, FDCCompass, Paymentech processors, the maximum length for this field is 12. **Important** Some processors have specific requirements and limitations, such as maximum amounts and maximum field lengths. For details, see: - \"Authorization Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). - \"Capture Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). - \"Credit Information for Specific Processors\" in the [Credit Card Services Using the SCMP API Guide](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/). If your processor supports zero amount authorizations, you can set this field to 0 for the authorization to check if the card is lost or stolen. For details, see \"Zero Amount Authorizations,\" \"Credit Information for Specific Processors\" in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) #### Card Present Required to include either this field or `orderInformation.lineItems[].unitPrice` for the order. #### Invoicing Required for creating a new invoice. #### PIN Debit Amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit; however, for all other processors, these fields are required. #### DCC with a Third-Party Provider Set this field to the converted amount that was returned by the DCC provider. You must include either this field or the 1st line item in the order and the specific line-order amount in your request. For details, see `grand_total_amount` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### FDMS South If you accept IDR or CLP currencies, see the entry for FDMS South in \"Authorization Information for Specific Processors\" of the [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/) #### DCC for First Data Not used.
|
18
18
|
attr_accessor :total_amount
|
19
19
|
|
20
|
+
# Subtotal amount of all the items.This amount (which is the value of all items in the cart, not including the additional amounts such as tax, shipping, etc.) cannot change after a sessions request. When there is a change to any of the additional amounts, this field should be resent in the order request. When the sub total amount changes, you must initiate a new transaction starting with a sessions request. Note The amount value must be a non-negative number containing 2 decimal places and limited to 7 digits before the decimal point. This value can not be changed after a sessions request.
|
21
|
+
attr_accessor :sub_total_amount
|
22
|
+
|
20
23
|
# Currency used for the order. Use the three-character [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) #### Used by **Authorization** Required field. **Authorization Reversal** For an authorization reversal (`reversalInformation`) or a capture (`processingOptions.capture` is set to `true`), you must use the same currency that you used in your payment authorization request. #### PIN Debit Currency for the amount you requested for the PIN debit purchase. This value is returned for partial authorizations. The issuing bank can approve a partial amount if the balance on the debit card is less than the requested transaction amount. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Returned by PIN debit purchase. For PIN debit reversal requests, you must use the same currency that was used for the PIN debit purchase or PIN debit credit that you are reversing. For the possible values, see the [ISO Standard Currency Codes](https://developer.cybersource.com/library/documentation/sbc/quickref/currencies.pdf). Required field for PIN Debit purchase and PIN Debit credit requests. Optional field for PIN Debit reversal requests. #### GPX This field is optional for reversing an authorization or credit. #### DCC for First Data Your local currency. For details, see the `currency` field description in [Dynamic Currency Conversion For First Data Using the SCMP API](http://apps.cybersource.com/library/documentation/dev_guides/DCC_FirstData_SCMP/DCC_FirstData_SCMP_API.pdf). #### Tax Calculation Required for international tax and value added tax only. Optional for U.S. and Canadian taxes. Your local currency.
|
21
24
|
attr_accessor :currency
|
22
25
|
|
@@ -89,6 +92,7 @@ module CyberSource
|
|
89
92
|
def self.attribute_map
|
90
93
|
{
|
91
94
|
:'total_amount' => :'totalAmount',
|
95
|
+
:'sub_total_amount' => :'subTotalAmount',
|
92
96
|
:'currency' => :'currency',
|
93
97
|
:'discount_amount' => :'discountAmount',
|
94
98
|
:'duty_amount' => :'dutyAmount',
|
@@ -120,6 +124,7 @@ module CyberSource
|
|
120
124
|
def self.swagger_types
|
121
125
|
{
|
122
126
|
:'total_amount' => :'String',
|
127
|
+
:'sub_total_amount' => :'String',
|
123
128
|
:'currency' => :'String',
|
124
129
|
:'discount_amount' => :'String',
|
125
130
|
:'duty_amount' => :'String',
|
@@ -159,6 +164,10 @@ module CyberSource
|
|
159
164
|
self.total_amount = attributes[:'totalAmount']
|
160
165
|
end
|
161
166
|
|
167
|
+
if attributes.has_key?(:'subTotalAmount')
|
168
|
+
self.sub_total_amount = attributes[:'subTotalAmount']
|
169
|
+
end
|
170
|
+
|
162
171
|
if attributes.has_key?(:'currency')
|
163
172
|
self.currency = attributes[:'currency']
|
164
173
|
end
|
@@ -279,6 +288,12 @@ module CyberSource
|
|
279
288
|
@total_amount = total_amount
|
280
289
|
end
|
281
290
|
|
291
|
+
# Custom attribute writer method with validation
|
292
|
+
# @param [Object] sub_total_amount Value to be assigned
|
293
|
+
def sub_total_amount=(sub_total_amount)
|
294
|
+
@sub_total_amount = sub_total_amount
|
295
|
+
end
|
296
|
+
|
282
297
|
# Custom attribute writer method with validation
|
283
298
|
# @param [Object] currency Value to be assigned
|
284
299
|
def currency=(currency)
|
@@ -405,6 +420,7 @@ module CyberSource
|
|
405
420
|
return true if self.equal?(o)
|
406
421
|
self.class == o.class &&
|
407
422
|
total_amount == o.total_amount &&
|
423
|
+
sub_total_amount == o.sub_total_amount &&
|
408
424
|
currency == o.currency &&
|
409
425
|
discount_amount == o.discount_amount &&
|
410
426
|
duty_amount == o.duty_amount &&
|
@@ -440,7 +456,7 @@ module CyberSource
|
|
440
456
|
# Calculates hash code according to all attributes.
|
441
457
|
# @return [Fixnum] Hash code
|
442
458
|
def hash
|
443
|
-
[total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion].hash
|
459
|
+
[total_amount, sub_total_amount, currency, discount_amount, duty_amount, gratuity_amount, tax_amount, national_tax_included, tax_applied_after_discount, tax_applied_level, tax_type_code, freight_amount, foreign_amount, foreign_currency, exchange_rate, exchange_rate_time_stamp, surcharge, settlement_amount, settlement_currency, amex_additional_amounts, tax_details, service_fee_amount, original_amount, original_currency, cashback_amount, currency_conversion].hash
|
444
460
|
end
|
445
461
|
|
446
462
|
# Builds the object from hash
|
@@ -58,6 +58,9 @@ module CyberSource
|
|
58
58
|
# Date of the tax calculation. Use format YYYYMMDD. You can provide a date in the past if you are calculating tax for a refund and want to know what the tax was on the date the order was placed. You can provide a date in the future if you are calculating the tax for a future date, such as an upcoming tax holiday. The default is the date, in Pacific time, that the bank receives the request. Keep this in mind if you are in a different time zone and want the tax calculated with the rates that are applicable on a specific date. #### Tax Calculation Optional field for U.S., Canadian, international tax, and value added taxes.
|
59
59
|
attr_accessor :invoice_date
|
60
60
|
|
61
|
+
# Cost centre of the merchant
|
62
|
+
attr_accessor :cost_center
|
63
|
+
|
61
64
|
# Attribute mapping from ruby-style variable name to JSON key.
|
62
65
|
def self.attribute_map
|
63
66
|
{
|
@@ -75,7 +78,8 @@ module CyberSource
|
|
75
78
|
:'reference_data_code' => :'referenceDataCode',
|
76
79
|
:'reference_data_number' => :'referenceDataNumber',
|
77
80
|
:'sales_slip_number' => :'salesSlipNumber',
|
78
|
-
:'invoice_date' => :'invoiceDate'
|
81
|
+
:'invoice_date' => :'invoiceDate',
|
82
|
+
:'cost_center' => :'costCenter'
|
79
83
|
}
|
80
84
|
end
|
81
85
|
|
@@ -96,7 +100,8 @@ module CyberSource
|
|
96
100
|
:'reference_data_code' => :'String',
|
97
101
|
:'reference_data_number' => :'String',
|
98
102
|
:'sales_slip_number' => :'Integer',
|
99
|
-
:'invoice_date' => :'String'
|
103
|
+
:'invoice_date' => :'String',
|
104
|
+
:'cost_center' => :'String'
|
100
105
|
}
|
101
106
|
end
|
102
107
|
|
@@ -169,6 +174,10 @@ module CyberSource
|
|
169
174
|
if attributes.has_key?(:'invoiceDate')
|
170
175
|
self.invoice_date = attributes[:'invoiceDate']
|
171
176
|
end
|
177
|
+
|
178
|
+
if attributes.has_key?(:'costCenter')
|
179
|
+
self.cost_center = attributes[:'costCenter']
|
180
|
+
end
|
172
181
|
end
|
173
182
|
|
174
183
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -247,6 +256,12 @@ module CyberSource
|
|
247
256
|
@invoice_date = invoice_date
|
248
257
|
end
|
249
258
|
|
259
|
+
# Custom attribute writer method with validation
|
260
|
+
# @param [Object] cost_center Value to be assigned
|
261
|
+
def cost_center=(cost_center)
|
262
|
+
@cost_center = cost_center
|
263
|
+
end
|
264
|
+
|
250
265
|
# Checks equality by comparing each attribute.
|
251
266
|
# @param [Object] Object to be compared
|
252
267
|
def ==(o)
|
@@ -266,7 +281,8 @@ module CyberSource
|
|
266
281
|
reference_data_code == o.reference_data_code &&
|
267
282
|
reference_data_number == o.reference_data_number &&
|
268
283
|
sales_slip_number == o.sales_slip_number &&
|
269
|
-
invoice_date == o.invoice_date
|
284
|
+
invoice_date == o.invoice_date &&
|
285
|
+
cost_center == o.cost_center
|
270
286
|
end
|
271
287
|
|
272
288
|
# @see the `==` method
|
@@ -278,7 +294,7 @@ module CyberSource
|
|
278
294
|
# Calculates hash code according to all attributes.
|
279
295
|
# @return [Fixnum] Hash code
|
280
296
|
def hash
|
281
|
-
[invoice_number, barcode_number, expiration_date, purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, reference_data_code, reference_data_number, sales_slip_number, invoice_date].hash
|
297
|
+
[invoice_number, barcode_number, expiration_date, purchase_order_number, purchase_order_date, purchase_contact_name, taxable, vat_invoice_reference_number, commodity_code, merchandise_code, transaction_advice_addendum, reference_data_code, reference_data_number, sales_slip_number, invoice_date, cost_center].hash
|
282
298
|
end
|
283
299
|
|
284
300
|
# Builds the object from hash
|
@@ -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
|