Class: CyberSourceMergedSpec::ProcessingInformation19

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

Overview

ProcessingInformation19 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(commerce_indicator: SKIP, payment_completion_timeout: SKIP, action_list: SKIP, additional_properties: nil) ⇒ ProcessingInformation19

Returns a new instance of ProcessingInformation19.



92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 92

def initialize(commerce_indicator: SKIP, payment_completion_timeout: SKIP,
               action_list: 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
  unless payment_completion_timeout == SKIP
    @payment_completion_timeout =
      payment_completion_timeout
  end
  @action_list = action_list unless action_list == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#action_listArray[String]

  • Use CONSUMER_AUTHENTICATION to use Payer Authentication along with Decision Manager. For any other value, only Decision Manager will run.
  • Use WATCHLIST_SCREENING when you want to call Watchlist Screening service.
  • Use UPDATE_AGREEMENT
  • Use BILLING_AGREEMENT_CREATE when Alternative Payment create mandate service is requested
  • Use CANCEL_AGREEMENT
  • Use AP_IMPORT_AGREEMENT when Alternative Payment import mandate service is requested.

Returns:

  • (Array[String])


67
68
69
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 67

def action_list
  @action_list
end

#commerce_indicatorString

Type of transaction. Used to determine fees based on channel. Possible values:

- aesk: American Express SafeKey authentication was successful.
- aesk_attempted: American Express SafeKey authentication was attempted

but did not succeed. • install: Installment payment.

  • install_internet: Non-U.S. e-commerce (Internet) installment payment. This value is supported only on Visa Platform Connect.
  • internet (default for authorizations): E-commerce order placed using a web site.
  • js: JCB J/Secure authentication was successful.
  • js_attempted: JCB J/Secure authentication was attempted but did not succeed.
  • moto: Mail order or telephone order.
  • moto_cc: Mail order or telephone order from a call center. This value is supported only on the Asia, Middle East, and Africa Gateway.
  • pb: ProtectBuy authentication was successful.
  • pb_attempted: ProtectBuy authentication was attempted but did not succeed.
  • recurring: Recurring payment that is a U.S. transaction or non-U.S. mail order / telephone order (MOTO) transaction.
  • recurring_internet: Recurring payment that is a non-U.S. e-commerce (Internet) transaction.
  • retail: Card-present transaction.
  • spa: For Mastercard Identity Check: Authentication was successful or was attempted but did not succeed. The e-commerce indicator for all Mastercard Identity Check transactions, including authentication attempts, must be set to spa.
  • spa_attempted: Authentication for a co-badged Mastercard and Cartes Bancaires card was attempted but did not succeed.
  • spa_failure: – For Mastercard Identity Check: Authentication failed. This value is supported only on Elavon, HSBC, and Streamline.
  • vbv: – For Visa Secure: Authentication was successful.
  • vbv_attempted: – For Visa Secure: Authentication was attempted but did not succeed.
  • vbv_failure: – For Visa Secure: Authentication failed. This value is supported only on HSBC and Streamline.

Returns:

  • (String)


49
50
51
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 49

def commerce_indicator
  @commerce_indicator
end

#payment_completion_timeoutString

Period after which an authorization request to the consumer expires due to inactivity. Value in seconds (e.g., 86400 for one day).

Returns:

  • (String)


54
55
56
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 54

def payment_completion_timeout
  @payment_completion_timeout
end

Class Method Details

.from_element(root) ⇒ Object



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

def self.from_element(root)
  commerce_indicator = XmlUtilities.from_element(root, 'commerceIndicator',
                                                 String)
  payment_completion_timeout = XmlUtilities.from_element(
    root, 'paymentCompletionTimeout', String
  )
  action_list = XmlUtilities.from_element_to_array(root, 'actionList',
                                                   String)

  new(commerce_indicator: commerce_indicator,
      payment_completion_timeout: payment_completion_timeout,
      action_list: action_list,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 107

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  commerce_indicator =
    hash.key?('commerceIndicator') ? hash['commerceIndicator'] : SKIP
  payment_completion_timeout =
    hash.key?('paymentCompletionTimeout') ? hash['paymentCompletionTimeout'] : SKIP
  action_list = hash.key?('actionList') ? hash['actionList'] : 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.
  ProcessingInformation19.new(commerce_indicator: commerce_indicator,
                              payment_completion_timeout: payment_completion_timeout,
                              action_list: action_list,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



70
71
72
73
74
75
76
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 70

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['commerce_indicator'] = 'commerceIndicator'
  @_hash['payment_completion_timeout'] = 'paymentCompletionTimeout'
  @_hash['action_list'] = 'actionList'
  @_hash
end

.nullablesObject

An array for nullable fields



88
89
90
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 88

def self.nullables
  []
end

.optionalsObject

An array for optional fields



79
80
81
82
83
84
85
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 79

def self.optionals
  %w[
    commerce_indicator
    payment_completion_timeout
    action_list
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



169
170
171
172
173
174
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 169

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

#to_sObject

Provides a human-readable string representation of the object.



161
162
163
164
165
166
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 161

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

#to_xml_element(doc, root_name) ⇒ Object



146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/cyber_source_merged_spec/models/processing_information19.rb', line 146

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

  XmlUtilities.add_as_subelement(doc, root, 'commerceIndicator',
                                 commerce_indicator)
  XmlUtilities.add_as_subelement(doc, root, 'paymentCompletionTimeout',
                                 payment_completion_timeout)
  XmlUtilities.add_array_as_subelement(doc, root, 'actionList', action_list)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end