Module: SpreeStripe::StoreDecorator

Defined in:
app/models/spree_stripe/store_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



3
4
5
6
# File 'app/models/spree_stripe/store_decorator.rb', line 3

def self.prepended(base)
  base.store_accessor :private_metadata, :stripe_apple_pay_domain_id
  base.store_accessor :private_metadata, :stripe_top_level_domain_id
end

Instance Method Details

#billing_nameObject



18
19
20
# File 'app/models/spree_stripe/store_decorator.rb', line 18

def billing_name
  name
end

#handle_code_changesObject



12
13
14
15
16
# File 'app/models/spree_stripe/store_decorator.rb', line 12

def handle_code_changes
  super

  SpreeStripe::RegisterDomainJob.perform_later(id)
end

#stripe_gatewayObject



8
9
10
# File 'app/models/spree_stripe/store_decorator.rb', line 8

def stripe_gateway
  @stripe_gateway ||= payment_methods.stripe.active.last
end