Class: CyberSourceMergedSpec::ProcessingInformation63

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

Overview

ProcessingInformation63 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(business_application_id:, commerce_indicator: SKIP, funding_options: SKIP, recurring_options: SKIP, purpose_of_payment: SKIP, payouts_options: SKIP, language_code: SKIP, account_verification_code: SKIP, additional_properties: nil) ⇒ ProcessingInformation63

Returns a new instance of ProcessingInformation63.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 127

def initialize(business_application_id:, commerce_indicator: SKIP,
               funding_options: SKIP, recurring_options: SKIP,
               purpose_of_payment: SKIP, payouts_options: SKIP,
               language_code: SKIP, account_verification_code: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @commerce_indicator = commerce_indicator unless commerce_indicator == SKIP
  @funding_options = funding_options unless funding_options == SKIP
  @recurring_options = recurring_options unless recurring_options == SKIP
  @business_application_id = business_application_id
  @purpose_of_payment = purpose_of_payment unless purpose_of_payment == SKIP
  @payouts_options = payouts_options unless payouts_options == SKIP
  @language_code = language_code unless language_code == SKIP
  unless  == SKIP
    @account_verification_code =
      
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#account_verification_codeArray[String]

Account verification code will inform what Payment Account Verification should be performed. With this array of codes, a merchant can choose à la carte what verifications to run. This field is optional, and the default is 1 if it is not passed in. This means that a full validation of the fields will be performed. Valid verification codes:

  • 1 = Full Account Verification (Card Account, CVN, CAVV, TAVV, Address, Name, eMail, Phone, Identity)
  • 2 = Card Account Verification
  • 3 = Address Verification
  • 4 = Card Authentication Method (CAM) (Cryptogram)
  • 5 = Cardholder Authentication Verification (CAVV)
  • 6 = Cardholder Identity Verification
  • 7 = CVV2 Verification
  • 8 = eMail Verification
  • 9 = Name Verification
  • 10 = Phone Verification

Returns:

  • (Array[String])


93
94
95
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 93

def 
  @account_verification_code
end

#business_application_idString

Payouts transaction type. Possible Values:

  • AA = Account to account
  • PP = Person to person
  • TU = Top-up for enhanced prepaid loads
  • WT = Wallet transfer
  • BI = Bank-Initiated
  • FT = Funds Transfer
  • FD = Funds Disbursement
  • MP = Merchant Payment
  • PD = Payroll Disbursement
  • LA = Liquid Assets

Returns:

  • (String)


55
56
57
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 55

def business_application_id
  @business_application_id
end

#commerce_indicatorString

Type of transaction. This field identifies the level of security used in an electronic commerce transaction over an open network (for example, the internet). Values for a Payouts transaction:
INTERNET, RECURRING, RECURRING_INTERNET, VBV_FAILURE, VBV_ATTEMPTED, VBV, SPA_FAILURE, SPA_ATTEMPTED, SPA
If no value is entered this field will set a default value = INTERNET.

Returns:

  • (String)


20
21
22
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 20

def commerce_indicator
  @commerce_indicator
end

#funding_optionsAftFundingOptions

Type of transaction. This field identifies the level of security used in an electronic commerce transaction over an open network (for example, the internet). Values for a Payouts transaction:
INTERNET, RECURRING, RECURRING_INTERNET, VBV_FAILURE, VBV_ATTEMPTED, VBV, SPA_FAILURE, SPA_ATTEMPTED, SPA
If no value is entered this field will set a default value = INTERNET.

Returns:



30
31
32
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 30

def funding_options
  @funding_options
end

#language_codeString

Contains the ISO 639-2 defined language Code

Returns:

  • (String)


73
74
75
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 73

def language_code
  @language_code
end

#payouts_optionsPayoutsOptions1

Visa Direct
Purpose of payment is required in certain markets to clearly identify the purpose of the payment based on the standard values defined for respective market.

Returns:



69
70
71
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 69

def payouts_options
  @payouts_options
end

#purpose_of_paymentString

Visa Direct
Purpose of payment is required in certain markets to clearly identify the purpose of the payment based on the standard values defined for respective market.

Returns:

  • (String)


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

def purpose_of_payment
  @purpose_of_payment
end

#recurring_optionsRecurringOptions4

Type of transaction. This field identifies the level of security used in an electronic commerce transaction over an open network (for example, the internet). Values for a Payouts transaction:
INTERNET, RECURRING, RECURRING_INTERNET, VBV_FAILURE, VBV_ATTEMPTED, VBV, SPA_FAILURE, SPA_ATTEMPTED, SPA
If no value is entered this field will set a default value = INTERNET.

Returns:



40
41
42
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 40

def recurring_options
  @recurring_options
end

Class Method Details

.from_element(root) ⇒ Object



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 189

def self.from_element(root)
  business_application_id = XmlUtilities.from_element(
    root, 'businessApplicationId', String
  )
  commerce_indicator = XmlUtilities.from_element(root, 'commerceIndicator',
                                                 String)
  funding_options = XmlUtilities.from_element(root, 'aftFundingOptions',
                                              AftFundingOptions)
  recurring_options = XmlUtilities.from_element(root, 'RecurringOptions4',
                                                RecurringOptions4)
  purpose_of_payment = XmlUtilities.from_element(root, 'purposeOfPayment',
                                                 String)
  payouts_options = XmlUtilities.from_element(root, 'PayoutsOptions1',
                                              PayoutsOptions1)
  language_code = XmlUtilities.from_element(root, 'languageCode', String)
   = XmlUtilities.from_element_to_array(
    root, 'accountVerificationCode', String
  )

  new(business_application_id: business_application_id,
      commerce_indicator: commerce_indicator,
      funding_options: funding_options,
      recurring_options: recurring_options,
      purpose_of_payment: purpose_of_payment,
      payouts_options: payouts_options,
      language_code: language_code,
      account_verification_code: ,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



150
151
152
153
154
155
156
157
158
159
160
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
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 150

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  business_application_id =
    hash.key?('businessApplicationId') ? hash['businessApplicationId'] : nil
  commerce_indicator =
    hash.key?('commerceIndicator') ? hash['commerceIndicator'] : SKIP
  funding_options = AftFundingOptions.from_hash(hash['fundingOptions']) if
    hash['fundingOptions']
  recurring_options = RecurringOptions4.from_hash(hash['recurringOptions']) if
    hash['recurringOptions']
  purpose_of_payment =
    hash.key?('purposeOfPayment') ? hash['purposeOfPayment'] : SKIP
  payouts_options = PayoutsOptions1.from_hash(hash['payoutsOptions']) if
    hash['payoutsOptions']
  language_code = hash.key?('languageCode') ? hash['languageCode'] : SKIP
   =
    hash.key?('accountVerificationCode') ? hash['accountVerificationCode'] : 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.
  ProcessingInformation63.new(business_application_id: business_application_id,
                              commerce_indicator: commerce_indicator,
                              funding_options: funding_options,
                              recurring_options: recurring_options,
                              purpose_of_payment: purpose_of_payment,
                              payouts_options: payouts_options,
                              language_code: language_code,
                              account_verification_code: ,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 96

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['commerce_indicator'] = 'commerceIndicator'
  @_hash['funding_options'] = 'fundingOptions'
  @_hash['recurring_options'] = 'recurringOptions'
  @_hash['business_application_id'] = 'businessApplicationId'
  @_hash['purpose_of_payment'] = 'purposeOfPayment'
  @_hash['payouts_options'] = 'payoutsOptions'
  @_hash['language_code'] = 'languageCode'
  @_hash['account_verification_code'] = 'accountVerificationCode'
  @_hash
end

.nullablesObject

An array for nullable fields



123
124
125
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 123

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    commerce_indicator
    funding_options
    recurring_options
    purpose_of_payment
    payouts_options
    language_code
    account_verification_code
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



254
255
256
257
258
259
260
261
262
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 254

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} commerce_indicator: #{@commerce_indicator.inspect}, funding_options:"\
  " #{@funding_options.inspect}, recurring_options: #{@recurring_options.inspect},"\
  " business_application_id: #{@business_application_id.inspect}, purpose_of_payment:"\
  " #{@purpose_of_payment.inspect}, payouts_options: #{@payouts_options.inspect},"\
  " language_code: #{@language_code.inspect}, account_verification_code:"\
  " #{@account_verification_code.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



244
245
246
247
248
249
250
251
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 244

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} commerce_indicator: #{@commerce_indicator}, funding_options:"\
  " #{@funding_options}, recurring_options: #{@recurring_options}, business_application_id:"\
  " #{@business_application_id}, purpose_of_payment: #{@purpose_of_payment}, payouts_options:"\
  " #{@payouts_options}, language_code: #{@language_code}, account_verification_code:"\
  " #{@account_verification_code}, additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/cyber_source_merged_spec/models/processing_information63.rb', line 219

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

  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, 'aftFundingOptions',
                                 funding_options)
  XmlUtilities.add_as_subelement(doc, root, 'RecurringOptions4',
                                 recurring_options)
  XmlUtilities.add_as_subelement(doc, root, 'purposeOfPayment',
                                 purpose_of_payment)
  XmlUtilities.add_as_subelement(doc, root, 'PayoutsOptions1',
                                 payouts_options)
  XmlUtilities.add_as_subelement(doc, root, 'languageCode', language_code)
  XmlUtilities.add_array_as_subelement(doc, root, 'accountVerificationCode',
                                       )
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end