Class: Services::UpdateThirdPartyContext

Inherits:
Object
  • Object
show all
Defined in:
app/contexts/services/update_third_party_context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(third_party, params) ⇒ UpdateThirdPartyContext

Returns a new instance of UpdateThirdPartyContext.



11
12
13
14
15
# File 'app/contexts/services/update_third_party_context.rb', line 11

def initialize(third_party, params)
  @third_party = third_party
  @params = params
  third_party.extend Services::ThirdPartyUpdater
end

Instance Attribute Details

#paramsObject

Returns the value of attribute params.



5
6
7
# File 'app/contexts/services/update_third_party_context.rb', line 5

def params
  @params
end

#third_partyObject

Returns the value of attribute third_party.



5
6
7
# File 'app/contexts/services/update_third_party_context.rb', line 5

def third_party
  @third_party
end

Class Method Details

.call(third_party, params) ⇒ Object



7
8
9
# File 'app/contexts/services/update_third_party_context.rb', line 7

def self.call(third_party, params)
  UpdateThirdPartyContext.new(third_party, params).call
end

Instance Method Details

#callObject



17
18
19
# File 'app/contexts/services/update_third_party_context.rb', line 17

def call
  third_party.update(params)
end