Class: Nabortu::Methods::SavePerson

Inherits:
Base
  • Object
show all
Defined in:
lib/nabortu/methods/save_person.rb

Instance Attribute Summary

Attributes inherited from Base

#params, #response

Instance Method Summary collapse

Methods inherited from Base

do_request, #do_request, #initialize

Constructor Details

This class inherits a constructor from Nabortu::Methods::Base

Instance Method Details

#do_prepareObject



10
11
12
# File 'lib/nabortu/methods/save_person.rb', line 10

def do_prepare
  @response[:save_person_result]
end

#request(params = {}) ⇒ Object



4
5
6
7
8
# File 'lib/nabortu/methods/save_person.rb', line 4

def request(params = {})
  person    = params[:person]     || raise(Nabortu::Errors::NoParam.new :person)
  client_id = params[:client_id]  || raise(Nabortu::Errors::NoParam.new :person)
  build_person(person) + build_document(person.document) + "<tns:id_client>#{client_id}</tns:id_client>"
end