app/services/tang/delete_card.rb in tang-0.0.9 vs app/services/tang/delete_card.rb in tang-0.1.0

- old
+ new

@@ -1,10 +1,12 @@ module Tang class DeleteCard def self.call(card) begin - customer = Stripe::Customer.retrieve(card.customer.stripe_id) - customer.sources.retrieve(card.stripe_id).delete + Stripe::Customer.delete_source( + card.customer.stripe_id, + card.stripe_id, + ) rescue Stripe::StripeError => e card.errors[:base] << e.message end return card end \ No newline at end of file