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
@@ -0,0 +1,191 @@
|
|
1
|
+
=begin
|
2
|
+
#CyberSource Merged Spec
|
3
|
+
|
4
|
+
#All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
|
5
|
+
|
6
|
+
OpenAPI spec version: 0.0.1
|
7
|
+
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module CyberSource
|
16
|
+
# Processor Information
|
17
|
+
class Ptsv2paymentsProcessorInformation
|
18
|
+
# Token received in original session service.
|
19
|
+
attr_accessor :pre_approval_token
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'pre_approval_token' => :'preApprovalToken'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.swagger_types
|
30
|
+
{
|
31
|
+
:'pre_approval_token' => :'String'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Initializes the object
|
36
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
37
|
+
def initialize(attributes = {})
|
38
|
+
return unless attributes.is_a?(Hash)
|
39
|
+
|
40
|
+
# convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
42
|
+
|
43
|
+
if attributes.has_key?(:'preApprovalToken')
|
44
|
+
self.pre_approval_token = attributes[:'preApprovalToken']
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
49
|
+
# @return Array for valid properties with the reasons
|
50
|
+
def list_invalid_properties
|
51
|
+
invalid_properties = Array.new
|
52
|
+
invalid_properties
|
53
|
+
end
|
54
|
+
|
55
|
+
# Check to see if the all the properties in the model are valid
|
56
|
+
# @return true if the model is valid
|
57
|
+
def valid?
|
58
|
+
true
|
59
|
+
end
|
60
|
+
|
61
|
+
# Custom attribute writer method with validation
|
62
|
+
# @param [Object] pre_approval_token Value to be assigned
|
63
|
+
def pre_approval_token=(pre_approval_token)
|
64
|
+
@pre_approval_token = pre_approval_token
|
65
|
+
end
|
66
|
+
|
67
|
+
# Checks equality by comparing each attribute.
|
68
|
+
# @param [Object] Object to be compared
|
69
|
+
def ==(o)
|
70
|
+
return true if self.equal?(o)
|
71
|
+
self.class == o.class &&
|
72
|
+
pre_approval_token == o.pre_approval_token
|
73
|
+
end
|
74
|
+
|
75
|
+
# @see the `==` method
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def eql?(o)
|
78
|
+
self == o
|
79
|
+
end
|
80
|
+
|
81
|
+
# Calculates hash code according to all attributes.
|
82
|
+
# @return [Fixnum] Hash code
|
83
|
+
def hash
|
84
|
+
[pre_approval_token].hash
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def build_from_hash(attributes)
|
91
|
+
return nil unless attributes.is_a?(Hash)
|
92
|
+
self.class.swagger_types.each_pair do |key, type|
|
93
|
+
if type =~ /\AArray<(.*)>/i
|
94
|
+
# check to ensure the input is an array given that the the attribute
|
95
|
+
# is documented as an array but the input is not
|
96
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
97
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
98
|
+
end
|
99
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
100
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
101
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
102
|
+
end
|
103
|
+
|
104
|
+
self
|
105
|
+
end
|
106
|
+
|
107
|
+
# Deserializes the data based on type
|
108
|
+
# @param string type Data type
|
109
|
+
# @param string value Value to be deserialized
|
110
|
+
# @return [Object] Deserialized data
|
111
|
+
def _deserialize(type, value)
|
112
|
+
case type.to_sym
|
113
|
+
when :DateTime
|
114
|
+
DateTime.parse(value)
|
115
|
+
when :Date
|
116
|
+
Date.parse(value)
|
117
|
+
when :String
|
118
|
+
value.to_s
|
119
|
+
when :Integer
|
120
|
+
value.to_i
|
121
|
+
when :Float
|
122
|
+
value.to_f
|
123
|
+
when :BOOLEAN
|
124
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
125
|
+
true
|
126
|
+
else
|
127
|
+
false
|
128
|
+
end
|
129
|
+
when :Object
|
130
|
+
# generic object (usually a Hash), return directly
|
131
|
+
value
|
132
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
133
|
+
inner_type = Regexp.last_match[:inner_type]
|
134
|
+
value.map { |v| _deserialize(inner_type, v) }
|
135
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
136
|
+
k_type = Regexp.last_match[:k_type]
|
137
|
+
v_type = Regexp.last_match[:v_type]
|
138
|
+
{}.tap do |hash|
|
139
|
+
value.each do |k, v|
|
140
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
else # model
|
144
|
+
temp_model = CyberSource.const_get(type).new
|
145
|
+
temp_model.build_from_hash(value)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
# Returns the string representation of the object
|
150
|
+
# @return [String] String presentation of the object
|
151
|
+
def to_s
|
152
|
+
to_hash.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
# to_body is an alias to to_hash (backward compatibility)
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
157
|
+
def to_body
|
158
|
+
to_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
# Returns the object in the form of hash
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_hash
|
164
|
+
hash = {}
|
165
|
+
self.class.attribute_map.each_pair do |attr, param|
|
166
|
+
value = self.send(attr)
|
167
|
+
next if value.nil?
|
168
|
+
hash[param] = _to_hash(value)
|
169
|
+
end
|
170
|
+
hash
|
171
|
+
end
|
172
|
+
|
173
|
+
# Outputs non-array value in the form of hash
|
174
|
+
# For object, use to_hash. Otherwise, just return the value
|
175
|
+
# @param [Object] value Any valid value
|
176
|
+
# @return [Hash] Returns the value in the form of hash
|
177
|
+
def _to_hash(value)
|
178
|
+
if value.is_a?(Array)
|
179
|
+
value.compact.map { |v| _to_hash(v) }
|
180
|
+
elsif value.is_a?(Hash)
|
181
|
+
{}.tap do |hash|
|
182
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
183
|
+
end
|
184
|
+
elsif value.respond_to? :to_hash
|
185
|
+
value.to_hash
|
186
|
+
else
|
187
|
+
value
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
@@ -34,6 +34,8 @@ module CyberSource
|
|
34
34
|
|
35
35
|
attr_accessor :payment_type
|
36
36
|
|
37
|
+
attr_accessor :e_wallet
|
38
|
+
|
37
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
40
|
def self.attribute_map
|
39
41
|
{
|
@@ -46,7 +48,8 @@ module CyberSource
|
|
46
48
|
:'instrument_identifier' => :'instrumentIdentifier',
|
47
49
|
:'shipping_address' => :'shippingAddress',
|
48
50
|
:'legacy_token' => :'legacyToken',
|
49
|
-
:'payment_type' => :'paymentType'
|
51
|
+
:'payment_type' => :'paymentType',
|
52
|
+
:'e_wallet' => :'eWallet'
|
50
53
|
}
|
51
54
|
end
|
52
55
|
|
@@ -54,7 +57,7 @@ module CyberSource
|
|
54
57
|
def self.swagger_types
|
55
58
|
{
|
56
59
|
:'card' => :'Ptsv2paymentsidrefundsPaymentInformationCard',
|
57
|
-
:'bank' => :'
|
60
|
+
:'bank' => :'Ptsv2paymentsidrefundsPaymentInformationBank',
|
58
61
|
:'tokenized_card' => :'Ptsv2paymentsPaymentInformationTokenizedCard',
|
59
62
|
:'fluid_data' => :'Ptsv2paymentsPaymentInformationFluidData',
|
60
63
|
:'customer' => :'Ptsv2paymentsPaymentInformationCustomer',
|
@@ -62,7 +65,8 @@ module CyberSource
|
|
62
65
|
:'instrument_identifier' => :'Ptsv2paymentsPaymentInformationInstrumentIdentifier',
|
63
66
|
:'shipping_address' => :'Ptsv2paymentsPaymentInformationShippingAddress',
|
64
67
|
:'legacy_token' => :'Ptsv2paymentsPaymentInformationLegacyToken',
|
65
|
-
:'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType'
|
68
|
+
:'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType',
|
69
|
+
:'e_wallet' => :'Ptsv2paymentsPaymentInformationEWallet'
|
66
70
|
}
|
67
71
|
end
|
68
72
|
|
@@ -113,6 +117,10 @@ module CyberSource
|
|
113
117
|
if attributes.has_key?(:'paymentType')
|
114
118
|
self.payment_type = attributes[:'paymentType']
|
115
119
|
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'eWallet')
|
122
|
+
self.e_wallet = attributes[:'eWallet']
|
123
|
+
end
|
116
124
|
end
|
117
125
|
|
118
126
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -142,7 +150,8 @@ module CyberSource
|
|
142
150
|
instrument_identifier == o.instrument_identifier &&
|
143
151
|
shipping_address == o.shipping_address &&
|
144
152
|
legacy_token == o.legacy_token &&
|
145
|
-
payment_type == o.payment_type
|
153
|
+
payment_type == o.payment_type &&
|
154
|
+
e_wallet == o.e_wallet
|
146
155
|
end
|
147
156
|
|
148
157
|
# @see the `==` method
|
@@ -154,7 +163,7 @@ module CyberSource
|
|
154
163
|
# Calculates hash code according to all attributes.
|
155
164
|
# @return [Fixnum] Hash code
|
156
165
|
def hash
|
157
|
-
[card, bank, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, payment_type].hash
|
166
|
+
[card, bank, tokenized_card, fluid_data, customer, payment_instrument, instrument_identifier, shipping_address, legacy_token, payment_type, e_wallet].hash
|
158
167
|
end
|
159
168
|
|
160
169
|
# Builds the object from hash
|
@@ -0,0 +1,215 @@
|
|
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 Ptsv2paymentsidrefundsPaymentInformationBank
|
17
|
+
attr_accessor :account
|
18
|
+
|
19
|
+
# Bank routing number. This is also called the _transit number_. For details, see `ecp_rdfi` request field description in the [Electronic Check Services Using the SCMP API Guide.](https://apps.cybersource.com/library/documentation/dev_guides/EChecks_SCMP_API/html/)
|
20
|
+
attr_accessor :routing_number
|
21
|
+
|
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
|
+
attr_accessor :iban
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'account' => :'account',
|
29
|
+
:'routing_number' => :'routingNumber',
|
30
|
+
:'iban' => :'iban'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.swagger_types
|
36
|
+
{
|
37
|
+
:'account' => :'Ptsv2paymentsPaymentInformationBankAccount',
|
38
|
+
:'routing_number' => :'String',
|
39
|
+
:'iban' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
return unless attributes.is_a?(Hash)
|
47
|
+
|
48
|
+
# convert string to symbol for hash key
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
50
|
+
|
51
|
+
if attributes.has_key?(:'account')
|
52
|
+
self.account = attributes[:'account']
|
53
|
+
end
|
54
|
+
|
55
|
+
if attributes.has_key?(:'routingNumber')
|
56
|
+
self.routing_number = attributes[:'routingNumber']
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'iban')
|
60
|
+
self.iban = attributes[:'iban']
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
+
# @return Array for valid properties with the reasons
|
66
|
+
def list_invalid_properties
|
67
|
+
invalid_properties = Array.new
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Custom attribute writer method with validation
|
78
|
+
# @param [Object] routing_number Value to be assigned
|
79
|
+
def routing_number=(routing_number)
|
80
|
+
@routing_number = routing_number
|
81
|
+
end
|
82
|
+
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] iban Value to be assigned
|
85
|
+
def iban=(iban)
|
86
|
+
@iban = iban
|
87
|
+
end
|
88
|
+
|
89
|
+
# Checks equality by comparing each attribute.
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
account == o.account &&
|
95
|
+
routing_number == o.routing_number &&
|
96
|
+
iban == o.iban
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Fixnum] Hash code
|
107
|
+
def hash
|
108
|
+
[account, routing_number, iban].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
self.class.swagger_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :BOOLEAN
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
temp_model = CyberSource.const_get(type).new
|
169
|
+
temp_model.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
next if value.nil?
|
192
|
+
hash[param] = _to_hash(value)
|
193
|
+
end
|
194
|
+
hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Outputs non-array value in the form of hash
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
199
|
+
# @param [Object] value Any valid value
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
201
|
+
def _to_hash(value)
|
202
|
+
if value.is_a?(Array)
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
204
|
+
elsif value.is_a?(Hash)
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
207
|
+
end
|
208
|
+
elsif value.respond_to? :to_hash
|
209
|
+
value.to_hash
|
210
|
+
else
|
211
|
+
value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
end
|
@@ -0,0 +1,218 @@
|
|
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 Reportingv3reportsReportFilters
|
17
|
+
attr_accessor :application_name
|
18
|
+
|
19
|
+
attr_accessor :first_name
|
20
|
+
|
21
|
+
attr_accessor :last_name
|
22
|
+
|
23
|
+
attr_accessor :email
|
24
|
+
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
26
|
+
def self.attribute_map
|
27
|
+
{
|
28
|
+
:'application_name' => :'Application.Name',
|
29
|
+
:'first_name' => :'firstName',
|
30
|
+
:'last_name' => :'lastName',
|
31
|
+
:'email' => :'email'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.swagger_types
|
37
|
+
{
|
38
|
+
:'application_name' => :'Array<String>',
|
39
|
+
:'first_name' => :'Array<String>',
|
40
|
+
:'last_name' => :'Array<String>',
|
41
|
+
:'email' => :'Array<String>'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
return unless attributes.is_a?(Hash)
|
49
|
+
|
50
|
+
# convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
52
|
+
|
53
|
+
if attributes.has_key?(:'Application.Name')
|
54
|
+
if (value = attributes[:'Application.Name']).is_a?(Array)
|
55
|
+
self.application_name = value
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
if attributes.has_key?(:'firstName')
|
60
|
+
if (value = attributes[:'firstName']).is_a?(Array)
|
61
|
+
self.first_name = value
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'lastName')
|
66
|
+
if (value = attributes[:'lastName']).is_a?(Array)
|
67
|
+
self.last_name = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'email')
|
72
|
+
if (value = attributes[:'email']).is_a?(Array)
|
73
|
+
self.email = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
application_name == o.application_name &&
|
97
|
+
first_name == o.first_name &&
|
98
|
+
last_name == o.last_name &&
|
99
|
+
email == o.email
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Fixnum] Hash code
|
110
|
+
def hash
|
111
|
+
[application_name, first_name, last_name, email].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.swagger_types.each_pair do |key, type|
|
120
|
+
if type =~ /\AArray<(.*)>/i
|
121
|
+
# check to ensure the input is an array given that the the attribute
|
122
|
+
# is documented as an array but the input is not
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
125
|
+
end
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
128
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
129
|
+
end
|
130
|
+
|
131
|
+
self
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def _deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :DateTime
|
141
|
+
DateTime.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :BOOLEAN
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
temp_model = CyberSource.const_get(type).new
|
172
|
+
temp_model.build_from_hash(value)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# Returns the string representation of the object
|
177
|
+
# @return [String] String presentation of the object
|
178
|
+
def to_s
|
179
|
+
to_hash.to_s
|
180
|
+
end
|
181
|
+
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_body
|
185
|
+
to_hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Returns the object in the form of hash
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_hash
|
191
|
+
hash = {}
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
193
|
+
value = self.send(attr)
|
194
|
+
next if value.nil?
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|