Class: CyberSource::Acpv1instructionsinstructionIdcredentialsTransactionData
- Inherits:
-
Object
- Object
- CyberSource::Acpv1instructionsinstructionIdcredentialsTransactionData
- Defined in:
- lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#client_reference_information ⇒ Object
Returns the value of attribute client_reference_information.
-
#mandate_reference_data ⇒ Object
Mandate Reference Data.
-
#merchant_information ⇒ Object
Returns the value of attribute merchant_information.
-
#merchant_order_id ⇒ Object
(Conditional) Digital Payment Application generated order/invoice number corresponding to a Consumer purchase.
-
#order_information ⇒ Object
Returns the value of attribute order_information.
-
#payment_options ⇒ Object
Returns the value of attribute payment_options.
-
#payment_service_provider_name ⇒ Object
(Conditional) Name of the payment service provider.
-
#payment_service_provider_url ⇒ Object
(Conditional) URL of the payment service provider.
-
#type ⇒ Object
(Conditional) Type of the transaction.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Acpv1instructionsinstructionIdcredentialsTransactionData
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Acpv1instructionsinstructionIdcredentialsTransactionData
Initializes the object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 91 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } if attributes.has_key?(:'clientReferenceInformation') self.client_reference_information = attributes[:'clientReferenceInformation'] end if attributes.has_key?(:'mandateReferenceData') if (value = attributes[:'mandateReferenceData']).is_a?(Array) self.mandate_reference_data = value end end if attributes.has_key?(:'type') self.type = attributes[:'type'] end if attributes.has_key?(:'orderInformation') self.order_information = attributes[:'orderInformation'] end if attributes.has_key?(:'paymentServiceProviderUrl') self.payment_service_provider_url = attributes[:'paymentServiceProviderUrl'] end if attributes.has_key?(:'paymentServiceProviderName') self.payment_service_provider_name = attributes[:'paymentServiceProviderName'] end if attributes.has_key?(:'merchantOrderId') self.merchant_order_id = attributes[:'merchantOrderId'] end if attributes.has_key?(:'merchantInformation') self.merchant_information = attributes[:'merchantInformation'] end if attributes.has_key?(:'paymentOptions') self. = attributes[:'paymentOptions'] end if attributes.has_key?(:'attachments') if (value = attributes[:'attachments']).is_a?(Array) self. = value end end end |
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
39 40 41 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 39 def end |
#client_reference_information ⇒ Object
Returns the value of attribute client_reference_information.
16 17 18 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 16 def client_reference_information @client_reference_information end |
#mandate_reference_data ⇒ Object
Mandate Reference Data.
19 20 21 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 19 def mandate_reference_data @mandate_reference_data end |
#merchant_information ⇒ Object
Returns the value of attribute merchant_information.
35 36 37 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 35 def merchant_information @merchant_information end |
#merchant_order_id ⇒ Object
(Conditional) Digital Payment Application generated order/invoice number corresponding to a Consumer purchase.
33 34 35 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 33 def merchant_order_id @merchant_order_id end |
#order_information ⇒ Object
Returns the value of attribute order_information.
24 25 26 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 24 def order_information @order_information end |
#payment_options ⇒ Object
Returns the value of attribute payment_options.
37 38 39 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 37 def end |
#payment_service_provider_name ⇒ Object
(Conditional) Name of the payment service provider.
30 31 32 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 30 def payment_service_provider_name @payment_service_provider_name end |
#payment_service_provider_url ⇒ Object
(Conditional) URL of the payment service provider.
27 28 29 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 27 def payment_service_provider_url @payment_service_provider_url end |
#type ⇒ Object
(Conditional) Type of the transaction. This field is used to determine the type of transaction and the associated processing rules. Possible values: - PURCHASE (Default) - BILL_PAYMENT - MONEY_TRANSFER - DISBURSEMENT - P2P
22 23 24 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 22 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 42 def self.attribute_map { :'client_reference_information' => :'clientReferenceInformation', :'mandate_reference_data' => :'mandateReferenceData', :'type' => :'type', :'order_information' => :'orderInformation', :'payment_service_provider_url' => :'paymentServiceProviderUrl', :'payment_service_provider_name' => :'paymentServiceProviderName', :'merchant_order_id' => :'merchantOrderId', :'merchant_information' => :'merchantInformation', :'payment_options' => :'paymentOptions', :'attachments' => :'attachments' } end |
.json_map ⇒ Object
Attribute mapping from JSON key to ruby-style variable name.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 58 def self.json_map { :'client_reference_information' => :'client_reference_information', :'mandate_reference_data' => :'mandate_reference_data', :'type' => :'type', :'order_information' => :'order_information', :'payment_service_provider_url' => :'payment_service_provider_url', :'payment_service_provider_name' => :'payment_service_provider_name', :'merchant_order_id' => :'merchant_order_id', :'merchant_information' => :'merchant_information', :'payment_options' => :'payment_options', :'attachments' => :'attachments' } end |
.swagger_types ⇒ Object
Attribute type mapping.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 74 def self.swagger_types { :'client_reference_information' => :'Acpv1instructionsinstructionIdcredentialsClientReferenceInformation', :'mandate_reference_data' => :'Array<Acpv1instructionsinstructionIdcredentialsMandateReferenceData>', :'type' => :'String', :'order_information' => :'Acpv1instructionsinstructionIdcredentialsOrderInformation', :'payment_service_provider_url' => :'String', :'payment_service_provider_name' => :'String', :'merchant_order_id' => :'String', :'merchant_information' => :'Acpv1instructionsinstructionIdcredentialsMerchantInformation', :'payment_options' => :'Acpv1instructionsinstructionIdcredentialsPaymentOptions', :'attachments' => :'Array<Acpv1instructionsinstructionIdcredentialsAttachments>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 217 def ==(o) return true if self.equal?(o) self.class == o.class && client_reference_information == o.client_reference_information && mandate_reference_data == o.mandate_reference_data && type == o.type && order_information == o.order_information && payment_service_provider_url == o.payment_service_provider_url && payment_service_provider_name == o.payment_service_provider_name && merchant_order_id == o.merchant_order_id && merchant_information == o.merchant_information && == o. && == o. end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 268 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = CyberSource.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 334 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 247 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
234 235 236 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 234 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
240 241 242 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 240 def hash [client_reference_information, mandate_reference_data, type, order_information, payment_service_provider_url, payment_service_provider_name, merchant_order_id, merchant_information, , ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 144 def list_invalid_properties invalid_properties = Array.new if @client_reference_information.nil? invalid_properties.push('invalid value for "client_reference_information", client_reference_information cannot be nil.') end if @order_information.nil? invalid_properties.push('invalid value for "order_information", order_information cannot be nil.') end #if !@payment_service_provider_url.nil? && @payment_service_provider_url !~ Regexp.new(/(?!^[*.,'#_\/-]+$)^.*$/) #invalid_properties.push('invalid value for "payment_service_provider_url", must conform to the pattern /(?!^[*.,'#_\/-]+$)^.*$/.') #end #if !@payment_service_provider_name.nil? && @payment_service_provider_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "payment_service_provider_name", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end #if !@merchant_order_id.nil? && @merchant_order_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #invalid_properties.push('invalid value for "merchant_order_id", must conform to the pattern /(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/.') #end if @merchant_information.nil? invalid_properties.push('invalid value for "merchant_information", merchant_information cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
314 315 316 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 314 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
320 321 322 323 324 325 326 327 328 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 320 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
308 309 310 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 308 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
175 176 177 178 179 180 181 182 183 |
# File 'lib/cybersource_rest_client/models/acpv1instructionsinstruction_idcredentials_transaction_data.rb', line 175 def valid? return false if @client_reference_information.nil? return false if @order_information.nil? #return false if !@payment_service_provider_url.nil? && @payment_service_provider_url !~ Regexp.new(/(?!^[*.,'#_\/-]+$)^.*$/) #return false if !@payment_service_provider_name.nil? && @payment_service_provider_name !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) #return false if !@merchant_order_id.nil? && @merchant_order_id !~ Regexp.new(/(?!^[*.,'#_\/-]+$)(?!.*\\.\/.*)^.*$/) return false if @merchant_information.nil? true end |