cybersource_rest_client 0.0.16 → 0.0.17
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/cybersource_rest_client.rb +12 -5
- data/lib/cybersource_rest_client/api/credit_api.rb +1 -1
- data/lib/cybersource_rest_client/api/download_dtd_api.rb +4 -4
- data/lib/cybersource_rest_client/api/download_xsd_api.rb +4 -4
- data/lib/cybersource_rest_client/api/payments_api.rb +1 -1
- data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +9 -9
- data/lib/cybersource_rest_client/api/reports_api.rb +9 -9
- data/lib/cybersource_rest_client/api/search_transactions_api.rb +1 -1
- data/lib/cybersource_rest_client/api/transaction_batches_api.rb +2 -8
- data/lib/cybersource_rest_client/models/{request_body.rb → create_adhoc_report_request.rb} +1 -1
- data/lib/cybersource_rest_client/models/{request_body_1.rb → create_report_subscription_request.rb} +1 -1
- data/lib/cybersource_rest_client/models/error.rb +23 -13
- data/lib/cybersource_rest_client/models/error_bean.rb +1 -1
- data/lib/cybersource_rest_client/models/error_links.rb +15 -15
- data/lib/cybersource_rest_client/models/error_response.rb +2 -20
- data/lib/cybersource_rest_client/models/inline_response_400.rb +59 -14
- data/lib/cybersource_rest_client/models/inline_response_400_1.rb +14 -59
- data/lib/cybersource_rest_client/models/{inline_response_400_1_fields.rb → inline_response_400_fields.rb} +1 -1
- data/lib/cybersource_rest_client/models/link.rb +4 -25
- data/lib/cybersource_rest_client/models/links.rb +14 -18
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information.rb +22 -4
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_electronic_benefits_transfer.rb +199 -0
- data/lib/cybersource_rest_client/models/ptsv2credits_processing_information_purchase_options.rb +184 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +29 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_order_information_line_items.rb +6 -6
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type.rb +203 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type_method.rb +184 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +22 -4
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_electronic_benefits_transfer.rb +224 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_purchase_options.rb +209 -0
- data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb +29 -4
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb +6 -6
- data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +13 -4
- data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb +6 -6
- data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_payment_information.rb +183 -0
- data/lib/cybersource_rest_client/models/riskv1decisions_order_information_line_items.rb +6 -6
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +2 -2
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information_payment_type.rb +1 -1
- data/lib/cybersource_rest_client/models/void_capture_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_credit_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_payment_request.rb +13 -4
- data/lib/cybersource_rest_client/models/void_refund_request.rb +13 -4
- metadata +12 -5
data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_amount_details.rb
CHANGED
@@ -69,6 +69,9 @@ module CyberSource
|
|
69
69
|
# Your local pricing currency code. For the possible values, see the [ISO Standard Currency Codes.](http://apps.cybersource.com/library/documentation/sbc/quickref/currencies.pdf) For details, see `original_currency` field description in [Credit Card Services Using the SCMP API.](https://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm) For details about converting a foreign cardholder’s purchase from your local pricing currency to the cardholder’s billing currency, see the [Dynamic Currency Conversion with a Third Party Provider Guide.](http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SCMP_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm).
|
70
70
|
attr_accessor :original_currency
|
71
71
|
|
72
|
+
# Cashback amount requested by the customer. If a cashback amount is included in the request, it must be included in the orderInformation.amountDetails.totalAmount value.
|
73
|
+
attr_accessor :cashback_amount
|
74
|
+
|
72
75
|
# Attribute mapping from ruby-style variable name to JSON key.
|
73
76
|
def self.attribute_map
|
74
77
|
{
|
@@ -90,7 +93,8 @@ module CyberSource
|
|
90
93
|
:'amex_additional_amounts' => :'amexAdditionalAmounts',
|
91
94
|
:'tax_details' => :'taxDetails',
|
92
95
|
:'service_fee_amount' => :'serviceFeeAmount',
|
93
|
-
:'original_currency' => :'originalCurrency'
|
96
|
+
:'original_currency' => :'originalCurrency',
|
97
|
+
:'cashback_amount' => :'cashbackAmount'
|
94
98
|
}
|
95
99
|
end
|
96
100
|
|
@@ -115,7 +119,8 @@ module CyberSource
|
|
115
119
|
:'amex_additional_amounts' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsAmexAdditionalAmounts>',
|
116
120
|
:'tax_details' => :'Array<Ptsv2paymentsOrderInformationAmountDetailsTaxDetails>',
|
117
121
|
:'service_fee_amount' => :'String',
|
118
|
-
:'original_currency' => :'String'
|
122
|
+
:'original_currency' => :'String',
|
123
|
+
:'cashback_amount' => :'String'
|
119
124
|
}
|
120
125
|
end
|
121
126
|
|
@@ -206,6 +211,10 @@ module CyberSource
|
|
206
211
|
if attributes.has_key?(:'originalCurrency')
|
207
212
|
self.original_currency = attributes[:'originalCurrency']
|
208
213
|
end
|
214
|
+
|
215
|
+
if attributes.has_key?(:'cashbackAmount')
|
216
|
+
self.cashback_amount = attributes[:'cashbackAmount']
|
217
|
+
end
|
209
218
|
end
|
210
219
|
|
211
220
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -280,6 +289,10 @@ module CyberSource
|
|
280
289
|
invalid_properties.push('invalid value for "original_currency", the character length must be smaller than or equal to 15.')
|
281
290
|
end
|
282
291
|
|
292
|
+
if !@cashback_amount.nil? && @cashback_amount.to_s.length > 13
|
293
|
+
invalid_properties.push('invalid value for "cashback_amount", the character length must be smaller than or equal to 13.')
|
294
|
+
end
|
295
|
+
|
283
296
|
invalid_properties
|
284
297
|
end
|
285
298
|
|
@@ -303,6 +316,7 @@ module CyberSource
|
|
303
316
|
return false if !@exchange_rate_time_stamp.nil? && @exchange_rate_time_stamp.to_s.length > 14
|
304
317
|
return false if !@service_fee_amount.nil? && @service_fee_amount.to_s.length > 15
|
305
318
|
return false if !@original_currency.nil? && @original_currency.to_s.length > 15
|
319
|
+
return false if !@cashback_amount.nil? && @cashback_amount.to_s.length > 13
|
306
320
|
true
|
307
321
|
end
|
308
322
|
|
@@ -476,6 +490,16 @@ module CyberSource
|
|
476
490
|
@original_currency = original_currency
|
477
491
|
end
|
478
492
|
|
493
|
+
# Custom attribute writer method with validation
|
494
|
+
# @param [Object] cashback_amount Value to be assigned
|
495
|
+
def cashback_amount=(cashback_amount)
|
496
|
+
if !cashback_amount.nil? && cashback_amount.to_s.length > 13
|
497
|
+
fail ArgumentError, 'invalid value for "cashback_amount", the character length must be smaller than or equal to 13.'
|
498
|
+
end
|
499
|
+
|
500
|
+
@cashback_amount = cashback_amount
|
501
|
+
end
|
502
|
+
|
479
503
|
# Checks equality by comparing each attribute.
|
480
504
|
# @param [Object] Object to be compared
|
481
505
|
def ==(o)
|
@@ -499,7 +523,8 @@ module CyberSource
|
|
499
523
|
amex_additional_amounts == o.amex_additional_amounts &&
|
500
524
|
tax_details == o.tax_details &&
|
501
525
|
service_fee_amount == o.service_fee_amount &&
|
502
|
-
original_currency == o.original_currency
|
526
|
+
original_currency == o.original_currency &&
|
527
|
+
cashback_amount == o.cashback_amount
|
503
528
|
end
|
504
529
|
|
505
530
|
# @see the `==` method
|
@@ -511,7 +536,7 @@ module CyberSource
|
|
511
536
|
# Calculates hash code according to all attributes.
|
512
537
|
# @return [Fixnum] Hash code
|
513
538
|
def hash
|
514
|
-
[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, amex_additional_amounts, tax_details, service_fee_amount, original_currency].hash
|
539
|
+
[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, amex_additional_amounts, tax_details, service_fee_amount, original_currency, cashback_amount].hash
|
515
540
|
end
|
516
541
|
|
517
542
|
# Builds the object from hash
|
data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_order_information_line_items.rb
CHANGED
@@ -105,7 +105,7 @@ module CyberSource
|
|
105
105
|
:'product_code' => :'String',
|
106
106
|
:'product_name' => :'String',
|
107
107
|
:'product_sku' => :'String',
|
108
|
-
:'quantity' => :'
|
108
|
+
:'quantity' => :'Integer',
|
109
109
|
:'unit_price' => :'String',
|
110
110
|
:'unit_of_measure' => :'String',
|
111
111
|
:'total_amount' => :'String',
|
@@ -232,8 +232,8 @@ module CyberSource
|
|
232
232
|
invalid_properties.push('invalid value for "product_sku", the character length must be smaller than or equal to 255.')
|
233
233
|
end
|
234
234
|
|
235
|
-
if !@quantity.nil? && @quantity >
|
236
|
-
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to
|
235
|
+
if !@quantity.nil? && @quantity > 999999999
|
236
|
+
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 999999999.')
|
237
237
|
end
|
238
238
|
|
239
239
|
if !@quantity.nil? && @quantity < 1
|
@@ -301,7 +301,7 @@ module CyberSource
|
|
301
301
|
return false if !@product_code.nil? && @product_code.to_s.length > 255
|
302
302
|
return false if !@product_name.nil? && @product_name.to_s.length > 255
|
303
303
|
return false if !@product_sku.nil? && @product_sku.to_s.length > 255
|
304
|
-
return false if !@quantity.nil? && @quantity >
|
304
|
+
return false if !@quantity.nil? && @quantity > 999999999
|
305
305
|
return false if !@quantity.nil? && @quantity < 1
|
306
306
|
return false if !@unit_price.nil? && @unit_price.to_s.length > 15
|
307
307
|
return false if !@unit_of_measure.nil? && @unit_of_measure.to_s.length > 12
|
@@ -352,8 +352,8 @@ module CyberSource
|
|
352
352
|
# Custom attribute writer method with validation
|
353
353
|
# @param [Object] quantity Value to be assigned
|
354
354
|
def quantity=(quantity)
|
355
|
-
if !quantity.nil? && quantity >
|
356
|
-
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to
|
355
|
+
if !quantity.nil? && quantity > 999999999
|
356
|
+
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 999999999.'
|
357
357
|
end
|
358
358
|
|
359
359
|
if !quantity.nil? && quantity < 1
|
@@ -20,12 +20,15 @@ module CyberSource
|
|
20
20
|
|
21
21
|
attr_accessor :customer
|
22
22
|
|
23
|
+
attr_accessor :payment_type
|
24
|
+
|
23
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
24
26
|
def self.attribute_map
|
25
27
|
{
|
26
28
|
:'card' => :'card',
|
27
29
|
:'bank' => :'bank',
|
28
|
-
:'customer' => :'customer'
|
30
|
+
:'customer' => :'customer',
|
31
|
+
:'payment_type' => :'paymentType'
|
29
32
|
}
|
30
33
|
end
|
31
34
|
|
@@ -34,7 +37,8 @@ module CyberSource
|
|
34
37
|
{
|
35
38
|
:'card' => :'Ptsv2paymentsidrefundsPaymentInformationCard',
|
36
39
|
:'bank' => :'Ptsv2paymentsPaymentInformationBank',
|
37
|
-
:'customer' => :'Ptsv2paymentsPaymentInformationCustomer'
|
40
|
+
:'customer' => :'Ptsv2paymentsPaymentInformationCustomer',
|
41
|
+
:'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType'
|
38
42
|
}
|
39
43
|
end
|
40
44
|
|
@@ -57,6 +61,10 @@ module CyberSource
|
|
57
61
|
if attributes.has_key?(:'customer')
|
58
62
|
self.customer = attributes[:'customer']
|
59
63
|
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'paymentType')
|
66
|
+
self.payment_type = attributes[:'paymentType']
|
67
|
+
end
|
60
68
|
end
|
61
69
|
|
62
70
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -79,7 +87,8 @@ module CyberSource
|
|
79
87
|
self.class == o.class &&
|
80
88
|
card == o.card &&
|
81
89
|
bank == o.bank &&
|
82
|
-
customer == o.customer
|
90
|
+
customer == o.customer &&
|
91
|
+
payment_type == o.payment_type
|
83
92
|
end
|
84
93
|
|
85
94
|
# @see the `==` method
|
@@ -91,7 +100,7 @@ module CyberSource
|
|
91
100
|
# Calculates hash code according to all attributes.
|
92
101
|
# @return [Fixnum] Hash code
|
93
102
|
def hash
|
94
|
-
[card, bank, customer].hash
|
103
|
+
[card, bank, customer, payment_type].hash
|
95
104
|
end
|
96
105
|
|
97
106
|
# Builds the object from hash
|
data/lib/cybersource_rest_client/models/ptsv2paymentsidreversals_order_information_line_items.rb
CHANGED
@@ -31,7 +31,7 @@ module CyberSource
|
|
31
31
|
# Attribute type mapping.
|
32
32
|
def self.swagger_types
|
33
33
|
{
|
34
|
-
:'quantity' => :'
|
34
|
+
:'quantity' => :'Integer',
|
35
35
|
:'unit_price' => :'String'
|
36
36
|
}
|
37
37
|
end
|
@@ -57,8 +57,8 @@ module CyberSource
|
|
57
57
|
# @return Array for valid properties with the reasons
|
58
58
|
def list_invalid_properties
|
59
59
|
invalid_properties = Array.new
|
60
|
-
if !@quantity.nil? && @quantity >
|
61
|
-
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to
|
60
|
+
if !@quantity.nil? && @quantity > 999999999
|
61
|
+
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 999999999.')
|
62
62
|
end
|
63
63
|
|
64
64
|
if !@quantity.nil? && @quantity < 1
|
@@ -75,7 +75,7 @@ module CyberSource
|
|
75
75
|
# Check to see if the all the properties in the model are valid
|
76
76
|
# @return true if the model is valid
|
77
77
|
def valid?
|
78
|
-
return false if !@quantity.nil? && @quantity >
|
78
|
+
return false if !@quantity.nil? && @quantity > 999999999
|
79
79
|
return false if !@quantity.nil? && @quantity < 1
|
80
80
|
return false if !@unit_price.nil? && @unit_price.to_s.length > 15
|
81
81
|
true
|
@@ -84,8 +84,8 @@ module CyberSource
|
|
84
84
|
# Custom attribute writer method with validation
|
85
85
|
# @param [Object] quantity Value to be assigned
|
86
86
|
def quantity=(quantity)
|
87
|
-
if !quantity.nil? && quantity >
|
88
|
-
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to
|
87
|
+
if !quantity.nil? && quantity > 999999999
|
88
|
+
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 999999999.'
|
89
89
|
end
|
90
90
|
|
91
91
|
if !quantity.nil? && quantity < 1
|
@@ -0,0 +1,183 @@
|
|
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 Ptsv2paymentsidvoidsPaymentInformation
|
17
|
+
attr_accessor :payment_type
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'payment_type' => :'paymentType'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.swagger_types
|
28
|
+
{
|
29
|
+
:'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return unless attributes.is_a?(Hash)
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
40
|
+
|
41
|
+
if attributes.has_key?(:'paymentType')
|
42
|
+
self.payment_type = attributes[:'paymentType']
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
47
|
+
# @return Array for valid properties with the reasons
|
48
|
+
def list_invalid_properties
|
49
|
+
invalid_properties = Array.new
|
50
|
+
invalid_properties
|
51
|
+
end
|
52
|
+
|
53
|
+
# Check to see if the all the properties in the model are valid
|
54
|
+
# @return true if the model is valid
|
55
|
+
def valid?
|
56
|
+
true
|
57
|
+
end
|
58
|
+
|
59
|
+
# Checks equality by comparing each attribute.
|
60
|
+
# @param [Object] Object to be compared
|
61
|
+
def ==(o)
|
62
|
+
return true if self.equal?(o)
|
63
|
+
self.class == o.class &&
|
64
|
+
payment_type == o.payment_type
|
65
|
+
end
|
66
|
+
|
67
|
+
# @see the `==` method
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def eql?(o)
|
70
|
+
self == o
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calculates hash code according to all attributes.
|
74
|
+
# @return [Fixnum] Hash code
|
75
|
+
def hash
|
76
|
+
[payment_type].hash
|
77
|
+
end
|
78
|
+
|
79
|
+
# Builds the object from hash
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
# @return [Object] Returns the model itself
|
82
|
+
def build_from_hash(attributes)
|
83
|
+
return nil unless attributes.is_a?(Hash)
|
84
|
+
self.class.swagger_types.each_pair do |key, type|
|
85
|
+
if type =~ /\AArray<(.*)>/i
|
86
|
+
# check to ensure the input is an array given that the the attribute
|
87
|
+
# is documented as an array but the input is not
|
88
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
89
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
90
|
+
end
|
91
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
92
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
93
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
94
|
+
end
|
95
|
+
|
96
|
+
self
|
97
|
+
end
|
98
|
+
|
99
|
+
# Deserializes the data based on type
|
100
|
+
# @param string type Data type
|
101
|
+
# @param string value Value to be deserialized
|
102
|
+
# @return [Object] Deserialized data
|
103
|
+
def _deserialize(type, value)
|
104
|
+
case type.to_sym
|
105
|
+
when :DateTime
|
106
|
+
DateTime.parse(value)
|
107
|
+
when :Date
|
108
|
+
Date.parse(value)
|
109
|
+
when :String
|
110
|
+
value.to_s
|
111
|
+
when :Integer
|
112
|
+
value.to_i
|
113
|
+
when :Float
|
114
|
+
value.to_f
|
115
|
+
when :BOOLEAN
|
116
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
117
|
+
true
|
118
|
+
else
|
119
|
+
false
|
120
|
+
end
|
121
|
+
when :Object
|
122
|
+
# generic object (usually a Hash), return directly
|
123
|
+
value
|
124
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
125
|
+
inner_type = Regexp.last_match[:inner_type]
|
126
|
+
value.map { |v| _deserialize(inner_type, v) }
|
127
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
128
|
+
k_type = Regexp.last_match[:k_type]
|
129
|
+
v_type = Regexp.last_match[:v_type]
|
130
|
+
{}.tap do |hash|
|
131
|
+
value.each do |k, v|
|
132
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
else # model
|
136
|
+
temp_model = CyberSource.const_get(type).new
|
137
|
+
temp_model.build_from_hash(value)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Returns the string representation of the object
|
142
|
+
# @return [String] String presentation of the object
|
143
|
+
def to_s
|
144
|
+
to_hash.to_s
|
145
|
+
end
|
146
|
+
|
147
|
+
# to_body is an alias to to_hash (backward compatibility)
|
148
|
+
# @return [Hash] Returns the object in the form of hash
|
149
|
+
def to_body
|
150
|
+
to_hash
|
151
|
+
end
|
152
|
+
|
153
|
+
# Returns the object in the form of hash
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_hash
|
156
|
+
hash = {}
|
157
|
+
self.class.attribute_map.each_pair do |attr, param|
|
158
|
+
value = self.send(attr)
|
159
|
+
next if value.nil?
|
160
|
+
hash[param] = _to_hash(value)
|
161
|
+
end
|
162
|
+
hash
|
163
|
+
end
|
164
|
+
|
165
|
+
# Outputs non-array value in the form of hash
|
166
|
+
# For object, use to_hash. Otherwise, just return the value
|
167
|
+
# @param [Object] value Any valid value
|
168
|
+
# @return [Hash] Returns the value in the form of hash
|
169
|
+
def _to_hash(value)
|
170
|
+
if value.is_a?(Array)
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
172
|
+
elsif value.is_a?(Hash)
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
175
|
+
end
|
176
|
+
elsif value.respond_to? :to_hash
|
177
|
+
value.to_hash
|
178
|
+
else
|
179
|
+
value
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
@@ -59,7 +59,7 @@ module CyberSource
|
|
59
59
|
def self.swagger_types
|
60
60
|
{
|
61
61
|
:'unit_price' => :'String',
|
62
|
-
:'quantity' => :'
|
62
|
+
:'quantity' => :'Integer',
|
63
63
|
:'product_sku' => :'String',
|
64
64
|
:'product_risk' => :'String',
|
65
65
|
:'product_name' => :'String',
|
@@ -123,8 +123,8 @@ module CyberSource
|
|
123
123
|
invalid_properties.push('invalid value for "unit_price", the character length must be smaller than or equal to 15.')
|
124
124
|
end
|
125
125
|
|
126
|
-
if !@quantity.nil? && @quantity >
|
127
|
-
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to
|
126
|
+
if !@quantity.nil? && @quantity > 999999999
|
127
|
+
invalid_properties.push('invalid value for "quantity", must be smaller than or equal to 999999999.')
|
128
128
|
end
|
129
129
|
|
130
130
|
if !@quantity.nil? && @quantity < 1
|
@@ -158,7 +158,7 @@ module CyberSource
|
|
158
158
|
# @return true if the model is valid
|
159
159
|
def valid?
|
160
160
|
return false if !@unit_price.nil? && @unit_price.to_s.length > 15
|
161
|
-
return false if !@quantity.nil? && @quantity >
|
161
|
+
return false if !@quantity.nil? && @quantity > 999999999
|
162
162
|
return false if !@quantity.nil? && @quantity < 1
|
163
163
|
return false if !@product_sku.nil? && @product_sku.to_s.length > 255
|
164
164
|
return false if !@product_risk.nil? && @product_risk.to_s.length > 6
|
@@ -181,8 +181,8 @@ module CyberSource
|
|
181
181
|
# Custom attribute writer method with validation
|
182
182
|
# @param [Object] quantity Value to be assigned
|
183
183
|
def quantity=(quantity)
|
184
|
-
if !quantity.nil? && quantity >
|
185
|
-
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to
|
184
|
+
if !quantity.nil? && quantity > 999999999
|
185
|
+
fail ArgumentError, 'invalid value for "quantity", must be smaller than or equal to 999999999.'
|
186
186
|
end
|
187
187
|
|
188
188
|
if !quantity.nil? && quantity < 1
|
@@ -14,10 +14,10 @@ require 'date'
|
|
14
14
|
|
15
15
|
module CyberSource
|
16
16
|
class TssV2TransactionsGet200ResponsePaymentInformationPaymentType
|
17
|
-
# A Payment Type is an agreed means for a payee to receive legal tender from a payer. The way one pays for a commercial financial transaction. Examples: Card, Bank Transfer, Digital, Direct Debit.
|
17
|
+
# A Payment Type is an agreed means for a payee to receive legal tender from a payer. The way one pays for a commercial financial transaction. Examples: Card, Bank Transfer, Digital, Direct Debit. Possible values: - `CARD` (use this for a PIN debit transaction)
|
18
18
|
attr_accessor :name
|
19
19
|
|
20
|
-
# SubType Name is detail information about Payment Type. Examples: For Card, if Credit or Debit or PrePaid. For Bank Transfer, if Online Bank Transfer or Wire Transfers.
|
20
|
+
# SubType Name is detail information about Payment Type. Examples: For Card, if Credit or Debit or PrePaid. For Bank Transfer, if Online Bank Transfer or Wire Transfers. - `DEBIT` (use this for a PIN debit transaction)
|
21
21
|
attr_accessor :sub_type_name
|
22
22
|
|
23
23
|
attr_accessor :funding_source
|