Module: Braspag::Service

Included in:
Cryptography, Gateway, Recorrente
Defined in:
lib/braspag/service.rb

Instance Method Summary collapse

Instance Method Details

#initialize(connection) ⇒ Object



3
4
5
6
# File 'lib/braspag/service.rb', line 3

def initialize(connection)
  @connection = connection
  self.class.endpoint :uri => uri, :version => 2
end

#on_create_document(doc) ⇒ Object



8
9
10
# File 'lib/braspag/service.rb', line 8

def on_create_document(doc)
  doc.alias 'tns', base_action_url
end

#on_response_document(doc) ⇒ Object



12
13
14
# File 'lib/braspag/service.rb', line 12

def on_response_document(doc)
  doc.add_namespace 'ns', base_action_url
end