Class: CyberSourceMergedSpec::AggregatorInformation5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::AggregatorInformation5
- Defined in:
- lib/cyber_source_merged_spec/models/aggregator_information5.rb
Overview
AggregatorInformation5 Model.
Instance Attribute Summary collapse
-
#name ⇒ String
Your payment aggregator business name.
-
#sub_merchant ⇒ SubMerchant
Your payment aggregator business name.
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(name: SKIP, sub_merchant: SKIP, additional_properties: nil) ⇒ AggregatorInformation5
constructor
A new instance of AggregatorInformation5.
-
#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(name: SKIP, sub_merchant: SKIP, additional_properties: nil) ⇒ AggregatorInformation5
Returns a new instance of AggregatorInformation5.
63 64 65 66 67 68 69 70 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 63 def initialize(name: SKIP, sub_merchant: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @sub_merchant = sub_merchant unless sub_merchant == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#name ⇒ String
Your payment aggregator business name.
American Express Direct
The maximum length of the aggregator name depends on the length of the
sub-merchant name. The combined length for both values must not exceed 36
characters.\
CyberSource through VisaNet
With American Express, the maximum length of the aggregator name depends
on the length of the sub-merchant name. The combined length for both
values must not exceed 36 characters. The value for this field does not
map to the TC 33 capture file5.
FDC Compass
This value must consist of uppercase characters.
25 26 27 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 25 def name @name end |
#sub_merchant ⇒ SubMerchant
Your payment aggregator business name.
American Express Direct
The maximum length of the aggregator name depends on the length of the
sub-merchant name. The combined length for both values must not exceed 36
characters.\
CyberSource through VisaNet
With American Express, the maximum length of the aggregator name depends
on the length of the sub-merchant name. The combined length for both
values must not exceed 36 characters. The value for this field does not
map to the TC 33 capture file5.
FDC Compass
This value must consist of uppercase characters.
40 41 42 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 40 def sub_merchant @sub_merchant end |
Class Method Details
.from_element(root) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 93 def self.from_element(root) name = XmlUtilities.from_element(root, 'name', String) sub_merchant = XmlUtilities.from_element(root, 'SubMerchant', SubMerchant) new(name: name, sub_merchant: sub_merchant, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP sub_merchant = SubMerchant.from_hash(hash['subMerchant']) if hash['subMerchant'] # 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. AggregatorInformation5.new(name: name, sub_merchant: sub_merchant, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['sub_merchant'] = 'subMerchant' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 54 55 56 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 51 def self.optionals %w[ name sub_merchant ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
121 122 123 124 125 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 121 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, sub_merchant: #{@sub_merchant.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
114 115 116 117 118 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 114 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, sub_merchant: #{@sub_merchant}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information5.rb', line 102 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'name', name) XmlUtilities.add_as_subelement(doc, root, 'SubMerchant', sub_merchant) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |