Class: CyberSourceMergedSpec::ProcessingInformation28

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

Overview

ProcessingInformation28 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(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_listArray[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.

Returns:

  • (Array[String])


17
18
19
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 17

def action_list
  @action_list
end

#action_token_typesArray[String]

TMS tokens types you want to perform the action on. Possible Values:

  • customer
  • paymentInstrument
  • instrumentIdentifier
  • shippingAddress
  • tokenizedCard

Returns:

  • (Array[String])


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

.namesObject

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

.nullablesObject

An array for nullable fields



46
47
48
# File 'lib/cyber_source_merged_spec/models/processing_information28.rb', line 46

def self.nullables
  []
end

.optionalsObject

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

#inspectObject

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_sObject

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