lib/kosher/shipping.rb in kosher-0.5.0 vs lib/kosher/shipping.rb in kosher-0.6.0
- old
+ new
@@ -1,12 +1,12 @@
module Kosher
# Shipping details of an offer.
#
# Shipping costs something (or nothing) and is subject to availability.
class Shipping < Structure
- key :cents, :type => Integer
- key :currency
- key :availability, :type => Structure
+ key :cents, :type => Integer
+ key :currency
+ has_one :availability
# Returns whether the item ships for free.
def free?
cents == 0
end