Sha256: 1c7860d21dece42501a25ef7618bb9c0f5fa00c9112d5007c4477908af702ada

Contents?: true

Size: 475 Bytes

Versions: 5

Compression:

Stored size: 475 Bytes

Contents

class StripeModelCallbacks::Customer::BankAccount::DeletedService < StripeModelCallbacks::BaseEventService
  def perform
    bank_account = StripeBankAccount.find_or_initialize_by(stripe_id: object.id)
    bank_account.assign_from_stripe(object)

    if bank_account.save
      bank_account.create_activity :customer_bank_account_deleted if event.type == "customer.bank_account.deleted"
      succeed!
    else
      fail! bank_account.errors.full_messages
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe_model_callbacks-0.1.7 app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb
stripe_model_callbacks-0.1.6 app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb
stripe_model_callbacks-0.1.5 app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb
stripe_model_callbacks-0.1.4 app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb
stripe_model_callbacks-0.1.3 app/services/stripe_model_callbacks/customer/bank_account/deleted_service.rb