cybersource_rest_client 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +4 -2
- data/lib/cybersource_rest_client/api/payments_api.rb +2 -2
- data/lib/cybersource_rest_client/models/create_bundled_decision_manager_case_request.rb +13 -4
- data/lib/cybersource_rest_client/models/create_payment_request.rb +13 -4
- data/lib/cybersource_rest_client/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information.rb +32 -8
- data/lib/cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information.rb +32 -4
- data/lib/cybersource_rest_client/models/invoicingv2invoices_customer_information.rb +13 -4
- data/lib/cybersource_rest_client/models/invoicingv2invoices_customer_information_company.rb +190 -0
- data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_amount_details_freight.rb +20 -4
- data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_line_items.rb +84 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +13 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information.rb +13 -4
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_order_information_bill_to.rb +206 -0
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_payment_information_tokenized_card.rb +21 -5
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +17 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information_electronic_verification_results.rb +102 -6
- data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_export_compliance_information.rb → pts_v2_payments_post201_response_watchlist_screening_information.rb} +2 -2
- data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_export_compliance_information_watch_list.rb → pts_v2_payments_post201_response_watchlist_screening_information_watch_list.rb} +2 -2
- data/lib/cybersource_rest_client/models/{risk_v1_export_compliance_inquiries_post201_response_watch_list_matches.rb → pts_v2_payments_post201_response_watchlist_screening_information_watch_list_matches.rb} +1 -1
- data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +20 -4
- data/lib/cybersource_rest_client/models/pts_v2_payouts_post201_response_recipient_information_card.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +26 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +20 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_service_location.rb +238 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +36 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +26 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type.rb +11 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_tokenized_card.rb +21 -5
- data/lib/cybersource_rest_client/models/ptsv2payments_point_of_sale_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +12 -2
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_authorization_options.rb +14 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_watchlist_screening_information.rb +215 -0
- data/lib/cybersource_rest_client/models/{riskv1exportcomplianceinquiries_export_compliance_information_weights.rb → ptsv2payments_watchlist_screening_information_weights.rb} +1 -1
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information_payouts_options.rb +20 -4
- data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response.rb +10 -1
- data/lib/cybersource_rest_client/models/risk_v1_decisions_post201_response_error_information.rb +1 -1
- data/lib/cybersource_rest_client/models/risk_v1_export_compliance_inquiries_post201_response.rb +1 -1
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +26 -4
- data/lib/cybersource_rest_client/models/riskv1decisions_processing_information.rb +2 -2
- data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_export_compliance_information.rb +1 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +40 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_brands.rb +194 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_card.rb +27 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_features.rb +286 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_issuer_information.rb +238 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_network.rb +190 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payout_options.rb +190 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +11 -1
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information_electronic_verification_results.rb +2 -2
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_token_information.rb +24 -4
- data/lib/cybersource_rest_client.rb +13 -4
- metadata +31 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f36efce71b153b362f20d6897835a11a4b66a2b3d12472aac3edc7b3d1dee0
|
4
|
+
data.tar.gz: 5b9eea3c04953b8b990be37f4d8b3e92c9e565dca2536bf2bdff0d3bed55408d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66558780465d8f29ddb9dbfe2a429f4e574a3598d77aaea0c30310a5e06076098e9caa059cd816b1b2aa101b123326dd2862ddb200d373d57fc30c09cfcc331c
|
7
|
+
data.tar.gz: cc369436fc15e95bdb320721faedf5176eab9a40aafc5e1826ada9998c3553fc3f0ee9ded1ffaefdfa5d6fac1fa05eca3a5acf89e9b8bd567041af17e7fe73a7
|
@@ -3,12 +3,14 @@ require 'openssl'
|
|
3
3
|
require 'jwt'
|
4
4
|
require 'json'
|
5
5
|
require 'active_support'
|
6
|
+
require 'time'
|
6
7
|
require_relative '../../core/ITokenGeneration.rb'
|
7
8
|
require_relative '../../util/Constants.rb'
|
8
9
|
require_relative '../../util/ExceptionHandler.rb'
|
9
10
|
require_relative '../../util/Cache.rb'
|
10
11
|
require_relative '../../authentication/payloadDigest/digest.rb'
|
11
12
|
require_relative '../../logging/log_factory.rb'
|
13
|
+
|
12
14
|
public
|
13
15
|
class GenerateJwtToken
|
14
16
|
@log_obj
|
@@ -66,9 +68,9 @@ public
|
|
66
68
|
|
67
69
|
# Note: Digest is not passed for GET calls
|
68
70
|
digest = DigestGeneration.new.generateDigest(payload)
|
69
|
-
jwtBody = "{\n
|
71
|
+
jwtBody = "{\n \"digest\":\"" + digest + "\", \"digestAlgorithm\":\"SHA-256\", \"iat\":" + Time.parse(gmtDatetime).to_i.to_s + "}"
|
70
72
|
elsif request_type == Constants::GET_REQUEST_TYPE || request_type == Constants::DELETE_REQUEST_TYPE
|
71
|
-
jwtBody = "{\n \"iat\"
|
73
|
+
jwtBody = "{\n \"iat\":" + Time.parse(gmtDatetime).to_i.to_s + "\n} \n\n"
|
72
74
|
else
|
73
75
|
raise StandardError.new(Constants::ERROR_PREFIX + Constants::INVALID_REQUEST_TYPE_METHOD)
|
74
76
|
end
|
@@ -21,7 +21,7 @@ module CyberSource
|
|
21
21
|
@api_client.set_configuration(config)
|
22
22
|
end
|
23
23
|
# Process a Payment
|
24
|
-
# A payment authorizes the amount for the transaction. There are a number of supported payment feature, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/
|
24
|
+
# A payment authorizes the amount for the transaction. There are a number of supported payment feature, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
|
25
25
|
# @param create_payment_request
|
26
26
|
# @param [Hash] opts the optional parameters
|
27
27
|
# @return [PtsV2PaymentsPost201Response]
|
@@ -31,7 +31,7 @@ module CyberSource
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Process a Payment
|
34
|
-
# A payment authorizes the amount for the transaction. There are a number of supported payment feature, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/
|
34
|
+
# A payment authorizes the amount for the transaction. There are a number of supported payment feature, such as E-commerce and Card Present - Credit Card/Debit Card, Echeck, e-Wallets, Level II/III Data, etc.. A payment response includes the status of the request. It also includes processor-specific information when the request is successful and errors if unsuccessful. See the [Payments Developer Guides Page](https://developer.cybersource.com/docs/cybs/en-us/payments/developer/ctv/rest/payments/payments-intro.html). Authorization can be requested with Capture, Decision Manager, Payer Authentication(3ds), and Token Creation.
|
35
35
|
# @param create_payment_request
|
36
36
|
# @param [Hash] opts the optional parameters
|
37
37
|
# @return [Array<(PtsV2PaymentsPost201Response, Fixnum, Hash)>] PtsV2PaymentsPost201Response data, response status code and response headers
|
@@ -42,6 +42,8 @@ module CyberSource
|
|
42
42
|
|
43
43
|
attr_accessor :consumer_authentication_information
|
44
44
|
|
45
|
+
attr_accessor :watchlist_screening_information
|
46
|
+
|
45
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
48
|
def self.attribute_map
|
47
49
|
{
|
@@ -58,7 +60,8 @@ module CyberSource
|
|
58
60
|
:'merchant_information' => :'merchantInformation',
|
59
61
|
:'acquirer_information' => :'acquirerInformation',
|
60
62
|
:'recurring_payment_information' => :'recurringPaymentInformation',
|
61
|
-
:'consumer_authentication_information' => :'consumerAuthenticationInformation'
|
63
|
+
:'consumer_authentication_information' => :'consumerAuthenticationInformation',
|
64
|
+
:'watchlist_screening_information' => :'watchlistScreeningInformation'
|
62
65
|
}
|
63
66
|
end
|
64
67
|
|
@@ -78,7 +81,8 @@ module CyberSource
|
|
78
81
|
:'merchant_information' => :'Riskv1decisionsMerchantInformation',
|
79
82
|
:'acquirer_information' => :'Ptsv2paymentsAcquirerInformation',
|
80
83
|
:'recurring_payment_information' => :'Ptsv2paymentsRecurringPaymentInformation',
|
81
|
-
:'consumer_authentication_information' => :'Riskv1decisionsConsumerAuthenticationInformation'
|
84
|
+
:'consumer_authentication_information' => :'Riskv1decisionsConsumerAuthenticationInformation',
|
85
|
+
:'watchlist_screening_information' => :'Ptsv2paymentsWatchlistScreeningInformation'
|
82
86
|
}
|
83
87
|
end
|
84
88
|
|
@@ -147,6 +151,10 @@ module CyberSource
|
|
147
151
|
if attributes.has_key?(:'consumerAuthenticationInformation')
|
148
152
|
self.consumer_authentication_information = attributes[:'consumerAuthenticationInformation']
|
149
153
|
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'watchlistScreeningInformation')
|
156
|
+
self.watchlist_screening_information = attributes[:'watchlistScreeningInformation']
|
157
|
+
end
|
150
158
|
end
|
151
159
|
|
152
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -180,7 +188,8 @@ module CyberSource
|
|
180
188
|
merchant_information == o.merchant_information &&
|
181
189
|
acquirer_information == o.acquirer_information &&
|
182
190
|
recurring_payment_information == o.recurring_payment_information &&
|
183
|
-
consumer_authentication_information == o.consumer_authentication_information
|
191
|
+
consumer_authentication_information == o.consumer_authentication_information &&
|
192
|
+
watchlist_screening_information == o.watchlist_screening_information
|
184
193
|
end
|
185
194
|
|
186
195
|
# @see the `==` method
|
@@ -192,7 +201,7 @@ module CyberSource
|
|
192
201
|
# Calculates hash code according to all attributes.
|
193
202
|
# @return [Fixnum] Hash code
|
194
203
|
def hash
|
195
|
-
[client_reference_information, processor_information, processing_information, payment_information, order_information, buyer_information, device_information, risk_information, travel_information, merchant_defined_information, merchant_information, acquirer_information, recurring_payment_information, consumer_authentication_information].hash
|
204
|
+
[client_reference_information, processor_information, processing_information, payment_information, order_information, buyer_information, device_information, risk_information, travel_information, merchant_defined_information, merchant_information, acquirer_information, recurring_payment_information, consumer_authentication_information, watchlist_screening_information].hash
|
196
205
|
end
|
197
206
|
|
198
207
|
# Builds the object from hash
|
@@ -61,6 +61,8 @@ module CyberSource
|
|
61
61
|
|
62
62
|
attr_accessor :recurring_payment_information
|
63
63
|
|
64
|
+
attr_accessor :watchlist_screening_information
|
65
|
+
|
64
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
65
67
|
def self.attribute_map
|
66
68
|
{
|
@@ -86,7 +88,8 @@ module CyberSource
|
|
86
88
|
:'processor_information' => :'processorInformation',
|
87
89
|
:'risk_information' => :'riskInformation',
|
88
90
|
:'acquirer_information' => :'acquirerInformation',
|
89
|
-
:'recurring_payment_information' => :'recurringPaymentInformation'
|
91
|
+
:'recurring_payment_information' => :'recurringPaymentInformation',
|
92
|
+
:'watchlist_screening_information' => :'watchlistScreeningInformation'
|
90
93
|
}
|
91
94
|
end
|
92
95
|
|
@@ -115,7 +118,8 @@ module CyberSource
|
|
115
118
|
:'processor_information' => :'Ptsv2paymentsProcessorInformation',
|
116
119
|
:'risk_information' => :'Ptsv2paymentsRiskInformation',
|
117
120
|
:'acquirer_information' => :'Ptsv2paymentsAcquirerInformation',
|
118
|
-
:'recurring_payment_information' => :'Ptsv2paymentsRecurringPaymentInformation'
|
121
|
+
:'recurring_payment_information' => :'Ptsv2paymentsRecurringPaymentInformation',
|
122
|
+
:'watchlist_screening_information' => :'Ptsv2paymentsWatchlistScreeningInformation'
|
119
123
|
}
|
120
124
|
end
|
121
125
|
|
@@ -220,6 +224,10 @@ module CyberSource
|
|
220
224
|
if attributes.has_key?(:'recurringPaymentInformation')
|
221
225
|
self.recurring_payment_information = attributes[:'recurringPaymentInformation']
|
222
226
|
end
|
227
|
+
|
228
|
+
if attributes.has_key?(:'watchlistScreeningInformation')
|
229
|
+
self.watchlist_screening_information = attributes[:'watchlistScreeningInformation']
|
230
|
+
end
|
223
231
|
end
|
224
232
|
|
225
233
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -262,7 +270,8 @@ module CyberSource
|
|
262
270
|
processor_information == o.processor_information &&
|
263
271
|
risk_information == o.risk_information &&
|
264
272
|
acquirer_information == o.acquirer_information &&
|
265
|
-
recurring_payment_information == o.recurring_payment_information
|
273
|
+
recurring_payment_information == o.recurring_payment_information &&
|
274
|
+
watchlist_screening_information == o.watchlist_screening_information
|
266
275
|
end
|
267
276
|
|
268
277
|
# @see the `==` method
|
@@ -274,7 +283,7 @@ module CyberSource
|
|
274
283
|
# Calculates hash code according to all attributes.
|
275
284
|
# @return [Fixnum] Hash code
|
276
285
|
def hash
|
277
|
-
[client_reference_information, processing_information, issuer_information, payment_information, order_information, buyer_information, recipient_information, device_information, merchant_information, aggregator_information, consumer_authentication_information, point_of_sale_information, merchant_defined_information, installment_information, travel_information, health_care_information, promotion_information, token_information, invoice_details, processor_information, risk_information, acquirer_information, recurring_payment_information].hash
|
286
|
+
[client_reference_information, processing_information, issuer_information, payment_information, order_information, buyer_information, recipient_information, device_information, merchant_information, aggregator_information, consumer_authentication_information, point_of_sale_information, merchant_defined_information, installment_information, travel_information, health_care_information, promotion_information, token_information, invoice_details, processor_information, risk_information, acquirer_information, recurring_payment_information, watchlist_screening_information].hash
|
278
287
|
end
|
279
288
|
|
280
289
|
# Builds the object from hash
|
@@ -34,9 +34,15 @@ module CyberSource
|
|
34
34
|
# 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.
|
35
35
|
attr_accessor :default_currency_code
|
36
36
|
|
37
|
-
# The 3D Secure payer authentication
|
37
|
+
# The 3D Secure payer authentication status for a merchant's invoice payments.
|
38
38
|
attr_accessor :payer_authentication3_ds_version
|
39
39
|
|
40
|
+
# Display VAT number on Invoice.
|
41
|
+
attr_accessor :show_vat_number
|
42
|
+
|
43
|
+
# Your government-assigned tax identification number. #### Tax Calculation Required field for value added tax only. Not applicable to U.S. and Canadian taxes.
|
44
|
+
attr_accessor :vat_registration_number
|
45
|
+
|
40
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
47
|
def self.attribute_map
|
42
48
|
{
|
@@ -47,7 +53,9 @@ module CyberSource
|
|
47
53
|
:'header_style' => :'headerStyle',
|
48
54
|
:'delivery_language' => :'deliveryLanguage',
|
49
55
|
:'default_currency_code' => :'defaultCurrencyCode',
|
50
|
-
:'payer_authentication3_ds_version' => :'payerAuthentication3DSVersion'
|
56
|
+
:'payer_authentication3_ds_version' => :'payerAuthentication3DSVersion',
|
57
|
+
:'show_vat_number' => :'showVatNumber',
|
58
|
+
:'vat_registration_number' => :'vatRegistrationNumber'
|
51
59
|
}
|
52
60
|
end
|
53
61
|
|
@@ -61,7 +69,9 @@ module CyberSource
|
|
61
69
|
:'header_style' => :'InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle',
|
62
70
|
:'delivery_language' => :'String',
|
63
71
|
:'default_currency_code' => :'String',
|
64
|
-
:'payer_authentication3_ds_version' => :'
|
72
|
+
:'payer_authentication3_ds_version' => :'BOOLEAN',
|
73
|
+
:'show_vat_number' => :'BOOLEAN',
|
74
|
+
:'vat_registration_number' => :'String'
|
65
75
|
}
|
66
76
|
end
|
67
77
|
|
@@ -103,6 +113,18 @@ module CyberSource
|
|
103
113
|
|
104
114
|
if attributes.has_key?(:'payerAuthentication3DSVersion')
|
105
115
|
self.payer_authentication3_ds_version = attributes[:'payerAuthentication3DSVersion']
|
116
|
+
else
|
117
|
+
self.payer_authentication3_ds_version = false
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'showVatNumber')
|
121
|
+
self.show_vat_number = attributes[:'showVatNumber']
|
122
|
+
else
|
123
|
+
self.show_vat_number = false
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.has_key?(:'vatRegistrationNumber')
|
127
|
+
self.vat_registration_number = attributes[:'vatRegistrationNumber']
|
106
128
|
end
|
107
129
|
end
|
108
130
|
|
@@ -150,9 +172,9 @@ module CyberSource
|
|
150
172
|
end
|
151
173
|
|
152
174
|
# Custom attribute writer method with validation
|
153
|
-
# @param [Object]
|
154
|
-
def
|
155
|
-
@
|
175
|
+
# @param [Object] vat_registration_number Value to be assigned
|
176
|
+
def vat_registration_number=(vat_registration_number)
|
177
|
+
@vat_registration_number = vat_registration_number
|
156
178
|
end
|
157
179
|
|
158
180
|
# Checks equality by comparing each attribute.
|
@@ -167,7 +189,9 @@ module CyberSource
|
|
167
189
|
header_style == o.header_style &&
|
168
190
|
delivery_language == o.delivery_language &&
|
169
191
|
default_currency_code == o.default_currency_code &&
|
170
|
-
payer_authentication3_ds_version == o.payer_authentication3_ds_version
|
192
|
+
payer_authentication3_ds_version == o.payer_authentication3_ds_version &&
|
193
|
+
show_vat_number == o.show_vat_number &&
|
194
|
+
vat_registration_number == o.vat_registration_number
|
171
195
|
end
|
172
196
|
|
173
197
|
# @see the `==` method
|
@@ -179,7 +203,7 @@ module CyberSource
|
|
179
203
|
# Calculates hash code according to all attributes.
|
180
204
|
# @return [Fixnum] Hash code
|
181
205
|
def hash
|
182
|
-
[merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication3_ds_version].hash
|
206
|
+
[merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication3_ds_version, show_vat_number, vat_registration_number].hash
|
183
207
|
end
|
184
208
|
|
185
209
|
# Builds the object from hash
|
data/lib/cybersource_rest_client/models/invoicingv2invoice_settings_invoice_settings_information.rb
CHANGED
@@ -37,6 +37,12 @@ module CyberSource
|
|
37
37
|
# For a merchant's invoice payments, enable 3D Secure payer authentication version 1, update to 3D Secure version 2, or disable 3D Secure. Possible values are: - `enable` - `update` - `disable`
|
38
38
|
attr_accessor :payer_authentication_in_invoicing
|
39
39
|
|
40
|
+
# Display VAT number on Invoice.
|
41
|
+
attr_accessor :show_vat_number
|
42
|
+
|
43
|
+
# Your government-assigned tax identification number. #### Tax Calculation Required field for value added tax only. Not applicable to U.S. and Canadian taxes.
|
44
|
+
attr_accessor :vat_registration_number
|
45
|
+
|
40
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
47
|
def self.attribute_map
|
42
48
|
{
|
@@ -47,7 +53,9 @@ module CyberSource
|
|
47
53
|
:'header_style' => :'headerStyle',
|
48
54
|
:'delivery_language' => :'deliveryLanguage',
|
49
55
|
:'default_currency_code' => :'defaultCurrencyCode',
|
50
|
-
:'payer_authentication_in_invoicing' => :'payerAuthenticationInInvoicing'
|
56
|
+
:'payer_authentication_in_invoicing' => :'payerAuthenticationInInvoicing',
|
57
|
+
:'show_vat_number' => :'showVatNumber',
|
58
|
+
:'vat_registration_number' => :'vatRegistrationNumber'
|
51
59
|
}
|
52
60
|
end
|
53
61
|
|
@@ -61,7 +69,9 @@ module CyberSource
|
|
61
69
|
:'header_style' => :'InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle',
|
62
70
|
:'delivery_language' => :'String',
|
63
71
|
:'default_currency_code' => :'String',
|
64
|
-
:'payer_authentication_in_invoicing' => :'String'
|
72
|
+
:'payer_authentication_in_invoicing' => :'String',
|
73
|
+
:'show_vat_number' => :'BOOLEAN',
|
74
|
+
:'vat_registration_number' => :'String'
|
65
75
|
}
|
66
76
|
end
|
67
77
|
|
@@ -104,6 +114,16 @@ module CyberSource
|
|
104
114
|
if attributes.has_key?(:'payerAuthenticationInInvoicing')
|
105
115
|
self.payer_authentication_in_invoicing = attributes[:'payerAuthenticationInInvoicing']
|
106
116
|
end
|
117
|
+
|
118
|
+
if attributes.has_key?(:'showVatNumber')
|
119
|
+
self.show_vat_number = attributes[:'showVatNumber']
|
120
|
+
else
|
121
|
+
self.show_vat_number = false
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'vatRegistrationNumber')
|
125
|
+
self.vat_registration_number = attributes[:'vatRegistrationNumber']
|
126
|
+
end
|
107
127
|
end
|
108
128
|
|
109
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -155,6 +175,12 @@ module CyberSource
|
|
155
175
|
@payer_authentication_in_invoicing = payer_authentication_in_invoicing
|
156
176
|
end
|
157
177
|
|
178
|
+
# Custom attribute writer method with validation
|
179
|
+
# @param [Object] vat_registration_number Value to be assigned
|
180
|
+
def vat_registration_number=(vat_registration_number)
|
181
|
+
@vat_registration_number = vat_registration_number
|
182
|
+
end
|
183
|
+
|
158
184
|
# Checks equality by comparing each attribute.
|
159
185
|
# @param [Object] Object to be compared
|
160
186
|
def ==(o)
|
@@ -167,7 +193,9 @@ module CyberSource
|
|
167
193
|
header_style == o.header_style &&
|
168
194
|
delivery_language == o.delivery_language &&
|
169
195
|
default_currency_code == o.default_currency_code &&
|
170
|
-
payer_authentication_in_invoicing == o.payer_authentication_in_invoicing
|
196
|
+
payer_authentication_in_invoicing == o.payer_authentication_in_invoicing &&
|
197
|
+
show_vat_number == o.show_vat_number &&
|
198
|
+
vat_registration_number == o.vat_registration_number
|
171
199
|
end
|
172
200
|
|
173
201
|
# @see the `==` method
|
@@ -179,7 +207,7 @@ module CyberSource
|
|
179
207
|
# Calculates hash code according to all attributes.
|
180
208
|
# @return [Fixnum] Hash code
|
181
209
|
def hash
|
182
|
-
[merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication_in_invoicing].hash
|
210
|
+
[merchant_logo, merchant_display_name, custom_email_message, enable_reminders, header_style, delivery_language, default_currency_code, payer_authentication_in_invoicing, show_vat_number, vat_registration_number].hash
|
183
211
|
end
|
184
212
|
|
185
213
|
# Builds the object from hash
|
@@ -24,12 +24,15 @@ module CyberSource
|
|
24
24
|
# Your identifier for the customer. When a subscription or customer profile is being created, the maximum length for this field for most processors is 30. Otherwise, the maximum length is 100. #### Comercio Latino For recurring payments in Mexico, the value is the customer’s contract number. Note Before you request the authorization, you must inform the issuer of the customer contract numbers that will be used for recurring transactions. #### Worldpay VAP For a follow-on credit with Worldpay VAP, CyberSource checks the following locations, in the order given, for a customer account ID value and uses the first value it finds: 1. `customer_account_id` value in the follow-on credit request 2. Customer account ID value that was used for the capture that is being credited 3. Customer account ID value that was used for the original authorization If a customer account ID value cannot be found in any of these locations, then no value is used. For processor-specific information, see the `customer_account_id` field description in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
25
25
|
attr_accessor :merchant_customer_id
|
26
26
|
|
27
|
+
attr_accessor :company
|
28
|
+
|
27
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
30
|
def self.attribute_map
|
29
31
|
{
|
30
32
|
:'name' => :'name',
|
31
33
|
:'email' => :'email',
|
32
|
-
:'merchant_customer_id' => :'merchantCustomerId'
|
34
|
+
:'merchant_customer_id' => :'merchantCustomerId',
|
35
|
+
:'company' => :'company'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
@@ -38,7 +41,8 @@ module CyberSource
|
|
38
41
|
{
|
39
42
|
:'name' => :'String',
|
40
43
|
:'email' => :'String',
|
41
|
-
:'merchant_customer_id' => :'String'
|
44
|
+
:'merchant_customer_id' => :'String',
|
45
|
+
:'company' => :'Invoicingv2invoicesCustomerInformationCompany'
|
42
46
|
}
|
43
47
|
end
|
44
48
|
|
@@ -61,6 +65,10 @@ module CyberSource
|
|
61
65
|
if attributes.has_key?(:'merchantCustomerId')
|
62
66
|
self.merchant_customer_id = attributes[:'merchantCustomerId']
|
63
67
|
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'company')
|
70
|
+
self.company = attributes[:'company']
|
71
|
+
end
|
64
72
|
end
|
65
73
|
|
66
74
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -101,7 +109,8 @@ module CyberSource
|
|
101
109
|
self.class == o.class &&
|
102
110
|
name == o.name &&
|
103
111
|
email == o.email &&
|
104
|
-
merchant_customer_id == o.merchant_customer_id
|
112
|
+
merchant_customer_id == o.merchant_customer_id &&
|
113
|
+
company == o.company
|
105
114
|
end
|
106
115
|
|
107
116
|
# @see the `==` method
|
@@ -113,7 +122,7 @@ module CyberSource
|
|
113
122
|
# Calculates hash code according to all attributes.
|
114
123
|
# @return [Fixnum] Hash code
|
115
124
|
def hash
|
116
|
-
[name, email, merchant_customer_id].hash
|
125
|
+
[name, email, merchant_customer_id, company].hash
|
117
126
|
end
|
118
127
|
|
119
128
|
# 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 Invoicingv2invoicesCustomerInformationCompany
|
17
|
+
# Name of the customer’s company. **CyberSource through VisaNet** Credit card networks cannot process transactions that contain non-ASCII characters. CyberSource through VisaNet accepts and stores non-ASCII characters correctly and displays them correctly in reports. However, the limitations of the credit card networks prevent CyberSource through VisaNet from transmitting non-ASCII characters to the credit card networks. Therefore, CyberSource through VisaNet replaces non-ASCII characters with meaningless ASCII characters for transmission to the credit card networks. For processor-specific information, see the `company_name` field in [Credit Card Services Using the SCMP API.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html)
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'name' => :'name'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'name' => :'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?(:'name')
|
43
|
+
self.name = attributes[:'name']
|
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] name Value to be assigned
|
62
|
+
def name=(name)
|
63
|
+
@name = name
|
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
|
+
name == o.name
|
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
|
+
[name].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
|