Class: Services::UpdateConfiguredAccountContext
- Inherits:
-
Object
- Object
- Services::UpdateConfiguredAccountContext
- Defined in:
- app/contexts/services/update_configured_account_context.rb
Instance Attribute Summary collapse
-
#ca_params ⇒ Object
Returns the value of attribute ca_params.
-
#configured_account ⇒ Object
Returns the value of attribute configured_account.
-
#cred_params ⇒ Object
Returns the value of attribute cred_params.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configured_account, ca_params, cred_params) ⇒ UpdateConfiguredAccountContext
constructor
A new instance of UpdateConfiguredAccountContext.
Constructor Details
#initialize(configured_account, ca_params, cred_params) ⇒ UpdateConfiguredAccountContext
Returns a new instance of UpdateConfiguredAccountContext.
11 12 13 14 15 16 |
# File 'app/contexts/services/update_configured_account_context.rb', line 11 def initialize(configured_account, ca_params, cred_params) @configured_account = configured_account @ca_params = ca_params @cred_params = cred_params @configured_account.extend Services::ConfiguredAccountUpdater end |
Instance Attribute Details
#ca_params ⇒ Object
Returns the value of attribute ca_params.
5 6 7 |
# File 'app/contexts/services/update_configured_account_context.rb', line 5 def ca_params @ca_params end |
#configured_account ⇒ Object
Returns the value of attribute configured_account.
5 6 7 |
# File 'app/contexts/services/update_configured_account_context.rb', line 5 def configured_account @configured_account end |
#cred_params ⇒ Object
Returns the value of attribute cred_params.
5 6 7 |
# File 'app/contexts/services/update_configured_account_context.rb', line 5 def cred_params @cred_params end |
Class Method Details
.call(configured_account, ca_params, cred_params) ⇒ Object
7 8 9 |
# File 'app/contexts/services/update_configured_account_context.rb', line 7 def self.call(configured_account, ca_params, cred_params) UpdateConfiguredAccountContext.new(configured_account, ca_params, cred_params).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'app/contexts/services/update_configured_account_context.rb', line 18 def call configured_account.update(ca_params).tap do | configured_account | UpdateCredentialContext.call(configured_account, cred_params) end end |