Skip to content

Commit

Permalink
declare provider_customer on customer as alias to payment_provider_cu…
Browse files Browse the repository at this point in the history
…stomer
  • Loading branch information
annvelents committed Jul 26, 2024
1 parent 669d958 commit 99ceba1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/models/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class Customer < ApplicationRecord
validates :payment_provider, inclusion: {in: PAYMENT_PROVIDERS}, allow_nil: true
validates :timezone, timezone: true, allow_nil: true

alias :provider_customergit :payment_provider_customer

def self.ransackable_attributes(_auth_object = nil)
%w[id name external_id email]
end
Expand Down Expand Up @@ -115,10 +117,6 @@ def preferred_document_locale
organization.document_locale.to_sym
end

def provider_customer
payment_provider_customer
end

def shipping_address
{
address_line1: shipping_address_line1,
Expand Down

0 comments on commit 99ceba1

Please sign in to comment.