Class: ThePlaidApi::UnofficialCurrencyCodeList
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::UnofficialCurrencyCodeList
- Defined in:
- lib/the_plaid_api/models/unofficial_currency_code_list.rb
Overview
List of unofficial currency codes
Instance Attribute Summary collapse
-
#ada ⇒ String
Cardano.
-
#bat ⇒ String
Basic Attention Token.
-
#bch ⇒ String
Bitcoin Cash.
-
#bnb ⇒ String
Binance Coin.
-
#bsv ⇒ String
Bitcoin Satoshi Vision.
-
#btc ⇒ String
Bitcoin.
-
#btg ⇒ String
Bitcoin Gold.
-
#cnh ⇒ String
Chinese Yuan (offshore).
-
#dash ⇒ String
Dash.
-
#doge ⇒ String
Dogecoin.
-
#etc ⇒ String
Ethereum Classic.
-
#eth ⇒ String
Ethereum.
-
#gbx ⇒ String
Pence sterling, i.e.
-
#lsk ⇒ String
Lisk.
-
#neo ⇒ String
Neo.
-
#omg ⇒ String
OmiseGO.
-
#qtum ⇒ String
Qtum.
-
#usdt ⇒ String
Tether.
-
#xlm ⇒ String
Stellar Lumen.
-
#xmr ⇒ String
Monero.
-
#xrp ⇒ String
Ripple.
-
#zec ⇒ String
Zcash.
-
#zrx ⇒ String
0x.
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(ada:, bat:, bch:, bnb:, btc:, btg:, cnh:, dash:, doge:, etc:, eth:, gbx:, lsk:, neo:, omg:, qtum:, usdt:, xlm:, xmr:, xrp:, zec:, zrx:, bsv: SKIP, additional_properties: nil) ⇒ UnofficialCurrencyCodeList
constructor
A new instance of UnofficialCurrencyCodeList.
-
#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(ada:, bat:, bch:, bnb:, btc:, btg:, cnh:, dash:, doge:, etc:, eth:, gbx:, lsk:, neo:, omg:, qtum:, usdt:, xlm:, xmr:, xrp:, zec:, zrx:, bsv: SKIP, additional_properties: nil) ⇒ UnofficialCurrencyCodeList
Returns a new instance of UnofficialCurrencyCodeList.
145 146 147 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 173 174 175 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 145 def initialize(ada:, bat:, bch:, bnb:, btc:, btg:, cnh:, dash:, doge:, etc:, eth:, gbx:, lsk:, neo:, omg:, qtum:, usdt:, xlm:, xmr:, xrp:, zec:, zrx:, bsv: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @ada = ada @bat = bat @bch = bch @bnb = bnb @btc = btc @btg = btg @bsv = bsv unless bsv == SKIP @cnh = cnh @dash = dash @doge = doge @etc = etc @eth = eth @gbx = gbx @lsk = lsk @neo = neo @omg = omg @qtum = qtum @usdt = usdt @xlm = xlm @xmr = xmr @xrp = xrp @zec = zec @zrx = zrx @additional_properties = additional_properties end |
Instance Attribute Details
#ada ⇒ String
Cardano
14 15 16 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 14 def ada @ada end |
#bat ⇒ String
Basic Attention Token
18 19 20 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 18 def bat @bat end |
#bch ⇒ String
Bitcoin Cash
22 23 24 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 22 def bch @bch end |
#bnb ⇒ String
Binance Coin
26 27 28 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 26 def bnb @bnb end |
#bsv ⇒ String
Bitcoin Satoshi Vision
38 39 40 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 38 def bsv @bsv end |
#btc ⇒ String
Bitcoin
30 31 32 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 30 def btc @btc end |
#btg ⇒ String
Bitcoin Gold
34 35 36 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 34 def btg @btg end |
#cnh ⇒ String
Chinese Yuan (offshore)
42 43 44 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 42 def cnh @cnh end |
#dash ⇒ String
Dash
46 47 48 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 46 def dash @dash end |
#doge ⇒ String
Dogecoin
50 51 52 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 50 def doge @doge end |
#etc ⇒ String
Ethereum Classic
54 55 56 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 54 def etc @etc end |
#eth ⇒ String
Ethereum
58 59 60 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 58 def eth @eth end |
#gbx ⇒ String
Pence sterling, i.e. British penny
62 63 64 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 62 def gbx @gbx end |
#lsk ⇒ String
Lisk
66 67 68 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 66 def lsk @lsk end |
#neo ⇒ String
Neo
70 71 72 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 70 def neo @neo end |
#omg ⇒ String
OmiseGO
74 75 76 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 74 def omg @omg end |
#qtum ⇒ String
Qtum
78 79 80 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 78 def qtum @qtum end |
#usdt ⇒ String
Tether
82 83 84 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 82 def usdt @usdt end |
#xlm ⇒ String
Stellar Lumen
86 87 88 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 86 def xlm @xlm end |
#xmr ⇒ String
Monero
90 91 92 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 90 def xmr @xmr end |
#xrp ⇒ String
Ripple
94 95 96 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 94 def xrp @xrp end |
#zec ⇒ String
Zcash
98 99 100 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 98 def zec @zec end |
#zrx ⇒ String
0x
102 103 104 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 102 def zrx @zrx end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
178 179 180 181 182 183 184 185 186 187 188 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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 178 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ada = hash.key?('ADA') ? hash['ADA'] : nil bat = hash.key?('BAT') ? hash['BAT'] : nil bch = hash.key?('BCH') ? hash['BCH'] : nil bnb = hash.key?('BNB') ? hash['BNB'] : nil btc = hash.key?('BTC') ? hash['BTC'] : nil btg = hash.key?('BTG') ? hash['BTG'] : nil cnh = hash.key?('CNH') ? hash['CNH'] : nil dash = hash.key?('DASH') ? hash['DASH'] : nil doge = hash.key?('DOGE') ? hash['DOGE'] : nil etc = hash.key?('ETC') ? hash['ETC'] : nil eth = hash.key?('ETH') ? hash['ETH'] : nil gbx = hash.key?('GBX') ? hash['GBX'] : nil lsk = hash.key?('LSK') ? hash['LSK'] : nil neo = hash.key?('NEO') ? hash['NEO'] : nil omg = hash.key?('OMG') ? hash['OMG'] : nil qtum = hash.key?('QTUM') ? hash['QTUM'] : nil usdt = hash.key?('USDT') ? hash['USDT'] : nil xlm = hash.key?('XLM') ? hash['XLM'] : nil xmr = hash.key?('XMR') ? hash['XMR'] : nil xrp = hash.key?('XRP') ? hash['XRP'] : nil zec = hash.key?('ZEC') ? hash['ZEC'] : nil zrx = hash.key?('ZRX') ? hash['ZRX'] : nil bsv = hash.key?('BSV') ? hash['BSV'] : 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. UnofficialCurrencyCodeList.new(ada: ada, bat: bat, bch: bch, bnb: bnb, btc: btc, btg: btg, cnh: cnh, dash: dash, doge: doge, etc: etc, eth: eth, gbx: gbx, lsk: lsk, neo: neo, omg: omg, qtum: qtum, usdt: usdt, xlm: xlm, xmr: xmr, xrp: xrp, zec: zec, zrx: zrx, bsv: bsv, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
105 106 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 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 105 def self.names @_hash = {} if @_hash.nil? @_hash['ada'] = 'ADA' @_hash['bat'] = 'BAT' @_hash['bch'] = 'BCH' @_hash['bnb'] = 'BNB' @_hash['btc'] = 'BTC' @_hash['btg'] = 'BTG' @_hash['bsv'] = 'BSV' @_hash['cnh'] = 'CNH' @_hash['dash'] = 'DASH' @_hash['doge'] = 'DOGE' @_hash['etc'] = 'ETC' @_hash['eth'] = 'ETH' @_hash['gbx'] = 'GBX' @_hash['lsk'] = 'LSK' @_hash['neo'] = 'NEO' @_hash['omg'] = 'OMG' @_hash['qtum'] = 'QTUM' @_hash['usdt'] = 'USDT' @_hash['xlm'] = 'XLM' @_hash['xmr'] = 'XMR' @_hash['xrp'] = 'XRP' @_hash['zec'] = 'ZEC' @_hash['zrx'] = 'ZRX' @_hash end |
.nullables ⇒ Object
An array for nullable fields
141 142 143 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 141 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
134 135 136 137 138 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 134 def self.optionals %w[ bsv ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
251 252 253 254 255 256 257 258 259 260 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 251 def inspect class_name = self.class.name.split('::').last "<#{class_name} ada: #{@ada.inspect}, bat: #{@bat.inspect}, bch: #{@bch.inspect}, bnb:"\ " #{@bnb.inspect}, btc: #{@btc.inspect}, btg: #{@btg.inspect}, bsv: #{@bsv.inspect}, cnh:"\ " #{@cnh.inspect}, dash: #{@dash.inspect}, doge: #{@doge.inspect}, etc: #{@etc.inspect},"\ " eth: #{@eth.inspect}, gbx: #{@gbx.inspect}, lsk: #{@lsk.inspect}, neo: #{@neo.inspect},"\ " omg: #{@omg.inspect}, qtum: #{@qtum.inspect}, usdt: #{@usdt.inspect}, xlm:"\ " #{@xlm.inspect}, xmr: #{@xmr.inspect}, xrp: #{@xrp.inspect}, zec: #{@zec.inspect}, zrx:"\ " #{@zrx.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
241 242 243 244 245 246 247 248 |
# File 'lib/the_plaid_api/models/unofficial_currency_code_list.rb', line 241 def to_s class_name = self.class.name.split('::').last "<#{class_name} ada: #{@ada}, bat: #{@bat}, bch: #{@bch}, bnb: #{@bnb}, btc: #{@btc}, btg:"\ " #{@btg}, bsv: #{@bsv}, cnh: #{@cnh}, dash: #{@dash}, doge: #{@doge}, etc: #{@etc}, eth:"\ " #{@eth}, gbx: #{@gbx}, lsk: #{@lsk}, neo: #{@neo}, omg: #{@omg}, qtum: #{@qtum}, usdt:"\ " #{@usdt}, xlm: #{@xlm}, xmr: #{@xmr}, xrp: #{@xrp}, zec: #{@zec}, zrx: #{@zrx},"\ " additional_properties: #{@additional_properties}>" end |