Sha256: 2bca1f9eb392de844fb7e275ea597f0ad81a40b004944d9aa9b38c7f6e031f3a
Contents?: true
Size: 427 Bytes
Versions: 17
Compression:
Stored size: 427 Bytes
Contents
module Mtwarden class BraintreePlanFetcher def self.store_locally Braintree::Plan.all.each do |plan| if local_plan = Mtwarden::Plan.find_by(braintree_id: plan.id) local_plan.update_attributes({ :name => plan.name, :price => plan.price }) else Mtwarden::Plan.create({ :name => plan.name, :price => plan.price, :braintree_id => plan.id }) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems