Class: Rack::InAppPurchase::Product
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Rack::InAppPurchase::Product
- Defined in:
- lib/rack/in-app-purchase/models/product.rb
Constant Summary collapse
- TYPES =
['Consumable', 'Non-Consumable', 'Free Subscription', 'Auto-Renewable Subscription', 'Non-Renewable Subscription'].freeze
Instance Method Summary collapse
Instance Method Details
#validate ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/rack/in-app-purchase/models/product.rb', line 16 def validate super validates_presence %i[product_identifier title description price price_locale] validates_numeric :price validates_includes TYPES, :type end |