Skip to content

Quasar-Flash/zaig-sdk-ruby

Repository files navigation

Zaig SDK - Ruby

# Library to integrate the Zaig services

🚀 Stack

  • ruby 2.7 to 3.2.X
  • docker

🔗 Links

🏃 How to use it

Import the library to your Gemfile:

gem "zaig"

Initialize the sdk with the basics:

Zaig.configure do |config|
  config.jwt_secret = "xxxxx-xxxxx-xxxxx-xxxx" # optional
  config.jwt_algorithm = "HS256" # optional
  config.jwt_user = "qcedente" # optional if jwt_secret is not defined
  config.base_url = "https://example.com"
  config.registration_endpoint = "zaig/consulta_de_credito" # optional
end

Run a company registration:

args = {} # hash with the company informations
# eg.: spec/fixtures/registration/valid_registration_payload.json
# documentation: https://integra-o-zaig.dev.qflash.com.br/redoc#tag/Zaig
reg_service = Zaig::Registration.new
res = reg_service.call(args)
# 'res' contains the fields defined at lib/zaig/entities/response.rb

🏃Preparando para execução

Clonando repository:

git clone git@github.com:Quasar-Flash/zaig-sdk-ruby.git
or com htts
git clone https://github.com/Quasar-Flash/zaig-sdk-ruby.git
cd zaig-sdk-ruby/

🚆 Rodando o projeto

Use o docker-compose para instalar e iniciar o sistema localmente, com todas as suas dependências:

docker-compose down && docker-compose run web bash

🌲 Branches

O projeto contém as seguintes branches protegidas: