Class: FastshopCatalog::ParticipantService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/fastshop_catalog/participant_service.rb

Constant Summary

Constants inherited from BaseService

BaseService::AUX_LOG

Instance Method Summary collapse

Methods inherited from BaseService

#action, camelize, #encrypt, #service_url

Constructor Details

#initializeParticipantService

Returns a new instance of ParticipantService.



4
5
6
7
8
9
10
# File 'lib/fastshop_catalog/participant_service.rb', line 4

def initialize
  @service = :participante
  @interface = 'IParticipante'
  @soap_method = :cadastrar_participante
  @return_key = 'Token'
  super
end

Instance Method Details

#insert(participant) ⇒ Object



12
13
14
15
16
17
# File 'lib/fastshop_catalog/participant_service.rb', line 12

def insert(participant)
  payload = participant.to_json.to_s
  AUX_LOG.debug('Participant as json: ' + payload)
  service_invoker_with_encryption('entrada', 'contrato' => participant.contract_code,
  'entrada' => payload)
end