class Segurofacil::Apolice
Public Class Methods
cancel(cnpj)
click to toggle source
Calls superclass method
# File lib/segurofacil/apolice.rb, line 35 def cancel(cnpj) res = super cnpj get_cancel_response(res) end
create(company)
click to toggle source
Create a new insurance policy @param company [Hash] the new insurance holder @return [ApoliceCreateResponse] @example Create new 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" })
Calls superclass method
# File lib/segurofacil/apolice.rb, line 30 def create(company) res = super company get_create_response(res) end
Private Class Methods
get_cancel_response(res)
click to toggle source
# File lib/segurofacil/apolice.rb, line 46 def get_cancel_response(res) Segurofacil::Responses::ApoliceCancelResponse.new(res) end
get_create_response(res)
click to toggle source
# File lib/segurofacil/apolice.rb, line 42 def get_create_response(res) Segurofacil::Responses::ApoliceCreateResponse.new(res) end