Sha256: 5da0dfa3bacec5feb000f63b63b4644d8203aa207f834629621cce908b81026f

Contents?: true

Size: 659 Bytes

Versions: 27

Compression:

Stored size: 659 Bytes

Contents

module Deliver
  # Set the app's pricing
  class UploadPriceTier
    def upload(options)
      return unless options[:price_tier]
      app = options[:app]

      # just to be sure, the user might have passed an int (which is fine with us)
      options[:price_tier] = options[:price_tier].to_s

      old_price = app.price_tier
      if options[:price_tier] == old_price
        Helper.log.info "Price Tier unchanged (tier #{options[:price_tier]})".green
        return
      end

      app.update_price_tier!(options[:price_tier])
      Helper.log.info "Successfully updated the pricing from #{old_price} to #{options[:price_tier]}".green
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
deliver-1.9.0 lib/deliver/upload_price_tier.rb
deliver-1.8.1 lib/deliver/upload_price_tier.rb
deliver-1.8.0 lib/deliver/upload_price_tier.rb
deliver-1.7.0 lib/deliver/upload_price_tier.rb
deliver-1.6.6 lib/deliver/upload_price_tier.rb
deliver-1.6.5 lib/deliver/upload_price_tier.rb
deliver-1.6.4 lib/deliver/upload_price_tier.rb
deliver-1.6.3 lib/deliver/upload_price_tier.rb
deliver-1.6.2 lib/deliver/upload_price_tier.rb
deliver-1.6.0 lib/deliver/upload_price_tier.rb
deliver-1.5.2 lib/deliver/upload_price_tier.rb
deliver-1.5.1 lib/deliver/upload_price_tier.rb
deliver-1.5.0 lib/deliver/upload_price_tier.rb
deliver-1.4.0 lib/deliver/upload_price_tier.rb
deliver-1.3.3 lib/deliver/upload_price_tier.rb
deliver-1.3.2 lib/deliver/upload_price_tier.rb
deliver-1.3.1 lib/deliver/upload_price_tier.rb
deliver-1.3.0 lib/deliver/upload_price_tier.rb
deliver-1.2.0 lib/deliver/upload_price_tier.rb
deliver-1.1.3 lib/deliver/upload_price_tier.rb