SeguroFacil ruby API library
Add this line to your application's Gemfile:
gem 'segurofacil-ruby', require: false
gem 'segurofacil-ruby', git: 'https://github.com/guilhermekfe/segurofacil-ruby.git', require: false
And then execute:
$ bundle
Or install it yourself as:
$ gem install segurofacil-ruby
And then create an initializer with that:
require 'segurofacil'
Make sure you have the following variables in your environment.
SEGUROFACIL_PARTNER_NAME - Your segurofacil identifier
SEGUROFACIL_EMAIL - Authentication email
SEGUROFACIL_PASSWORD - Authentication password
Segurofacil::Apolice.create({
name: "Company Test",
razaoSocial: "Company Test",
cNPJ: "33.333.333/0001-33",
responsavel: "Test",
cPF: "333.333.333-33",
qualificacao: "Test",
email: "[email protected]",
telefone: "35555555",
atividade: "Test",
address1: "Test",
address2: "Test",
bairro: "Manhattan",
city: "NYC",
estado: "NY",
cep: "12345678"
})
Segurofacil::Apolice.cancel(cnpj)
Segurofacil::Estagiario.create(
{
nome: 'name',
cpf: 'document_cpf',
dob: 'date_of_birth',
sexoId: sex_id # 1 for male and 2 for female
},
cnpj
)
Segurofacil::Estagiarios.get(cnpj)
Segurofacil::Estagiario.remove(intern_document_cpf, cnpj)
The gem is available as open source under the terms of the MIT License.
- Create Apolice
- Cancel Apolice
- Add Estagiario
- Remove Estagiario
- Get Estagiarios