Class: VisaAcceptanceMergedSpec::MerchantDescriptor
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::MerchantDescriptor
- Defined in:
- lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb
Overview
MerchantDescriptor Model.
Instance Attribute Summary collapse
-
#address1 ⇒ String
First line of merchant's address.
-
#administrative_area ⇒ String
The state where the merchant is located.
-
#alternate_name ⇒ String
An alternate name for the merchant.
-
#contact ⇒ String
Contact information for the merchant.
-
#country ⇒ String
Merchant's country.
-
#country_of_origin ⇒ String
Visa Platform Connect This field will indicate merchant country of origin.
-
#customer_service_phone_number ⇒ String
Visa Platform Connect Indicates customer service phone number of Merchant.
-
#locality ⇒ String
Merchant's City.
-
#name ⇒ String
Your merchant name.
-
#phone ⇒ String
Merchant phone as contact information for CNP transactions.
-
#postal_code ⇒ String
Merchant's postal code.
-
#store_id ⇒ String
The identifier of the store.
-
#store_name ⇒ String
The name of the store.
-
#url ⇒ String
Address of company's website provided by merchant.
Class Method Summary collapse
-
.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, alternate_name: SKIP, contact: SKIP, address1: SKIP, locality: SKIP, country: SKIP, postal_code: SKIP, administrative_area: SKIP, phone: SKIP, url: SKIP, country_of_origin: SKIP, store_id: SKIP, store_name: SKIP, customer_service_phone_number: SKIP, additional_properties: nil) ⇒ MerchantDescriptor
constructor
A new instance of MerchantDescriptor.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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, alternate_name: SKIP, contact: SKIP, address1: SKIP, locality: SKIP, country: SKIP, postal_code: SKIP, administrative_area: SKIP, phone: SKIP, url: SKIP, country_of_origin: SKIP, store_id: SKIP, store_name: SKIP, customer_service_phone_number: SKIP, additional_properties: nil) ⇒ MerchantDescriptor
Returns a new instance of MerchantDescriptor.
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 189 def initialize(name: SKIP, alternate_name: SKIP, contact: SKIP, address1: SKIP, locality: SKIP, country: SKIP, postal_code: SKIP, administrative_area: SKIP, phone: SKIP, url: SKIP, country_of_origin: SKIP, store_id: SKIP, store_name: SKIP, customer_service_phone_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @alternate_name = alternate_name unless alternate_name == SKIP @contact = contact unless contact == SKIP @address1 = address1 unless address1 == SKIP @locality = locality unless locality == SKIP @country = country unless country == SKIP @postal_code = postal_code unless postal_code == SKIP @administrative_area = administrative_area unless administrative_area == SKIP @phone = phone unless phone == SKIP @url = url unless url == SKIP @country_of_origin = country_of_origin unless country_of_origin == SKIP @store_id = store_id unless store_id == SKIP @store_name = store_name unless store_name == SKIP unless customer_service_phone_number == SKIP @customer_service_phone_number = customer_service_phone_number end @additional_properties = additional_properties end |
Instance Attribute Details
#address1 ⇒ String
First line of merchant's address.
49 50 51 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 49 def address1 @address1 end |
#administrative_area ⇒ String
The state where the merchant is located.
PIN debit
State code or region code for your business. Use the Use the [State, Province, and Territory Codes for the United States and Canada]( This value might be displayed on the cardholder’s statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. Important This value must consist of English characters. Note This field is supported only for businesses located in the U.S. or Canada. Optional field for PIN debit credit or PIN debit purchase.
116 117 118 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 116 def administrative_area @administrative_area end |
#alternate_name ⇒ String
An alternate name for the merchant.
37 38 39 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 37 def alternate_name @alternate_name end |
#contact ⇒ String
Contact information for the merchant. Note These are the maximum data lengths for the following payment processors:
- FDCCompass (13)
- Paymentech (13)
45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 45 def contact @contact end |
#country ⇒ String
Merchant's country.
PIN debit
Country code for your business location. Use the [ISO Standard Country
Codes](
This value might be displayed on the cardholder’s statement.
When you do not include this value in your PIN debit request, the merchant
name from your account is used.
Important This value must consist of English characters.
Note If your business is located in the U.S. or Canada and you include
this field in a
request, you must also include
merchantInformation.merchantDescriptor.administrativeArea.
Optional field for PIN debit credit or PIN debit purchase.
76 77 78 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 76 def country @country end |
#country_of_origin ⇒ String
Visa Platform Connect
This field will indicate merchant country of origin
129 130 131 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 129 def country_of_origin @country_of_origin end |
#customer_service_phone_number ⇒ String
Visa Platform Connect
Indicates customer service phone number of Merchant.
142 143 144 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 142 def customer_service_phone_number @customer_service_phone_number end |
#locality ⇒ String
Merchant's City.
PIN debit
City for your business location. This value might be displayed on the cardholder’s statement. When you do not include this value in your PIN debit request, the merchant name from your account is used. Important This value must consist of English characters. Optional field for PIN debit credit or PIN debit purchase requests.
60 61 62 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 60 def locality @locality end |
#name ⇒ String
Your merchant name. Note For Paymentech processor using Visa Acceptance Payouts, the maximum data length is 22.
PIN debit
Your business name. This name is displayed on the cardholder’s statement. When you include more than one consecutive space, extra spaces are removed. When you do not include this value in your PIN debit request, the merchant name from your account is used. Important This value must consist of English characters. Optional field for PIN debit credit or PIN debit purchase requests.
Airline processing
Your merchant name. This name is displayed on the cardholder’s statement. When you include more than one consecutive space, extra spaces are removed. Note Some airline fee programs may require the original ticket number (ticket identifier) or the ancillary service description in positions 13 through 23 of this field. Important This value must consist of English characters. Required for captures and credits.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 33 def name @name end |
#phone ⇒ String
Merchant phone as contact information for CNP transactions
120 121 122 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 120 def phone @phone end |
#postal_code ⇒ String
Merchant's postal code.
PIN debit
Postal code for your business location. This value might be displayed on
the cardholder’s statement.
If your business is domiciled in the U.S., you can use a 5-digit or
9-digit postal code. A 9-digit postal code must follow this format:
[5 digits][dash][4 digits]
Example: 12345-6789
If your business is domiciled in Canada, you can use a 6-digit or 9-digit
postal code. A 6-digit postal code must follow this format:
[alpha][numeric][alpha][space]
[numeric][alpha][numeric]
Example: A1B 2C3
When you do not include this value in your PIN debit request, the merchant
name from your account is used.
Important This value must consist of English characters.
Note This field is supported only for businesses located in the U.S.
or Canada.
Important Mastercard requires a postal code for any country that uses
postal codes.
You can provide the postal code in your account or you can include this
field in your request.
Optional field for PIN debit credit or PIN debit purchase.
102 103 104 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 102 def postal_code @postal_code end |
#store_id ⇒ String
The identifier of the store.
133 134 135 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 133 def store_id @store_id end |
#store_name ⇒ String
The name of the store.
137 138 139 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 137 def store_name @store_name end |
#url ⇒ String
Address of company's website provided by merchant
124 125 126 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 124 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 219 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP alternate_name = hash.key?('alternateName') ? hash['alternateName'] : SKIP contact = hash.key?('contact') ? hash['contact'] : SKIP address1 = hash.key?('address1') ? hash['address1'] : SKIP locality = hash.key?('locality') ? hash['locality'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP administrative_area = hash.key?('administrativeArea') ? hash['administrativeArea'] : SKIP phone = hash.key?('phone') ? hash['phone'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP country_of_origin = hash.key?('countryOfOrigin') ? hash['countryOfOrigin'] : SKIP store_id = hash.key?('storeId') ? hash['storeId'] : SKIP store_name = hash.key?('storeName') ? hash['storeName'] : SKIP customer_service_phone_number = hash.key?('customerServicePhoneNumber') ? hash['customerServicePhoneNumber'] : 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. MerchantDescriptor.new(name: name, alternate_name: alternate_name, contact: contact, address1: address1, locality: locality, country: country, postal_code: postal_code, administrative_area: administrative_area, phone: phone, url: url, country_of_origin: country_of_origin, store_id: store_id, store_name: store_name, customer_service_phone_number: customer_service_phone_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 145 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['alternate_name'] = 'alternateName' @_hash['contact'] = 'contact' @_hash['address1'] = 'address1' @_hash['locality'] = 'locality' @_hash['country'] = 'country' @_hash['postal_code'] = 'postalCode' @_hash['administrative_area'] = 'administrativeArea' @_hash['phone'] = 'phone' @_hash['url'] = 'url' @_hash['country_of_origin'] = 'countryOfOrigin' @_hash['store_id'] = 'storeId' @_hash['store_name'] = 'storeName' @_hash['customer_service_phone_number'] = 'customerServicePhoneNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
185 186 187 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 185 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 165 def self.optionals %w[ name alternate_name contact address1 locality country postal_code administrative_area phone url country_of_origin store_id store_name customer_service_phone_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 278 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, alternate_name: #{@alternate_name.inspect},"\ " contact: #{@contact.inspect}, address1: #{@address1.inspect}, locality:"\ " #{@locality.inspect}, country: #{@country.inspect}, postal_code: #{@postal_code.inspect},"\ " administrative_area: #{@administrative_area.inspect}, phone: #{@phone.inspect}, url:"\ " #{@url.inspect}, country_of_origin: #{@country_of_origin.inspect}, store_id:"\ " #{@store_id.inspect}, store_name: #{@store_name.inspect}, customer_service_phone_number:"\ " #{@customer_service_phone_number.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
267 268 269 270 271 272 273 274 275 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_descriptor.rb', line 267 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, alternate_name: #{@alternate_name}, contact: #{@contact},"\ " address1: #{@address1}, locality: #{@locality}, country: #{@country}, postal_code:"\ " #{@postal_code}, administrative_area: #{@administrative_area}, phone: #{@phone}, url:"\ " #{@url}, country_of_origin: #{@country_of_origin}, store_id: #{@store_id}, store_name:"\ " #{@store_name}, customer_service_phone_number: #{@customer_service_phone_number},"\ " additional_properties: #{@additional_properties}>" end |