Class: CyberSourceMergedSpec::Issuer3
- Defined in:
- lib/cyber_source_merged_spec/models/issuer3.rb
Overview
Issuer associated with the tokenized card.
Instance Attribute Summary collapse
-
#bank_applications ⇒ Array[BankApplication]
Flags indicating what authentication, binding, and trusted-beneficiary enrollment capabilities the issuer supports.
-
#capabilities ⇒ Capabilities
Flags indicating what authentication, binding, and trusted-beneficiary enrollment capabilities the issuer supports.
-
#email ⇒ String
Issuer customer service email address.
-
#long_description ⇒ String
Long description of the card.
-
#name ⇒ String
Issuer name.
-
#phone_number ⇒ String
Issuer customer service phone number.
-
#privacy_policy_url ⇒ String
Issuer privacy policy url.
-
#short_description ⇒ String
Short description of the card.
-
#url ⇒ String
Issuer customer service url.
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, short_description: SKIP, long_description: SKIP, email: SKIP, phone_number: SKIP, url: SKIP, privacy_policy_url: SKIP, capabilities: SKIP, bank_applications: SKIP, additional_properties: nil) ⇒ Issuer3
constructor
A new instance of Issuer3.
-
#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, short_description: SKIP, long_description: SKIP, email: SKIP, phone_number: SKIP, url: SKIP, privacy_policy_url: SKIP, capabilities: SKIP, bank_applications: SKIP, additional_properties: nil) ⇒ Issuer3
Returns a new instance of Issuer3.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 87 def initialize(name: SKIP, short_description: SKIP, long_description: SKIP, email: SKIP, phone_number: SKIP, url: SKIP, privacy_policy_url: SKIP, capabilities: SKIP, bank_applications: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @short_description = short_description unless short_description == SKIP @long_description = long_description unless long_description == SKIP @email = email unless email == SKIP @phone_number = phone_number unless phone_number == SKIP @url = url unless url == SKIP @privacy_policy_url = privacy_policy_url unless privacy_policy_url == SKIP @capabilities = capabilities unless capabilities == SKIP @bank_applications = bank_applications unless bank_applications == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#bank_applications ⇒ Array[BankApplication]
Flags indicating what authentication, binding, and trusted-beneficiary enrollment capabilities the issuer supports. Supported only for VTS Tokens.
50 51 52 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 50 def bank_applications @bank_applications end |
#capabilities ⇒ Capabilities
Flags indicating what authentication, binding, and trusted-beneficiary enrollment capabilities the issuer supports. Supported only for VTS Tokens.
44 45 46 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 44 def capabilities @capabilities end |
#email ⇒ String
Issuer customer service email address.
26 27 28 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 26 def email @email end |
#long_description ⇒ String
Long description of the card.
22 23 24 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 22 def long_description @long_description end |
#name ⇒ String
Issuer name.
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 14 def name @name end |
#phone_number ⇒ String
Issuer customer service phone number.
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 30 def phone_number @phone_number end |
#privacy_policy_url ⇒ String
Issuer privacy policy url.
38 39 40 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 38 def privacy_policy_url @privacy_policy_url end |
#short_description ⇒ String
Short description of the card.
18 19 20 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 18 def short_description @short_description end |
#url ⇒ String
Issuer customer service url.
34 35 36 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 34 def url @url end |
Class Method Details
.from_element(root) ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 153 def self.from_element(root) name = XmlUtilities.from_element(root, 'name', String) short_description = XmlUtilities.from_element(root, 'shortDescription', String) long_description = XmlUtilities.from_element(root, 'longDescription', String) email = XmlUtilities.from_element(root, 'email', String) phone_number = XmlUtilities.from_element(root, 'phoneNumber', String) url = XmlUtilities.from_element(root, 'url', String) privacy_policy_url = XmlUtilities.from_element(root, 'privacyPolicyUrl', String) capabilities = XmlUtilities.from_element(root, 'Capabilities', Capabilities) bank_applications = XmlUtilities.from_element_to_array(root, 'BankApplication', BankApplication) new(name: name, short_description: short_description, long_description: long_description, email: email, phone_number: phone_number, url: url, privacy_policy_url: privacy_policy_url, capabilities: capabilities, bank_applications: bank_applications, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
107 108 109 110 111 112 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 147 148 149 150 151 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 107 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP short_description = hash.key?('shortDescription') ? hash['shortDescription'] : SKIP long_description = hash.key?('longDescription') ? hash['longDescription'] : SKIP email = hash.key?('email') ? hash['email'] : SKIP phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP privacy_policy_url = hash.key?('privacyPolicyUrl') ? hash['privacyPolicyUrl'] : SKIP capabilities = Capabilities.from_hash(hash['capabilities']) if hash['capabilities'] # Parameter is an array, so we need to iterate through it bank_applications = nil unless hash['bankApplications'].nil? bank_applications = [] hash['bankApplications'].each do |structure| bank_applications << (BankApplication.from_hash(structure) if structure) end end bank_applications = SKIP unless hash.key?('bankApplications') # 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. Issuer3.new(name: name, short_description: short_description, long_description: long_description, email: email, phone_number: phone_number, url: url, privacy_policy_url: privacy_policy_url, capabilities: capabilities, bank_applications: bank_applications, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['short_description'] = 'shortDescription' @_hash['long_description'] = 'longDescription' @_hash['email'] = 'email' @_hash['phone_number'] = 'phoneNumber' @_hash['url'] = 'url' @_hash['privacy_policy_url'] = 'privacyPolicyUrl' @_hash['capabilities'] = 'capabilities' @_hash['bank_applications'] = 'bankApplications' @_hash end |
.nullables ⇒ Object
An array for nullable fields
83 84 85 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 83 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 68 def self.optionals %w[ name short_description long_description email phone_number url privacy_policy_url capabilities bank_applications ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
215 216 217 218 219 220 221 222 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 215 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, short_description: #{@short_description.inspect},"\ " long_description: #{@long_description.inspect}, email: #{@email.inspect}, phone_number:"\ " #{@phone_number.inspect}, url: #{@url.inspect}, privacy_policy_url:"\ " #{@privacy_policy_url.inspect}, capabilities: #{@capabilities.inspect}, bank_applications:"\ " #{@bank_applications.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
205 206 207 208 209 210 211 212 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 205 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, short_description: #{@short_description}, long_description:"\ " #{@long_description}, email: #{@email}, phone_number: #{@phone_number}, url: #{@url},"\ " privacy_policy_url: #{@privacy_policy_url}, capabilities: #{@capabilities},"\ " bank_applications: #{@bank_applications}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/cyber_source_merged_spec/models/issuer3.rb', line 182 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, 'shortDescription', short_description) XmlUtilities.add_as_subelement(doc, root, 'longDescription', long_description) XmlUtilities.add_as_subelement(doc, root, 'email', email) XmlUtilities.add_as_subelement(doc, root, 'phoneNumber', phone_number) XmlUtilities.add_as_subelement(doc, root, 'url', url) XmlUtilities.add_as_subelement(doc, root, 'privacyPolicyUrl', privacy_policy_url) XmlUtilities.add_as_subelement(doc, root, 'Capabilities', capabilities) XmlUtilities.add_array_as_subelement(doc, root, 'BankApplication', bank_applications) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |