Class: CyberSourceMergedSpec::PostIssuerLifeCycleSimulationRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::PostIssuerLifeCycleSimulationRequest
- Defined in:
- lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb
Overview
Represents the Issuer LifeCycle Event Simulation for a Tokenized Card.
Instance Attribute Summary collapse
-
#card ⇒ Card30
The new state of the Tokenized Card.
-
#metadata ⇒ TmsIssuerLifeCycleEventSimulationMetadata
The new state of the Tokenized Card.
-
#state ⇒ String
The new state of the Tokenized Card.
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(state: SKIP, card: SKIP, metadata: SKIP, additional_properties: nil) ⇒ PostIssuerLifeCycleSimulationRequest
constructor
A new instance of PostIssuerLifeCycleSimulationRequest.
-
#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(state: SKIP, card: SKIP, metadata: SKIP, additional_properties: nil) ⇒ PostIssuerLifeCycleSimulationRequest
Returns a new instance of PostIssuerLifeCycleSimulationRequest.
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 59 def initialize(state: SKIP, card: SKIP, metadata: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @state = state unless state == SKIP @card = card unless card == SKIP @metadata = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#card ⇒ Card30
The new state of the Tokenized Card. Possible Values:
- ACTIVE
- SUSPENDED
- DELETED
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 26 def card @card end |
#metadata ⇒ TmsIssuerLifeCycleEventSimulationMetadata
The new state of the Tokenized Card. Possible Values:
- ACTIVE
- SUSPENDED
- DELETED
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 34 def @metadata end |
#state ⇒ String
The new state of the Tokenized Card. Possible Values:
- ACTIVE
- SUSPENDED
- DELETED
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 18 def state @state end |
Class Method Details
.from_element(root) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 94 def self.from_element(root) state = XmlUtilities.from_element(root, 'state', String) card = XmlUtilities.from_element(root, 'Card30', Card30) = XmlUtilities.from_element( root, 'tmsIssuerLifeCycleEventSimulationMetadata', TmsIssuerLifeCycleEventSimulationMetadata ) new(state: state, card: card, metadata: , additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 71 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. state = hash.key?('state') ? hash['state'] : SKIP card = Card30.from_hash(hash['card']) if hash['card'] = TmsIssuerLifeCycleEventSimulationMetadata.from_hash(hash['metadata']) if hash['metadata'] # 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. PostIssuerLifeCycleSimulationRequest.new(state: state, card: card, metadata: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['state'] = 'state' @_hash['card'] = 'card' @_hash['metadata'] = 'metadata' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 46 def self.optionals %w[ state card metadata ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} state: #{@state.inspect}, card: #{@card.inspect}, metadata:"\ " #{@metadata.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
124 125 126 127 128 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 124 def to_s class_name = self.class.name.split('::').last "<#{class_name} state: #{@state}, card: #{@card}, metadata: #{@metadata},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/cyber_source_merged_spec/models/post_issuer_life_cycle_simulation_request.rb', line 108 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'state', state) XmlUtilities.add_as_subelement(doc, root, 'Card30', card) XmlUtilities.add_as_subelement( doc, root, 'tmsIssuerLifeCycleEventSimulationMetadata', ) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |