Class: SolidusBolt::Accounts::AddPaymentMethodService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/solidus_bolt/accounts/add_payment_method_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseService

call

Constructor Details

#initialize(access_token:, credit_card:, address:, email:) ⇒ AddPaymentMethodService

Returns a new instance of AddPaymentMethodService.



8
9
10
11
12
13
14
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 8

def initialize(access_token:, credit_card:, address:, email:)
  @access_token = access_token
  @credit_card = credit_card
  @address = address
  @email = email
  super
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



6
7
8
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 6

def access_token
  @access_token
end

#addressObject (readonly)

Returns the value of attribute address.



6
7
8
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 6

def address
  @address
end

#credit_cardObject (readonly)

Returns the value of attribute credit_card.



6
7
8
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 6

def credit_card
  @credit_card
end

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 6

def email
  @email
end

Instance Method Details

#callObject



16
17
18
# File 'app/services/solidus_bolt/accounts/add_payment_method_service.rb', line 16

def call
  add_payment_method
end