Class: CyberSourceMergedSpec::ProcessorInformation7
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ProcessorInformation7
- Defined in:
- lib/cyber_source_merged_spec/models/processor_information7.rb
Overview
ProcessorInformation7 Model.
Instance Attribute Summary collapse
-
#cedp_verified_indicator ⇒ String
Merchant Commercial Enhanced Data Program (CEDP) verified indicator for capture/bill requests.
-
#network ⇒ Network
TODO: Write general description for this method.
-
#response_source_code ⇒ String
Field contains the response source code that identifies the source.
-
#supplementary_transaction_data ⇒ String
Supplementary transaction data for Klarna Advantage Plus.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(network: SKIP, response_source_code: SKIP, supplementary_transaction_data: SKIP, cedp_verified_indicator: SKIP, additional_properties: nil) ⇒ ProcessorInformation7
constructor
A new instance of ProcessorInformation7.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ Object
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(network: SKIP, response_source_code: SKIP, supplementary_transaction_data: SKIP, cedp_verified_indicator: SKIP, additional_properties: nil) ⇒ ProcessorInformation7
Returns a new instance of ProcessorInformation7.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 66 def initialize(network: SKIP, response_source_code: SKIP, supplementary_transaction_data: SKIP, cedp_verified_indicator: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @network = network unless network == SKIP @response_source_code = response_source_code unless response_source_code == SKIP unless supplementary_transaction_data == SKIP @supplementary_transaction_data = supplementary_transaction_data end @cedp_verified_indicator = cedp_verified_indicator unless cedp_verified_indicator == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#cedp_verified_indicator ⇒ String
Merchant Commercial Enhanced Data Program (CEDP) verified indicator for capture/bill requests. This field is used when the client is doing authorization with a different gateway and capture/settlement with CyberSource. This field flows in ISO field 34, DSID 02 tag DA, in AN, EBCDIC format. Possible values:
Y: Merchant CEDP verified
Used by
Capture Request Request field for force capture/bill support when auth is done with a different gateway.
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 38 def cedp_verified_indicator @cedp_verified_indicator end |
#network ⇒ Network
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 14 def network @network end |
#response_source_code ⇒ String
Field contains the response source code that identifies the source.
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 18 def response_source_code @response_source_code end |
#supplementary_transaction_data ⇒ String
Supplementary transaction data for Klarna Advantage Plus. Fields to capture Interoperability Data from Merchant and transfer to Klarna for Authorization/Sale/Re-Auth/Capture APIs.
24 25 26 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 24 def supplementary_transaction_data @supplementary_transaction_data end |
Class Method Details
.from_element(root) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 110 def self.from_element(root) network = XmlUtilities.from_element(root, 'Network', Network) response_source_code = XmlUtilities.from_element(root, 'responseSourceCode', String) supplementary_transaction_data = XmlUtilities.from_element( root, 'supplementaryTransactionData', String ) cedp_verified_indicator = XmlUtilities.from_element( root, 'cedpVerifiedIndicator', String ) new(network: network, response_source_code: response_source_code, supplementary_transaction_data: supplementary_transaction_data, cedp_verified_indicator: cedp_verified_indicator, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. network = Network.from_hash(hash['network']) if hash['network'] response_source_code = hash.key?('responseSourceCode') ? hash['responseSourceCode'] : SKIP supplementary_transaction_data = hash.key?('supplementaryTransactionData') ? hash['supplementaryTransactionData'] : SKIP cedp_verified_indicator = hash.key?('cedpVerifiedIndicator') ? hash['cedpVerifiedIndicator'] : 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. ProcessorInformation7.new(network: network, response_source_code: response_source_code, supplementary_transaction_data: supplementary_transaction_data, cedp_verified_indicator: cedp_verified_indicator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['network'] = 'network' @_hash['response_source_code'] = 'responseSourceCode' @_hash['supplementary_transaction_data'] = 'supplementaryTransactionData' @_hash['cedp_verified_indicator'] = 'cedpVerifiedIndicator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
62 63 64 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 62 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 55 56 57 58 59 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 52 def self.optionals %w[ network response_source_code supplementary_transaction_data cedp_verified_indicator ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
155 156 157 158 159 160 161 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 155 def inspect class_name = self.class.name.split('::').last "<#{class_name} network: #{@network.inspect}, response_source_code:"\ " #{@response_source_code.inspect}, supplementary_transaction_data:"\ " #{@supplementary_transaction_data.inspect}, cedp_verified_indicator:"\ " #{@cedp_verified_indicator.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
146 147 148 149 150 151 152 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 146 def to_s class_name = self.class.name.split('::').last "<#{class_name} network: #{@network}, response_source_code: #{@response_source_code},"\ " supplementary_transaction_data: #{@supplementary_transaction_data},"\ " cedp_verified_indicator: #{@cedp_verified_indicator}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/cyber_source_merged_spec/models/processor_information7.rb', line 129 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'Network', network) XmlUtilities.add_as_subelement(doc, root, 'responseSourceCode', response_source_code) XmlUtilities.add_as_subelement(doc, root, 'supplementaryTransactionData', supplementary_transaction_data) XmlUtilities.add_as_subelement(doc, root, 'cedpVerifiedIndicator', cedp_verified_indicator) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |