Class: Plaid::UnofficialCurrencyCodeList
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::UnofficialCurrencyCodeList
- Defined in:
- lib/plaid/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.
-
#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
TehterUS.
-
#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:, 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:, additional_properties: nil) ⇒ UnofficialCurrencyCodeList
Returns a new instance of UnofficialCurrencyCodeList.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 138 def initialize(ada:, bat:, bch:, bnb:, btc:, btg:, cnh:, dash:, doge:, etc:, eth:, gbx:, lsk:, neo:, omg:, qtum:, usdt:, xlm:, xmr:, xrp:, zec:, zrx:, 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 @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/plaid/models/unofficial_currency_code_list.rb', line 14 def ada @ada end |
#bat ⇒ String
Basic Attention Token
18 19 20 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 18 def bat @bat end |
#bch ⇒ String
Bitcoin Cash
22 23 24 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 22 def bch @bch end |
#bnb ⇒ String
Binance Coin
26 27 28 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 26 def bnb @bnb end |
#btc ⇒ String
Bitcoin
30 31 32 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 30 def btc @btc end |
#btg ⇒ String
Bitcoin Gold
34 35 36 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 34 def btg @btg end |
#cnh ⇒ String
Chinese Yuan (offshore)
38 39 40 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 38 def cnh @cnh end |
#dash ⇒ String
Dash
42 43 44 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 42 def dash @dash end |
#doge ⇒ String
Dogecoin
46 47 48 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 46 def doge @doge end |
#etc ⇒ String
Ethereum Classic
50 51 52 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 50 def etc @etc end |
#eth ⇒ String
Ethereum
54 55 56 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 54 def eth @eth end |
#gbx ⇒ String
Pence sterling, i.e. British penny
58 59 60 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 58 def gbx @gbx end |
#lsk ⇒ String
Lisk
62 63 64 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 62 def lsk @lsk end |
#neo ⇒ String
Neo
66 67 68 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 66 def neo @neo end |
#omg ⇒ String
OmiseGO
70 71 72 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 70 def omg @omg end |
#qtum ⇒ String
Qtum
74 75 76 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 74 def qtum @qtum end |
#usdt ⇒ String
TehterUS
78 79 80 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 78 def usdt @usdt end |
#xlm ⇒ String
Stellar Lumen
82 83 84 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 82 def xlm @xlm end |
#xmr ⇒ String
Monero
86 87 88 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 86 def xmr @xmr end |
#xrp ⇒ String
Ripple
90 91 92 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 90 def xrp @xrp end |
#zec ⇒ String
Zcash
94 95 96 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 94 def zec @zec end |
#zrx ⇒ String
0x
98 99 100 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 98 def zrx @zrx end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
170 171 172 173 174 175 176 177 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 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 170 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 # 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, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 101 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['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
134 135 136 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 134 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
129 130 131 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 129 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
241 242 243 244 245 246 247 248 249 250 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 241 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}, 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.
231 232 233 234 235 236 237 238 |
# File 'lib/plaid/models/unofficial_currency_code_list.rb', line 231 def to_s class_name = self.class.name.split('::').last "<#{class_name} 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}, additional_properties:"\ " #{@additional_properties}>" end |