Class: Pokemon::Cardmarket

Inherits:
Object
  • Object
show all
Defined in:
lib/pokemon_tcg_sdk/cardmarket.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/cardmarket.rb', line 3

def prices
  @prices
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/pokemon_tcg_sdk/cardmarket.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/cardmarket.rb', line 5

def self.from_json(json)
  cardmarket = Cardmarket.new
  cardmarket.url = json['url']
  cardmarket.updated_at = json['updatedAt']
  cardmarket.prices = CardmarketPrices.from_json(json['prices']) if !json['prices'].nil?

  cardmarket
end