Class: CyberSourceMergedSpec::IssuerInformation6
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::IssuerInformation6
- Defined in:
- lib/cyber_source_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](http://apps.cybersource.com/library/documentation/sbc/quickref/coun tries_alpha_list.pdf) 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_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, 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.
- #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, country: SKIP, bin_length: SKIP, account_prefix: SKIP, phone_number: SKIP, additional_properties: nil) ⇒ IssuerInformation6
Returns a new instance of IssuerInformation6.
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 68 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](https://pcissc.secure.force.com/faq/articles/Frequently_Asked_ Question/What-are-acceptable-formats-for-truncation-of-primary-account-num bers).In case the input is not the full intrument (PAN or TOKEN), this field may be truncated.
35 36 37 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 35 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.
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 26 def bin_length @bin_length end |
#country ⇒ String
This field contains [2-character ISO Country Codes](http://apps.cybersource.com/library/documentation/sbc/quickref/coun tries_alpha_list.pdf) for the issuer.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 20 def country @country end |
#name ⇒ String
This field contains the issuer name.
14 15 16 |
# File 'lib/cyber_source_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.
39 40 41 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 39 def phone_number @phone_number end |
Class Method Details
.from_element(root) ⇒ Object
109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 109 def self.from_element(root) name = XmlUtilities.from_element(root, 'name', String) country = XmlUtilities.from_element(root, 'country', String) bin_length = XmlUtilities.from_element(root, 'binLength', String) account_prefix = XmlUtilities.from_element(root, 'accountPrefix', String) phone_number = XmlUtilities.from_element(root, 'phoneNumber', String) new(name: name, country: country, bin_length: bin_length, account_prefix: account_prefix, phone_number: phone_number, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 83 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.
42 43 44 45 46 47 48 49 50 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 42 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
64 65 66 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 64 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
53 54 55 56 57 58 59 60 61 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 53 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.
147 148 149 150 151 152 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 147 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.
139 140 141 142 143 144 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 139 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 |
#to_xml_element(doc, root_name) ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/cyber_source_merged_spec/models/issuer_information6.rb', line 124 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, 'country', country) XmlUtilities.add_as_subelement(doc, root, 'binLength', bin_length) XmlUtilities.add_as_subelement(doc, root, 'accountPrefix', account_prefix) XmlUtilities.add_as_subelement(doc, root, 'phoneNumber', phone_number) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |