Sha256: 61ee1a2b6e6acf3bf4d585b634f7bec1615bbd38524ef89f952e46858629cc6f
Contents?: true
Size: 356 Bytes
Versions: 4
Compression:
Stored size: 356 Bytes
Contents
module Tang class RemoveCustomerDiscount def self.call(customer) begin cu = Stripe::Customer.retrieve(customer.stripe_id) cu.delete_discount rescue Stripe::StripeError => e customer.errors[:base] << e.message end customer.update(coupon: nil, coupon_start: nil) return customer end end end
Version data entries
4 entries across 4 versions & 1 rubygems