PHP code example of theposeidonas / laravel-parasut-api
1. Go to this page and download the library: Download theposeidonas/laravel-parasut-api library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
theposeidonas / laravel-parasut-api example snippets
'Parasut' => Theposeidonas\LaravelParasutApi\Facades\Parasut::class,
use Theposeidonas\LaravelParasutApi\Facades\Parasut;
/* Satışlar */
Parasut::Bill(); // Satış faturası https://apidocs.parasut.com/#tag/SalesInvoices
Parasut::Customer(); // Müşteri https://apidocs.parasut.com/#tag/Contacts
/* Giderler */
Parasut::Receipt(); // Fiş - Fatura https://apidocs.parasut.com/#tag/PurchaseBills
Parasut::Bank(); // Banka giderleri https://apidocs.parasut.com/#tag/BankFees
Parasut::Salary(); // Maaş giderleri https://apidocs.parasut.com/#tag/Salaries
Parasut::Tax(); // Vergi giderleri https://apidocs.parasut.com/#tag/Taxes
Parasut::Supplier(); // Tedarikçi https://apidocs.parasut.com/#tag/Contacts
Parasut::Employee(); // Çalışan https://apidocs.parasut.com/#tag/Employees
/* Resmileştirme */
Parasut::Inbox(); // E-Fatura Gelen Kutusu https://apidocs.parasut.com/#tag/EInvoiceInboxes
Parasut::EArchive(); // E-Arşiv https://apidocs.parasut.com/#tag/EArchives
Parasut::EBill(); // E-Fatura https://apidocs.parasut.com/#tag/EInvoices
Parasut::ESmm(); // E SMM https://apidocs.parasut.com/#tag/ESmms
/* Nakit */
Parasut::Account(); // Kasa ve Banka https://apidocs.parasut.com/#tag/Accounts
Parasut::Transaction(); // İşlem https://apidocs.parasut.com/#tag/Transactions
/* Stok */
Parasut::Product(); // Ürün https://apidocs.parasut.com/#tag/Products
Parasut::Warehouse(); // Depo https://apidocs.parasut.com/#tag/Warehouses
Parasut::Waybill(); // İrsaliye https://apidocs.parasut.com/#tag/ShipmentDocuments
Parasut::StockMovement(); // Stok Hareketi https://apidocs.parasut.com/#tag/StockMovements
/* Ayarlar */
Parasut::Category(); // Kategori https://apidocs.parasut.com/#tag/ItemCategories
Parasut::Tag(); // Etiket https://apidocs.parasut.com/#tag/Tags
/* Other */
Parasut::ApiHome(); // Api Home https://apidocs.parasut.com/#tag/ApiHome
Parasut::TrackableJob(); // Trackable Job https://apidocs.parasut.com/#tag/TrackableJobs
Parasut::Webhook(); // Webhooks https://apidocs.parasut.com/#tag/Webhooks
$customer = [
'data'=>[
'type'=>'contacts',
'attributes'=>[
'email'=>'[email protected] ',
'name'=>'İsim Soyisim',
'contact_type'=>'person',
'tax_number'=>'11111111111',
'account_type'=>'customer'
]
]
];
$response = Parasut::Customer()->create($customer);
Array
(
[success] => true // İşlem başarılı ise true
[error] => false // İşlem başarısız ise true
[body] => stdClass Object // Paraşüt dökümanlarında yazan response -> stdClass Object olarak
[status] => 200 // Response Status
)
$parameters = [
'filter' => [
// Sadece integer kabul edilir.
'vkn' => 1234567890
],
// Bu kısım zorunlu değil.
'page' => [
'number' => 1,
'size'=> 15
]
];
Parasut::Inbox->index($parameters);
$parameters = [
'filter' => [
'name' => 'isim',
'currency' => 'TRY',
'bank_name' => 'Banka ismi',
'bank_branch' => 'Banka Şubesi',
'account_type' => 'Hesap Tipi',
'iban' => 'TR00 0000 0000 0000 0000 0000 00'
],
'sort' => 'balance',
'page' => [
'number' => 1,
'size' => 15
]
];
$response = Parasut::Account()->index($id, $parameters);
shell
php artisan vendor:publish --tag=parasut-config --force
Parasut::Product()->inventory($id);
Parasut::Customer()->show($id);
Parasut::Customer()->edit($id, $data);