{"id":19987106,"url":"https://github.com/bigoen/parasut","last_synced_at":"2025-05-04T08:31:12.204Z","repository":{"id":62494121,"uuid":"289003793","full_name":"bigoen/parasut","owner":"bigoen","description":"Parasut v4 Api","archived":false,"fork":false,"pushed_at":"2021-03-08T14:53:03.000Z","size":100,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T06:01:41.555Z","etag":null,"topics":["composer","parasut","php","sdk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigoen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-20T12:44:41.000Z","updated_at":"2022-09-05T07:26:50.000Z","dependencies_parsed_at":"2022-11-02T11:17:38.453Z","dependency_job_id":null,"html_url":"https://github.com/bigoen/parasut","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigoen%2Fparasut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigoen%2Fparasut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigoen%2Fparasut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigoen%2Fparasut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigoen","download_url":"https://codeload.github.com/bigoen/parasut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252307865,"owners_count":21727085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","parasut","php","sdk"],"created_at":"2024-11-13T04:33:39.751Z","updated_at":"2025-05-04T08:31:08.284Z","avatar_url":"https://github.com/bigoen.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Parasut Php SDK\n==\nInstall:\n```\ncomposer require bigoen/parasut\n```\nBase defines:\n```php\nuse Symfony\\Component\\HttpClient\\HttpClient;\n\n$clientId = '';\n$clientSecret = '';\n$email = 'Panel email';\n$password = 'Panel password';\n$companyId = '123'; // https://uygulama.parasut.com/123/\n$httpClient = HttpClient::create();\n```\nAccountService:\n```php\nuse Bigoen\\Contracts\\Parasut\\Constant\\CurrencyConstant;\nuse Bigoen\\Contracts\\Parasut\\Constant\\AccountTypeConstant;\nuse Bigoen\\Parasut\\Services\\AccountService;\nuse Bigoen\\Parasut\\Model\\Account;\n\n$service = new AccountService(\n    $clientId, \n    $clientSecret,\n    $email,\n    $password,\n    $companyId, \n    $httpClient\n);\n// set queries. \n$queries = [\n    'page[size]' =\u003e 20,\n];\n// return array.\n$service-\u003egetAccounts($queries);\n// return objects.\n$service-\u003egetObjectAccounts($queries);\n// post object.\n$object = new Account();\n$object-\u003ename = \"Test\";\n$object-\u003ecurrency = CurrencyConstant::TRL;\n$object-\u003eaccountType = AccountTypeConstant::BANK;\n$object-\u003ebankName = \"Test Bank\";\n$object-\u003ebankBranch = \"Test\";\n$object-\u003ebankAccountNo = \"123456\";\n\n$service-\u003epostObjectAccount($object);\n// put object.\n$object = $service-\u003egetObjectAccount(123);\n$object-\u003ename = \"New Name\";\n\n$service-\u003eputObjectAccount($object);\n// delete object.\n$service-\u003edeleteAccount(123);\n```\nContactService:\n```php\nuse Bigoen\\Parasut\\Services\\ContactService;\nuse Bigoen\\Parasut\\Model\\Contact;\n\n$service = new ContactService(\n    $clientId, \n    $clientSecret,\n    $email,\n    $password,\n    $companyId, \n    $httpClient\n);\n// set queries. \n$queries = [\n    'page[size]' =\u003e 20,\n];\n// return array.\n$service-\u003egetContacts($queries);\n// return objects.\n$service-\u003egetObjectContacts($queries);\n// post object.\n$object = new Contact();\n$object-\u003ename = \"Test\";\n$object-\u003eshortName = \"Short\";\n$object-\u003etaxOffice = \"Tax Office\";\n$object-\u003etaxNumber = \"123123\";\n$object-\u003ecity = \"İzmir\";\n$object-\u003edistrict = \"Konak\";\n\n$service-\u003epostObjectContact($object);\n// put object.\n$object = $service-\u003egetObjectContact(123);\n$object-\u003ename = \"New Name\";\n\n$service-\u003eputObjectContact($object);\n// delete object.\n$service-\u003edeleteContact(123);\n```\nSalesInvoiceService:\n```php\nuse Bigoen\\Contracts\\Parasut\\Constant\\PaymentItemTypeConstant;\nuse Bigoen\\Contracts\\Parasut\\Constant\\CurrencyConstant;\nuse Bigoen\\Parasut\\Model\\SalesInvoicePayment;\nuse Bigoen\\Parasut\\Services\\SalesInvoiceService;\nuse Bigoen\\Parasut\\Model\\SalesInvoice;\n\n$service = new SalesInvoiceService(\n    $clientId, \n    $clientSecret,\n    $email,\n    $password,\n    $companyId, \n    $httpClient\n);\n// set queries. \n$queries = [\n    'page[size]' =\u003e 20,\n];\n// return array.\n$service-\u003egetSalesInvoices($queries);\n// return objects.\n$service-\u003egetObjectSalesInvoices($queries);\n// post object.\n$object = new SalesInvoice();\n$object-\u003eitemType = PaymentItemTypeConstant::INVOICE;\n$object-\u003edescription = \"Test\";\n$object-\u003eissueDate = new DateTime();\n$object-\u003edueDate = new DateTime();\n$object-\u003ecurrency = CurrencyConstant::TRL;\n$object-\u003eexchangeRate = 1;\n// set other variables.\n\n$service-\u003epostObjectSalesInvoice($object);\n// put object.\n$object = $service-\u003egetObjectSalesInvoice(123);\n$object-\u003edescription = \"New Description\";\n\n$service-\u003eputObjectSalesInvoice($object);\n// payment.\n$includeQueries = 'payable, transaction';\n$payment = new SalesInvoicePayment();\n$payment-\u003esalesInvoiceId = 123;\n$payment-\u003enotes = \"Notes\";\n$payment-\u003eaccountId = 123;\n$payment-\u003edate = new DateTime();\n$payment-\u003eamount = 100.5;\n$payment-\u003eexchangeRate = 1;\n\n$service-\u003epostObjectSalesInvoicePayment($payment, $includeQueries);\n// delete object.\n$service-\u003edeleteSalesInvoice(123);\n```\nPurchaseBillService:\n```php\nuse Bigoen\\Contracts\\Parasut\\Constant\\PaymentItemTypeConstant;\nuse Bigoen\\Contracts\\Parasut\\Constant\\CurrencyConstant;\nuse Bigoen\\Parasut\\Services\\PurchaseBillService;\nuse Bigoen\\Parasut\\Model\\PurchaseBill;\nuse Bigoen\\Parasut\\Model\\PurchaseBillPayment;\n\n$service = new PurchaseBillService(\n    $clientId, \n    $clientSecret,\n    $email,\n    $password,\n    $companyId, \n    $httpClient\n);\n// set queries. \n$queries = [\n    'page[size]' =\u003e 20,\n];\n// return array.\n$service-\u003egetPurchaseBills($queries);\n// return objects.\n$service-\u003egetObjectPurchaseBills($queries);\n// post object.\n$object = new PurchaseBill();\n$object-\u003eitemType = PaymentItemTypeConstant::PURCHASE_BILL;\n$object-\u003edescription = \"Test\";\n$object-\u003eissueDate = new DateTime();\n$object-\u003edueDate = new DateTime();\n$object-\u003ecurrency = CurrencyConstant::TRL;\n$object-\u003eexchangeRate = 1;\n$object-\u003enetTotal = 100.0;\n$object-\u003etotalVat = 18.0;\n// set other variables.\n\n// basic or detailed.\n$service-\u003epostObjectPurchaseBillBasic($object);\n$service-\u003epostObjectPurchaseBillDetailed($object);\n// put object.\n$object = $service-\u003egetObjectPurchaseBill(123);\n$object-\u003edescription = \"New Description\";\n\n$service-\u003eputObjectPurchaseBillBasic($object);\n// payment.\n$includeQueries = 'payable, transaction';\n$payment = new PurchaseBillPayment(); \n$payment-\u003epurchaseBillId = 123;\n$payment-\u003enotes = \"Notes\";\n$payment-\u003eaccountId = 123;\n$payment-\u003edate = new DateTime();\n$payment-\u003eamount = 100.5;\n$payment-\u003eexchangeRate = 1;\n\n$service-\u003epostObjectPurchaseBillPayment($payment, $includeQueries);\n// delete object.\n$service-\u003edeletePurchaseBill(123);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigoen%2Fparasut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigoen%2Fparasut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigoen%2Fparasut/lists"}