https://github.com/phansys/facturama-php-sdk-abandoned
Facturama SDK PHP
https://github.com/phansys/facturama-php-sdk-abandoned
Last synced: 2 months ago
JSON representation
Facturama SDK PHP
- Host: GitHub
- URL: https://github.com/phansys/facturama-php-sdk-abandoned
- Owner: phansys
- License: mit
- Created: 2017-02-03T02:54:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T19:15:00.000Z (almost 9 years ago)
- Last Synced: 2025-12-26T05:56:26.475Z (6 months ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#Facturama SDK PHP
## How do I install it?
composer install javiertelioz/facturama-php-sdk:^1.0@dev
### Including the Lib
It includes the library to your project
```php
require __DIR__.'/vendor/autoload.php';
```
Start the development!
### Create an instance of Facturama\Api class
Example.
```php
$facturama = new \Facturama\Api('USER', 'PASSWORD');
```
With this instance you can start working.
At this stage your are ready to make call to the API on behalf of the user.
#### Making GET calls
```php
$params = [];
$result = $facturama->get('Client', $params);
```
#### Making POST calls
```php
$params = [
"Address" => [
"Street" => "St One ",
"ExteriorNumber" => "15",
"InteriorNumber" => "12",
"Neighborhood" => "Lower Manhattan, ",
"ZipCode" => "sample string 5",
"Locality" => "sample string 6",
"Municipality" => "sample string 7",
"State" => "sample string 8",
"Country" => "MX"
],
"Rfc" => "XEXX010101000",
"Name" => "Test Test",
"Email" => "test@facturma.com"
];
$result = $facturama->post('Client', $params);
```
#### Making PUT calls
```php
$clientId = 'TGpJ_Ko32_ZSEPBcZXRnRw2';
$body = [
"Id" => $clientId,
"Address" => [
"Street" => "St One",
"ExteriorNumber" => "15",
"InteriorNumber" => "12",
"Neighborhood" => "Lower Manhattan, ",
"ZipCode" => "sample string 5",
"Locality" => "sample string 6",
"Municipality" => "sample string 7",
"State" => "sample string 8",
"Country" => "MX"
],
"Rfc" => "XEXX010101000",
"Name" => "Test Test 2",
"Email" => "test@facturma.com"
];
$result = $facturama->put('Client/' . $clientId, $body);
```
#### Making DELETE calls
```php
$clientId = 'TGpJ_Ko32_ZSEPBcZXRnRw2';
$result = $facturama->delete('Client/' . $clientId);
```
## Examples
Don't forget to check out our examples codes in the [examples](https://github.com/javiertelioz/facturama-php-sdk/tree/master/examples) directory
## I want to contribute!
That is great! Just fork the project in github. Create a topic branch, write some code, and add some tests for your new code.
Thanks for helping!
##Contributing:
[phansys](https://github.com/phansys/)