Class: Magnetik::UpdateCreditCard
- Inherits:
-
Object
- Object
- Magnetik::UpdateCreditCard
- Includes:
- UseCase
- Defined in:
- app/use_cases/magnetik/update_credit_card.rb
Instance Attribute Summary collapse
-
#local_card ⇒ Object
readonly
Returns the value of attribute local_card.
Instance Method Summary collapse
-
#initialize(card, params) ⇒ UpdateCreditCard
constructor
A new instance of UpdateCreditCard.
- #perform ⇒ Object
Methods included from UseCase
Constructor Details
#initialize(card, params) ⇒ UpdateCreditCard
Returns a new instance of UpdateCreditCard.
7 8 9 10 |
# File 'app/use_cases/magnetik/update_credit_card.rb', line 7 def initialize(card, params) @card = card @params = params end |
Instance Attribute Details
#local_card ⇒ Object (readonly)
Returns the value of attribute local_card.
5 6 7 |
# File 'app/use_cases/magnetik/update_credit_card.rb', line 5 def local_card @local_card end |
Instance Method Details
#perform ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/use_cases/magnetik/update_credit_card.rb', line 12 def perform if fetch_customer && fetch_card if update_remote_card update_local_card end end end |