Class: CyberSourceMergedSpec::AggregatorInformation7
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::AggregatorInformation7
- Defined in:
- lib/cyber_source_merged_spec/models/aggregator_information7.rb
Overview
AggregatorInformation7 Model.
Instance Attribute Summary collapse
-
#aggregator_id ⇒ String
Value that identifies you as a payment aggregator.
-
#city ⇒ String
Acquirer city.
-
#country ⇒ String
Acquirer country.
-
#independent_sales_organization_id ⇒ String
Independent sales organization ID.
-
#name ⇒ String
Your payment aggregator business name.
-
#postal_code ⇒ String
Acquirer postal code.
-
#state ⇒ String
Acquirer state.
-
#street_address ⇒ String
Acquirer street name.
-
#sub_merchant ⇒ SubMerchant7
Independent sales organization ID.
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(aggregator_id: SKIP, name: SKIP, independent_sales_organization_id: SKIP, sub_merchant: SKIP, street_address: SKIP, city: SKIP, state: SKIP, postal_code: SKIP, country: SKIP, additional_properties: nil) ⇒ AggregatorInformation7
constructor
A new instance of AggregatorInformation7.
-
#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(aggregator_id: SKIP, name: SKIP, independent_sales_organization_id: SKIP, sub_merchant: SKIP, street_address: SKIP, city: SKIP, state: SKIP, postal_code: SKIP, country: SKIP, additional_properties: nil) ⇒ AggregatorInformation7
Returns a new instance of AggregatorInformation7.
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 90 def initialize(aggregator_id: SKIP, name: SKIP, independent_sales_organization_id: SKIP, sub_merchant: SKIP, street_address: SKIP, city: SKIP, state: SKIP, postal_code: SKIP, country: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @aggregator_id = aggregator_id unless aggregator_id == SKIP @name = name unless name == SKIP unless independent_sales_organization_id == SKIP @independent_sales_organization_id = independent_sales_organization_id end @sub_merchant = sub_merchant unless sub_merchant == SKIP @street_address = street_address unless street_address == SKIP @city = city unless city == SKIP @state = state unless state == SKIP @postal_code = postal_code unless postal_code == SKIP @country = country unless country == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#aggregator_id ⇒ String
Value that identifies you as a payment aggregator. Get this value from the processor.
15 16 17 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 15 def aggregator_id @aggregator_id end |
#city ⇒ String
Acquirer city.
40 41 42 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 40 def city @city end |
#country ⇒ String
Acquirer country.
52 53 54 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 52 def country @country end |
#independent_sales_organization_id ⇒ String
Independent sales organization ID. This field is only used for Mastercard transactions submitted through PPGS.
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 26 def independent_sales_organization_id @independent_sales_organization_id end |
#name ⇒ String
Your payment aggregator business name. This field is conditionally required when aggregator id is present.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 20 def name @name end |
#postal_code ⇒ String
Acquirer postal code.
48 49 50 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 48 def postal_code @postal_code end |
#state ⇒ String
Acquirer state.
44 45 46 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 44 def state @state end |
#street_address ⇒ String
Acquirer street name.
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 36 def street_address @street_address end |
#sub_merchant ⇒ SubMerchant7
Independent sales organization ID. This field is only used for Mastercard transactions submitted through PPGS.
32 33 34 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 32 def sub_merchant @sub_merchant end |
Class Method Details
.from_element(root) ⇒ Object
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 148 def self.from_element(root) aggregator_id = XmlUtilities.from_element(root, 'aggregatorId', String) name = XmlUtilities.from_element(root, 'name', String) independent_sales_organization_id = XmlUtilities.from_element( root, 'independentSalesOrganizationID', String ) sub_merchant = XmlUtilities.from_element(root, 'SubMerchant7', SubMerchant7) street_address = XmlUtilities.from_element(root, 'streetAddress', String) city = XmlUtilities.from_element(root, 'city', String) state = XmlUtilities.from_element(root, 'state', String) postal_code = XmlUtilities.from_element(root, 'postalCode', String) country = XmlUtilities.from_element(root, 'country', String) new(aggregator_id: aggregator_id, name: name, independent_sales_organization_id: independent_sales_organization_id, sub_merchant: sub_merchant, street_address: street_address, city: city, state: state, postal_code: postal_code, country: country, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 113 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. aggregator_id = hash.key?('aggregatorId') ? hash['aggregatorId'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP independent_sales_organization_id = hash.key?('independentSalesOrganizationID') ? hash['independentSalesOrganizationID'] : SKIP sub_merchant = SubMerchant7.from_hash(hash['subMerchant']) if hash['subMerchant'] street_address = hash.key?('streetAddress') ? hash['streetAddress'] : SKIP city = hash.key?('city') ? hash['city'] : SKIP state = hash.key?('state') ? hash['state'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP country = hash.key?('country') ? hash['country'] : 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. AggregatorInformation7.new(aggregator_id: aggregator_id, name: name, independent_sales_organization_id: independent_sales_organization_id, sub_merchant: sub_merchant, street_address: street_address, city: city, state: state, postal_code: postal_code, country: country, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 55 def self.names @_hash = {} if @_hash.nil? @_hash['aggregator_id'] = 'aggregatorId' @_hash['name'] = 'name' @_hash['independent_sales_organization_id'] = 'independentSalesOrganizationID' @_hash['sub_merchant'] = 'subMerchant' @_hash['street_address'] = 'streetAddress' @_hash['city'] = 'city' @_hash['state'] = 'state' @_hash['postal_code'] = 'postalCode' @_hash['country'] = 'country' @_hash end |
.nullables ⇒ Object
An array for nullable fields
86 87 88 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 86 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 71 def self.optionals %w[ aggregator_id name independent_sales_organization_id sub_merchant street_address city state postal_code country ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
205 206 207 208 209 210 211 212 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 205 def inspect class_name = self.class.name.split('::').last "<#{class_name} aggregator_id: #{@aggregator_id.inspect}, name: #{@name.inspect},"\ " independent_sales_organization_id: #{@independent_sales_organization_id.inspect},"\ " sub_merchant: #{@sub_merchant.inspect}, street_address: #{@street_address.inspect}, city:"\ " #{@city.inspect}, state: #{@state.inspect}, postal_code: #{@postal_code.inspect}, country:"\ " #{@country.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
195 196 197 198 199 200 201 202 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 195 def to_s class_name = self.class.name.split('::').last "<#{class_name} aggregator_id: #{@aggregator_id}, name: #{@name},"\ " independent_sales_organization_id: #{@independent_sales_organization_id}, sub_merchant:"\ " #{@sub_merchant}, street_address: #{@street_address}, city: #{@city}, state: #{@state},"\ " postal_code: #{@postal_code}, country: #{@country}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/cyber_source_merged_spec/models/aggregator_information7.rb', line 174 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'aggregatorId', aggregator_id) XmlUtilities.add_as_subelement(doc, root, 'name', name) XmlUtilities.add_as_subelement(doc, root, 'independentSalesOrganizationID', independent_sales_organization_id) XmlUtilities.add_as_subelement(doc, root, 'SubMerchant7', sub_merchant) XmlUtilities.add_as_subelement(doc, root, 'streetAddress', street_address) XmlUtilities.add_as_subelement(doc, root, 'city', city) XmlUtilities.add_as_subelement(doc, root, 'state', state) XmlUtilities.add_as_subelement(doc, root, 'postalCode', postal_code) XmlUtilities.add_as_subelement(doc, root, 'country', country) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |