Class: CyberSourceMergedSpec::ProcessingInformation70

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

Overview

ProcessingInformation70 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(payment_solution: SKIP, business_application_id: SKIP, commerce_indicator: SKIP, commerce_indicator_label: SKIP, additional_properties: nil) ⇒ ProcessingInformation70

Returns a new instance of ProcessingInformation70.



133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 133

def initialize(payment_solution: SKIP, business_application_id: SKIP,
               commerce_indicator: SKIP, commerce_indicator_label: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @payment_solution = payment_solution unless payment_solution == SKIP
  @business_application_id = business_application_id unless business_application_id == SKIP
  @commerce_indicator = commerce_indicator unless commerce_indicator == SKIP
  @commerce_indicator_label = commerce_indicator_label unless commerce_indicator_label == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#business_application_idString

Required for AFT and OCT transactions. Given below is a list of all the BAI values available. However, the processors may support only few specific BAI values.

  • AA : Account-to-account
  • BB : Supplier Payments
  • BI : Bank-Initiated P2P Money Transfer
  • BP : Non-Card Bill Pay/Bill Pay
  • CD : Cash Deposit
  • CP : Credit card Bill Payment
  • FD : Funds disbursement
  • FT : Funds transfer
  • GD : Government Disbursement
  • GP : Gambling payout (non-online gambling)
  • LO : Loyalty credits and rebates
  • MD : Merchant Settlement
  • OG : Online Gambling Payout
  • PD : Payroll and pension disbursement
  • PP : Person-to-Person or Peer-to-Peer
  • TU : Top up, prepaid load
  • WT : Digital wallet

Returns:

  • (String)


58
59
60
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 58

def business_application_id
  @business_application_id
end

#commerce_indicatorString

Type of transaction. Some payment card companies use this information when determining discount rates.

Used by

Authorization Required payer authentication transactions; otherwise, optional. Credit Required for standalone credits on Chase Paymentech solutions; otherwise, optional. The list of valid values in this field depends on your processor.

Ingenico ePayments

When you omit this field for Ingenico ePayments, the processor uses the default transaction type they have on file for you instead of the default value

Card Present

You must set this field to retail. This field is required for a card-present transaction. Note that this should ONLY be used when the cardholder and card are present at the time of the transaction. For all keyed transactions originated from a POS terminal where the cardholder and card are not present, commerceIndicator should be submitted as “moto"

Returns:

  • (String)


82
83
84
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 82

def commerce_indicator
  @commerce_indicator
end

#commerce_indicator_labelString

Type of transaction. Some payment card companies use this information when determining discount rates.

Used by

Authorization Required payer authentication transactions; otherwise, optional. Credit Required for standalone credits on Chase Paymentech solutions; otherwise, optional. The list of valid values in this field depends on your processor.

Ingenico ePayments

When you omit this field for Ingenico ePayments, the processor uses the default transaction type they have on file for you instead of the default value

Card Present

You must set this field to retail. This field is required for a card-present transaction. Note that this should ONLY be used when the cardholder and card are present at the time of the transaction. For all keyed transactions originated from a POS terminal where the cardholder and card are not present, commerceIndicator should be submitted as moto

Returns:

  • (String)


106
107
108
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 106

def commerce_indicator_label
  @commerce_indicator_label
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)


35
36
37
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 35

def payment_solution
  @payment_solution
end

Class Method Details

.from_element(root) ⇒ Object



175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 175

def self.from_element(root)
  payment_solution = XmlUtilities.from_element(root, 'paymentSolution',
                                               String)
  business_application_id = XmlUtilities.from_element(
    root, 'businessApplicationId', String
  )
  commerce_indicator = XmlUtilities.from_element(root, 'commerceIndicator',
                                                 String)
  commerce_indicator_label = XmlUtilities.from_element(
    root, 'commerceIndicatorLabel', String
  )

  new(payment_solution: payment_solution,
      business_application_id: business_application_id,
      commerce_indicator: commerce_indicator,
      commerce_indicator_label: commerce_indicator_label,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
172
173
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 147

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  payment_solution =
    hash.key?('paymentSolution') ? hash['paymentSolution'] : SKIP
  business_application_id =
    hash.key?('businessApplicationId') ? hash['businessApplicationId'] : SKIP
  commerce_indicator =
    hash.key?('commerceIndicator') ? hash['commerceIndicator'] : SKIP
  commerce_indicator_label =
    hash.key?('commerceIndicatorLabel') ? hash['commerceIndicatorLabel'] : SKIP

  # 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.
  ProcessingInformation70.new(payment_solution: payment_solution,
                              business_application_id: business_application_id,
                              commerce_indicator: commerce_indicator,
                              commerce_indicator_label: commerce_indicator_label,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



109
110
111
112
113
114
115
116
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 109

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['payment_solution'] = 'paymentSolution'
  @_hash['business_application_id'] = 'businessApplicationId'
  @_hash['commerce_indicator'] = 'commerceIndicator'
  @_hash['commerce_indicator_label'] = 'commerceIndicatorLabel'
  @_hash
end

.nullablesObject

An array for nullable fields



129
130
131
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 129

def self.nullables
  []
end

.optionalsObject

An array for optional fields



119
120
121
122
123
124
125
126
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 119

def self.optionals
  %w[
    payment_solution
    business_application_id
    commerce_indicator
    commerce_indicator_label
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



221
222
223
224
225
226
227
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 221

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} payment_solution: #{@payment_solution.inspect}, business_application_id:"\
  " #{@business_application_id.inspect}, commerce_indicator: #{@commerce_indicator.inspect},"\
  " commerce_indicator_label: #{@commerce_indicator_label.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



212
213
214
215
216
217
218
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 212

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} payment_solution: #{@payment_solution}, business_application_id:"\
  " #{@business_application_id}, commerce_indicator: #{@commerce_indicator},"\
  " commerce_indicator_label: #{@commerce_indicator_label}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/cyber_source_merged_spec/models/processing_information70.rb', line 194

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

  XmlUtilities.add_as_subelement(doc, root, 'paymentSolution',
                                 payment_solution)
  XmlUtilities.add_as_subelement(doc, root, 'businessApplicationId',
                                 business_application_id)
  XmlUtilities.add_as_subelement(doc, root, 'commerceIndicator',
                                 commerce_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'commerceIndicatorLabel',
                                 commerce_indicator_label)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end