accordous/fluxous-client

There is no license information available for the latest version (v1.1) of this package.

Client for Fluxous API

v1.1 2024-06-25 13:59 UTC

This package is auto-updated.

Last update: 2024-10-25 14:46:52 UTC


README

Esse pacote auxilia no consumo da API do Fluxous utilizando Laravel.

Documentação: Fluxous - Manual API.

Instalação

composer require accordous/fluxous-client

Configuração

  • Publique o arquivo de configuração caso tenha interesse em alterar algum dos valores pré-definidos
php artisan vendor:publish --tag=Fluxous
  • Altere as configurações no arquivo .env do seu projeto Laravel
FLUXOUS_HOST='https://api.fluxous.com.br'
FLUXOUS_API='/v1'

Recursos

  • Autenticação /auth/token
use Accordous\FluxousClient\Services\FluxousService;

$service = new FluxousService();

$data = [
    'client_id' => '',
    'client_secret' => '',
];

$response = $service->auth()->token($data);

$result = $response->json();
  • Categorias /categories

get

use Accordous\FluxousClient\Services\FluxousService;

$service = new FluxousService($clientId, $clientSecret);

$response = $service->categories()->index();

$result = $response->json();

post

use Accordous\FluxousClient\Services\FluxousService;

$service = new FluxousService($clientId, $clientSecret);

$attributes = [
    '' => '',
];

$response = $service->categories()->store($attributes);

$result = $response->json();
  • Contas /accounts
use Accordous\FluxousClient\Services\FluxousService;

$service = new FluxousService($clientId, $clientSecret);

$attributes = [
    '' => '',
];

$response = $service->accounts()->store($attributes);

$result = $response->json();
  • Transações
use Accordous\FluxousClient\Services\FluxousService;

$service = new FluxousService($clientId, $clientSecret);

$attributes = [
    '' => '',
];

$response = $service->transactions()->store($attributes);

$result = $response->json();