Sha256: 9ded8ff6a9676bd574f62514a05beed8850fa50b895c86a1374ae3c993bd27d2

Contents?: true

Size: 558 Bytes

Versions: 5

Compression:

Stored size: 558 Bytes

Contents

class StripeBankAccount < StripeModelCallbacks::ApplicationRecord
  def self.stripe_class
    Stripe::BankAccount
  end

  def assign_from_stripe(object)
    check_object_is_stripe_class(object)
    assign_attributes(stripe_account_id: object.account)

    StripeModelCallbacks::AttributesAssignerService.execute!(
      model: self, stripe_model: object,
      attributes: %w[
        id account_holder_name account_holder_type bank_name country currency default_for_currency
        fingerprint last4 metadata routing_number status
      ]
    )
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe_model_callbacks-0.1.7 lib/stripe_model_callbacks/models/stripe_bank_account.rb
stripe_model_callbacks-0.1.6 lib/stripe_model_callbacks/models/stripe_bank_account.rb
stripe_model_callbacks-0.1.5 lib/stripe_model_callbacks/models/stripe_bank_account.rb
stripe_model_callbacks-0.1.4 lib/stripe_model_callbacks/models/stripe_bank_account.rb
stripe_model_callbacks-0.1.3 lib/stripe_model_callbacks/models/stripe_bank_account.rb