Skip to content

Commit

Permalink
resales.md finished
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciuspugliese committed Feb 5, 2018
1 parent e7e8f4c commit 25c0482
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docs/resales.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Primeira Mao Documentation

[Return documentation](https://github.com/life-code/primeira-mao/blob/master/docs/README.md)

## Resales documentation

```sh
<?php

require('./vendor/autoload.php');

use PrimeiraMao\Resales\Resale;

$resale = new Resale();

// ------- FIND -------
// Find one register for id
$response = $resale->find(1);

// Find all registers
$response = $resale->all();

var_dump($response);
die();


// ------- DELETE -------
// Delete one register for id
$response = $resale->delete(1);

var_dump($response);
die();


// ------- CREATE -------
// Create one register
// Send an array with the same structure as the official documentation says.
// https://primeiramao.docs.apiary.io/#reference/resale/resales/criando-um-registro
$data = [];
$response = $resale->create($data);

var_dump($response);
die();


// ------- UPDATE -------
// Update one register for id
// Send an array with the same structure as the official documentation says.
// https://primeiramao.docs.apiary.io/#reference/resale/resale/editando-uma-revenda
$data = [];
$response = $resale->update($id, $data);

var_dump($response);
die();
```

0 comments on commit 25c0482

Please sign in to comment.