Class: CyberSourceMergedSpec::ProcessingInformation1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/processing_information1.rb

Overview

ProcessingInformation1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(bank_transfer_options: SKIP, payment_solution: SKIP, enhanced_data_enabled: SKIP, digital_service_indicator: SKIP, capture_options: SKIP, authorization_options: SKIP, purchase_options: SKIP, additional_properties: nil) ⇒ ProcessingInformation1

Returns a new instance of ProcessingInformation1.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 140

def initialize(bank_transfer_options: SKIP, payment_solution: SKIP,
               enhanced_data_enabled: SKIP, digital_service_indicator: SKIP,
               capture_options: SKIP, authorization_options: SKIP,
               purchase_options: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @bank_transfer_options = bank_transfer_options unless bank_transfer_options == SKIP
  @payment_solution = payment_solution unless payment_solution == SKIP
  @enhanced_data_enabled = enhanced_data_enabled unless enhanced_data_enabled == SKIP
  unless digital_service_indicator == SKIP
    @digital_service_indicator =
      digital_service_indicator
  end
  @capture_options = capture_options unless capture_options == SKIP
  @authorization_options = authorization_options unless authorization_options == SKIP
  @purchase_options = purchase_options unless purchase_options == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#authorization_optionsAuthorizationOptions1

Mastercard Digital Enablement Service (MDES) digital service indicators received in the authorization response message for MDES transactions. This data is provided in the 0110 response in the Field 34—Acceptance Environment Data (TLV Format), Dataset ID 04—Additional Service Result Data, Tag DF1F—Mastercard Digital Enablement Service Indicator for Acquirer to acquirers. This field is in ANS, EBCDIC format and flows in Field 34, DSID 04 Tag DF1F, mapped to Mastercard Data Element DE119, Sub-element 004. This field is supported for all flavors of Authorization response only.

Used by

Authorization Response Response field only.



92
93
94
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 92

def authorization_options
  @authorization_options
end

#bank_transfer_optionsBankTransferOptions1

TODO: Write general description for this method



14
15
16
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 14

def bank_transfer_options
  @bank_transfer_options
end

#capture_optionsCaptureOptions1

Mastercard Digital Enablement Service (MDES) digital service indicators received in the authorization response message for MDES transactions. This data is provided in the 0110 response in the Field 34—Acceptance Environment Data (TLV Format), Dataset ID 04—Additional Service Result Data, Tag DF1F—Mastercard Digital Enablement Service Indicator for Acquirer to acquirers. This field is in ANS, EBCDIC format and flows in Field 34, DSID 04 Tag DF1F, mapped to Mastercard Data Element DE119, Sub-element 004. This field is supported for all flavors of Authorization response only.

Used by

Authorization Response Response field only.

Returns:



77
78
79
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 77

def capture_options
  @capture_options
end

#digital_service_indicatorString

Mastercard Digital Enablement Service (MDES) digital service indicators received in the authorization response message for MDES transactions. This data is provided in the 0110 response in the Field 34—Acceptance Environment Data (TLV Format), Dataset ID 04—Additional Service Result Data, Tag DF1F—Mastercard Digital Enablement Service Indicator for Acquirer to acquirers. This field is in ANS, EBCDIC format and flows in Field 34, DSID 04 Tag DF1F, mapped to Mastercard Data Element DE119, Sub-element 004. This field is supported for all flavors of Authorization response only.

Used by

Authorization Response Response field only.

Returns:

  • (String)


62
63
64
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 62

def digital_service_indicator
  @digital_service_indicator
end

#enhanced_data_enabledTrueClass | FalseClass

The possible values for the reply field are:

  • true : the airline data was included in the request to the processor.
  • false : the airline data was not included in the request to the processor. Returned by authorization, capture, or credit services.

Returns:

  • (TrueClass | FalseClass)


47
48
49
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 47

def enhanced_data_enabled
  @enhanced_data_enabled
end

#payment_solutionString

Type of digital payment solution for the transaction. Possible Values:

  • visacheckout: Visa Checkout. This value is required for Visa Checkout transactions. For details, see payment_solution field description in [Visa Checkout Using the REST API.](https://developer.cybersource.com/content/dam/docs/cybs/en-us/apifie lds/reference/all/rest/api-fields.pdf)
  • 001: Apple Pay.
  • 004: Cybersource In-App Solution.
  • 005: Masterpass. This value is required for Masterpass transactions on OmniPay Direct.
  • 006: Android Pay.
  • 007: Chase Pay.
  • 008: Samsung Pay.
  • 012: Google Pay.
  • 013: Cybersource P2PE Decryption
  • 014: Mastercard credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token.
  • 015: Visa credential on file (COF) payment network token. Returned in authorizations that use a payment network token associated with a TMS token.
  • 027: Click to Pay.

Returns:

  • (String)


39
40
41
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 39

def payment_solution
  @payment_solution
end

#purchase_optionsPurchaseOptions1

Mastercard Digital Enablement Service (MDES) digital service indicators received in the authorization response message for MDES transactions. This data is provided in the 0110 response in the Field 34—Acceptance Environment Data (TLV Format), Dataset ID 04—Additional Service Result Data, Tag DF1F—Mastercard Digital Enablement Service Indicator for Acquirer to acquirers. This field is in ANS, EBCDIC format and flows in Field 34, DSID 04 Tag DF1F, mapped to Mastercard Data Element DE119, Sub-element 004. This field is supported for all flavors of Authorization response only.

Used by

Authorization Response Response field only.

Returns:



107
108
109
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 107

def purchase_options
  @purchase_options
end

Class Method Details

.from_element(root) ⇒ Object



198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 198

def self.from_element(root)
  bank_transfer_options = XmlUtilities.from_element(root,
                                                    'BankTransferOptions1',
                                                    BankTransferOptions1)
  payment_solution = XmlUtilities.from_element(root, 'paymentSolution',
                                               String)
  enhanced_data_enabled = XmlUtilities.from_element(root,
                                                    'enhancedDataEnabled',
                                                    TrueClass)
  digital_service_indicator = XmlUtilities.from_element(
    root, 'digitalServiceIndicator', String
  )
  capture_options = XmlUtilities.from_element(root, 'CaptureOptions1',
                                              CaptureOptions1)
  authorization_options = XmlUtilities.from_element(root,
                                                    'AuthorizationOptions1',
                                                    AuthorizationOptions1)
  purchase_options = XmlUtilities.from_element(root, 'PurchaseOptions1',
                                               PurchaseOptions1)

  new(bank_transfer_options: bank_transfer_options,
      payment_solution: payment_solution,
      enhanced_data_enabled: enhanced_data_enabled,
      digital_service_indicator: digital_service_indicator,
      capture_options: capture_options,
      authorization_options: authorization_options,
      purchase_options: purchase_options,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 161

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  bank_transfer_options = BankTransferOptions1.from_hash(hash['bankTransferOptions']) if
    hash['bankTransferOptions']
  payment_solution =
    hash.key?('paymentSolution') ? hash['paymentSolution'] : SKIP
  enhanced_data_enabled =
    hash.key?('enhancedDataEnabled') ? hash['enhancedDataEnabled'] : SKIP
  digital_service_indicator =
    hash.key?('digitalServiceIndicator') ? hash['digitalServiceIndicator'] : SKIP
  capture_options = CaptureOptions1.from_hash(hash['captureOptions']) if
    hash['captureOptions']
  authorization_options = AuthorizationOptions1.from_hash(hash['authorizationOptions']) if
    hash['authorizationOptions']
  purchase_options = PurchaseOptions1.from_hash(hash['purchaseOptions']) if
    hash['purchaseOptions']

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ProcessingInformation1.new(bank_transfer_options: bank_transfer_options,
                             payment_solution: payment_solution,
                             enhanced_data_enabled: enhanced_data_enabled,
                             digital_service_indicator: digital_service_indicator,
                             capture_options: capture_options,
                             authorization_options: authorization_options,
                             purchase_options: purchase_options,
                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



110
111
112
113
114
115
116
117
118
119
120
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 110

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bank_transfer_options'] = 'bankTransferOptions'
  @_hash['payment_solution'] = 'paymentSolution'
  @_hash['enhanced_data_enabled'] = 'enhancedDataEnabled'
  @_hash['digital_service_indicator'] = 'digitalServiceIndicator'
  @_hash['capture_options'] = 'captureOptions'
  @_hash['authorization_options'] = 'authorizationOptions'
  @_hash['purchase_options'] = 'purchaseOptions'
  @_hash
end

.nullablesObject

An array for nullable fields



136
137
138
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 136

def self.nullables
  []
end

.optionalsObject

An array for optional fields



123
124
125
126
127
128
129
130
131
132
133
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 123

def self.optionals
  %w[
    bank_transfer_options
    payment_solution
    enhanced_data_enabled
    digital_service_indicator
    capture_options
    authorization_options
    purchase_options
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



262
263
264
265
266
267
268
269
270
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 262

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} bank_transfer_options: #{@bank_transfer_options.inspect}, payment_solution:"\
  " #{@payment_solution.inspect}, enhanced_data_enabled: #{@enhanced_data_enabled.inspect},"\
  " digital_service_indicator: #{@digital_service_indicator.inspect}, capture_options:"\
  " #{@capture_options.inspect}, authorization_options: #{@authorization_options.inspect},"\
  " purchase_options: #{@purchase_options.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



252
253
254
255
256
257
258
259
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 252

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} bank_transfer_options: #{@bank_transfer_options}, payment_solution:"\
  " #{@payment_solution}, enhanced_data_enabled: #{@enhanced_data_enabled},"\
  " digital_service_indicator: #{@digital_service_indicator}, capture_options:"\
  " #{@capture_options}, authorization_options: #{@authorization_options}, purchase_options:"\
  " #{@purchase_options}, additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/cyber_source_merged_spec/models/processing_information1.rb', line 228

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root, 'BankTransferOptions1',
                                 bank_transfer_options)
  XmlUtilities.add_as_subelement(doc, root, 'paymentSolution',
                                 payment_solution)
  XmlUtilities.add_as_subelement(doc, root, 'enhancedDataEnabled',
                                 enhanced_data_enabled)
  XmlUtilities.add_as_subelement(doc, root, 'digitalServiceIndicator',
                                 digital_service_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'CaptureOptions1',
                                 capture_options)
  XmlUtilities.add_as_subelement(doc, root, 'AuthorizationOptions1',
                                 authorization_options)
  XmlUtilities.add_as_subelement(doc, root, 'PurchaseOptions1',
                                 purchase_options)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end