Class: VisaAcceptanceMergedSpec::IssuerInformation6
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::IssuerInformation6
- Defined in:
- lib/visa_acceptance_merged_spec/models/issuer_information6.rb
Overview
IssuerInformation6 Model.
Instance Attribute Summary collapse
-
#account_prefix ⇒ String
This field contains the first 6 to 8 digits of a primary account number (PAN).
-
#bin_length ⇒ String
This field contains the length of the BIN.
-
#country ⇒ String
This field contains [2-character ISO Country Codes]( for the issuer..
-
#name ⇒ String
This field contains the issuer name.
-
#phone_number ⇒ String
This field contains the customer service phone number for the issuer.
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, country: SKIP, bin_length: SKIP, account_prefix: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ IssuerInformation6
constructor
A new instance of IssuerInformation6.
-
#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, country: SKIP, bin_length: SKIP, account_prefix: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ IssuerInformation6
Returns a new instance of IssuerInformation6.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 64 def initialize(name: SKIP, country: SKIP, bin_length: SKIP, account_prefix: SKIP, phone_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @country = country unless country == SKIP @bin_length = bin_length unless bin_length == SKIP @account_prefix = account_prefix unless account_prefix == SKIP @phone_number = phone_number unless phone_number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#account_prefix ⇒ String
This field contains the first 6 to 8 digits of a primary account number (PAN). The length of the field is determined by [PCI-DSS standards for truncation]( case the input is not the full intrument (PAN or TOKEN), this field may be truncated.
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 31 def account_prefix @account_prefix end |
#bin_length ⇒ String
This field contains the length of the BIN. In some cases, this field may be absent if we do not receive accurate information from the network source.
24 25 26 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 24 def bin_length @bin_length end |
#country ⇒ String
This field contains [2-character ISO Country Codes]( for the issuer.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 18 def country @country end |
#name ⇒ String
This field contains the issuer name.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 14 def name @name end |
#phone_number ⇒ String
This field contains the customer service phone number for the issuer.
35 36 37 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 35 def phone_number @phone_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP bin_length = hash.key?('binLength') ? hash['binLength'] : SKIP account_prefix = hash.key?('accountPrefix') ? hash['accountPrefix'] : SKIP phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : 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. IssuerInformation6.new(name: name, country: country, bin_length: bin_length, account_prefix: account_prefix, phone_number: phone_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
38 39 40 41 42 43 44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 38 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['country'] = 'country' @_hash['bin_length'] = 'binLength' @_hash['account_prefix'] = 'accountPrefix' @_hash['phone_number'] = 'phoneNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 49 def self.optionals %w[ name country bin_length account_prefix phone_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
114 115 116 117 118 119 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 114 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, country: #{@country.inspect}, bin_length:"\ " #{@bin_length.inspect}, account_prefix: #{@account_prefix.inspect}, phone_number:"\ " #{@phone_number.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
106 107 108 109 110 111 |
# File 'lib/visa_acceptance_merged_spec/models/issuer_information6.rb', line 106 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, country: #{@country}, bin_length: #{@bin_length},"\ " account_prefix: #{@account_prefix}, phone_number: #{@phone_number}, additional_properties:"\ " #{@additional_properties}>" end |