Class: Pokemon::TcgPlayerPrices
- Inherits:
-
Object
- Object
- Pokemon::TcgPlayerPrices
- Defined in:
- lib/pokemon_tcg_sdk/tcgplayer.rb
Instance Attribute Summary collapse
-
#first_edition ⇒ Object
Returns the value of attribute first_edition.
-
#first_edition_holofoil ⇒ Object
Returns the value of attribute first_edition_holofoil.
-
#first_edition_normal ⇒ Object
Returns the value of attribute first_edition_normal.
-
#holofoil ⇒ Object
Returns the value of attribute holofoil.
-
#normal ⇒ Object
Returns the value of attribute normal.
-
#reverse_holofoil ⇒ Object
Returns the value of attribute reverse_holofoil.
-
#unlimited ⇒ Object
Returns the value of attribute unlimited.
Class Method Summary collapse
Instance Attribute Details
#first_edition ⇒ Object
Returns the value of attribute first_edition.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def first_edition @first_edition end |
#first_edition_holofoil ⇒ Object
Returns the value of attribute first_edition_holofoil.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def first_edition_holofoil @first_edition_holofoil end |
#first_edition_normal ⇒ Object
Returns the value of attribute first_edition_normal.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def first_edition_normal @first_edition_normal end |
#holofoil ⇒ Object
Returns the value of attribute holofoil.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def holofoil @holofoil end |
#normal ⇒ Object
Returns the value of attribute normal.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def normal @normal end |
#reverse_holofoil ⇒ Object
Returns the value of attribute reverse_holofoil.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def reverse_holofoil @reverse_holofoil end |
#unlimited ⇒ Object
Returns the value of attribute unlimited.
16 17 18 |
# File 'lib/pokemon_tcg_sdk/tcgplayer.rb', line 16 def unlimited @unlimited end |
Class Method Details
.from_json(json) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# 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 |