Class: Billimatic::Resources::Person
- Defined in:
- lib/billimatic/resources/person.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(http) ⇒ Person
constructor
A new instance of Person.
- #search(cpf:) ⇒ Object
Methods inherited from Base
#collection_name, #create, crud, #destroy, #list, #list_by_organization, #parsed_body, #show, #show_by_organization, #update
Methods included from Hooks
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 |