Class: CyberSourceMergedSpec::StrongAuthentication1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::StrongAuthentication1
- Defined in:
- lib/cyber_source_merged_spec/models/strong_authentication1.rb
Overview
StrongAuthentication1 Model.
Instance Attribute Summary collapse
-
#issuer_information ⇒ PaymentsStrongAuthIssuerInformation
TODO: Write general description for this method.
-
#outage_exemption_indicator ⇒ String
This field will contain the outage exemption indicator with one of the following values: Possible values: -
0(Outage Authentication exemption does not apply to the transaction) -1(Outage exempt from SCA as authentication could not be done due to outage).
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(issuer_information: SKIP, outage_exemption_indicator: SKIP, additional_properties: nil) ⇒ StrongAuthentication1
constructor
A new instance of StrongAuthentication1.
-
#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(issuer_information: SKIP, outage_exemption_indicator: SKIP, additional_properties: nil) ⇒ StrongAuthentication1
Returns a new instance of StrongAuthentication1.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 46 def initialize(issuer_information: SKIP, outage_exemption_indicator: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @issuer_information = issuer_information unless issuer_information == SKIP unless outage_exemption_indicator == SKIP @outage_exemption_indicator = outage_exemption_indicator end @additional_properties = additional_properties end |
Instance Attribute Details
#issuer_information ⇒ PaymentsStrongAuthIssuerInformation
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 14 def issuer_information @issuer_information end |
#outage_exemption_indicator ⇒ String
This field will contain the outage exemption indicator with one of the following values: Possible values:
0(Outage Authentication exemption does not apply to the transaction)1(Outage exempt from SCA as authentication could not be done due to outage)
23 24 25 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 23 def outage_exemption_indicator @outage_exemption_indicator end |
Class Method Details
.from_element(root) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 83 def self.from_element(root) issuer_information = XmlUtilities.from_element( root, 'paymentsStrongAuthIssuerInformation', PaymentsStrongAuthIssuerInformation ) outage_exemption_indicator = XmlUtilities.from_element( root, 'outageExemptionIndicator', String ) new(issuer_information: issuer_information, outage_exemption_indicator: outage_exemption_indicator, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 60 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['issuerInformation'] issuer_information = PaymentsStrongAuthIssuerInformation.from_hash(hash['issuerInformation']) end outage_exemption_indicator = hash.key?('outageExemptionIndicator') ? hash['outageExemptionIndicator'] : 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. StrongAuthentication1.new(issuer_information: issuer_information, outage_exemption_indicator: outage_exemption_indicator, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
26 27 28 29 30 31 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 26 def self.names @_hash = {} if @_hash.nil? @_hash['issuer_information'] = 'issuerInformation' @_hash['outage_exemption_indicator'] = 'outageExemptionIndicator' @_hash end |
.nullables ⇒ Object
An array for nullable fields
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 42 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 34 def self.optionals %w[ issuer_information outage_exemption_indicator ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} issuer_information: #{@issuer_information.inspect},"\ " outage_exemption_indicator: #{@outage_exemption_indicator.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
112 113 114 115 116 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 112 def to_s class_name = self.class.name.split('::').last "<#{class_name} issuer_information: #{@issuer_information}, outage_exemption_indicator:"\ " #{@outage_exemption_indicator}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/cyber_source_merged_spec/models/strong_authentication1.rb', line 97 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'paymentsStrongAuthIssuerInformation', issuer_information) XmlUtilities.add_as_subelement(doc, root, 'outageExemptionIndicator', outage_exemption_indicator) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |