Class: Deliver::UploadPriceTier
- Inherits:
-
Object
- Object
- Deliver::UploadPriceTier
- Defined in:
- lib/deliver/upload_price_tier.rb
Overview
Set the app’s pricing
Instance Method Summary collapse
Instance Method Details
#upload(options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/deliver/upload_price_tier.rb', line 4 def upload() return unless [:price_tier] app = [:app] # just to be sure, the user might have passed an int (which is fine with us) [:price_tier] = [:price_tier].to_s old_price = app.price_tier if [:price_tier] == old_price Helper.log.info "Price Tier unchanged (tier #{[:price_tier]})".green return end app.update_price_tier!([:price_tier]) Helper.log.info "Successfully updated the pricing from #{old_price} to #{[:price_tier]}".green end |