class Pokemon::TcgPlayerPrices

Attributes

first_edition[RW]
first_edition_holofoil[RW]
first_edition_normal[RW]
holofoil[RW]
normal[RW]
reverse_holofoil[RW]
unlimited[RW]

Public Class Methods

from_json(json) click to toggle source
# File lib/pokemon_tcg_sdk/tcgplayer.rb, line 18
def self.from_json(json)
  price = TcgPlayerPrices.new
  price.normal = TcgPlayerPriceValues.from_json(json['normal']) if json.key? 'normal'
  price.holofoil = TcgPlayerPriceValues.from_json(json['holofoil']) if !json['holofoil'].nil?
  price.reverse_holofoil = TcgPlayerPriceValues.from_json(json['reverseHolofoil']) if !json['reverseHolofoil'].nil?
  price.first_edition_holofoil = TcgPlayerPriceValues.from_json(json['1stEditionHolofoil']) if !json['1stEditionHolofoil'].nil?
  price.first_edition_normal = TcgPlayerPriceValues.from_json(json['1stEditionNormal']) if !json['1stEditionNormal'].nil?
  price.first_edition = TcgPlayerPriceValues.from_json(json['1stEdition']) if !json['1stEdition'].nil?
  price.unlimited = TcgPlayerPriceValues.from_json(json['unlimited']) if !json['unlimited'].nil?

  price
end