myfreecomm/billimatic-client-ruby

View on GitHub
lib/billimatic/resources/person.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Billimatic
  module Resources
    class Person < Base
      crud :list, :show, :create, :update, :destroy

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

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