Class: CyberSourceMergedSpec::ProcessingInformation28
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ProcessingInformation28
- Defined in:
- lib/cyber_source_merged_spec/models/processing_information28.rb
Overview
ProcessingInformation28 Model.
Instance Attribute Summary collapse
-
#action_list ⇒ Array[String]
Array of actions (one or more) to be included in the tokenize request.
-
#action_token_types ⇒ Array[String]
TMS tokens types you want to perform the action on.
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(action_list: SKIP, action_token_types: SKIP, additional_properties: nil) ⇒ ProcessingInformation28
constructor
A new instance of ProcessingInformation28.
-
#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(action_list: SKIP, action_token_types: SKIP, additional_properties: nil) ⇒ ProcessingInformation28
Returns a new instance of ProcessingInformation28.
50 51 52 53 54 55 56 57 58 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 50 def initialize(action_list: SKIP, action_token_types: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @action_list = action_list unless action_list == SKIP @action_token_types = action_token_types unless action_token_types == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#action_list ⇒ Array[String]
Array of actions (one or more) to be included in the tokenize request. Possible Values:
TOKEN_CREATE: Use this when you want to create a token from the card/bank data in your tokenize request.
17 18 19 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 17 def action_list @action_list end |
#action_token_types ⇒ Array[String]
TMS tokens types you want to perform the action on. Possible Values:
- customer
- paymentInstrument
- instrumentIdentifier
- shippingAddress
- tokenizedCard
27 28 29 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 27 def action_token_types @action_token_types end |
Class Method Details
.from_element(root) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 82 def self.from_element(root) action_list = XmlUtilities.from_element_to_array(root, 'actionList', String) action_token_types = XmlUtilities.from_element_to_array( root, 'actionTokenTypes', String ) new(action_list: action_list, action_token_types: action_token_types, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action_list = hash.key?('actionList') ? hash['actionList'] : SKIP action_token_types = hash.key?('actionTokenTypes') ? hash['actionTokenTypes'] : 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. ProcessingInformation28.new(action_list: action_list, action_token_types: action_token_types, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
30 31 32 33 34 35 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 30 def self.names @_hash = {} if @_hash.nil? @_hash['action_list'] = 'actionList' @_hash['action_token_types'] = 'actionTokenTypes' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 38 def self.optionals %w[ action_list action_token_types ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} action_list: #{@action_list.inspect}, action_token_types:"\ " #{@action_token_types.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
107 108 109 110 111 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 107 def to_s class_name = self.class.name.split('::').last "<#{class_name} action_list: #{@action_list}, action_token_types: #{@action_token_types},"\ " additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 94 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_array_as_subelement(doc, root, 'actionList', action_list) XmlUtilities.add_array_as_subelement(doc, root, 'actionTokenTypes', action_token_types) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |