Class: Pokemon::Tcgplayer

Inherits:
Object
  • Object
show all
Defined in:
lib/pokemon_tcg_sdk/tcgplayer.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#pricesObject

Returns the value of attribute prices.



3
4
5
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 3

def prices
  @prices
end

#updated_atObject

Returns the value of attribute updated_at.



3
4
5
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 3

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 3

def url
  @url
end

Class Method Details

.from_json(json) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 5

def self.from_json(json)
  tcgplayer = Tcgplayer.new
  tcgplayer.url = json['url']
  tcgplayer.updated_at = json['updatedAt']
  tcgplayer.prices = TcgPlayerPrices.from_json(json['prices']) if !json['prices'].nil?

  tcgplayer
end