lib/rapa/resources/item_resource.rb in rapa-0.4.2 vs lib/rapa/resources/item_resource.rb in rapa-0.4.3
- old
+ new
@@ -54,9 +54,14 @@
# @return [String, nil]
def ean
source.dig("ItemAttributes", "EAN")
end
+ # @return [Boolean]
+ def ebook?
+ source.dig("ItemAttributes", "ProductGroup") == "eBooks"
+ end
+
# @return [Integer, nil]
def episode_sequence
if value = source.dig("ItemAttributes", "EpisodeSequence")
value.to_i
end