Class: Billimatic::Resources::Person

Inherits:
Base
  • Object
show all
Defined in:
lib/billimatic/resources/person.rb

Instance Attribute Summary

Attributes inherited from Base

#http

Instance Method Summary collapse

Methods inherited from Base

#collection_name, #create, crud, #destroy, #list, #list_by_organization, #parsed_body, #show, #show_by_organization, #update

Methods included from Hooks

#notify

Constructor Details

#initialize(http) ⇒ Person

Returns a new instance of Person.



6
7
8
9
# File 'lib/billimatic/resources/person.rb', line 6

def initialize(http)
  @collection_name = 'people'
  super http
end

Instance Method Details

#search(cpf:) ⇒ Object



11
12
13
14
15
# File 'lib/billimatic/resources/person.rb', line 11

def search(cpf:)
  http.get("#{resource_base_path}/search", params: { cpf: cpf }) do |response|
    respond_with_collection response
  end
end