No commit activity in last 3 years
No release in over 3 years
Gem to wrap segurofacil.com.br API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
>= 0
~> 10.0
~> 3.0

Runtime

 Project Readme

Segurofacil

SeguroFacil ruby API library

Installation

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'

Usage

Make sure you have the following variables in your environment.

SEGUROFACIL_PARTNER_NAME - Your segurofacil identifier
SEGUROFACIL_EMAIL - Authentication email
SEGUROFACIL_PASSWORD - Authentication password

Insurance Policy

Creating a new insurance policy

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: "user@email.com",
  telefone: "35555555",
  atividade: "Test",
  address1: "Test",
  address2: "Test",
  bairro: "Manhattan",
  city: "NYC",
  estado: "NY",
  cep: "12345678"
})

Cancelling an insurance policy

Segurofacil::Apolice.cancel(cnpj)

Intern

Adding intern

Segurofacil::Estagiario.create(
  {
    nome: 'name',
    cpf: 'document_cpf',
    dob: 'date_of_birth',
    sexoId: sex_id # 1 for male and 2 for female
  },
  cnpj
)

Listing interns

Segurofacil::Estagiarios.get(cnpj)

Remove intern from insurance policy

Segurofacil::Estagiario.remove(intern_document_cpf, cnpj)

License

The gem is available as open source under the terms of the MIT License.

TODO

  • Create Apolice
  • Cancel Apolice
  • Add Estagiario
  • Remove Estagiario
  • Get Estagiarios