From e4a7fd1ade74ad4a6281fb6b9e2ea3caf82663e5 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 3 Sep 2026 15:57:43 +0800 Subject: [PATCH 1/2] feat: normalize generated endpoint arguments --- CHANGELOG.md | 2 + README.md | 45 +- composer.json | 3 +- contracts/php-sdk-examples.json | 1353 ++- contracts/postman-manifest.json | 2013 +++- contracts/public-api-1.1.0.json | 9892 +++++++++++++++++ docs/adr/0007-generated-endpoint-arguments.md | 33 + docs/api-examples.md | 2698 ++--- docs/api-reference-handoff.md | 2 + docs/migration-guide.md | 23 +- docs/progress.md | 9 + docs/release-checklist.md | 2 +- docs/releases/1.1.1.md | 3 + src/Service.php | 170 + .../Concerns/ChatChannelServiceEndpoints.php | 78 +- .../Concerns/CommentServiceEndpoints.php | 31 +- .../Concerns/ContactServiceEndpoints.php | 31 +- .../Concerns/CustomerServiceEndpoints.php | 39 +- .../Concerns/DeviceServiceEndpoints.php | 49 +- .../Concerns/DriverServiceEndpoints.php | 124 +- .../Concerns/EntityServiceEndpoints.php | 31 +- .../Concerns/EquipmentServiceEndpoints.php | 31 +- .../Concerns/FileServiceEndpoints.php | 42 +- .../Concerns/FleetServiceEndpoints.php | 31 +- .../Concerns/FuelReportServiceEndpoints.php | 31 +- .../FuelTransactionServiceEndpoints.php | 67 +- .../Concerns/GeofenceServiceEndpoints.php | 15 +- .../Concerns/IssueServiceEndpoints.php | 31 +- .../Concerns/LabelServiceEndpoints.php | 9 +- .../Concerns/ManifestServiceEndpoints.php | 27 +- .../Concerns/OnboardServiceEndpoints.php | 9 +- .../Concerns/OrchestratorServiceEndpoints.php | 4 +- .../Concerns/OrderConfigServiceEndpoints.php | 11 +- .../Concerns/OrderServiceEndpoints.php | 211 +- .../Concerns/OrganizationServiceEndpoints.php | 4 +- .../Concerns/PartServiceEndpoints.php | 31 +- .../Concerns/PayloadServiceEndpoints.php | 31 +- .../Concerns/PlaceServiceEndpoints.php | 35 +- .../Concerns/PurchaseRateServiceEndpoints.php | 13 +- .../Concerns/SensorServiceEndpoints.php | 31 +- .../Concerns/ServiceAreaServiceEndpoints.php | 31 +- .../Concerns/ServiceQuoteServiceEndpoints.php | 11 +- .../Concerns/ServiceRateServiceEndpoints.php | 31 +- .../TrackingNumberServiceEndpoints.php | 24 +- .../TrackingStatusServiceEndpoints.php | 31 +- .../Concerns/VehicleServiceEndpoints.php | 40 +- .../Concerns/VendorServiceEndpoints.php | 31 +- .../Concerns/WorkOrderServiceEndpoints.php | 40 +- .../Concerns/ZoneServiceEndpoints.php | 31 +- tests/Contract/ApiExamplesTest.php | 25 +- tests/Contract/EndpointContractTest.php | 145 +- tests/ResourceServiceTest.php | 77 + tools/check-api-compatibility.php | 16 +- tools/check-contract-manifest.php | 32 + tools/generate-api-examples.php | 132 +- tools/generate-endpoint-services.php | 243 +- tools/live-sdk-contract-router.php | 50 +- 57 files changed, 15104 insertions(+), 3181 deletions(-) create mode 100644 contracts/public-api-1.1.0.json create mode 100644 docs/adr/0007-generated-endpoint-arguments.md diff --git a/CHANGELOG.md b/CHANGELOG.md index fd42256..c3a33af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Normalized order dispatch calls so `dispatch($orderId)`, `dispatchOrder($orderId)`, and the legacy parameter-array form use the same official `PATCH` endpoint. +- Added positional path identifiers and direct body, query, and multipart arrays to all 220 generated methods while preserving the complete published 1.1.0 envelope and named-argument surface. +- Updated the generated catalog and public examples to hide internal transport envelopes and execute the documented ergonomic calls. - Corrected the order destination action to use the HTTP verb defined by the official API contract. ## [1.1.0] - 2026-08-31 diff --git a/README.md b/README.md index d9684cf..e8d9a3a 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,31 @@ Never commit an API key. Load it from your runtime secret manager or environment Existing property access remains supported (`$fleetbase->orders`). Explicit accessors such as `$fleetbase->orders()` are available for static analysis and dependency injection. Browse [all 220 generated PHP examples](docs/api-examples.md); CI executes each exact snippet against a hermetic transport. +### Endpoint arguments + +Generated endpoint methods use the resource identifiers that appear in the URL as positional arguments, followed by the API data and optional request options. Body and query fields are passed directly; callers do not need to know the SDK's internal `body` or `query` transport keys. + +```php +$driver = $fleetbase->drivers->changeDriverPassword($driverId, [ + 'current_password' => $currentPassword, + 'password' => $newPassword, + 'password_confirmation' => $newPassword, + 'device_name' => 'navigator', +]); + +$order = $fleetbase->orders->scheduleOrder($orderId, [ + 'date' => '2026-09-10', + 'time' => '8am', + 'timezone' => 'Asia/Singapore', +]); + +$manifests = $fleetbase->drivers->listDriverManifests($driverId, [ + 'page' => 1, +]); +``` + +Methods with two URL identifiers take both identifiers before the data array, for example `capturePhotoForOrder($orderId, $subjectId, $data, $requestOptions)`. Collection methods take data first and request options second. The published 1.1.0 envelope form remains supported, including named `parameters:` and `options:` arguments, but new documentation uses the positional/direct form. + ## Configuration The second constructor argument accepts client configuration. The third legacy argument retains the debug flag without printing requests or credentials. @@ -148,20 +173,16 @@ Exception URLs are sanitized and never include credentials or query strings. Avo Multipart actions accept standard Guzzle multipart parts. The Core file service also exposes the official base64 upload action. ```php -$file = $fleetbase->files->uploadFile([], [ - 'multipart' => [ - [ - 'name' => 'file', - 'contents' => file_get_contents('/path/to/document.pdf'), - 'filename' => 'document.pdf', - ], - ['name' => 'path', 'contents' => 'documents'], +$file = $fleetbase->files->uploadFile([ + [ + 'name' => 'file', + 'contents' => file_get_contents('/path/to/document.pdf'), + 'filename' => 'document.pdf', ], + ['name' => 'path', 'contents' => 'documents'], ]); -$contents = $fleetbase->files->downloadFile([ - 'id' => 'file_123', -]); +$contents = $fleetbase->files->downloadFile('file_123'); ``` Non-JSON successful responses are returned as strings. The underlying PSR-7 response is available from `$fleetbase->client->getLastPsrResponse()` when headers or streaming behavior are needed. @@ -172,7 +193,7 @@ Retries are opt-in. GET, HEAD, OPTIONS, PUT, and DELETE requests may retry on tr ```php $order = $fleetbase->orders->createOrder( - ['body' => $attributes], + $attributes, [ 'idempotency_key' => $operationId, 'max_retries' => 2, diff --git a/composer.json b/composer.json index 9f70287..e62dbd1 100644 --- a/composer.json +++ b/composer.json @@ -71,7 +71,8 @@ "api:compatibility": [ "@api:snapshot", "@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.0.2.json --current=build/contracts/public-api-current.json", - "@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.0.3.json --current=build/contracts/public-api-current.json" + "@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.0.3.json --current=build/contracts/public-api-current.json", + "@php tools/check-api-compatibility.php --baseline=contracts/public-api-1.1.0.json --current=build/contracts/public-api-current.json" ], "check": [ "@lint", diff --git a/contracts/php-sdk-examples.json b/contracts/php-sdk-examples.json index 0f3310d..a810cb0 100644 --- a/contracts/php-sdk-examples.json +++ b/contracts/php-sdk-examples.json @@ -15,1760 +15,2233 @@ "group": "Contacts", "name": "Create a Contact", "implementation": "Fleetbase\\Sdk\\Services\\ContactService::createContact", - "call": "$result = $fleetbase->contacts->createContact(\n [\n 'body' => [\n 'name' => 'John Doe',\n 'type' => 'customer',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '+1 563-920-4264',\n ],\n ],\n []\n);", - "code": "contacts->createContact(\n [\n 'body' => [\n 'name' => 'John Doe',\n 'type' => 'customer',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '+1 563-920-4264',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->contacts->createContact(\n [\n 'name' => 'John Doe',\n 'type' => 'customer',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '+1 563-920-4264',\n ]\n);", + "code": "contacts->createContact(\n [\n 'name' => 'John Doe',\n 'type' => 'customer',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '+1 563-920-4264',\n ]\n);" }, "fleetbase-api-contacts-delete-a-contact": { "collection": "Fleetbase API", "group": "Contacts", "name": "Delete a Contact", "implementation": "Fleetbase\\Sdk\\Services\\ContactService::deleteContact", - "call": "$result = $fleetbase->contacts->deleteContact(\n [\n 'id' => 'contact_id-fixture',\n ],\n []\n);", - "code": "contacts->deleteContact(\n [\n 'id' => 'contact_id-fixture',\n ],\n []\n);" + "variables": { + "contactId": "contact_id-fixture" + }, + "call": "$result = $fleetbase->contacts->deleteContact($contactId);", + "code": "contacts->deleteContact($contactId);" }, "fleetbase-api-contacts-query-contacts": { "collection": "Fleetbase API", "group": "Contacts", "name": "Query Contacts", "implementation": "Fleetbase\\Sdk\\Services\\ContactService::queryContacts", - "call": "$result = $fleetbase->contacts->queryContacts(\n [],\n [\n 'query' => [\n 'query' => 'contact_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "contacts->queryContacts(\n [],\n [\n 'query' => [\n 'query' => 'contact_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->contacts->queryContacts(\n [\n 'query' => 'contact_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "contacts->queryContacts(\n [\n 'query' => 'contact_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-contacts-retrieve-a-contact": { "collection": "Fleetbase API", "group": "Contacts", "name": "Retrieve a Contact", "implementation": "Fleetbase\\Sdk\\Services\\ContactService::retrieveContact", - "call": "$result = $fleetbase->contacts->retrieveContact(\n [\n 'id' => 'contact_id-fixture',\n ],\n []\n);", - "code": "contacts->retrieveContact(\n [\n 'id' => 'contact_id-fixture',\n ],\n []\n);" + "variables": { + "contactId": "contact_id-fixture" + }, + "call": "$result = $fleetbase->contacts->retrieveContact($contactId);", + "code": "contacts->retrieveContact($contactId);" }, "fleetbase-api-contacts-update-a-contact": { "collection": "Fleetbase API", "group": "Contacts", "name": "Update a Contact", "implementation": "Fleetbase\\Sdk\\Services\\ContactService::updateContact", - "call": "$result = $fleetbase->contacts->updateContact(\n [\n 'id' => 'contact_id-fixture',\n 'body' => [\n 'name' => 'John Doe',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '563-920-4264',\n 'meta' => [\n 'external_ref' => 'john-doe',\n ],\n ],\n ],\n []\n);", - "code": "contacts->updateContact(\n [\n 'id' => 'contact_id-fixture',\n 'body' => [\n 'name' => 'John Doe',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '563-920-4264',\n 'meta' => [\n 'external_ref' => 'john-doe',\n ],\n ],\n ],\n []\n);" + "variables": { + "contactId": "contact_id-fixture" + }, + "call": "$result = $fleetbase->contacts->updateContact(\n $contactId,\n [\n 'name' => 'John Doe',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '563-920-4264',\n 'meta' => [\n 'external_ref' => 'john-doe',\n ],\n ]\n);", + "code": "contacts->updateContact(\n $contactId,\n [\n 'name' => 'John Doe',\n 'title' => 'Mr',\n 'email' => 'john@exampleco.com',\n 'phone' => '563-920-4264',\n 'meta' => [\n 'external_ref' => 'john-doe',\n ],\n ]\n);" }, "fleetbase-api-customers-create-a-customer": { "collection": "Fleetbase API", "group": "Customers", "name": "Create a Customer", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::createCustomer", - "call": "$result = $fleetbase->customers->createCustomer(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'name' => 'Jane Customer',\n 'password' => 'customer_password-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'place' => [\n 'name' => 'Home',\n 'street1' => '123 Main Street',\n 'city' => 'Kingston',\n 'province' => 'Kingston',\n 'postal_code' => '00000',\n 'country' => 'JM',\n ],\n ],\n ],\n []\n);", - "code": "customers->createCustomer(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'name' => 'Jane Customer',\n 'password' => 'customer_password-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'place' => [\n 'name' => 'Home',\n 'street1' => '123 Main Street',\n 'city' => 'Kingston',\n 'province' => 'Kingston',\n 'postal_code' => '00000',\n 'country' => 'JM',\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->createCustomer(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'name' => 'Jane Customer',\n 'password' => 'customer_password-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'place' => [\n 'name' => 'Home',\n 'street1' => '123 Main Street',\n 'city' => 'Kingston',\n 'province' => 'Kingston',\n 'postal_code' => '00000',\n 'country' => 'JM',\n ],\n ]\n);", + "code": "customers->createCustomer(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'name' => 'Jane Customer',\n 'password' => 'customer_password-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'place' => [\n 'name' => 'Home',\n 'street1' => '123 Main Street',\n 'city' => 'Kingston',\n 'province' => 'Kingston',\n 'postal_code' => '00000',\n 'country' => 'JM',\n ],\n ]\n);" }, "fleetbase-api-customers-create-a-customer-order": { "collection": "Fleetbase API", "group": "Customers", "name": "Create a Customer Order", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::createCustomerOrder", - "call": "$result = $fleetbase->customers->createCustomerOrder(\n [\n 'body' => [\n 'type' => 'transport',\n 'scheduled_at' => '2026-05-25T10:00:00Z',\n 'notes' => 'Handle with care.',\n 'pickup' => [\n 'name' => 'Pickup',\n 'street1' => '4169 N State RD 7',\n 'city' => 'Lauderdale Lakes',\n 'province' => 'FL',\n 'postal_code' => '33319',\n 'country' => 'US',\n ],\n 'dropoff' => [\n 'name' => 'Dropoff',\n 'city' => 'Kingston',\n 'country' => 'JM',\n ],\n 'entities' => [\n [\n 'name' => 'Wireless Headphones',\n 'description' => 'Electronics',\n 'weight' => 2.5,\n 'weight_unit' => 'lb',\n 'declared_value' => 150,\n 'currency' => 'USD',\n ],\n ],\n ],\n ],\n []\n);", - "code": "customers->createCustomerOrder(\n [\n 'body' => [\n 'type' => 'transport',\n 'scheduled_at' => '2026-05-25T10:00:00Z',\n 'notes' => 'Handle with care.',\n 'pickup' => [\n 'name' => 'Pickup',\n 'street1' => '4169 N State RD 7',\n 'city' => 'Lauderdale Lakes',\n 'province' => 'FL',\n 'postal_code' => '33319',\n 'country' => 'US',\n ],\n 'dropoff' => [\n 'name' => 'Dropoff',\n 'city' => 'Kingston',\n 'country' => 'JM',\n ],\n 'entities' => [\n [\n 'name' => 'Wireless Headphones',\n 'description' => 'Electronics',\n 'weight' => 2.5,\n 'weight_unit' => 'lb',\n 'declared_value' => 150,\n 'currency' => 'USD',\n ],\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->createCustomerOrder(\n [\n 'type' => 'transport',\n 'scheduled_at' => '2026-05-25T10:00:00Z',\n 'notes' => 'Handle with care.',\n 'pickup' => [\n 'name' => 'Pickup',\n 'street1' => '4169 N State RD 7',\n 'city' => 'Lauderdale Lakes',\n 'province' => 'FL',\n 'postal_code' => '33319',\n 'country' => 'US',\n ],\n 'dropoff' => [\n 'name' => 'Dropoff',\n 'city' => 'Kingston',\n 'country' => 'JM',\n ],\n 'entities' => [\n [\n 'name' => 'Wireless Headphones',\n 'description' => 'Electronics',\n 'weight' => 2.5,\n 'weight_unit' => 'lb',\n 'declared_value' => 150,\n 'currency' => 'USD',\n ],\n ],\n ]\n);", + "code": "customers->createCustomerOrder(\n [\n 'type' => 'transport',\n 'scheduled_at' => '2026-05-25T10:00:00Z',\n 'notes' => 'Handle with care.',\n 'pickup' => [\n 'name' => 'Pickup',\n 'street1' => '4169 N State RD 7',\n 'city' => 'Lauderdale Lakes',\n 'province' => 'FL',\n 'postal_code' => '33319',\n 'country' => 'US',\n ],\n 'dropoff' => [\n 'name' => 'Dropoff',\n 'city' => 'Kingston',\n 'country' => 'JM',\n ],\n 'entities' => [\n [\n 'name' => 'Wireless Headphones',\n 'description' => 'Electronics',\n 'weight' => 2.5,\n 'weight_unit' => 'lb',\n 'declared_value' => 150,\n 'currency' => 'USD',\n ],\n ],\n ]\n);" }, "fleetbase-api-customers-forgot-customer-password": { "collection": "Fleetbase API", "group": "Customers", "name": "Forgot Customer Password", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::forgotCustomerPassword", - "call": "$result = $fleetbase->customers->forgotCustomerPassword(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n ],\n ],\n []\n);", - "code": "customers->forgotCustomerPassword(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->forgotCustomerPassword(\n [\n 'identity' => 'customer_identity-fixture',\n ]\n);", + "code": "customers->forgotCustomerPassword(\n [\n 'identity' => 'customer_identity-fixture',\n ]\n);" }, "fleetbase-api-customers-list-customer-orders": { "collection": "Fleetbase API", "group": "Customers", "name": "List Customer Orders", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::listCustomerOrders", - "call": "$result = $fleetbase->customers->listCustomerOrders(\n [],\n []\n);", - "code": "customers->listCustomerOrders(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->listCustomerOrders();", + "code": "customers->listCustomerOrders();" }, "fleetbase-api-customers-list-customer-places": { "collection": "Fleetbase API", "group": "Customers", "name": "List Customer Places", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::listCustomerPlaces", - "call": "$result = $fleetbase->customers->listCustomerPlaces(\n [],\n []\n);", - "code": "customers->listCustomerPlaces(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->listCustomerPlaces();", + "code": "customers->listCustomerPlaces();" }, "fleetbase-api-customers-login-customer": { "collection": "Fleetbase API", "group": "Customers", "name": "Login Customer", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::loginCustomer", - "call": "$result = $fleetbase->customers->loginCustomer(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'password' => 'customer_password-fixture',\n ],\n ],\n []\n);", - "code": "customers->loginCustomer(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'password' => 'customer_password-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->loginCustomer(\n [\n 'identity' => 'customer_identity-fixture',\n 'password' => 'customer_password-fixture',\n ]\n);", + "code": "customers->loginCustomer(\n [\n 'identity' => 'customer_identity-fixture',\n 'password' => 'customer_password-fixture',\n ]\n);" }, "fleetbase-api-customers-logout-all-customer-sessions": { "collection": "Fleetbase API", "group": "Customers", "name": "Logout All Customer Sessions", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::logoutAllCustomerSessions", - "call": "$result = $fleetbase->customers->logoutAllCustomerSessions(\n [],\n []\n);", - "code": "customers->logoutAllCustomerSessions(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->logoutAllCustomerSessions();", + "code": "customers->logoutAllCustomerSessions();" }, "fleetbase-api-customers-logout-customer": { "collection": "Fleetbase API", "group": "Customers", "name": "Logout Customer", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::logoutCustomer", - "call": "$result = $fleetbase->customers->logoutCustomer(\n [],\n []\n);", - "code": "customers->logoutCustomer(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->logoutCustomer();", + "code": "customers->logoutCustomer();" }, "fleetbase-api-customers-register-customer-device": { "collection": "Fleetbase API", "group": "Customers", "name": "Register Customer Device", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::registerCustomerDevice", - "call": "$result = $fleetbase->customers->registerCustomerDevice(\n [\n 'body' => [\n 'token' => 'push_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);", - "code": "customers->registerCustomerDevice(\n [\n 'body' => [\n 'token' => 'push_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->registerCustomerDevice(\n [\n 'token' => 'push_token-fixture',\n 'platform' => 'ios',\n ]\n);", + "code": "customers->registerCustomerDevice(\n [\n 'token' => 'push_token-fixture',\n 'platform' => 'ios',\n ]\n);" }, "fleetbase-api-customers-request-customer-creation-code": { "collection": "Fleetbase API", "group": "Customers", "name": "Request Customer Creation Code", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::requestCustomerCreationCode", - "call": "$result = $fleetbase->customers->requestCustomerCreationCode(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'mode' => 'email',\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n ],\n ],\n []\n);", - "code": "customers->requestCustomerCreationCode(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'mode' => 'email',\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->requestCustomerCreationCode(\n [\n 'identity' => 'customer_identity-fixture',\n 'mode' => 'email',\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n ]\n);", + "code": "customers->requestCustomerCreationCode(\n [\n 'identity' => 'customer_identity-fixture',\n 'mode' => 'email',\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n ]\n);" }, "fleetbase-api-customers-request-customer-login-sms": { "collection": "Fleetbase API", "group": "Customers", "name": "Request Customer Login SMS", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::requestCustomerLoginSms", - "call": "$result = $fleetbase->customers->requestCustomerLoginSms(\n [\n 'body' => [\n 'phone' => 'customer_phone-fixture',\n ],\n ],\n []\n);", - "code": "customers->requestCustomerLoginSms(\n [\n 'body' => [\n 'phone' => 'customer_phone-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->requestCustomerLoginSms(\n [\n 'phone' => 'customer_phone-fixture',\n ]\n);", + "code": "customers->requestCustomerLoginSms(\n [\n 'phone' => 'customer_phone-fixture',\n ]\n);" }, "fleetbase-api-customers-reset-customer-password": { "collection": "Fleetbase API", "group": "Customers", "name": "Reset Customer Password", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::resetCustomerPassword", - "call": "$result = $fleetbase->customers->resetCustomerPassword(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'password' => 'customer_password-fixture',\n ],\n ],\n []\n);", - "code": "customers->resetCustomerPassword(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'password' => 'customer_password-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->resetCustomerPassword(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'password' => 'customer_password-fixture',\n ]\n);", + "code": "customers->resetCustomerPassword(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'password' => 'customer_password-fixture',\n ]\n);" }, "fleetbase-api-customers-retrieve-authenticated-customer": { "collection": "Fleetbase API", "group": "Customers", "name": "Retrieve Authenticated Customer", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::retrieveAuthenticatedCustomer", - "call": "$result = $fleetbase->customers->retrieveAuthenticatedCustomer(\n [],\n []\n);", - "code": "customers->retrieveAuthenticatedCustomer(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->retrieveAuthenticatedCustomer();", + "code": "customers->retrieveAuthenticatedCustomer();" }, "fleetbase-api-customers-retrieve-a-customer-order": { "collection": "Fleetbase API", "group": "Customers", "name": "Retrieve a Customer Order", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::retrieveCustomerOrder", - "call": "$result = $fleetbase->customers->retrieveCustomerOrder(\n [\n 'customer_order_id' => 'customer_order_id-fixture',\n ],\n []\n);", - "code": "customers->retrieveCustomerOrder(\n [\n 'customer_order_id' => 'customer_order_id-fixture',\n ],\n []\n);" + "variables": { + "customerOrderId": "customer_order_id-fixture" + }, + "call": "$result = $fleetbase->customers->retrieveCustomerOrder($customerOrderId);", + "code": "customers->retrieveCustomerOrder($customerOrderId);" }, "fleetbase-api-customers-update-authenticated-customer": { "collection": "Fleetbase API", "group": "Customers", "name": "Update Authenticated Customer", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::updateAuthenticatedCustomer", - "call": "$result = $fleetbase->customers->updateAuthenticatedCustomer(\n [\n 'body' => [\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n 'email' => 'customer_email-fixture',\n ],\n ],\n []\n);", - "code": "customers->updateAuthenticatedCustomer(\n [\n 'body' => [\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n 'email' => 'customer_email-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->updateAuthenticatedCustomer(\n [\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n 'email' => 'customer_email-fixture',\n ]\n);", + "code": "customers->updateAuthenticatedCustomer(\n [\n 'name' => 'customer_name-fixture',\n 'phone' => 'customer_phone-fixture',\n 'email' => 'customer_email-fixture',\n ]\n);" }, "fleetbase-api-customers-verify-customer-login-code": { "collection": "Fleetbase API", "group": "Customers", "name": "Verify Customer Login Code", "implementation": "Fleetbase\\Sdk\\Services\\CustomerService::verifyCustomerLoginCode", - "call": "$result = $fleetbase->customers->verifyCustomerLoginCode(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'for' => 'fleetops_customer_login',\n ],\n ],\n []\n);", - "code": "customers->verifyCustomerLoginCode(\n [\n 'body' => [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'for' => 'fleetops_customer_login',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->customers->verifyCustomerLoginCode(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'for' => 'fleetops_customer_login',\n ]\n);", + "code": "customers->verifyCustomerLoginCode(\n [\n 'identity' => 'customer_identity-fixture',\n 'code' => 'verification_code-fixture',\n 'for' => 'fleetops_customer_login',\n ]\n);" }, "fleetbase-api-devices-attach-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Attach Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::attachDevice", - "call": "$result = $fleetbase->devices->attachDevice(\n [\n 'device_id' => 'device_id-fixture',\n 'body' => [\n 'vehicle' => 'vehicle_id-fixture',\n ],\n ],\n []\n);", - "code": "devices->attachDevice(\n [\n 'device_id' => 'device_id-fixture',\n 'body' => [\n 'vehicle' => 'vehicle_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "deviceId": "device_id-fixture" + }, + "call": "$result = $fleetbase->devices->attachDevice(\n $deviceId,\n [\n 'vehicle' => 'vehicle_id-fixture',\n ]\n);", + "code": "devices->attachDevice(\n $deviceId,\n [\n 'vehicle' => 'vehicle_id-fixture',\n ]\n);" }, "fleetbase-api-devices-create-a-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Create a Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::createDevice", - "call": "$result = $fleetbase->devices->createDevice(\n [\n 'body' => [\n 'name' => 'OBD Tracker 12',\n 'type' => 'obd',\n 'device_id' => 'OBD-12',\n 'serial_number' => 'SN-10001',\n 'status' => 'active',\n ],\n ],\n []\n);", - "code": "devices->createDevice(\n [\n 'body' => [\n 'name' => 'OBD Tracker 12',\n 'type' => 'obd',\n 'device_id' => 'OBD-12',\n 'serial_number' => 'SN-10001',\n 'status' => 'active',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->devices->createDevice(\n [\n 'name' => 'OBD Tracker 12',\n 'type' => 'obd',\n 'device_id' => 'OBD-12',\n 'serial_number' => 'SN-10001',\n 'status' => 'active',\n ]\n);", + "code": "devices->createDevice(\n [\n 'name' => 'OBD Tracker 12',\n 'type' => 'obd',\n 'device_id' => 'OBD-12',\n 'serial_number' => 'SN-10001',\n 'status' => 'active',\n ]\n);" }, "fleetbase-api-devices-delete-a-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Delete a Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::deleteDevice", - "call": "$result = $fleetbase->devices->deleteDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);", - "code": "devices->deleteDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);" + "variables": { + "deviceId": "device_id-fixture" + }, + "call": "$result = $fleetbase->devices->deleteDevice($deviceId);", + "code": "devices->deleteDevice($deviceId);" }, "fleetbase-api-devices-detach-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Detach Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::detachDevice", - "call": "$result = $fleetbase->devices->detachDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);", - "code": "devices->detachDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);" + "variables": { + "deviceId": "device_id-fixture" + }, + "call": "$result = $fleetbase->devices->detachDevice($deviceId);", + "code": "devices->detachDevice($deviceId);" }, "fleetbase-api-devices-query-devices": { "collection": "Fleetbase API", "group": "Devices", "name": "Query Devices", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::queryDevices", - "call": "$result = $fleetbase->devices->queryDevices(\n [],\n []\n);", - "code": "devices->queryDevices(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->devices->queryDevices();", + "code": "devices->queryDevices();" }, "fleetbase-api-devices-retrieve-a-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Retrieve a Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::retrieveDevice", - "call": "$result = $fleetbase->devices->retrieveDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);", - "code": "devices->retrieveDevice(\n [\n 'device_id' => 'device_id-fixture',\n ],\n []\n);" + "variables": { + "deviceId": "device_id-fixture" + }, + "call": "$result = $fleetbase->devices->retrieveDevice($deviceId);", + "code": "devices->retrieveDevice($deviceId);" }, "fleetbase-api-devices-update-a-device": { "collection": "Fleetbase API", "group": "Devices", "name": "Update a Device", "implementation": "Fleetbase\\Sdk\\Services\\DeviceService::updateDevice", - "call": "$result = $fleetbase->devices->updateDevice(\n [\n 'device_id' => 'device_id-fixture',\n 'body' => [\n 'status' => 'maintenance',\n ],\n ],\n []\n);", - "code": "devices->updateDevice(\n [\n 'device_id' => 'device_id-fixture',\n 'body' => [\n 'status' => 'maintenance',\n ],\n ],\n []\n);" + "variables": { + "deviceId": "device_id-fixture" + }, + "call": "$result = $fleetbase->devices->updateDevice(\n $deviceId,\n [\n 'status' => 'maintenance',\n ]\n);", + "code": "devices->updateDevice(\n $deviceId,\n [\n 'status' => 'maintenance',\n ]\n);" }, "fleetbase-api-drivers-change-driver-password": { "collection": "Fleetbase API", "group": "Drivers", "name": "Change Driver Password", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::changeDriverPassword", - "call": "$result = $fleetbase->drivers->changeDriverPassword(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'current_password' => 'created_driver_password-fixture',\n 'password' => 'driver_new_password-fixture',\n 'password_confirmation' => 'driver_new_password-fixture',\n 'device_name' => 'navigator',\n ],\n ],\n []\n);", - "code": "drivers->changeDriverPassword(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'current_password' => 'created_driver_password-fixture',\n 'password' => 'driver_new_password-fixture',\n 'password_confirmation' => 'driver_new_password-fixture',\n 'device_name' => 'navigator',\n ],\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->changeDriverPassword(\n $driverId,\n [\n 'current_password' => 'created_driver_password-fixture',\n 'password' => 'driver_new_password-fixture',\n 'password_confirmation' => 'driver_new_password-fixture',\n 'device_name' => 'navigator',\n ]\n);", + "code": "drivers->changeDriverPassword(\n $driverId,\n [\n 'current_password' => 'created_driver_password-fixture',\n 'password' => 'driver_new_password-fixture',\n 'password_confirmation' => 'driver_new_password-fixture',\n 'device_name' => 'navigator',\n ]\n);" }, "fleetbase-api-drivers-create-a-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Create a Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::createDriver", - "call": "$result = $fleetbase->drivers->createDriver(\n [\n 'body' => [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'password' => 'driver_seed_password-fixture',\n ],\n ],\n []\n);", - "code": "drivers->createDriver(\n [\n 'body' => [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'password' => 'driver_seed_password-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->createDriver(\n [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'password' => 'driver_seed_password-fixture',\n ]\n);", + "code": "drivers->createDriver(\n [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n 'password' => 'driver_seed_password-fixture',\n ]\n);" }, "fleetbase-api-drivers-delete-a-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Delete a Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::deleteDriver", - "call": "$result = $fleetbase->drivers->deleteDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->deleteDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->deleteDriver($driverId);", + "code": "drivers->deleteDriver($driverId);" }, "fleetbase-api-drivers-get-driver-current-organization": { "collection": "Fleetbase API", "group": "Drivers", "name": "Get Driver Current Organization", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::getDriverCurrentOrganization", - "call": "$result = $fleetbase->drivers->getDriverCurrentOrganization(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->getDriverCurrentOrganization(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->getDriverCurrentOrganization($driverId);", + "code": "drivers->getDriverCurrentOrganization($driverId);" }, "fleetbase-api-drivers-list-driver-manifests": { "collection": "Fleetbase API", "group": "Drivers", "name": "List Driver Manifests", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::listDriverManifests", - "call": "$result = $fleetbase->drivers->listDriverManifests(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->listDriverManifests(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->listDriverManifests($driverId);", + "code": "drivers->listDriverManifests($driverId);" }, "fleetbase-api-drivers-list-driver-organizations": { "collection": "Fleetbase API", "group": "Drivers", "name": "List Driver Organizations", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::listDriverOrganizations", - "call": "$result = $fleetbase->drivers->listDriverOrganizations(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->listDriverOrganizations(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->listDriverOrganizations($driverId);", + "code": "drivers->listDriverOrganizations($driverId);" }, "fleetbase-api-drivers-login-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Login Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::loginDriver", - "call": "$result = $fleetbase->drivers->loginDriver(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'password' => 'driver_password-fixture',\n ],\n ],\n []\n);", - "code": "drivers->loginDriver(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'password' => 'driver_password-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->loginDriver(\n [\n 'identity' => 'driver_identity-fixture',\n 'password' => 'driver_password-fixture',\n ]\n);", + "code": "drivers->loginDriver(\n [\n 'identity' => 'driver_identity-fixture',\n 'password' => 'driver_password-fixture',\n ]\n);" }, "fleetbase-api-drivers-query-drivers": { "collection": "Fleetbase API", "group": "Drivers", "name": "Query Drivers", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::queryDrivers", - "call": "$result = $fleetbase->drivers->queryDrivers(\n [],\n [\n 'query' => [\n 'id' => 'driver_id-fixture',\n ],\n ]\n);", - "code": "drivers->queryDrivers(\n [],\n [\n 'query' => [\n 'id' => 'driver_id-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->queryDrivers(\n [\n 'id' => 'driver_id-fixture',\n ]\n);", + "code": "drivers->queryDrivers(\n [\n 'id' => 'driver_id-fixture',\n ]\n);" }, "fleetbase-api-drivers-register-device": { "collection": "Fleetbase API", "group": "Drivers", "name": "Register Device", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::registerDevice", - "call": "$result = $fleetbase->drivers->registerDevice(\n [\n 'body' => [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);", - "code": "drivers->registerDevice(\n [\n 'body' => [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->registerDevice(\n [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ]\n);", + "code": "drivers->registerDevice(\n [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ]\n);" }, "fleetbase-api-drivers-register-driver-device": { "collection": "Fleetbase API", "group": "Drivers", "name": "Register Driver Device", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::registerDriverDevice", - "call": "$result = $fleetbase->drivers->registerDriverDevice(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);", - "code": "drivers->registerDriverDevice(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ],\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->registerDriverDevice(\n $driverId,\n [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ]\n);", + "code": "drivers->registerDriverDevice(\n $driverId,\n [\n 'token' => 'device_token-fixture',\n 'platform' => 'ios',\n ]\n);" }, "fleetbase-api-drivers-request-driver-login-sms": { "collection": "Fleetbase API", "group": "Drivers", "name": "Request Driver Login SMS", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::requestDriverLoginSms", - "call": "$result = $fleetbase->drivers->requestDriverLoginSms(\n [\n 'body' => [\n 'phone' => 'driver_phone-fixture',\n ],\n ],\n []\n);", - "code": "drivers->requestDriverLoginSms(\n [\n 'body' => [\n 'phone' => 'driver_phone-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->requestDriverLoginSms(\n [\n 'phone' => 'driver_phone-fixture',\n ]\n);", + "code": "drivers->requestDriverLoginSms(\n [\n 'phone' => 'driver_phone-fixture',\n ]\n);" }, "fleetbase-api-drivers-request-driver-password-reset": { "collection": "Fleetbase API", "group": "Drivers", "name": "Request Driver Password Reset", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::requestDriverPasswordReset", - "call": "$result = $fleetbase->drivers->requestDriverPasswordReset(\n [\n 'body' => [\n 'identity' => 'driver_reset_identity-fixture',\n ],\n ],\n []\n);", - "code": "drivers->requestDriverPasswordReset(\n [\n 'body' => [\n 'identity' => 'driver_reset_identity-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->requestDriverPasswordReset(\n [\n 'identity' => 'driver_reset_identity-fixture',\n ]\n);", + "code": "drivers->requestDriverPasswordReset(\n [\n 'identity' => 'driver_reset_identity-fixture',\n ]\n);" }, "fleetbase-api-drivers-reset-driver-password": { "collection": "Fleetbase API", "group": "Drivers", "name": "Reset Driver Password", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::resetDriverPassword", - "call": "$result = $fleetbase->drivers->resetDriverPassword(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'driver_password_reset_code-fixture',\n 'password' => 'driver_password-fixture',\n ],\n ],\n []\n);", - "code": "drivers->resetDriverPassword(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'driver_password_reset_code-fixture',\n 'password' => 'driver_password-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->resetDriverPassword(\n [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'driver_password_reset_code-fixture',\n 'password' => 'driver_password-fixture',\n ]\n);", + "code": "drivers->resetDriverPassword(\n [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'driver_password_reset_code-fixture',\n 'password' => 'driver_password-fixture',\n ]\n);" }, "fleetbase-api-drivers-retrieve-a-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Retrieve a Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::retrieveDriver", - "call": "$result = $fleetbase->drivers->retrieveDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->retrieveDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->retrieveDriver($driverId);", + "code": "drivers->retrieveDriver($driverId);" }, "fleetbase-api-drivers-simulate-driver-route": { "collection": "Fleetbase API", "group": "Drivers", "name": "Simulate Driver Route", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::simulateDriverRoute", - "call": "$result = $fleetbase->drivers->simulateDriverRoute(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'start' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'end' => [\n 'latitude' => 1.2903,\n 'longitude' => 103.8519,\n ],\n ],\n ],\n []\n);", - "code": "drivers->simulateDriverRoute(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'start' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'end' => [\n 'latitude' => 1.2903,\n 'longitude' => 103.8519,\n ],\n ],\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->simulateDriverRoute(\n $driverId,\n [\n 'start' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'end' => [\n 'latitude' => 1.2903,\n 'longitude' => 103.8519,\n ],\n ]\n);", + "code": "drivers->simulateDriverRoute(\n $driverId,\n [\n 'start' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'end' => [\n 'latitude' => 1.2903,\n 'longitude' => 103.8519,\n ],\n ]\n);" }, "fleetbase-api-drivers-switch-driver-organization": { "collection": "Fleetbase API", "group": "Drivers", "name": "Switch Driver Organization", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::switchDriverOrganization", - "call": "$result = $fleetbase->drivers->switchDriverOrganization(\n [\n 'id' => 'multi_org_driver_id-fixture',\n 'body' => [\n 'next' => 'secondary_organization_id-fixture',\n ],\n ],\n []\n);", - "code": "drivers->switchDriverOrganization(\n [\n 'id' => 'multi_org_driver_id-fixture',\n 'body' => [\n 'next' => 'secondary_organization_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "driverId": "multi_org_driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->switchDriverOrganization(\n $driverId,\n [\n 'next' => 'secondary_organization_id-fixture',\n ]\n);", + "code": "drivers->switchDriverOrganization(\n $driverId,\n [\n 'next' => 'secondary_organization_id-fixture',\n ]\n);" }, "fleetbase-api-drivers-toggle-driver-online": { "collection": "Fleetbase API", "group": "Drivers", "name": "Toggle Driver Online", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::toggleDriverOnline", - "call": "$result = $fleetbase->drivers->toggleDriverOnline(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'online' => true,\n ],\n ],\n []\n);", - "code": "drivers->toggleDriverOnline(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'online' => true,\n ],\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->toggleDriverOnline(\n $driverId,\n [\n 'online' => true,\n ]\n);", + "code": "drivers->toggleDriverOnline(\n $driverId,\n [\n 'online' => true,\n ]\n);" }, "fleetbase-api-drivers-track-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Track Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::trackDriver", - "call": "$result = $fleetbase->drivers->trackDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);", - "code": "drivers->trackDriver(\n [\n 'id' => 'driver_id-fixture',\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->trackDriver(\n $driverId,\n [\n 'latitude' => -19.288195,\n 'longitude' => 146.795965,\n 'speed' => 100,\n ]\n);", + "code": "drivers->trackDriver(\n $driverId,\n [\n 'latitude' => -19.288195,\n 'longitude' => 146.795965,\n 'speed' => 100,\n ]\n);" }, "fleetbase-api-drivers-update-a-driver": { "collection": "Fleetbase API", "group": "Drivers", "name": "Update a Driver", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::updateDriver", - "call": "$result = $fleetbase->drivers->updateDriver(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n ],\n ],\n []\n);", - "code": "drivers->updateDriver(\n [\n 'id' => 'driver_id-fixture',\n 'body' => [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n ],\n ],\n []\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->drivers->updateDriver(\n $driverId,\n [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n ]\n);", + "code": "drivers->updateDriver(\n $driverId,\n [\n 'name' => 'John Doe',\n 'email' => 'randomEmail-fixture',\n 'phone' => 'randomPhoneNumber-fixture',\n ]\n);" }, "fleetbase-api-drivers-verify-driver-login-code": { "collection": "Fleetbase API", "group": "Drivers", "name": "Verify Driver Login Code", "implementation": "Fleetbase\\Sdk\\Services\\DriverService::verifyDriverLoginCode", - "call": "$result = $fleetbase->drivers->verifyDriverLoginCode(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'verification_code-fixture',\n ],\n ],\n []\n);", - "code": "drivers->verifyDriverLoginCode(\n [\n 'body' => [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'verification_code-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->drivers->verifyDriverLoginCode(\n [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'verification_code-fixture',\n ]\n);", + "code": "drivers->verifyDriverLoginCode(\n [\n 'identity' => 'driver_identity-fixture',\n 'code' => 'verification_code-fixture',\n ]\n);" }, "fleetbase-api-entities-create-an-entity": { "collection": "Fleetbase API", "group": "Entities", "name": "Create an Entity", "implementation": "Fleetbase\\Sdk\\Services\\EntityService::createEntity", - "call": "$result = $fleetbase->entities->createEntity(\n [\n 'body' => [\n 'name' => 'SampleEntity',\n 'type' => 'parcel',\n 'payload' => 'payload_id-fixture',\n 'customer' => 'ACustomer',\n 'internal_id' => 'ENTITY001',\n 'description' => 'Sample description',\n 'meta' => [\n 'warehouse_bin' => '1',\n 'warehouse_rack' => '3',\n 'warehouse_section' => '4',\n ],\n 'weight' => 2.5,\n 'weight_unit' => 'kg',\n 'length' => 10,\n 'width' => 5,\n 'height' => 8,\n 'dimensions_unit' => 'mm',\n 'declared_value' => 1500,\n 'price' => 1200,\n 'sale_price' => 900,\n 'sku' => 'SKU123',\n 'currency' => 'USD',\n ],\n ],\n []\n);", - "code": "entities->createEntity(\n [\n 'body' => [\n 'name' => 'SampleEntity',\n 'type' => 'parcel',\n 'payload' => 'payload_id-fixture',\n 'customer' => 'ACustomer',\n 'internal_id' => 'ENTITY001',\n 'description' => 'Sample description',\n 'meta' => [\n 'warehouse_bin' => '1',\n 'warehouse_rack' => '3',\n 'warehouse_section' => '4',\n ],\n 'weight' => 2.5,\n 'weight_unit' => 'kg',\n 'length' => 10,\n 'width' => 5,\n 'height' => 8,\n 'dimensions_unit' => 'mm',\n 'declared_value' => 1500,\n 'price' => 1200,\n 'sale_price' => 900,\n 'sku' => 'SKU123',\n 'currency' => 'USD',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->entities->createEntity(\n [\n 'name' => 'SampleEntity',\n 'type' => 'parcel',\n 'payload' => 'payload_id-fixture',\n 'customer' => 'ACustomer',\n 'internal_id' => 'ENTITY001',\n 'description' => 'Sample description',\n 'meta' => [\n 'warehouse_bin' => '1',\n 'warehouse_rack' => '3',\n 'warehouse_section' => '4',\n ],\n 'weight' => 2.5,\n 'weight_unit' => 'kg',\n 'length' => 10,\n 'width' => 5,\n 'height' => 8,\n 'dimensions_unit' => 'mm',\n 'declared_value' => 1500,\n 'price' => 1200,\n 'sale_price' => 900,\n 'sku' => 'SKU123',\n 'currency' => 'USD',\n ]\n);", + "code": "entities->createEntity(\n [\n 'name' => 'SampleEntity',\n 'type' => 'parcel',\n 'payload' => 'payload_id-fixture',\n 'customer' => 'ACustomer',\n 'internal_id' => 'ENTITY001',\n 'description' => 'Sample description',\n 'meta' => [\n 'warehouse_bin' => '1',\n 'warehouse_rack' => '3',\n 'warehouse_section' => '4',\n ],\n 'weight' => 2.5,\n 'weight_unit' => 'kg',\n 'length' => 10,\n 'width' => 5,\n 'height' => 8,\n 'dimensions_unit' => 'mm',\n 'declared_value' => 1500,\n 'price' => 1200,\n 'sale_price' => 900,\n 'sku' => 'SKU123',\n 'currency' => 'USD',\n ]\n);" }, "fleetbase-api-entities-delete-a-entity": { "collection": "Fleetbase API", "group": "Entities", "name": "Delete a Entity", "implementation": "Fleetbase\\Sdk\\Services\\EntityService::deleteEntity", - "call": "$result = $fleetbase->entities->deleteEntity(\n [\n 'id' => 'entity_id-fixture',\n ],\n []\n);", - "code": "entities->deleteEntity(\n [\n 'id' => 'entity_id-fixture',\n ],\n []\n);" + "variables": { + "entityId": "entity_id-fixture" + }, + "call": "$result = $fleetbase->entities->deleteEntity($entityId);", + "code": "entities->deleteEntity($entityId);" }, "fleetbase-api-entities-query-entities": { "collection": "Fleetbase API", "group": "Entities", "name": "Query Entities", "implementation": "Fleetbase\\Sdk\\Services\\EntityService::queryEntities", - "call": "$result = $fleetbase->entities->queryEntities(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'type' => 'parcel',\n ],\n ]\n);", - "code": "entities->queryEntities(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'type' => 'parcel',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->entities->queryEntities(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'type' => 'parcel',\n ]\n);", + "code": "entities->queryEntities(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'type' => 'parcel',\n ]\n);" }, "fleetbase-api-entities-retrieve-an-entity": { "collection": "Fleetbase API", "group": "Entities", "name": "Retrieve an Entity", "implementation": "Fleetbase\\Sdk\\Services\\EntityService::retrieveEntity", - "call": "$result = $fleetbase->entities->retrieveEntity(\n [\n 'id' => 'entity_id-fixture',\n ],\n []\n);", - "code": "entities->retrieveEntity(\n [\n 'id' => 'entity_id-fixture',\n ],\n []\n);" + "variables": { + "entityId": "entity_id-fixture" + }, + "call": "$result = $fleetbase->entities->retrieveEntity($entityId);", + "code": "entities->retrieveEntity($entityId);" }, "fleetbase-api-entities-update-a-entity": { "collection": "Fleetbase API", "group": "Entities", "name": "Update a Entity", "implementation": "Fleetbase\\Sdk\\Services\\EntityService::updateEntity", - "call": "$result = $fleetbase->entities->updateEntity(\n [\n 'id' => 'entity_id-fixture',\n 'body' => [\n 'internal_id' => 'ENTITY001-1',\n 'description' => 'New entity description',\n 'destination' => '',\n 'sku' => 'SKUABC123',\n 'currency' => 'SGD',\n ],\n ],\n []\n);", - "code": "entities->updateEntity(\n [\n 'id' => 'entity_id-fixture',\n 'body' => [\n 'internal_id' => 'ENTITY001-1',\n 'description' => 'New entity description',\n 'destination' => '',\n 'sku' => 'SKUABC123',\n 'currency' => 'SGD',\n ],\n ],\n []\n);" + "variables": { + "entityId": "entity_id-fixture" + }, + "call": "$result = $fleetbase->entities->updateEntity(\n $entityId,\n [\n 'internal_id' => 'ENTITY001-1',\n 'description' => 'New entity description',\n 'destination' => '',\n 'sku' => 'SKUABC123',\n 'currency' => 'SGD',\n ]\n);", + "code": "entities->updateEntity(\n $entityId,\n [\n 'internal_id' => 'ENTITY001-1',\n 'description' => 'New entity description',\n 'destination' => '',\n 'sku' => 'SKUABC123',\n 'currency' => 'SGD',\n ]\n);" }, "fleetbase-api-equipment-create-equipment": { "collection": "Fleetbase API", "group": "Equipment", "name": "Create Equipment", "implementation": "Fleetbase\\Sdk\\Services\\EquipmentService::createEquipment", - "call": "$result = $fleetbase->equipment->createEquipment(\n [\n 'body' => [\n 'name' => 'Liftgate LG-12',\n 'code' => 'LG-12',\n 'type' => 'liftgate',\n 'status' => 'available',\n 'serial_number' => 'LG120045',\n 'manufacturer' => 'Maxon',\n 'model' => 'BMR',\n 'currency' => 'USD',\n ],\n ],\n []\n);", - "code": "equipment->createEquipment(\n [\n 'body' => [\n 'name' => 'Liftgate LG-12',\n 'code' => 'LG-12',\n 'type' => 'liftgate',\n 'status' => 'available',\n 'serial_number' => 'LG120045',\n 'manufacturer' => 'Maxon',\n 'model' => 'BMR',\n 'currency' => 'USD',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->equipment->createEquipment(\n [\n 'name' => 'Liftgate LG-12',\n 'code' => 'LG-12',\n 'type' => 'liftgate',\n 'status' => 'available',\n 'serial_number' => 'LG120045',\n 'manufacturer' => 'Maxon',\n 'model' => 'BMR',\n 'currency' => 'USD',\n ]\n);", + "code": "equipment->createEquipment(\n [\n 'name' => 'Liftgate LG-12',\n 'code' => 'LG-12',\n 'type' => 'liftgate',\n 'status' => 'available',\n 'serial_number' => 'LG120045',\n 'manufacturer' => 'Maxon',\n 'model' => 'BMR',\n 'currency' => 'USD',\n ]\n);" }, "fleetbase-api-equipment-delete-equipment": { "collection": "Fleetbase API", "group": "Equipment", "name": "Delete Equipment", "implementation": "Fleetbase\\Sdk\\Services\\EquipmentService::deleteEquipment", - "call": "$result = $fleetbase->equipment->deleteEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n ],\n []\n);", - "code": "equipment->deleteEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n ],\n []\n);" + "variables": { + "equipmentId": "equipment_id-fixture" + }, + "call": "$result = $fleetbase->equipment->deleteEquipment($equipmentId);", + "code": "equipment->deleteEquipment($equipmentId);" }, "fleetbase-api-equipment-query-equipment": { "collection": "Fleetbase API", "group": "Equipment", "name": "Query Equipment", "implementation": "Fleetbase\\Sdk\\Services\\EquipmentService::queryEquipment", - "call": "$result = $fleetbase->equipment->queryEquipment(\n [],\n []\n);", - "code": "equipment->queryEquipment(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->equipment->queryEquipment();", + "code": "equipment->queryEquipment();" }, "fleetbase-api-equipment-retrieve-equipment": { "collection": "Fleetbase API", "group": "Equipment", "name": "Retrieve Equipment", "implementation": "Fleetbase\\Sdk\\Services\\EquipmentService::retrieveEquipment", - "call": "$result = $fleetbase->equipment->retrieveEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n ],\n []\n);", - "code": "equipment->retrieveEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n ],\n []\n);" + "variables": { + "equipmentId": "equipment_id-fixture" + }, + "call": "$result = $fleetbase->equipment->retrieveEquipment($equipmentId);", + "code": "equipment->retrieveEquipment($equipmentId);" }, "fleetbase-api-equipment-update-equipment": { "collection": "Fleetbase API", "group": "Equipment", "name": "Update Equipment", "implementation": "Fleetbase\\Sdk\\Services\\EquipmentService::updateEquipment", - "call": "$result = $fleetbase->equipment->updateEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n 'body' => [\n 'status' => 'maintenance',\n ],\n ],\n []\n);", - "code": "equipment->updateEquipment(\n [\n 'equipment_id' => 'equipment_id-fixture',\n 'body' => [\n 'status' => 'maintenance',\n ],\n ],\n []\n);" + "variables": { + "equipmentId": "equipment_id-fixture" + }, + "call": "$result = $fleetbase->equipment->updateEquipment(\n $equipmentId,\n [\n 'status' => 'maintenance',\n ]\n);", + "code": "equipment->updateEquipment(\n $equipmentId,\n [\n 'status' => 'maintenance',\n ]\n);" }, "fleetbase-api-fleets-create-a-fleet": { "collection": "Fleetbase API", "group": "Fleets", "name": "Create a Fleet", "implementation": "Fleetbase\\Sdk\\Services\\FleetService::createFleet", - "call": "$result = $fleetbase->fleets->createFleet(\n [\n 'body' => [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ],\n ],\n []\n);", - "code": "fleets->createFleet(\n [\n 'body' => [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->fleets->createFleet(\n [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ]\n);", + "code": "fleets->createFleet(\n [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ]\n);" }, "fleetbase-api-fleets-delete-a-fleet": { "collection": "Fleetbase API", "group": "Fleets", "name": "Delete a Fleet", "implementation": "Fleetbase\\Sdk\\Services\\FleetService::deleteFleet", - "call": "$result = $fleetbase->fleets->deleteFleet(\n [\n 'id' => 'fleet_id-fixture',\n ],\n []\n);", - "code": "fleets->deleteFleet(\n [\n 'id' => 'fleet_id-fixture',\n ],\n []\n);" + "variables": { + "fleetId": "fleet_id-fixture" + }, + "call": "$result = $fleetbase->fleets->deleteFleet($fleetId);", + "code": "fleets->deleteFleet($fleetId);" }, "fleetbase-api-fleets-query-fleets": { "collection": "Fleetbase API", "group": "Fleets", "name": "Query Fleets", "implementation": "Fleetbase\\Sdk\\Services\\FleetService::queryFleets", - "call": "$result = $fleetbase->fleets->queryFleets(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "fleets->queryFleets(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->fleets->queryFleets(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "fleets->queryFleets(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-fleets-retrieve-a-fleet": { "collection": "Fleetbase API", "group": "Fleets", "name": "Retrieve a Fleet", "implementation": "Fleetbase\\Sdk\\Services\\FleetService::retrieveFleet", - "call": "$result = $fleetbase->fleets->retrieveFleet(\n [\n 'id' => 'fleet_id-fixture',\n ],\n []\n);", - "code": "fleets->retrieveFleet(\n [\n 'id' => 'fleet_id-fixture',\n ],\n []\n);" + "variables": { + "fleetId": "fleet_id-fixture" + }, + "call": "$result = $fleetbase->fleets->retrieveFleet($fleetId);", + "code": "fleets->retrieveFleet($fleetId);" }, "fleetbase-api-fleets-update-a-fleet": { "collection": "Fleetbase API", "group": "Fleets", "name": "Update a Fleet", "implementation": "Fleetbase\\Sdk\\Services\\FleetService::updateFleet", - "call": "$result = $fleetbase->fleets->updateFleet(\n [\n 'id' => 'fleet_id-fixture',\n 'body' => [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ],\n ],\n []\n);", - "code": "fleets->updateFleet(\n [\n 'id' => 'fleet_id-fixture',\n 'body' => [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "fleetId": "fleet_id-fixture" + }, + "call": "$result = $fleetbase->fleets->updateFleet(\n $fleetId,\n [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ]\n);", + "code": "fleets->updateFleet(\n $fleetId,\n [\n 'name' => 'Haulers',\n 'service_area' => 'service_area_id-fixture',\n ]\n);" }, "fleetbase-api-fuel-reports-create-a-fuel-report": { "collection": "Fleetbase API", "group": "Fuel Reports", "name": "Create a Fuel Report", "implementation": "Fleetbase\\Sdk\\Services\\FuelReportService::createFuelReport", - "call": "$result = $fleetbase->fuelReports->createFuelReport(\n [\n 'body' => [\n 'driver' => 'driver_id-fixture',\n 'odometer' => 12042,\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'amount' => 120.5,\n 'currency' => 'USD',\n 'status' => 'submitted',\n ],\n ],\n []\n);", - "code": "fuelReports->createFuelReport(\n [\n 'body' => [\n 'driver' => 'driver_id-fixture',\n 'odometer' => 12042,\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'amount' => 120.5,\n 'currency' => 'USD',\n 'status' => 'submitted',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->fuelReports->createFuelReport(\n [\n 'driver' => 'driver_id-fixture',\n 'odometer' => 12042,\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'amount' => 120.5,\n 'currency' => 'USD',\n 'status' => 'submitted',\n ]\n);", + "code": "fuelReports->createFuelReport(\n [\n 'driver' => 'driver_id-fixture',\n 'odometer' => 12042,\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'amount' => 120.5,\n 'currency' => 'USD',\n 'status' => 'submitted',\n ]\n);" }, "fleetbase-api-fuel-reports-delete-a-fuel-report": { "collection": "Fleetbase API", "group": "Fuel Reports", "name": "Delete a Fuel Report", "implementation": "Fleetbase\\Sdk\\Services\\FuelReportService::deleteFuelReport", - "call": "$result = $fleetbase->fuelReports->deleteFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n ],\n []\n);", - "code": "fuelReports->deleteFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n ],\n []\n);" + "variables": { + "fuelReportId": "fuel_report_id-fixture" + }, + "call": "$result = $fleetbase->fuelReports->deleteFuelReport($fuelReportId);", + "code": "fuelReports->deleteFuelReport($fuelReportId);" }, "fleetbase-api-fuel-reports-query-fuel-reports": { "collection": "Fleetbase API", "group": "Fuel Reports", "name": "Query Fuel Reports", "implementation": "Fleetbase\\Sdk\\Services\\FuelReportService::queryFuelReports", - "call": "$result = $fleetbase->fuelReports->queryFuelReports(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "fuelReports->queryFuelReports(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->fuelReports->queryFuelReports(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "fuelReports->queryFuelReports(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-fuel-reports-retrieve-a-fuel-report": { "collection": "Fleetbase API", "group": "Fuel Reports", "name": "Retrieve a Fuel Report", "implementation": "Fleetbase\\Sdk\\Services\\FuelReportService::retrieveFuelReport", - "call": "$result = $fleetbase->fuelReports->retrieveFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n ],\n []\n);", - "code": "fuelReports->retrieveFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n ],\n []\n);" + "variables": { + "fuelReportId": "fuel_report_id-fixture" + }, + "call": "$result = $fleetbase->fuelReports->retrieveFuelReport($fuelReportId);", + "code": "fuelReports->retrieveFuelReport($fuelReportId);" }, "fleetbase-api-fuel-reports-update-a-fuel-report": { "collection": "Fleetbase API", "group": "Fuel Reports", "name": "Update a Fuel Report", "implementation": "Fleetbase\\Sdk\\Services\\FuelReportService::updateFuelReport", - "call": "$result = $fleetbase->fuelReports->updateFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n 'body' => [\n 'odometer' => 12050,\n 'volume' => 43.1,\n 'metric_unit' => 'liter',\n 'amount' => 122.75,\n 'currency' => 'USD',\n 'status' => 'approved',\n ],\n ],\n []\n);", - "code": "fuelReports->updateFuelReport(\n [\n 'id' => 'fuel_report_id-fixture',\n 'body' => [\n 'odometer' => 12050,\n 'volume' => 43.1,\n 'metric_unit' => 'liter',\n 'amount' => 122.75,\n 'currency' => 'USD',\n 'status' => 'approved',\n ],\n ],\n []\n);" + "variables": { + "fuelReportId": "fuel_report_id-fixture" + }, + "call": "$result = $fleetbase->fuelReports->updateFuelReport(\n $fuelReportId,\n [\n 'odometer' => 12050,\n 'volume' => 43.1,\n 'metric_unit' => 'liter',\n 'amount' => 122.75,\n 'currency' => 'USD',\n 'status' => 'approved',\n ]\n);", + "code": "fuelReports->updateFuelReport(\n $fuelReportId,\n [\n 'odometer' => 12050,\n 'volume' => 43.1,\n 'metric_unit' => 'liter',\n 'amount' => 122.75,\n 'currency' => 'USD',\n 'status' => 'approved',\n ]\n);" }, "fleetbase-api-fuel-transactions-create-a-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Create a Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::createFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->createFuelTransaction(\n [\n 'body' => [\n 'provider' => 'petroapp',\n 'provider_transaction_id' => 'TX-timestamp-fixture',\n 'vehicle' => 'vehicle_id-fixture',\n 'station_name' => 'North Depot Fuel',\n 'transaction_at' => '2026-05-07T08:30:00Z',\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'amount' => 6500,\n 'currency' => 'USD',\n ],\n ],\n []\n);", - "code": "fuelTransactions->createFuelTransaction(\n [\n 'body' => [\n 'provider' => 'petroapp',\n 'provider_transaction_id' => 'TX-timestamp-fixture',\n 'vehicle' => 'vehicle_id-fixture',\n 'station_name' => 'North Depot Fuel',\n 'transaction_at' => '2026-05-07T08:30:00Z',\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'amount' => 6500,\n 'currency' => 'USD',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->fuelTransactions->createFuelTransaction(\n [\n 'provider' => 'petroapp',\n 'provider_transaction_id' => 'TX-timestamp-fixture',\n 'vehicle' => 'vehicle_id-fixture',\n 'station_name' => 'North Depot Fuel',\n 'transaction_at' => '2026-05-07T08:30:00Z',\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'amount' => 6500,\n 'currency' => 'USD',\n ]\n);", + "code": "fuelTransactions->createFuelTransaction(\n [\n 'provider' => 'petroapp',\n 'provider_transaction_id' => 'TX-timestamp-fixture',\n 'vehicle' => 'vehicle_id-fixture',\n 'station_name' => 'North Depot Fuel',\n 'transaction_at' => '2026-05-07T08:30:00Z',\n 'volume' => 42.5,\n 'metric_unit' => 'liter',\n 'amount' => 6500,\n 'currency' => 'USD',\n ]\n);" }, "fleetbase-api-fuel-transactions-delete-a-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Delete a Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::deleteFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->deleteFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);", - "code": "fuelTransactions->deleteFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->deleteFuelTransaction($fuelTransactionId);", + "code": "fuelTransactions->deleteFuelTransaction($fuelTransactionId);" }, "fleetbase-api-fuel-transactions-match-fuel-transaction-order": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Match Fuel Transaction Order", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::matchFuelTransactionOrder", - "call": "$result = $fleetbase->fuelTransactions->matchFuelTransactionOrder(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'order' => 'order_id-fixture',\n ],\n ],\n []\n);", - "code": "fuelTransactions->matchFuelTransactionOrder(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'order' => 'order_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->matchFuelTransactionOrder(\n $fuelTransactionId,\n [\n 'order' => 'order_id-fixture',\n ]\n);", + "code": "fuelTransactions->matchFuelTransactionOrder(\n $fuelTransactionId,\n [\n 'order' => 'order_id-fixture',\n ]\n);" }, "fleetbase-api-fuel-transactions-match-fuel-transaction-vehicle": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Match Fuel Transaction Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::matchFuelTransactionVehicle", - "call": "$result = $fleetbase->fuelTransactions->matchFuelTransactionVehicle(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'vehicle' => 'vehicle_id-fixture',\n ],\n ],\n []\n);", - "code": "fuelTransactions->matchFuelTransactionVehicle(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'vehicle' => 'vehicle_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->matchFuelTransactionVehicle(\n $fuelTransactionId,\n [\n 'vehicle' => 'vehicle_id-fixture',\n ]\n);", + "code": "fuelTransactions->matchFuelTransactionVehicle(\n $fuelTransactionId,\n [\n 'vehicle' => 'vehicle_id-fixture',\n ]\n);" }, "fleetbase-api-fuel-transactions-query-fuel-transactions": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Query Fuel Transactions", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::queryFuelTransactions", - "call": "$result = $fleetbase->fuelTransactions->queryFuelTransactions(\n [],\n []\n);", - "code": "fuelTransactions->queryFuelTransactions(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->fuelTransactions->queryFuelTransactions();", + "code": "fuelTransactions->queryFuelTransactions();" }, "fleetbase-api-fuel-transactions-reprocess-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Reprocess Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::reprocessFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->reprocessFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);", - "code": "fuelTransactions->reprocessFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->reprocessFuelTransaction($fuelTransactionId);", + "code": "fuelTransactions->reprocessFuelTransaction($fuelTransactionId);" }, "fleetbase-api-fuel-transactions-retrieve-a-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Retrieve a Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::retrieveFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->retrieveFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);", - "code": "fuelTransactions->retrieveFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->retrieveFuelTransaction($fuelTransactionId);", + "code": "fuelTransactions->retrieveFuelTransaction($fuelTransactionId);" }, "fleetbase-api-fuel-transactions-review-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Review Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::reviewFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->reviewFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'status' => 'reviewed',\n ],\n ],\n []\n);", - "code": "fuelTransactions->reviewFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'status' => 'reviewed',\n ],\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->reviewFuelTransaction(\n $fuelTransactionId,\n [\n 'status' => 'reviewed',\n ]\n);", + "code": "fuelTransactions->reviewFuelTransaction(\n $fuelTransactionId,\n [\n 'status' => 'reviewed',\n ]\n);" }, "fleetbase-api-fuel-transactions-update-a-fuel-transaction": { "collection": "Fleetbase API", "group": "Fuel Transactions", "name": "Update a Fuel Transaction", "implementation": "Fleetbase\\Sdk\\Services\\FuelTransactionService::updateFuelTransaction", - "call": "$result = $fleetbase->fuelTransactions->updateFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'sync_status' => 'reviewed',\n ],\n ],\n []\n);", - "code": "fuelTransactions->updateFuelTransaction(\n [\n 'fuel_transaction_id' => 'fuel_transaction_id-fixture',\n 'body' => [\n 'sync_status' => 'reviewed',\n ],\n ],\n []\n);" + "variables": { + "fuelTransactionId": "fuel_transaction_id-fixture" + }, + "call": "$result = $fleetbase->fuelTransactions->updateFuelTransaction(\n $fuelTransactionId,\n [\n 'sync_status' => 'reviewed',\n ]\n);", + "code": "fuelTransactions->updateFuelTransaction(\n $fuelTransactionId,\n [\n 'sync_status' => 'reviewed',\n ]\n);" }, "fleetbase-api-geofences-get-driver-geofence-history": { "collection": "Fleetbase API", "group": "Geofences", "name": "Get Driver Geofence History", "implementation": "Fleetbase\\Sdk\\Services\\GeofenceService::getDriverGeofenceHistory", - "call": "$result = $fleetbase->geofences->getDriverGeofenceHistory(\n [\n 'driverId' => 'driver_id-fixture',\n ],\n [\n 'query' => [\n 'per_page' => '50',\n ],\n ]\n);", - "code": "geofences->getDriverGeofenceHistory(\n [\n 'driverId' => 'driver_id-fixture',\n ],\n [\n 'query' => [\n 'per_page' => '50',\n ],\n ]\n);" + "variables": { + "driverId": "driver_id-fixture" + }, + "call": "$result = $fleetbase->geofences->getDriverGeofenceHistory(\n $driverId,\n [\n 'per_page' => '50',\n ]\n);", + "code": "geofences->getDriverGeofenceHistory(\n $driverId,\n [\n 'per_page' => '50',\n ]\n);" }, "fleetbase-api-geofences-get-geofence-dwell-report": { "collection": "Fleetbase API", "group": "Geofences", "name": "Get Geofence Dwell Report", "implementation": "Fleetbase\\Sdk\\Services\\GeofenceService::getGeofenceDwellReport", - "call": "$result = $fleetbase->geofences->getGeofenceDwellReport(\n [],\n [\n 'query' => [\n 'from' => 'from_datetime-fixture',\n 'to' => 'to_datetime-fixture',\n ],\n ]\n);", - "code": "geofences->getGeofenceDwellReport(\n [],\n [\n 'query' => [\n 'from' => 'from_datetime-fixture',\n 'to' => 'to_datetime-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->geofences->getGeofenceDwellReport(\n [\n 'from' => 'from_datetime-fixture',\n 'to' => 'to_datetime-fixture',\n ]\n);", + "code": "geofences->getGeofenceDwellReport(\n [\n 'from' => 'from_datetime-fixture',\n 'to' => 'to_datetime-fixture',\n ]\n);" }, "fleetbase-api-geofences-get-geofence-inventory": { "collection": "Fleetbase API", "group": "Geofences", "name": "Get Geofence Inventory", "implementation": "Fleetbase\\Sdk\\Services\\GeofenceService::getGeofenceInventory", - "call": "$result = $fleetbase->geofences->getGeofenceInventory(\n [],\n []\n);", - "code": "geofences->getGeofenceInventory(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->geofences->getGeofenceInventory();", + "code": "geofences->getGeofenceInventory();" }, "fleetbase-api-geofences-list-geofence-events": { "collection": "Fleetbase API", "group": "Geofences", "name": "List Geofence Events", "implementation": "Fleetbase\\Sdk\\Services\\GeofenceService::listGeofenceEvents", - "call": "$result = $fleetbase->geofences->listGeofenceEvents(\n [],\n [\n 'query' => [\n 'per_page' => '50',\n 'event_type' => 'entered',\n ],\n ]\n);", - "code": "geofences->listGeofenceEvents(\n [],\n [\n 'query' => [\n 'per_page' => '50',\n 'event_type' => 'entered',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->geofences->listGeofenceEvents(\n [\n 'per_page' => '50',\n 'event_type' => 'entered',\n ]\n);", + "code": "geofences->listGeofenceEvents(\n [\n 'per_page' => '50',\n 'event_type' => 'entered',\n ]\n);" }, "fleetbase-api-issues-create-an-issue": { "collection": "Fleetbase API", "group": "Issues", "name": "Create an Issue", "implementation": "Fleetbase\\Sdk\\Services\\IssueService::createIssue", - "call": "$result = $fleetbase->issues->createIssue(\n [\n 'body' => [\n 'driver' => 'driver_id-fixture',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'report' => 'Vehicle tire pressure warning',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'medium',\n 'status' => 'open',\n ],\n ],\n []\n);", - "code": "issues->createIssue(\n [\n 'body' => [\n 'driver' => 'driver_id-fixture',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'report' => 'Vehicle tire pressure warning',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'medium',\n 'status' => 'open',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->issues->createIssue(\n [\n 'driver' => 'driver_id-fixture',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'report' => 'Vehicle tire pressure warning',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'medium',\n 'status' => 'open',\n ]\n);", + "code": "issues->createIssue(\n [\n 'driver' => 'driver_id-fixture',\n 'location' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n 'report' => 'Vehicle tire pressure warning',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'medium',\n 'status' => 'open',\n ]\n);" }, "fleetbase-api-issues-delete-an-issue": { "collection": "Fleetbase API", "group": "Issues", "name": "Delete an Issue", "implementation": "Fleetbase\\Sdk\\Services\\IssueService::deleteIssue", - "call": "$result = $fleetbase->issues->deleteIssue(\n [\n 'id' => 'issue_id-fixture',\n ],\n []\n);", - "code": "issues->deleteIssue(\n [\n 'id' => 'issue_id-fixture',\n ],\n []\n);" + "variables": { + "issueId": "issue_id-fixture" + }, + "call": "$result = $fleetbase->issues->deleteIssue($issueId);", + "code": "issues->deleteIssue($issueId);" }, "fleetbase-api-issues-query-issues": { "collection": "Fleetbase API", "group": "Issues", "name": "Query Issues", "implementation": "Fleetbase\\Sdk\\Services\\IssueService::queryIssues", - "call": "$result = $fleetbase->issues->queryIssues(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "issues->queryIssues(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->issues->queryIssues(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "issues->queryIssues(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-issues-retrieve-an-issue": { "collection": "Fleetbase API", "group": "Issues", "name": "Retrieve an Issue", "implementation": "Fleetbase\\Sdk\\Services\\IssueService::retrieveIssue", - "call": "$result = $fleetbase->issues->retrieveIssue(\n [\n 'id' => 'issue_id-fixture',\n ],\n []\n);", - "code": "issues->retrieveIssue(\n [\n 'id' => 'issue_id-fixture',\n ],\n []\n);" + "variables": { + "issueId": "issue_id-fixture" + }, + "call": "$result = $fleetbase->issues->retrieveIssue($issueId);", + "code": "issues->retrieveIssue($issueId);" }, "fleetbase-api-issues-update-an-issue": { "collection": "Fleetbase API", "group": "Issues", "name": "Update an Issue", "implementation": "Fleetbase\\Sdk\\Services\\IssueService::updateIssue", - "call": "$result = $fleetbase->issues->updateIssue(\n [\n 'id' => 'issue_id-fixture',\n 'body' => [\n 'report' => 'Updated issue report',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'high',\n 'status' => 'resolved',\n ],\n ],\n []\n);", - "code": "issues->updateIssue(\n [\n 'id' => 'issue_id-fixture',\n 'body' => [\n 'report' => 'Updated issue report',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'high',\n 'status' => 'resolved',\n ],\n ],\n []\n);" + "variables": { + "issueId": "issue_id-fixture" + }, + "call": "$result = $fleetbase->issues->updateIssue(\n $issueId,\n [\n 'report' => 'Updated issue report',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'high',\n 'status' => 'resolved',\n ]\n);", + "code": "issues->updateIssue(\n $issueId,\n [\n 'report' => 'Updated issue report',\n 'category' => 'vehicle',\n 'type' => 'maintenance',\n 'priority' => 'high',\n 'status' => 'resolved',\n ]\n);" }, "fleetbase-api-labels-render-label": { "collection": "Fleetbase API", "group": "Labels", "name": "Render Label", "implementation": "Fleetbase\\Sdk\\Services\\LabelService::renderLabel", - "call": "$result = $fleetbase->labels->renderLabel(\n [\n 'id' => 'order_id-fixture',\n ],\n [\n 'query' => [\n 'format' => 'stream',\n 'type' => 'order',\n ],\n ]\n);", - "code": "labels->renderLabel(\n [\n 'id' => 'order_id-fixture',\n ],\n [\n 'query' => [\n 'format' => 'stream',\n 'type' => 'order',\n ],\n ]\n);" + "variables": { + "labelId": "order_id-fixture" + }, + "call": "$result = $fleetbase->labels->renderLabel(\n $labelId,\n [\n 'format' => 'stream',\n 'type' => 'order',\n ]\n);", + "code": "labels->renderLabel(\n $labelId,\n [\n 'format' => 'stream',\n 'type' => 'order',\n ]\n);" }, "fleetbase-api-manifests-optimize-a-manifest": { "collection": "Fleetbase API", "group": "Manifests", "name": "Optimize a Manifest", "implementation": "Fleetbase\\Sdk\\Services\\ManifestService::optimizeManifest", - "call": "$result = $fleetbase->manifests->optimizeManifest(\n [\n 'id' => 'manifest_id-fixture',\n 'body' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n ],\n []\n);", - "code": "manifests->optimizeManifest(\n [\n 'id' => 'manifest_id-fixture',\n 'body' => [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ],\n ],\n []\n);" + "variables": { + "manifestId": "manifest_id-fixture" + }, + "call": "$result = $fleetbase->manifests->optimizeManifest(\n $manifestId,\n [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ]\n);", + "code": "manifests->optimizeManifest(\n $manifestId,\n [\n 'latitude' => 1.3521,\n 'longitude' => 103.8198,\n ]\n);" }, "fleetbase-api-manifests-retrieve-a-manifest": { "collection": "Fleetbase API", "group": "Manifests", "name": "Retrieve a Manifest", "implementation": "Fleetbase\\Sdk\\Services\\ManifestService::retrieveManifest", - "call": "$result = $fleetbase->manifests->retrieveManifest(\n [\n 'id' => 'manifest_id-fixture',\n ],\n []\n);", - "code": "manifests->retrieveManifest(\n [\n 'id' => 'manifest_id-fixture',\n ],\n []\n);" + "variables": { + "manifestId": "manifest_id-fixture" + }, + "call": "$result = $fleetbase->manifests->retrieveManifest($manifestId);", + "code": "manifests->retrieveManifest($manifestId);" }, "fleetbase-api-manifests-update-a-manifest-stop": { "collection": "Fleetbase API", "group": "Manifests", "name": "Update a Manifest Stop", "implementation": "Fleetbase\\Sdk\\Services\\ManifestService::updateManifestStop", - "call": "$result = $fleetbase->manifests->updateManifestStop(\n [\n 'id' => 'manifest_stop_id-fixture',\n 'body' => [\n 'status' => 'arrived',\n ],\n ],\n []\n);", - "code": "manifests->updateManifestStop(\n [\n 'id' => 'manifest_stop_id-fixture',\n 'body' => [\n 'status' => 'arrived',\n ],\n ],\n []\n);" + "variables": { + "manifestId": "manifest_stop_id-fixture" + }, + "call": "$result = $fleetbase->manifests->updateManifestStop(\n $manifestId,\n [\n 'status' => 'arrived',\n ]\n);", + "code": "manifests->updateManifestStop(\n $manifestId,\n [\n 'status' => 'arrived',\n ]\n);" }, "fleetbase-api-onboard-get-driver-onboard-settings": { "collection": "Fleetbase API", "group": "Onboard", "name": "Get Driver Onboard Settings", "implementation": "Fleetbase\\Sdk\\Services\\OnboardService::getDriverOnboardSettings", - "call": "$result = $fleetbase->onboard->getDriverOnboardSettings(\n [\n 'companyId' => 'organization_id-fixture',\n ],\n []\n);", - "code": "onboard->getDriverOnboardSettings(\n [\n 'companyId' => 'organization_id-fixture',\n ],\n []\n);" + "variables": { + "companyId": "organization_id-fixture" + }, + "call": "$result = $fleetbase->onboard->getDriverOnboardSettings($companyId);", + "code": "onboard->getDriverOnboardSettings($companyId);" }, "fleetbase-api-orchestrator-commit-orchestrator-plan": { "collection": "Fleetbase API", "group": "Orchestrator", "name": "Commit Orchestrator Plan", "implementation": "Fleetbase\\Sdk\\Services\\OrchestratorService::commitOrchestratorPlan", - "call": "$result = $fleetbase->orchestrator->commitOrchestratorPlan(\n [\n 'body' => [\n 'scheduled_date' => '2026-05-16',\n 'assignments' => [\n [\n 'order_id' => 'order_id-fixture',\n 'vehicle_id' => 'vehicle_id-fixture',\n 'driver_id' => 'driver_id-fixture',\n 'sequence' => 1,\n 'arrival' => 1778918400,\n 'duration' => 900,\n 'distance' => 4200,\n ],\n ],\n ],\n ],\n []\n);", - "code": "orchestrator->commitOrchestratorPlan(\n [\n 'body' => [\n 'scheduled_date' => '2026-05-16',\n 'assignments' => [\n [\n 'order_id' => 'order_id-fixture',\n 'vehicle_id' => 'vehicle_id-fixture',\n 'driver_id' => 'driver_id-fixture',\n 'sequence' => 1,\n 'arrival' => 1778918400,\n 'duration' => 900,\n 'distance' => 4200,\n ],\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orchestrator->commitOrchestratorPlan(\n [\n 'scheduled_date' => '2026-05-16',\n 'assignments' => [\n [\n 'order_id' => 'order_id-fixture',\n 'vehicle_id' => 'vehicle_id-fixture',\n 'driver_id' => 'driver_id-fixture',\n 'sequence' => 1,\n 'arrival' => 1778918400,\n 'duration' => 900,\n 'distance' => 4200,\n ],\n ],\n ]\n);", + "code": "orchestrator->commitOrchestratorPlan(\n [\n 'scheduled_date' => '2026-05-16',\n 'assignments' => [\n [\n 'order_id' => 'order_id-fixture',\n 'vehicle_id' => 'vehicle_id-fixture',\n 'driver_id' => 'driver_id-fixture',\n 'sequence' => 1,\n 'arrival' => 1778918400,\n 'duration' => 900,\n 'distance' => 4200,\n ],\n ],\n ]\n);" }, "fleetbase-api-orchestrator-run-orchestrator": { "collection": "Fleetbase API", "group": "Orchestrator", "name": "Run Orchestrator", "implementation": "Fleetbase\\Sdk\\Services\\OrchestratorService::runOrchestrator", - "call": "$result = $fleetbase->orchestrator->runOrchestrator(\n [\n 'body' => [\n 'mode' => 'assign_vehicles',\n 'order_ids' => [\n 'order_id-fixture',\n ],\n 'vehicle_ids' => [\n 'vehicle_id-fixture',\n ],\n 'driver_ids' => [],\n 'prior_assignments' => [],\n 'options' => [\n 'engine' => 'greedy',\n 'allocation_strategy' => 'route_aware',\n 'geometry' => false,\n 'respect_capacity' => true,\n 'respect_skills' => true,\n 'return_to_depot' => false,\n ],\n ],\n ],\n []\n);", - "code": "orchestrator->runOrchestrator(\n [\n 'body' => [\n 'mode' => 'assign_vehicles',\n 'order_ids' => [\n 'order_id-fixture',\n ],\n 'vehicle_ids' => [\n 'vehicle_id-fixture',\n ],\n 'driver_ids' => [],\n 'prior_assignments' => [],\n 'options' => [\n 'engine' => 'greedy',\n 'allocation_strategy' => 'route_aware',\n 'geometry' => false,\n 'respect_capacity' => true,\n 'respect_skills' => true,\n 'return_to_depot' => false,\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orchestrator->runOrchestrator(\n [\n 'mode' => 'assign_vehicles',\n 'order_ids' => [\n 'order_id-fixture',\n ],\n 'vehicle_ids' => [\n 'vehicle_id-fixture',\n ],\n 'driver_ids' => [],\n 'prior_assignments' => [],\n 'options' => [\n 'engine' => 'greedy',\n 'allocation_strategy' => 'route_aware',\n 'geometry' => false,\n 'respect_capacity' => true,\n 'respect_skills' => true,\n 'return_to_depot' => false,\n ],\n ]\n);", + "code": "orchestrator->runOrchestrator(\n [\n 'mode' => 'assign_vehicles',\n 'order_ids' => [\n 'order_id-fixture',\n ],\n 'vehicle_ids' => [\n 'vehicle_id-fixture',\n ],\n 'driver_ids' => [],\n 'prior_assignments' => [],\n 'options' => [\n 'engine' => 'greedy',\n 'allocation_strategy' => 'route_aware',\n 'geometry' => false,\n 'respect_capacity' => true,\n 'respect_skills' => true,\n 'return_to_depot' => false,\n ],\n ]\n);" }, "fleetbase-api-order-configs-query-order-configs": { "collection": "Fleetbase API", "group": "Order Configs", "name": "Query Order Configs", "implementation": "Fleetbase\\Sdk\\Services\\OrderConfigService::queryOrderConfigs", - "call": "$result = $fleetbase->orderConfigs->queryOrderConfigs(\n [],\n []\n);", - "code": "orderConfigs->queryOrderConfigs(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orderConfigs->queryOrderConfigs();", + "code": "orderConfigs->queryOrderConfigs();" }, "fleetbase-api-order-configs-retrieve-an-order-config": { "collection": "Fleetbase API", "group": "Order Configs", "name": "Retrieve an Order Config", "implementation": "Fleetbase\\Sdk\\Services\\OrderConfigService::retrieveOrderConfig", - "call": "$result = $fleetbase->orderConfigs->retrieveOrderConfig(\n [\n 'order_config_id' => 'order_config_id-fixture',\n ],\n []\n);", - "code": "orderConfigs->retrieveOrderConfig(\n [\n 'order_config_id' => 'order_config_id-fixture',\n ],\n []\n);" + "variables": { + "orderConfigId": "order_config_id-fixture" + }, + "call": "$result = $fleetbase->orderConfigs->retrieveOrderConfig($orderConfigId);", + "code": "orderConfigs->retrieveOrderConfig($orderConfigId);" }, "fleetbase-api-orders-cancel-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Cancel an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::cancelOrder", - "call": "$result = $fleetbase->orders->cancelOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->cancelOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->cancelOrder($orderId);", + "code": "orders->cancelOrder($orderId);" }, "fleetbase-api-orders-capture-photo-for-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Capture Photo for Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::capturePhotoForOrder", - "call": "$result = $fleetbase->orders->capturePhotoForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subjectId' => 'subject_id-fixture',\n 'body' => [\n 'photos' => [\n 'proof_photo_base64-fixture',\n ],\n 'remarks' => 'Verified by Photo',\n 'data' => [],\n ],\n ],\n []\n);", - "code": "orders->capturePhotoForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subjectId' => 'subject_id-fixture',\n 'body' => [\n 'photos' => [\n 'proof_photo_base64-fixture',\n ],\n 'remarks' => 'Verified by Photo',\n 'data' => [],\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture", + "subjectId": "subject_id-fixture" + }, + "call": "$result = $fleetbase->orders->capturePhotoForOrder(\n $orderId,\n $subjectId,\n [\n 'photos' => [\n 'proof_photo_base64-fixture',\n ],\n 'remarks' => 'Verified by Photo',\n 'data' => [],\n ]\n);", + "code": "orders->capturePhotoForOrder(\n $orderId,\n $subjectId,\n [\n 'photos' => [\n 'proof_photo_base64-fixture',\n ],\n 'remarks' => 'Verified by Photo',\n 'data' => [],\n ]\n);" }, "fleetbase-api-orders-capture-qr-code-for-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Capture QR Code for Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::captureQrCodeForOrder", - "call": "$result = $fleetbase->orders->captureQrCodeForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subject-id' => '',\n 'body' => [\n 'code' => 'qr_code-fixture',\n 'data' => [],\n 'raw_data' => [],\n ],\n ],\n []\n);", - "code": "orders->captureQrCodeForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subject-id' => '',\n 'body' => [\n 'code' => 'qr_code-fixture',\n 'data' => [],\n 'raw_data' => [],\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture", + "subjectId": "subject-id-fixture" + }, + "call": "$result = $fleetbase->orders->captureQrCodeForOrder(\n $orderId,\n $subjectId,\n [\n 'code' => 'qr_code-fixture',\n 'data' => [],\n 'raw_data' => [],\n ]\n);", + "code": "orders->captureQrCodeForOrder(\n $orderId,\n $subjectId,\n [\n 'code' => 'qr_code-fixture',\n 'data' => [],\n 'raw_data' => [],\n ]\n);" }, "fleetbase-api-orders-capture-signature-for-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Capture Signature for Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::captureSignatureForOrder", - "call": "$result = $fleetbase->orders->captureSignatureForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subject-id' => '',\n 'body' => [\n 'signature' => 'proof_signature_base64-fixture',\n 'data' => [],\n ],\n ],\n []\n);", - "code": "orders->captureSignatureForOrder(\n [\n 'id' => 'order_id-fixture',\n 'subject-id' => '',\n 'body' => [\n 'signature' => 'proof_signature_base64-fixture',\n 'data' => [],\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture", + "subjectId": "subject-id-fixture" + }, + "call": "$result = $fleetbase->orders->captureSignatureForOrder(\n $orderId,\n $subjectId,\n [\n 'signature' => 'proof_signature_base64-fixture',\n 'data' => [],\n ]\n);", + "code": "orders->captureSignatureForOrder(\n $orderId,\n $subjectId,\n [\n 'signature' => 'proof_signature_base64-fixture',\n 'data' => [],\n ]\n);" }, "fleetbase-api-orders-complete-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Complete an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::completeOrder", - "call": "$result = $fleetbase->orders->completeOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->completeOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->completeOrder($orderId);", + "code": "orders->completeOrder($orderId);" }, "fleetbase-api-orders-create-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrder", - "call": "$result = $fleetbase->orders->createOrder(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'waypoints' => [\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n ],\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'facilitator' => 'vendor_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);", - "code": "orders->createOrder(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'waypoints' => [\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n ],\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'facilitator' => 'vendor_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrder(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'waypoints' => [\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n ],\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'facilitator' => 'vendor_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);", + "code": "orders->createOrder(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'waypoints' => [\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n ],\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'facilitator' => 'vendor_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-complete-payload": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using Complete Payload", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingCompletePayload", - "call": "$result = $fleetbase->orders->createOrderUsingCompletePayload(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'notes' => 'Deliver through receiving bay.',\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingCompletePayload(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'notes' => 'Deliver through receiving bay.',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingCompletePayload(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'notes' => 'Deliver through receiving bay.',\n ]\n);", + "code": "orders->createOrderUsingCompletePayload(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'dispatch' => false,\n 'driver' => 'driver_id-fixture',\n 'customer' => 'contact_id-fixture',\n 'notes' => 'Deliver through receiving bay.',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-coordinates": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using Coordinates", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingCoordinates", - "call": "$result = $fleetbase->orders->createOrderUsingCoordinates(\n [\n 'body' => [\n 'pickup' => [\n 'latitude' => 1.2830632,\n 'longitude' => 103.8579965,\n ],\n 'dropoff' => [\n 'lat' => 1.4043,\n 'lng' => 103.793,\n ],\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingCoordinates(\n [\n 'body' => [\n 'pickup' => [\n 'latitude' => 1.2830632,\n 'longitude' => 103.8579965,\n ],\n 'dropoff' => [\n 'lat' => 1.4043,\n 'lng' => 103.793,\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingCoordinates(\n [\n 'pickup' => [\n 'latitude' => 1.2830632,\n 'longitude' => 103.8579965,\n ],\n 'dropoff' => [\n 'lat' => 1.4043,\n 'lng' => 103.793,\n ],\n ]\n);", + "code": "orders->createOrderUsingCoordinates(\n [\n 'pickup' => [\n 'latitude' => 1.2830632,\n 'longitude' => 103.8579965,\n ],\n 'dropoff' => [\n 'lat' => 1.4043,\n 'lng' => 103.793,\n ],\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-geojson-points": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using GeoJSON Points", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingGeojsonPoints", - "call": "$result = $fleetbase->orders->createOrderUsingGeojsonPoints(\n [\n 'body' => [\n 'pickup' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.8579965,\n 1.2830632,\n ],\n ],\n 'dropoff' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.793,\n 1.4043,\n ],\n ],\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingGeojsonPoints(\n [\n 'body' => [\n 'pickup' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.8579965,\n 1.2830632,\n ],\n ],\n 'dropoff' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.793,\n 1.4043,\n ],\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingGeojsonPoints(\n [\n 'pickup' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.8579965,\n 1.2830632,\n ],\n ],\n 'dropoff' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.793,\n 1.4043,\n ],\n ],\n ]\n);", + "code": "orders->createOrderUsingGeojsonPoints(\n [\n 'pickup' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.8579965,\n 1.2830632,\n ],\n ],\n 'dropoff' => [\n 'type' => 'Point',\n 'coordinates' => [\n 103.793,\n 1.4043,\n ],\n ],\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-payload": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using Payload", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingPayload", - "call": "$result = $fleetbase->orders->createOrderUsingPayload(\n [\n 'body' => [\n 'payload' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingPayload(\n [\n 'body' => [\n 'payload' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingPayload(\n [\n 'payload' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);", + "code": "orders->createOrderUsingPayload(\n [\n 'payload' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-waypoints-and-entities-with-photos": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using Waypoints and Entities with Photos", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingWaypointsAndEntitiesWithPhotos", - "call": "$result = $fleetbase->orders->createOrderUsingWaypointsAndEntitiesWithPhotos(\n [\n 'body' => [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingWaypointsAndEntitiesWithPhotos(\n [\n 'body' => [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingWaypointsAndEntitiesWithPhotos(\n [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);", + "code": "orders->createOrderUsingWaypointsAndEntitiesWithPhotos(\n [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp',\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-waypoints-and-entity-destinations": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using Waypoints and Entity Destinations", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingWaypointsAndEntityDestinations", - "call": "$result = $fleetbase->orders->createOrderUsingWaypointsAndEntityDestinations(\n [\n 'body' => [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingWaypointsAndEntityDestinations(\n [\n 'body' => [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingWaypointsAndEntityDestinations(\n [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);", + "code": "orders->createOrderUsingWaypointsAndEntityDestinations(\n [\n 'payload' => [\n 'waypoints' => [\n 'Singapore 018971',\n '321 Orchard Rd, Singapore',\n ],\n 'entities' => [\n [\n 'destination' => 0,\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'destination' => 0,\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'destination' => 1,\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n 'meta' => [\n 'Warehouse' => 'WAREHOUSE-123',\n ],\n 'notes' => 'Order notes',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-only-pickup-dropoff": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using only Pickup Dropoff", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingOnlyPickupDropoff", - "call": "$result = $fleetbase->orders->createOrderUsingOnlyPickupDropoff(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingOnlyPickupDropoff(\n [\n 'body' => [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingOnlyPickupDropoff(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n ]\n);", + "code": "orders->createOrderUsingOnlyPickupDropoff(\n [\n 'pickup' => 'Singapore 018971',\n 'dropoff' => '321 Orchard Rd, Singapore',\n ]\n);" }, "fleetbase-api-orders-create-an-order-using-only-waypoints": { "collection": "Fleetbase API", "group": "Orders", "name": "Create an Order using only Waypoints", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::createOrderUsingOnlyWaypoints", - "call": "$result = $fleetbase->orders->createOrderUsingOnlyWaypoints(\n [\n 'body' => [\n 'waypoints' => [\n [\n 1.3521,\n 103.8198,\n ],\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n 'Sentosa, Singapore',\n ],\n ],\n ],\n []\n);", - "code": "orders->createOrderUsingOnlyWaypoints(\n [\n 'body' => [\n 'waypoints' => [\n [\n 1.3521,\n 103.8198,\n ],\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n 'Sentosa, Singapore',\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->orders->createOrderUsingOnlyWaypoints(\n [\n 'waypoints' => [\n [\n 1.3521,\n 103.8198,\n ],\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n 'Sentosa, Singapore',\n ],\n ]\n);", + "code": "orders->createOrderUsingOnlyWaypoints(\n [\n 'waypoints' => [\n [\n 1.3521,\n 103.8198,\n ],\n '10 Bayfront Avenue, Singapore 018956',\n '18 Marina Gardens Drive, Singapore 018953',\n '80 Mandai Lake Rd, Singapore 729826',\n '1 Beach Road, Singapore 189673',\n 'Sentosa, Singapore',\n ],\n ]\n);" }, "fleetbase-api-orders-delete-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Delete an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::deleteOrder", - "call": "$result = $fleetbase->orders->deleteOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->deleteOrder(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->deleteOrder($orderId);", + "code": "orders->deleteOrder($orderId);" }, "fleetbase-api-orders-dispatch-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Dispatch an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::dispatchOrder", - "call": "$result = $fleetbase->orders->dispatchOrder('order_id-fixture');", - "code": "orders->dispatchOrder('order_id-fixture');" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->dispatchOrder($orderId);", + "code": "orders->dispatchOrder($orderId);" }, "fleetbase-api-orders-get-editable-entity-fields": { "collection": "Fleetbase API", "group": "Orders", "name": "Get Editable Entity Fields", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::getEditableEntityFields", - "call": "$result = $fleetbase->orders->getEditableEntityFields(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->getEditableEntityFields(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->getEditableEntityFields($orderId);", + "code": "orders->getEditableEntityFields($orderId);" }, "fleetbase-api-orders-get-order-distance-and-time": { "collection": "Fleetbase API", "group": "Orders", "name": "Get Order Distance and Time", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::getOrderDistanceAndTime", - "call": "$result = $fleetbase->orders->getOrderDistanceAndTime(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->getOrderDistanceAndTime(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->getOrderDistanceAndTime($orderId);", + "code": "orders->getOrderDistanceAndTime($orderId);" }, "fleetbase-api-orders-get-order-eta": { "collection": "Fleetbase API", "group": "Orders", "name": "Get Order ETA", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::getOrderEta", - "call": "$result = $fleetbase->orders->getOrderEta(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->getOrderEta(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->getOrderEta($orderId);", + "code": "orders->getOrderEta($orderId);" }, "fleetbase-api-orders-get-order-next-activity": { "collection": "Fleetbase API", "group": "Orders", "name": "Get Order Next Activity", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::getOrderNextActivity", - "call": "$result = $fleetbase->orders->getOrderNextActivity(\n [\n 'id' => 'order_id-fixture',\n ],\n [\n 'query' => [\n 'waypoint' => 'current_waypoint_id-fixture',\n ],\n ]\n);", - "code": "orders->getOrderNextActivity(\n [\n 'id' => 'order_id-fixture',\n ],\n [\n 'query' => [\n 'waypoint' => 'current_waypoint_id-fixture',\n ],\n ]\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->getOrderNextActivity(\n $orderId,\n [\n 'waypoint' => 'current_waypoint_id-fixture',\n ]\n);", + "code": "orders->getOrderNextActivity(\n $orderId,\n [\n 'waypoint' => 'current_waypoint_id-fixture',\n ]\n);" }, "fleetbase-api-orders-get-order-tracker": { "collection": "Fleetbase API", "group": "Orders", "name": "Get Order Tracker", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::getOrderTracker", - "call": "$result = $fleetbase->orders->getOrderTracker(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->getOrderTracker(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->getOrderTracker($orderId);", + "code": "orders->getOrderTracker($orderId);" }, "fleetbase-api-orders-list-order-comments": { "collection": "Fleetbase API", "group": "Orders", "name": "List Order Comments", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::listOrderComments", - "call": "$result = $fleetbase->orders->listOrderComments(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->listOrderComments(\n [\n 'id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->listOrderComments($orderId);", + "code": "orders->listOrderComments($orderId);" }, "fleetbase-api-orders-list-order-proofs": { "collection": "Fleetbase API", "group": "Orders", "name": "List Order Proofs", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::listOrderProofs", - "call": "$result = $fleetbase->orders->listOrderProofs(\n [\n 'id' => 'order_id-fixture',\n 'subjectId' => 'subject_id-fixture',\n ],\n []\n);", - "code": "orders->listOrderProofs(\n [\n 'id' => 'order_id-fixture',\n 'subjectId' => 'subject_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture", + "subjectId": "subject_id-fixture" + }, + "call": "$result = $fleetbase->orders->listOrderProofs($orderId, $subjectId);", + "code": "orders->listOrderProofs($orderId, $subjectId);" }, "fleetbase-api-orders-query-orders": { "collection": "Fleetbase API", "group": "Orders", "name": "Query Orders", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::queryOrders", - "call": "$result = $fleetbase->orders->queryOrders(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'status' => 'created',\n ],\n ]\n);", - "code": "orders->queryOrders(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'status' => 'created',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->orders->queryOrders(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'status' => 'created',\n ]\n);", + "code": "orders->queryOrders(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n 'status' => 'created',\n ]\n);" }, "fleetbase-api-orders-retrieve-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Retrieve an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::retrieveOrder", - "call": "$result = $fleetbase->orders->retrieveOrder(\n [\n 'order_id' => 'order_id-fixture',\n ],\n []\n);", - "code": "orders->retrieveOrder(\n [\n 'order_id' => 'order_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->retrieveOrder($orderId);", + "code": "orders->retrieveOrder($orderId);" }, "fleetbase-api-orders-schedule-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Schedule an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::scheduleOrder", - "call": "$result = $fleetbase->orders->scheduleOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'date' => '2024-02-11',\n 'time' => '8am',\n 'timezone' => 'Asia/Singapore',\n ],\n ],\n []\n);", - "code": "orders->scheduleOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'date' => '2024-02-11',\n 'time' => '8am',\n 'timezone' => 'Asia/Singapore',\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->scheduleOrder(\n $orderId,\n [\n 'date' => '2024-02-11',\n 'time' => '8am',\n 'timezone' => 'Asia/Singapore',\n ]\n);", + "code": "orders->scheduleOrder(\n $orderId,\n [\n 'date' => '2024-02-11',\n 'time' => '8am',\n 'timezone' => 'Asia/Singapore',\n ]\n);" }, "fleetbase-api-orders-set-order-destination": { "collection": "Fleetbase API", "group": "Orders", "name": "Set Order Destination", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::setOrderDestination", - "call": "$result = $fleetbase->orders->setOrderDestination(\n [\n 'id' => 'order_id-fixture',\n 'placeId' => 'waypoint_id-fixture',\n ],\n []\n);", - "code": "orders->setOrderDestination(\n [\n 'id' => 'order_id-fixture',\n 'placeId' => 'waypoint_id-fixture',\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture", + "placeId": "waypoint_id-fixture" + }, + "call": "$result = $fleetbase->orders->setOrderDestination($orderId, $placeId);", + "code": "orders->setOrderDestination($orderId, $placeId);" }, "fleetbase-api-orders-start-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Start an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::startOrder", - "call": "$result = $fleetbase->orders->startOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'skip_dispatch' => false,\n ],\n ],\n []\n);", - "code": "orders->startOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'skip_dispatch' => false,\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->startOrder(\n $orderId,\n [\n 'skip_dispatch' => false,\n ]\n);", + "code": "orders->startOrder(\n $orderId,\n [\n 'skip_dispatch' => false,\n ]\n);" }, "fleetbase-api-orders-update-order-activity": { "collection": "Fleetbase API", "group": "Orders", "name": "Update Order Activity", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::updateOrderActivity", - "call": "$result = $fleetbase->orders->updateOrderActivity(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'activity' => 'next_activity-fixture',\n 'skip_dispatch' => false,\n ],\n ],\n []\n);", - "code": "orders->updateOrderActivity(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'activity' => 'next_activity-fixture',\n 'skip_dispatch' => false,\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->updateOrderActivity(\n $orderId,\n [\n 'activity' => 'next_activity-fixture',\n 'skip_dispatch' => false,\n ]\n);", + "code": "orders->updateOrderActivity(\n $orderId,\n [\n 'activity' => 'next_activity-fixture',\n 'skip_dispatch' => false,\n ]\n);" }, "fleetbase-api-orders-update-an-order": { "collection": "Fleetbase API", "group": "Orders", "name": "Update an Order", "implementation": "Fleetbase\\Sdk\\Services\\OrderService::updateOrder", - "call": "$result = $fleetbase->orders->updateOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'service_quote' => 'service_quote_id-fixture',\n ],\n ],\n []\n);", - "code": "orders->updateOrder(\n [\n 'id' => 'order_id-fixture',\n 'body' => [\n 'service_quote' => 'service_quote_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "orderId": "order_id-fixture" + }, + "call": "$result = $fleetbase->orders->updateOrder(\n $orderId,\n [\n 'service_quote' => 'service_quote_id-fixture',\n ]\n);", + "code": "orders->updateOrder(\n $orderId,\n [\n 'service_quote' => 'service_quote_id-fixture',\n ]\n);" }, "fleetbase-api-organizations-get-current-organization": { "collection": "Fleetbase API", "group": "Organizations", "name": "Get Current Organization", "implementation": "Fleetbase\\Sdk\\Services\\OrganizationService::getCurrentOrganization", - "call": "$result = $fleetbase->organizations->getCurrentOrganization(\n [],\n []\n);", - "code": "organizations->getCurrentOrganization(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->organizations->getCurrentOrganization();", + "code": "organizations->getCurrentOrganization();" }, "fleetbase-api-organizations-list-organizations": { "collection": "Fleetbase API", "group": "Organizations", "name": "List Organizations", "implementation": "Fleetbase\\Sdk\\Services\\OrganizationService::listOrganizations", - "call": "$result = $fleetbase->organizations->listOrganizations(\n [],\n [\n 'query' => [\n 'limit' => '10',\n 'with_driver_onboard' => 'false',\n ],\n ]\n);", - "code": "organizations->listOrganizations(\n [],\n [\n 'query' => [\n 'limit' => '10',\n 'with_driver_onboard' => 'false',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->organizations->listOrganizations(\n [\n 'limit' => '10',\n 'with_driver_onboard' => 'false',\n ]\n);", + "code": "organizations->listOrganizations(\n [\n 'limit' => '10',\n 'with_driver_onboard' => 'false',\n ]\n);" }, "fleetbase-api-parts-create-a-part": { "collection": "Fleetbase API", "group": "Parts", "name": "Create a Part", "implementation": "Fleetbase\\Sdk\\Services\\PartService::createPart", - "call": "$result = $fleetbase->parts->createPart(\n [\n 'body' => [\n 'sku' => 'FLT-OIL-timestamp-fixture',\n 'name' => 'Oil Filter',\n 'quantity_on_hand' => 24,\n 'unit_cost' => 1200,\n 'currency' => 'USD',\n 'status' => 'in_stock',\n ],\n ],\n []\n);", - "code": "parts->createPart(\n [\n 'body' => [\n 'sku' => 'FLT-OIL-timestamp-fixture',\n 'name' => 'Oil Filter',\n 'quantity_on_hand' => 24,\n 'unit_cost' => 1200,\n 'currency' => 'USD',\n 'status' => 'in_stock',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->parts->createPart(\n [\n 'sku' => 'FLT-OIL-timestamp-fixture',\n 'name' => 'Oil Filter',\n 'quantity_on_hand' => 24,\n 'unit_cost' => 1200,\n 'currency' => 'USD',\n 'status' => 'in_stock',\n ]\n);", + "code": "parts->createPart(\n [\n 'sku' => 'FLT-OIL-timestamp-fixture',\n 'name' => 'Oil Filter',\n 'quantity_on_hand' => 24,\n 'unit_cost' => 1200,\n 'currency' => 'USD',\n 'status' => 'in_stock',\n ]\n);" }, "fleetbase-api-parts-delete-a-part": { "collection": "Fleetbase API", "group": "Parts", "name": "Delete a Part", "implementation": "Fleetbase\\Sdk\\Services\\PartService::deletePart", - "call": "$result = $fleetbase->parts->deletePart(\n [\n 'part_id' => 'part_id-fixture',\n ],\n []\n);", - "code": "parts->deletePart(\n [\n 'part_id' => 'part_id-fixture',\n ],\n []\n);" + "variables": { + "partId": "part_id-fixture" + }, + "call": "$result = $fleetbase->parts->deletePart($partId);", + "code": "parts->deletePart($partId);" }, "fleetbase-api-parts-query-parts": { "collection": "Fleetbase API", "group": "Parts", "name": "Query Parts", "implementation": "Fleetbase\\Sdk\\Services\\PartService::queryParts", - "call": "$result = $fleetbase->parts->queryParts(\n [],\n []\n);", - "code": "parts->queryParts(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->parts->queryParts();", + "code": "parts->queryParts();" }, "fleetbase-api-parts-retrieve-a-part": { "collection": "Fleetbase API", "group": "Parts", "name": "Retrieve a Part", "implementation": "Fleetbase\\Sdk\\Services\\PartService::retrievePart", - "call": "$result = $fleetbase->parts->retrievePart(\n [\n 'part_id' => 'part_id-fixture',\n ],\n []\n);", - "code": "parts->retrievePart(\n [\n 'part_id' => 'part_id-fixture',\n ],\n []\n);" + "variables": { + "partId": "part_id-fixture" + }, + "call": "$result = $fleetbase->parts->retrievePart($partId);", + "code": "parts->retrievePart($partId);" }, "fleetbase-api-parts-update-a-part": { "collection": "Fleetbase API", "group": "Parts", "name": "Update a Part", "implementation": "Fleetbase\\Sdk\\Services\\PartService::updatePart", - "call": "$result = $fleetbase->parts->updatePart(\n [\n 'part_id' => 'part_id-fixture',\n 'body' => [\n 'quantity_on_hand' => 18,\n ],\n ],\n []\n);", - "code": "parts->updatePart(\n [\n 'part_id' => 'part_id-fixture',\n 'body' => [\n 'quantity_on_hand' => 18,\n ],\n ],\n []\n);" + "variables": { + "partId": "part_id-fixture" + }, + "call": "$result = $fleetbase->parts->updatePart(\n $partId,\n [\n 'quantity_on_hand' => 18,\n ]\n);", + "code": "parts->updatePart(\n $partId,\n [\n 'quantity_on_hand' => 18,\n ]\n);" }, "fleetbase-api-payloads-create-a-payload": { "collection": "Fleetbase API", "group": "Payloads", "name": "Create a Payload", "implementation": "Fleetbase\\Sdk\\Services\\PayloadService::createPayload", - "call": "$result = $fleetbase->payloads->createPayload(\n [\n 'body' => [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'type' => 'food_delivery',\n ],\n ],\n []\n);", - "code": "payloads->createPayload(\n [\n 'body' => [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'type' => 'food_delivery',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->payloads->createPayload(\n [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'type' => 'food_delivery',\n ]\n);", + "code": "payloads->createPayload(\n [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'type' => 'food_delivery',\n ]\n);" }, "fleetbase-api-payloads-delete-a-payload": { "collection": "Fleetbase API", "group": "Payloads", "name": "Delete a Payload", "implementation": "Fleetbase\\Sdk\\Services\\PayloadService::deletePayload", - "call": "$result = $fleetbase->payloads->deletePayload(\n [\n 'id' => 'payload_id-fixture',\n ],\n []\n);", - "code": "payloads->deletePayload(\n [\n 'id' => 'payload_id-fixture',\n ],\n []\n);" + "variables": { + "payloadId": "payload_id-fixture" + }, + "call": "$result = $fleetbase->payloads->deletePayload($payloadId);", + "code": "payloads->deletePayload($payloadId);" }, "fleetbase-api-payloads-query-payloads": { "collection": "Fleetbase API", "group": "Payloads", "name": "Query Payloads", "implementation": "Fleetbase\\Sdk\\Services\\PayloadService::queryPayloads", - "call": "$result = $fleetbase->payloads->queryPayloads(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "payloads->queryPayloads(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->payloads->queryPayloads(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "payloads->queryPayloads(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-payloads-retrieve-a-payload": { "collection": "Fleetbase API", "group": "Payloads", "name": "Retrieve a Payload", "implementation": "Fleetbase\\Sdk\\Services\\PayloadService::retrievePayload", - "call": "$result = $fleetbase->payloads->retrievePayload(\n [\n 'id' => 'payload_id-fixture',\n ],\n []\n);", - "code": "payloads->retrievePayload(\n [\n 'id' => 'payload_id-fixture',\n ],\n []\n);" + "variables": { + "payloadId": "payload_id-fixture" + }, + "call": "$result = $fleetbase->payloads->retrievePayload($payloadId);", + "code": "payloads->retrievePayload($payloadId);" }, "fleetbase-api-payloads-update-a-payload": { "collection": "Fleetbase API", "group": "Payloads", "name": "Update a Payload", "implementation": "Fleetbase\\Sdk\\Services\\PayloadService::updatePayload", - "call": "$result = $fleetbase->payloads->updatePayload(\n [\n 'id' => 'payload_id-fixture',\n 'body' => [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n ],\n []\n);", - "code": "payloads->updatePayload(\n [\n 'id' => 'payload_id-fixture',\n 'body' => [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ],\n ],\n []\n);" + "variables": { + "payloadId": "payload_id-fixture" + }, + "call": "$result = $fleetbase->payloads->updatePayload(\n $payloadId,\n [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ]\n);", + "code": "payloads->updatePayload(\n $payloadId,\n [\n 'pickup' => [\n 'street1' => '10 Bayfront Avenue',\n 'city' => 'Singapore',\n 'postal_code' => '018956',\n 'country' => 'SG',\n ],\n 'dropoff' => [\n 'street1' => '80 Mandai Lake Rd',\n 'city' => 'Singapore',\n 'postal_code' => '729826',\n 'country' => 'SG',\n ],\n 'entities' => [\n [\n 'name' => 'UltraHD 4K Smart TV',\n 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.',\n 'currency' => 'USD',\n 'price' => 1200,\n ],\n [\n 'name' => 'Bluetooth Wireless Headphones',\n 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.',\n 'currency' => 'USD',\n 'price' => 250,\n ],\n [\n 'name' => 'Smart Fitness Watch',\n 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.',\n 'currency' => 'USD',\n 'price' => 199.99,\n ],\n ],\n ]\n);" }, "fleetbase-api-places-create-a-place": { "collection": "Fleetbase API", "group": "Places", "name": "Create a Place", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::createPlace", - "call": "$result = $fleetbase->places->createPlace(\n [\n 'body' => [\n 'name' => 'Central Park',\n 'street1' => '830 5th Ave',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ],\n ],\n []\n);", - "code": "places->createPlace(\n [\n 'body' => [\n 'name' => 'Central Park',\n 'street1' => '830 5th Ave',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->places->createPlace(\n [\n 'name' => 'Central Park',\n 'street1' => '830 5th Ave',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ]\n);", + "code": "places->createPlace(\n [\n 'name' => 'Central Park',\n 'street1' => '830 5th Ave',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ]\n);" }, "fleetbase-api-places-delete-a-place": { "collection": "Fleetbase API", "group": "Places", "name": "Delete a Place", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::deletePlace", - "call": "$result = $fleetbase->places->deletePlace(\n [\n 'id' => 'place_id-fixture',\n ],\n []\n);", - "code": "places->deletePlace(\n [\n 'id' => 'place_id-fixture',\n ],\n []\n);" + "variables": { + "placeId": "place_id-fixture" + }, + "call": "$result = $fleetbase->places->deletePlace($placeId);", + "code": "places->deletePlace($placeId);" }, "fleetbase-api-places-list-all-places": { "collection": "Fleetbase API", "group": "Places", "name": "List all Places", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::listAllPlaces", - "call": "$result = $fleetbase->places->listAllPlaces(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "places->listAllPlaces(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->places->listAllPlaces(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "places->listAllPlaces(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-places-query-places": { "collection": "Fleetbase API", "group": "Places", "name": "Query Places", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::queryPlaces", - "call": "$result = $fleetbase->places->queryPlaces(\n [],\n [\n 'query' => [\n 'query' => 'place_name-fixture',\n 'limit' => '25',\n 'offset' => '',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "places->queryPlaces(\n [],\n [\n 'query' => [\n 'query' => 'place_name-fixture',\n 'limit' => '25',\n 'offset' => '',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->places->queryPlaces(\n [\n 'query' => 'place_name-fixture',\n 'limit' => '25',\n 'offset' => '',\n 'sort' => 'created_at',\n ]\n);", + "code": "places->queryPlaces(\n [\n 'query' => 'place_name-fixture',\n 'limit' => '25',\n 'offset' => '',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-places-retrieve-a-place": { "collection": "Fleetbase API", "group": "Places", "name": "Retrieve a Place", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::retrievePlace", - "call": "$result = $fleetbase->places->retrievePlace(\n [\n 'id' => 'place_id-fixture',\n ],\n []\n);", - "code": "places->retrievePlace(\n [\n 'id' => 'place_id-fixture',\n ],\n []\n);" + "variables": { + "placeId": "place_id-fixture" + }, + "call": "$result = $fleetbase->places->retrievePlace($placeId);", + "code": "places->retrievePlace($placeId);" }, "fleetbase-api-places-search-places": { "collection": "Fleetbase API", "group": "Places", "name": "Search Places", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::searchPlaces", - "call": "$result = $fleetbase->places->searchPlaces(\n [],\n [\n 'query' => [\n 'query' => 'place_query-fixture',\n 'll' => 'place_ll-fixture',\n 'locale' => 'locale-fixture',\n ],\n ]\n);", - "code": "places->searchPlaces(\n [],\n [\n 'query' => [\n 'query' => 'place_query-fixture',\n 'll' => 'place_ll-fixture',\n 'locale' => 'locale-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->places->searchPlaces(\n [\n 'query' => 'place_query-fixture',\n 'll' => 'place_ll-fixture',\n 'locale' => 'locale-fixture',\n ]\n);", + "code": "places->searchPlaces(\n [\n 'query' => 'place_query-fixture',\n 'll' => 'place_ll-fixture',\n 'locale' => 'locale-fixture',\n ]\n);" }, "fleetbase-api-places-update-a-place": { "collection": "Fleetbase API", "group": "Places", "name": "Update a Place", "implementation": "Fleetbase\\Sdk\\Services\\PlaceService::updatePlace", - "call": "$result = $fleetbase->places->updatePlace(\n [\n 'id' => 'place_id-fixture',\n 'body' => [\n 'name' => 'Central Park Edit',\n 'street1' => '830 5th Ave a ',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ],\n ],\n []\n);", - "code": "places->updatePlace(\n [\n 'id' => 'place_id-fixture',\n 'body' => [\n 'name' => 'Central Park Edit',\n 'street1' => '830 5th Ave a ',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ],\n ],\n []\n);" + "variables": { + "placeId": "place_id-fixture" + }, + "call": "$result = $fleetbase->places->updatePlace(\n $placeId,\n [\n 'name' => 'Central Park Edit',\n 'street1' => '830 5th Ave a ',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ]\n);", + "code": "places->updatePlace(\n $placeId,\n [\n 'name' => 'Central Park Edit',\n 'street1' => '830 5th Ave a ',\n 'city' => 'New York',\n 'province' => 'New York',\n 'postal_code' => '10065',\n 'neighborhood' => 'Manhattan',\n 'district' => 'Midtown',\n 'building' => 'Park Area',\n 'country' => 'US',\n 'phone' => '+12123106600',\n 'type' => 'Park',\n ]\n);" }, "fleetbase-api-purchase-rates-create-a-purchase-rate": { "collection": "Fleetbase API", "group": "Purchase Rates", "name": "Create a Purchase Rate", "implementation": "Fleetbase\\Sdk\\Services\\PurchaseRateService::createPurchaseRate", - "call": "$result = $fleetbase->purchaseRates->createPurchaseRate(\n [\n 'body' => [\n 'service_quote' => 'service_quote_id-fixture',\n ],\n ],\n []\n);", - "code": "purchaseRates->createPurchaseRate(\n [\n 'body' => [\n 'service_quote' => 'service_quote_id-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->purchaseRates->createPurchaseRate(\n [\n 'service_quote' => 'service_quote_id-fixture',\n ]\n);", + "code": "purchaseRates->createPurchaseRate(\n [\n 'service_quote' => 'service_quote_id-fixture',\n ]\n);" }, "fleetbase-api-purchase-rates-query-purchase-rates": { "collection": "Fleetbase API", "group": "Purchase Rates", "name": "Query Purchase Rates", "implementation": "Fleetbase\\Sdk\\Services\\PurchaseRateService::queryPurchaseRates", - "call": "$result = $fleetbase->purchaseRates->queryPurchaseRates(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "purchaseRates->queryPurchaseRates(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->purchaseRates->queryPurchaseRates(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "purchaseRates->queryPurchaseRates(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-purchase-rates-retrieve-a-purchase-rate": { "collection": "Fleetbase API", "group": "Purchase Rates", "name": "Retrieve a Purchase Rate", "implementation": "Fleetbase\\Sdk\\Services\\PurchaseRateService::retrievePurchaseRate", - "call": "$result = $fleetbase->purchaseRates->retrievePurchaseRate(\n [\n 'id' => 'purchase_rate_id-fixture',\n ],\n []\n);", - "code": "purchaseRates->retrievePurchaseRate(\n [\n 'id' => 'purchase_rate_id-fixture',\n ],\n []\n);" + "variables": { + "purchaseRateId": "purchase_rate_id-fixture" + }, + "call": "$result = $fleetbase->purchaseRates->retrievePurchaseRate($purchaseRateId);", + "code": "purchaseRates->retrievePurchaseRate($purchaseRateId);" }, "fleetbase-api-sensors-create-a-sensor": { "collection": "Fleetbase API", "group": "Sensors", "name": "Create a Sensor", "implementation": "Fleetbase\\Sdk\\Services\\SensorService::createSensor", - "call": "$result = $fleetbase->sensors->createSensor(\n [\n 'body' => [\n 'name' => 'Cargo Temperature',\n 'type' => 'temperature',\n 'device' => 'device_id-fixture',\n 'unit' => 'celsius',\n 'status' => 'active',\n 'min_threshold' => 0,\n 'max_threshold' => 8,\n ],\n ],\n []\n);", - "code": "sensors->createSensor(\n [\n 'body' => [\n 'name' => 'Cargo Temperature',\n 'type' => 'temperature',\n 'device' => 'device_id-fixture',\n 'unit' => 'celsius',\n 'status' => 'active',\n 'min_threshold' => 0,\n 'max_threshold' => 8,\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->sensors->createSensor(\n [\n 'name' => 'Cargo Temperature',\n 'type' => 'temperature',\n 'device' => 'device_id-fixture',\n 'unit' => 'celsius',\n 'status' => 'active',\n 'min_threshold' => 0,\n 'max_threshold' => 8,\n ]\n);", + "code": "sensors->createSensor(\n [\n 'name' => 'Cargo Temperature',\n 'type' => 'temperature',\n 'device' => 'device_id-fixture',\n 'unit' => 'celsius',\n 'status' => 'active',\n 'min_threshold' => 0,\n 'max_threshold' => 8,\n ]\n);" }, "fleetbase-api-sensors-delete-a-sensor": { "collection": "Fleetbase API", "group": "Sensors", "name": "Delete a Sensor", "implementation": "Fleetbase\\Sdk\\Services\\SensorService::deleteSensor", - "call": "$result = $fleetbase->sensors->deleteSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n ],\n []\n);", - "code": "sensors->deleteSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n ],\n []\n);" + "variables": { + "sensorId": "sensor_id-fixture" + }, + "call": "$result = $fleetbase->sensors->deleteSensor($sensorId);", + "code": "sensors->deleteSensor($sensorId);" }, "fleetbase-api-sensors-query-sensors": { "collection": "Fleetbase API", "group": "Sensors", "name": "Query Sensors", "implementation": "Fleetbase\\Sdk\\Services\\SensorService::querySensors", - "call": "$result = $fleetbase->sensors->querySensors(\n [],\n []\n);", - "code": "sensors->querySensors(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->sensors->querySensors();", + "code": "sensors->querySensors();" }, "fleetbase-api-sensors-retrieve-a-sensor": { "collection": "Fleetbase API", "group": "Sensors", "name": "Retrieve a Sensor", "implementation": "Fleetbase\\Sdk\\Services\\SensorService::retrieveSensor", - "call": "$result = $fleetbase->sensors->retrieveSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n ],\n []\n);", - "code": "sensors->retrieveSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n ],\n []\n);" + "variables": { + "sensorId": "sensor_id-fixture" + }, + "call": "$result = $fleetbase->sensors->retrieveSensor($sensorId);", + "code": "sensors->retrieveSensor($sensorId);" }, "fleetbase-api-sensors-update-a-sensor": { "collection": "Fleetbase API", "group": "Sensors", "name": "Update a Sensor", "implementation": "Fleetbase\\Sdk\\Services\\SensorService::updateSensor", - "call": "$result = $fleetbase->sensors->updateSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n 'body' => [\n 'last_value' => '4.2',\n 'last_reading_at' => '2026-05-07T08:30:00Z',\n ],\n ],\n []\n);", - "code": "sensors->updateSensor(\n [\n 'sensor_id' => 'sensor_id-fixture',\n 'body' => [\n 'last_value' => '4.2',\n 'last_reading_at' => '2026-05-07T08:30:00Z',\n ],\n ],\n []\n);" + "variables": { + "sensorId": "sensor_id-fixture" + }, + "call": "$result = $fleetbase->sensors->updateSensor(\n $sensorId,\n [\n 'last_value' => '4.2',\n 'last_reading_at' => '2026-05-07T08:30:00Z',\n ]\n);", + "code": "sensors->updateSensor(\n $sensorId,\n [\n 'last_value' => '4.2',\n 'last_reading_at' => '2026-05-07T08:30:00Z',\n ]\n);" }, "fleetbase-api-service-areas-create-a-service-area": { "collection": "Fleetbase API", "group": "Service Areas", "name": "Create a Service Area", "implementation": "Fleetbase\\Sdk\\Services\\ServiceAreaService::createServiceArea", - "call": "$result = $fleetbase->serviceAreas->createServiceArea(\n [\n 'body' => [\n 'name' => 'Singapore',\n 'type' => 'city',\n 'latitude' => '1.3521',\n 'longitude' => '103.8198',\n 'radius' => '30000',\n 'country' => 'SG',\n 'status' => 'active',\n ],\n ],\n []\n);", - "code": "serviceAreas->createServiceArea(\n [\n 'body' => [\n 'name' => 'Singapore',\n 'type' => 'city',\n 'latitude' => '1.3521',\n 'longitude' => '103.8198',\n 'radius' => '30000',\n 'country' => 'SG',\n 'status' => 'active',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->serviceAreas->createServiceArea(\n [\n 'name' => 'Singapore',\n 'type' => 'city',\n 'latitude' => '1.3521',\n 'longitude' => '103.8198',\n 'radius' => '30000',\n 'country' => 'SG',\n 'status' => 'active',\n ]\n);", + "code": "serviceAreas->createServiceArea(\n [\n 'name' => 'Singapore',\n 'type' => 'city',\n 'latitude' => '1.3521',\n 'longitude' => '103.8198',\n 'radius' => '30000',\n 'country' => 'SG',\n 'status' => 'active',\n ]\n);" }, "fleetbase-api-service-areas-delete-a-service-area": { "collection": "Fleetbase API", "group": "Service Areas", "name": "Delete a Service Area", "implementation": "Fleetbase\\Sdk\\Services\\ServiceAreaService::deleteServiceArea", - "call": "$result = $fleetbase->serviceAreas->deleteServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n ],\n []\n);", - "code": "serviceAreas->deleteServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n ],\n []\n);" + "variables": { + "serviceAreaId": "service_area_id-fixture" + }, + "call": "$result = $fleetbase->serviceAreas->deleteServiceArea($serviceAreaId);", + "code": "serviceAreas->deleteServiceArea($serviceAreaId);" }, "fleetbase-api-service-areas-query-service-areas": { "collection": "Fleetbase API", "group": "Service Areas", "name": "Query Service Areas", "implementation": "Fleetbase\\Sdk\\Services\\ServiceAreaService::queryServiceAreas", - "call": "$result = $fleetbase->serviceAreas->queryServiceAreas(\n [],\n [\n 'query' => [\n 'name' => 'service_area_name-fixture',\n ],\n ]\n);", - "code": "serviceAreas->queryServiceAreas(\n [],\n [\n 'query' => [\n 'name' => 'service_area_name-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->serviceAreas->queryServiceAreas(\n [\n 'name' => 'service_area_name-fixture',\n ]\n);", + "code": "serviceAreas->queryServiceAreas(\n [\n 'name' => 'service_area_name-fixture',\n ]\n);" }, "fleetbase-api-service-areas-retrieve-a-service-area": { "collection": "Fleetbase API", "group": "Service Areas", "name": "Retrieve a Service Area", "implementation": "Fleetbase\\Sdk\\Services\\ServiceAreaService::retrieveServiceArea", - "call": "$result = $fleetbase->serviceAreas->retrieveServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n ],\n []\n);", - "code": "serviceAreas->retrieveServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n ],\n []\n);" + "variables": { + "serviceAreaId": "service_area_id-fixture" + }, + "call": "$result = $fleetbase->serviceAreas->retrieveServiceArea($serviceAreaId);", + "code": "serviceAreas->retrieveServiceArea($serviceAreaId);" }, "fleetbase-api-service-areas-update-a-service-area": { "collection": "Fleetbase API", "group": "Service Areas", "name": "Update a Service Area", "implementation": "Fleetbase\\Sdk\\Services\\ServiceAreaService::updateServiceArea", - "call": "$result = $fleetbase->serviceAreas->updateServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n 'body' => [\n 'status' => 'active',\n ],\n ],\n []\n);", - "code": "serviceAreas->updateServiceArea(\n [\n 'id' => 'service_area_id-fixture',\n 'body' => [\n 'status' => 'active',\n ],\n ],\n []\n);" + "variables": { + "serviceAreaId": "service_area_id-fixture" + }, + "call": "$result = $fleetbase->serviceAreas->updateServiceArea(\n $serviceAreaId,\n [\n 'status' => 'active',\n ]\n);", + "code": "serviceAreas->updateServiceArea(\n $serviceAreaId,\n [\n 'status' => 'active',\n ]\n);" }, "fleetbase-api-service-quotes-query-service-quotes": { "collection": "Fleetbase API", "group": "Service Quotes", "name": "Query Service Quotes", "implementation": "Fleetbase\\Sdk\\Services\\ServiceQuoteService::queryServiceQuotes", - "call": "$result = $fleetbase->serviceQuotes->queryServiceQuotes(\n [],\n [\n 'query' => [\n 'payload' => 'payload_id-fixture',\n ],\n ]\n);", - "code": "serviceQuotes->queryServiceQuotes(\n [],\n [\n 'query' => [\n 'payload' => 'payload_id-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->serviceQuotes->queryServiceQuotes(\n [\n 'payload' => 'payload_id-fixture',\n ]\n);", + "code": "serviceQuotes->queryServiceQuotes(\n [\n 'payload' => 'payload_id-fixture',\n ]\n);" }, "fleetbase-api-service-quotes-retrieve-a-service-quote": { "collection": "Fleetbase API", "group": "Service Quotes", "name": "Retrieve a Service Quote", "implementation": "Fleetbase\\Sdk\\Services\\ServiceQuoteService::retrieveServiceQuote", - "call": "$result = $fleetbase->serviceQuotes->retrieveServiceQuote(\n [\n 'id' => 'service_quote_id-fixture',\n ],\n []\n);", - "code": "serviceQuotes->retrieveServiceQuote(\n [\n 'id' => 'service_quote_id-fixture',\n ],\n []\n);" + "variables": { + "serviceQuoteId": "service_quote_id-fixture" + }, + "call": "$result = $fleetbase->serviceQuotes->retrieveServiceQuote($serviceQuoteId);", + "code": "serviceQuotes->retrieveServiceQuote($serviceQuoteId);" }, "fleetbase-api-service-rates-create-a-service-rate": { "collection": "Fleetbase API", "group": "Service Rates", "name": "Create a Service Rate", "implementation": "Fleetbase\\Sdk\\Services\\ServiceRateService::createServiceRate", - "call": "$result = $fleetbase->serviceRates->createServiceRate(\n [\n 'body' => [\n 'service_name' => 'Food Delivery',\n 'service_type' => 'food_delivery',\n 'rate_calculation_method' => 'per_meter',\n 'currency' => 'USD',\n 'base_fee' => 10,\n 'per_meter_unit' => 'km',\n 'per_meter_flat_rate_fee' => 25,\n 'has_cod_fee' => true,\n 'cod_calculation_method' => 'percentage',\n 'cod_flat_fee' => 1,\n 'cod_percent' => 0,\n 'has_peak_hours_fee' => true,\n 'peak_hours_calculation_method' => 'percentage',\n 'peak_hours_flat_fee' => 3,\n 'peak_hours_percent' => 0,\n 'peak_hours_start' => '17:00',\n 'peak_hours_end' => '18:45',\n 'duration_terms' => 'Standard',\n 'estimated_days' => 3,\n ],\n ],\n []\n);", - "code": "serviceRates->createServiceRate(\n [\n 'body' => [\n 'service_name' => 'Food Delivery',\n 'service_type' => 'food_delivery',\n 'rate_calculation_method' => 'per_meter',\n 'currency' => 'USD',\n 'base_fee' => 10,\n 'per_meter_unit' => 'km',\n 'per_meter_flat_rate_fee' => 25,\n 'has_cod_fee' => true,\n 'cod_calculation_method' => 'percentage',\n 'cod_flat_fee' => 1,\n 'cod_percent' => 0,\n 'has_peak_hours_fee' => true,\n 'peak_hours_calculation_method' => 'percentage',\n 'peak_hours_flat_fee' => 3,\n 'peak_hours_percent' => 0,\n 'peak_hours_start' => '17:00',\n 'peak_hours_end' => '18:45',\n 'duration_terms' => 'Standard',\n 'estimated_days' => 3,\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->serviceRates->createServiceRate(\n [\n 'service_name' => 'Food Delivery',\n 'service_type' => 'food_delivery',\n 'rate_calculation_method' => 'per_meter',\n 'currency' => 'USD',\n 'base_fee' => 10,\n 'per_meter_unit' => 'km',\n 'per_meter_flat_rate_fee' => 25,\n 'has_cod_fee' => true,\n 'cod_calculation_method' => 'percentage',\n 'cod_flat_fee' => 1,\n 'cod_percent' => 0,\n 'has_peak_hours_fee' => true,\n 'peak_hours_calculation_method' => 'percentage',\n 'peak_hours_flat_fee' => 3,\n 'peak_hours_percent' => 0,\n 'peak_hours_start' => '17:00',\n 'peak_hours_end' => '18:45',\n 'duration_terms' => 'Standard',\n 'estimated_days' => 3,\n ]\n);", + "code": "serviceRates->createServiceRate(\n [\n 'service_name' => 'Food Delivery',\n 'service_type' => 'food_delivery',\n 'rate_calculation_method' => 'per_meter',\n 'currency' => 'USD',\n 'base_fee' => 10,\n 'per_meter_unit' => 'km',\n 'per_meter_flat_rate_fee' => 25,\n 'has_cod_fee' => true,\n 'cod_calculation_method' => 'percentage',\n 'cod_flat_fee' => 1,\n 'cod_percent' => 0,\n 'has_peak_hours_fee' => true,\n 'peak_hours_calculation_method' => 'percentage',\n 'peak_hours_flat_fee' => 3,\n 'peak_hours_percent' => 0,\n 'peak_hours_start' => '17:00',\n 'peak_hours_end' => '18:45',\n 'duration_terms' => 'Standard',\n 'estimated_days' => 3,\n ]\n);" }, "fleetbase-api-service-rates-delete-a-service-rate": { "collection": "Fleetbase API", "group": "Service Rates", "name": "Delete a Service Rate", "implementation": "Fleetbase\\Sdk\\Services\\ServiceRateService::deleteServiceRate", - "call": "$result = $fleetbase->serviceRates->deleteServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n ],\n []\n);", - "code": "serviceRates->deleteServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n ],\n []\n);" + "variables": { + "serviceRateId": "service_rate_id-fixture" + }, + "call": "$result = $fleetbase->serviceRates->deleteServiceRate($serviceRateId);", + "code": "serviceRates->deleteServiceRate($serviceRateId);" }, "fleetbase-api-service-rates-query-service-rates": { "collection": "Fleetbase API", "group": "Service Rates", "name": "Query Service Rates", "implementation": "Fleetbase\\Sdk\\Services\\ServiceRateService::queryServiceRates", - "call": "$result = $fleetbase->serviceRates->queryServiceRates(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'currency' => 'USD',\n ],\n ]\n);", - "code": "serviceRates->queryServiceRates(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'currency' => 'USD',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->serviceRates->queryServiceRates(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'currency' => 'USD',\n ]\n);", + "code": "serviceRates->queryServiceRates(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'currency' => 'USD',\n ]\n);" }, "fleetbase-api-service-rates-retrieve-a-service-rate": { "collection": "Fleetbase API", "group": "Service Rates", "name": "Retrieve a Service Rate", "implementation": "Fleetbase\\Sdk\\Services\\ServiceRateService::retrieveServiceRate", - "call": "$result = $fleetbase->serviceRates->retrieveServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n ],\n []\n);", - "code": "serviceRates->retrieveServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n ],\n []\n);" + "variables": { + "serviceRateId": "service_rate_id-fixture" + }, + "call": "$result = $fleetbase->serviceRates->retrieveServiceRate($serviceRateId);", + "code": "serviceRates->retrieveServiceRate($serviceRateId);" }, "fleetbase-api-service-rates-update-a-service-rate": { "collection": "Fleetbase API", "group": "Service Rates", "name": "Update a Service Rate", "implementation": "Fleetbase\\Sdk\\Services\\ServiceRateService::updateServiceRate", - "call": "$result = $fleetbase->serviceRates->updateServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n 'body' => [\n 'currency' => 'SGD',\n 'base_fee' => 12.66,\n 'estimated_days' => 6,\n ],\n ],\n []\n);", - "code": "serviceRates->updateServiceRate(\n [\n 'id' => 'service_rate_id-fixture',\n 'body' => [\n 'currency' => 'SGD',\n 'base_fee' => 12.66,\n 'estimated_days' => 6,\n ],\n ],\n []\n);" + "variables": { + "serviceRateId": "service_rate_id-fixture" + }, + "call": "$result = $fleetbase->serviceRates->updateServiceRate(\n $serviceRateId,\n [\n 'currency' => 'SGD',\n 'base_fee' => 12.66,\n 'estimated_days' => 6,\n ]\n);", + "code": "serviceRates->updateServiceRate(\n $serviceRateId,\n [\n 'currency' => 'SGD',\n 'base_fee' => 12.66,\n 'estimated_days' => 6,\n ]\n);" }, "fleetbase-api-tracking-numbers-create-a-tracking-number": { "collection": "Fleetbase API", "group": "Tracking Numbers", "name": "Create a Tracking Number", "implementation": "Fleetbase\\Sdk\\Services\\TrackingNumberService::createTrackingNumber", - "call": "$result = $fleetbase->trackingNumbers->createTrackingNumber(\n [\n 'body' => [\n 'region' => 'SG',\n 'owner' => 'order_id-fixture',\n ],\n ],\n []\n);", - "code": "trackingNumbers->createTrackingNumber(\n [\n 'body' => [\n 'region' => 'SG',\n 'owner' => 'order_id-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->trackingNumbers->createTrackingNumber(\n [\n 'region' => 'SG',\n 'owner' => 'order_id-fixture',\n ]\n);", + "code": "trackingNumbers->createTrackingNumber(\n [\n 'region' => 'SG',\n 'owner' => 'order_id-fixture',\n ]\n);" }, "fleetbase-api-tracking-numbers-decode-tracking-number-qr": { "collection": "Fleetbase API", "group": "Tracking Numbers", "name": "Decode Tracking Number QR", "implementation": "Fleetbase\\Sdk\\Services\\TrackingNumberService::decodeTrackingNumberQr", - "call": "$result = $fleetbase->trackingNumbers->decodeTrackingNumberQr(\n [\n 'body' => [\n 'code' => 'qr_code-fixture',\n ],\n ],\n []\n);", - "code": "trackingNumbers->decodeTrackingNumberQr(\n [\n 'body' => [\n 'code' => 'qr_code-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->trackingNumbers->decodeTrackingNumberQr(\n [\n 'code' => 'qr_code-fixture',\n ]\n);", + "code": "trackingNumbers->decodeTrackingNumberQr(\n [\n 'code' => 'qr_code-fixture',\n ]\n);" }, "fleetbase-api-tracking-numbers-delete-a-tracking-number": { "collection": "Fleetbase API", "group": "Tracking Numbers", "name": "Delete a Tracking Number", "implementation": "Fleetbase\\Sdk\\Services\\TrackingNumberService::deleteTrackingNumber", - "call": "$result = $fleetbase->trackingNumbers->deleteTrackingNumber(\n [\n 'id' => 'tracking_number_id-fixture',\n ],\n []\n);", - "code": "trackingNumbers->deleteTrackingNumber(\n [\n 'id' => 'tracking_number_id-fixture',\n ],\n []\n);" + "variables": { + "trackingNumberId": "tracking_number_id-fixture" + }, + "call": "$result = $fleetbase->trackingNumbers->deleteTrackingNumber($trackingNumberId);", + "code": "trackingNumbers->deleteTrackingNumber($trackingNumberId);" }, "fleetbase-api-tracking-numbers-query-tracking-numbers": { "collection": "Fleetbase API", "group": "Tracking Numbers", "name": "Query Tracking Numbers", "implementation": "Fleetbase\\Sdk\\Services\\TrackingNumberService::queryTrackingNumbers", - "call": "$result = $fleetbase->trackingNumbers->queryTrackingNumbers(\n [],\n [\n 'query' => [\n 'query' => 'SG',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "trackingNumbers->queryTrackingNumbers(\n [],\n [\n 'query' => [\n 'query' => 'SG',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->trackingNumbers->queryTrackingNumbers(\n [\n 'query' => 'SG',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "trackingNumbers->queryTrackingNumbers(\n [\n 'query' => 'SG',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-tracking-numbers-retrieve-a-tracking-number": { "collection": "Fleetbase API", "group": "Tracking Numbers", "name": "Retrieve a Tracking Number", "implementation": "Fleetbase\\Sdk\\Services\\TrackingNumberService::retrieveTrackingNumber", - "call": "$result = $fleetbase->trackingNumbers->retrieveTrackingNumber(\n [\n 'id' => 'tracking_number_id-fixture',\n ],\n []\n);", - "code": "trackingNumbers->retrieveTrackingNumber(\n [\n 'id' => 'tracking_number_id-fixture',\n ],\n []\n);" + "variables": { + "trackingNumberId": "tracking_number_id-fixture" + }, + "call": "$result = $fleetbase->trackingNumbers->retrieveTrackingNumber($trackingNumberId);", + "code": "trackingNumbers->retrieveTrackingNumber($trackingNumberId);" }, "fleetbase-api-tracking-statuses-create-a-tracking-status": { "collection": "Fleetbase API", "group": "Tracking Statuses", "name": "Create a Tracking Status", "implementation": "Fleetbase\\Sdk\\Services\\TrackingStatusService::createTrackingStatus", - "call": "$result = $fleetbase->trackingStatuses->createTrackingStatus(\n [\n 'body' => [\n 'status' => 'Delivery is en-route',\n 'code' => 'delivery-en-route',\n 'details' => 'Our driver has picked up your order and is on the way to your address!',\n 'tracking_number' => 'tracking_number_id-fixture',\n 'location' => [\n 1.3521,\n 103.8198,\n ],\n 'city' => 'Singapore',\n ],\n ],\n []\n);", - "code": "trackingStatuses->createTrackingStatus(\n [\n 'body' => [\n 'status' => 'Delivery is en-route',\n 'code' => 'delivery-en-route',\n 'details' => 'Our driver has picked up your order and is on the way to your address!',\n 'tracking_number' => 'tracking_number_id-fixture',\n 'location' => [\n 1.3521,\n 103.8198,\n ],\n 'city' => 'Singapore',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->trackingStatuses->createTrackingStatus(\n [\n 'status' => 'Delivery is en-route',\n 'code' => 'delivery-en-route',\n 'details' => 'Our driver has picked up your order and is on the way to your address!',\n 'tracking_number' => 'tracking_number_id-fixture',\n 'location' => [\n 1.3521,\n 103.8198,\n ],\n 'city' => 'Singapore',\n ]\n);", + "code": "trackingStatuses->createTrackingStatus(\n [\n 'status' => 'Delivery is en-route',\n 'code' => 'delivery-en-route',\n 'details' => 'Our driver has picked up your order and is on the way to your address!',\n 'tracking_number' => 'tracking_number_id-fixture',\n 'location' => [\n 1.3521,\n 103.8198,\n ],\n 'city' => 'Singapore',\n ]\n);" }, "fleetbase-api-tracking-statuses-delete-a-tracking-status": { "collection": "Fleetbase API", "group": "Tracking Statuses", "name": "Delete a Tracking Status", "implementation": "Fleetbase\\Sdk\\Services\\TrackingStatusService::deleteTrackingStatus", - "call": "$result = $fleetbase->trackingStatuses->deleteTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n ],\n []\n);", - "code": "trackingStatuses->deleteTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n ],\n []\n);" + "variables": { + "trackingStatusId": "tracking_status_id-fixture" + }, + "call": "$result = $fleetbase->trackingStatuses->deleteTrackingStatus($trackingStatusId);", + "code": "trackingStatuses->deleteTrackingStatus($trackingStatusId);" }, "fleetbase-api-tracking-statuses-query-tracking-statuses": { "collection": "Fleetbase API", "group": "Tracking Statuses", "name": "Query Tracking Statuses", "implementation": "Fleetbase\\Sdk\\Services\\TrackingStatusService::queryTrackingStatuses", - "call": "$result = $fleetbase->trackingStatuses->queryTrackingStatuses(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'tracking_number' => 'tracking_number_id-fixture',\n ],\n ]\n);", - "code": "trackingStatuses->queryTrackingStatuses(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'tracking_number' => 'tracking_number_id-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->trackingStatuses->queryTrackingStatuses(\n [\n 'limit' => '25',\n 'tracking_number' => 'tracking_number_id-fixture',\n ]\n);", + "code": "trackingStatuses->queryTrackingStatuses(\n [\n 'limit' => '25',\n 'tracking_number' => 'tracking_number_id-fixture',\n ]\n);" }, "fleetbase-api-tracking-statuses-retrieve-a-tracking-status": { "collection": "Fleetbase API", "group": "Tracking Statuses", "name": "Retrieve a Tracking Status", "implementation": "Fleetbase\\Sdk\\Services\\TrackingStatusService::retrieveTrackingStatus", - "call": "$result = $fleetbase->trackingStatuses->retrieveTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n ],\n []\n);", - "code": "trackingStatuses->retrieveTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n ],\n []\n);" + "variables": { + "trackingStatusId": "tracking_status_id-fixture" + }, + "call": "$result = $fleetbase->trackingStatuses->retrieveTrackingStatus($trackingStatusId);", + "code": "trackingStatuses->retrieveTrackingStatus($trackingStatusId);" }, "fleetbase-api-tracking-statuses-update-a-tracking-status": { "collection": "Fleetbase API", "group": "Tracking Statuses", "name": "Update a Tracking Status", "implementation": "Fleetbase\\Sdk\\Services\\TrackingStatusService::updateTrackingStatus", - "call": "$result = $fleetbase->trackingStatuses->updateTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n 'body' => [\n 'country' => 'SG',\n ],\n ],\n []\n);", - "code": "trackingStatuses->updateTrackingStatus(\n [\n 'id' => 'tracking_status_id-fixture',\n 'body' => [\n 'country' => 'SG',\n ],\n ],\n []\n);" + "variables": { + "trackingStatusId": "tracking_status_id-fixture" + }, + "call": "$result = $fleetbase->trackingStatuses->updateTrackingStatus(\n $trackingStatusId,\n [\n 'country' => 'SG',\n ]\n);", + "code": "trackingStatuses->updateTrackingStatus(\n $trackingStatusId,\n [\n 'country' => 'SG',\n ]\n);" }, "fleetbase-api-vehicles-create-a-vehicle": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Create a Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::createVehicle", - "call": "$result = $fleetbase->vehicles->createVehicle(\n [\n 'body' => [\n 'vin' => '1GCGSBEA0G1111111',\n 'year' => 2023,\n 'make' => 'Toyota',\n 'model' => 'Camry',\n 'trim' => 'SE',\n 'plate_number' => 'ABC123',\n 'status' => 'maintenance',\n 'online' => false,\n ],\n ],\n []\n);", - "code": "vehicles->createVehicle(\n [\n 'body' => [\n 'vin' => '1GCGSBEA0G1111111',\n 'year' => 2023,\n 'make' => 'Toyota',\n 'model' => 'Camry',\n 'trim' => 'SE',\n 'plate_number' => 'ABC123',\n 'status' => 'maintenance',\n 'online' => false,\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->vehicles->createVehicle(\n [\n 'vin' => '1GCGSBEA0G1111111',\n 'year' => 2023,\n 'make' => 'Toyota',\n 'model' => 'Camry',\n 'trim' => 'SE',\n 'plate_number' => 'ABC123',\n 'status' => 'maintenance',\n 'online' => false,\n ]\n);", + "code": "vehicles->createVehicle(\n [\n 'vin' => '1GCGSBEA0G1111111',\n 'year' => 2023,\n 'make' => 'Toyota',\n 'model' => 'Camry',\n 'trim' => 'SE',\n 'plate_number' => 'ABC123',\n 'status' => 'maintenance',\n 'online' => false,\n ]\n);" }, "fleetbase-api-vehicles-delete-a-vehicle": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Delete a Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::deleteVehicle", - "call": "$result = $fleetbase->vehicles->deleteVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);", - "code": "vehicles->deleteVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);" + "variables": { + "vehicleId": "vehicle_id-fixture" + }, + "call": "$result = $fleetbase->vehicles->deleteVehicle($vehicleId);", + "code": "vehicles->deleteVehicle($vehicleId);" }, "fleetbase-api-vehicles-query-vehicles": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Query Vehicles", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::queryVehicles", - "call": "$result = $fleetbase->vehicles->queryVehicles(\n [],\n [\n 'query' => [\n 'query' => 'vehicle_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "vehicles->queryVehicles(\n [],\n [\n 'query' => [\n 'query' => 'vehicle_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->vehicles->queryVehicles(\n [\n 'query' => 'vehicle_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "vehicles->queryVehicles(\n [\n 'query' => 'vehicle_name-fixture',\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-api-vehicles-retrieve-a-vehicle": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Retrieve a Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::retrieveVehicle", - "call": "$result = $fleetbase->vehicles->retrieveVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);", - "code": "vehicles->retrieveVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);" + "variables": { + "vehicleId": "vehicle_id-fixture" + }, + "call": "$result = $fleetbase->vehicles->retrieveVehicle($vehicleId);", + "code": "vehicles->retrieveVehicle($vehicleId);" }, "fleetbase-api-vehicles-track-vehicle": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Track Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::trackVehicle", - "call": "$result = $fleetbase->vehicles->trackVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);", - "code": "vehicles->trackVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n ],\n []\n);" + "variables": { + "vehicleId": "vehicle_id-fixture" + }, + "call": "$result = $fleetbase->vehicles->trackVehicle(\n $vehicleId,\n [\n 'latitude' => -19.288195,\n 'longitude' => 146.795965,\n 'speed' => 100,\n ]\n);", + "code": "vehicles->trackVehicle(\n $vehicleId,\n [\n 'latitude' => -19.288195,\n 'longitude' => 146.795965,\n 'speed' => 100,\n ]\n);" }, "fleetbase-api-vehicles-update-a-vehicle": { "collection": "Fleetbase API", "group": "Vehicles", "name": "Update a Vehicle", "implementation": "Fleetbase\\Sdk\\Services\\VehicleService::updateVehicle", - "call": "$result = $fleetbase->vehicles->updateVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n 'body' => [\n 'plate_number' => 'ABC123',\n 'status' => 'operational',\n 'latitude' => 40.7484,\n 'longitude' => -73.9857,\n 'speed' => 90,\n ],\n ],\n []\n);", - "code": "vehicles->updateVehicle(\n [\n 'id' => 'vehicle_id-fixture',\n 'body' => [\n 'plate_number' => 'ABC123',\n 'status' => 'operational',\n 'latitude' => 40.7484,\n 'longitude' => -73.9857,\n 'speed' => 90,\n ],\n ],\n []\n);" + "variables": { + "vehicleId": "vehicle_id-fixture" + }, + "call": "$result = $fleetbase->vehicles->updateVehicle(\n $vehicleId,\n [\n 'plate_number' => 'ABC123',\n 'status' => 'operational',\n 'latitude' => 40.7484,\n 'longitude' => -73.9857,\n 'speed' => 90,\n ]\n);", + "code": "vehicles->updateVehicle(\n $vehicleId,\n [\n 'plate_number' => 'ABC123',\n 'status' => 'operational',\n 'latitude' => 40.7484,\n 'longitude' => -73.9857,\n 'speed' => 90,\n ]\n);" }, "fleetbase-api-vendors-create-a-vendor": { "collection": "Fleetbase API", "group": "Vendors", "name": "Create a Vendor", "implementation": "Fleetbase\\Sdk\\Services\\VendorService::createVendor", - "call": "$result = $fleetbase->vendors->createVendor(\n [\n 'body' => [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ],\n ],\n []\n);", - "code": "vendors->createVendor(\n [\n 'body' => [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->vendors->createVendor(\n [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ]\n);", + "code": "vendors->createVendor(\n [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ]\n);" }, "fleetbase-api-vendors-delete-a-vendor": { "collection": "Fleetbase API", "group": "Vendors", "name": "Delete a Vendor", "implementation": "Fleetbase\\Sdk\\Services\\VendorService::deleteVendor", - "call": "$result = $fleetbase->vendors->deleteVendor(\n [\n 'id' => 'vendor_id-fixture',\n ],\n []\n);", - "code": "vendors->deleteVendor(\n [\n 'id' => 'vendor_id-fixture',\n ],\n []\n);" + "variables": { + "vendorId": "vendor_id-fixture" + }, + "call": "$result = $fleetbase->vendors->deleteVendor($vendorId);", + "code": "vendors->deleteVendor($vendorId);" }, "fleetbase-api-vendors-query-vendors": { "collection": "Fleetbase API", "group": "Vendors", "name": "Query Vendors", "implementation": "Fleetbase\\Sdk\\Services\\VendorService::queryVendors", - "call": "$result = $fleetbase->vendors->queryVendors(\n [],\n [\n 'query' => [\n 'id' => 'vendor_id-fixture',\n ],\n ]\n);", - "code": "vendors->queryVendors(\n [],\n [\n 'query' => [\n 'id' => 'vendor_id-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->vendors->queryVendors(\n [\n 'id' => 'vendor_id-fixture',\n ]\n);", + "code": "vendors->queryVendors(\n [\n 'id' => 'vendor_id-fixture',\n ]\n);" }, "fleetbase-api-vendors-retrieve-a-vendor": { "collection": "Fleetbase API", "group": "Vendors", "name": "Retrieve a Vendor", "implementation": "Fleetbase\\Sdk\\Services\\VendorService::retrieveVendor", - "call": "$result = $fleetbase->vendors->retrieveVendor(\n [\n 'id' => 'vendor_id-fixture',\n ],\n []\n);", - "code": "vendors->retrieveVendor(\n [\n 'id' => 'vendor_id-fixture',\n ],\n []\n);" + "variables": { + "vendorId": "vendor_id-fixture" + }, + "call": "$result = $fleetbase->vendors->retrieveVendor($vendorId);", + "code": "vendors->retrieveVendor($vendorId);" }, "fleetbase-api-vendors-update-a-vendor": { "collection": "Fleetbase API", "group": "Vendors", "name": "Update a Vendor", "implementation": "Fleetbase\\Sdk\\Services\\VendorService::updateVendor", - "call": "$result = $fleetbase->vendors->updateVendor(\n [\n 'id' => 'vendor_id-fixture',\n 'body' => [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ],\n ],\n []\n);", - "code": "vendors->updateVendor(\n [\n 'id' => 'vendor_id-fixture',\n 'body' => [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ],\n ],\n []\n);" + "variables": { + "vendorId": "vendor_id-fixture" + }, + "call": "$result = $fleetbase->vendors->updateVendor(\n $vendorId,\n [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ]\n);", + "code": "vendors->updateVendor(\n $vendorId,\n [\n 'name' => 'ABC Corporation',\n 'type' => 'Supplier',\n 'email' => 'abc@example.com',\n 'phone' => '1234567890',\n ]\n);" }, "fleetbase-api-work-orders-create-a-work-order": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Create a Work Order", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::createWorkOrder", - "call": "$result = $fleetbase->workOrders->createWorkOrder(\n [\n 'body' => [\n 'subject' => 'Replace rear tire',\n 'category' => 'corrective_maintenance',\n 'status' => 'open',\n 'priority' => 'high',\n 'target_type' => 'fleet-ops:vehicle',\n 'target' => 'vehicle_id-fixture',\n 'assignee_type' => 'fleet-ops:vendor',\n 'assignee' => 'vendor_id-fixture',\n ],\n ],\n []\n);", - "code": "workOrders->createWorkOrder(\n [\n 'body' => [\n 'subject' => 'Replace rear tire',\n 'category' => 'corrective_maintenance',\n 'status' => 'open',\n 'priority' => 'high',\n 'target_type' => 'fleet-ops:vehicle',\n 'target' => 'vehicle_id-fixture',\n 'assignee_type' => 'fleet-ops:vendor',\n 'assignee' => 'vendor_id-fixture',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->workOrders->createWorkOrder(\n [\n 'subject' => 'Replace rear tire',\n 'category' => 'corrective_maintenance',\n 'status' => 'open',\n 'priority' => 'high',\n 'target_type' => 'fleet-ops:vehicle',\n 'target' => 'vehicle_id-fixture',\n 'assignee_type' => 'fleet-ops:vendor',\n 'assignee' => 'vendor_id-fixture',\n ]\n);", + "code": "workOrders->createWorkOrder(\n [\n 'subject' => 'Replace rear tire',\n 'category' => 'corrective_maintenance',\n 'status' => 'open',\n 'priority' => 'high',\n 'target_type' => 'fleet-ops:vehicle',\n 'target' => 'vehicle_id-fixture',\n 'assignee_type' => 'fleet-ops:vendor',\n 'assignee' => 'vendor_id-fixture',\n ]\n);" }, "fleetbase-api-work-orders-delete-a-work-order": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Delete a Work Order", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::deleteWorkOrder", - "call": "$result = $fleetbase->workOrders->deleteWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);", - "code": "workOrders->deleteWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);" + "variables": { + "workOrderId": "work_order_id-fixture" + }, + "call": "$result = $fleetbase->workOrders->deleteWorkOrder($workOrderId);", + "code": "workOrders->deleteWorkOrder($workOrderId);" }, "fleetbase-api-work-orders-query-work-orders": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Query Work Orders", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::queryWorkOrders", - "call": "$result = $fleetbase->workOrders->queryWorkOrders(\n [],\n []\n);", - "code": "workOrders->queryWorkOrders(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->workOrders->queryWorkOrders();", + "code": "workOrders->queryWorkOrders();" }, "fleetbase-api-work-orders-retrieve-a-work-order": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Retrieve a Work Order", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::retrieveWorkOrder", - "call": "$result = $fleetbase->workOrders->retrieveWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);", - "code": "workOrders->retrieveWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);" + "variables": { + "workOrderId": "work_order_id-fixture" + }, + "call": "$result = $fleetbase->workOrders->retrieveWorkOrder($workOrderId);", + "code": "workOrders->retrieveWorkOrder($workOrderId);" }, "fleetbase-api-work-orders-send-work-order": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Send Work Order", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::sendWorkOrder", - "call": "$result = $fleetbase->workOrders->sendWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);", - "code": "workOrders->sendWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n ],\n []\n);" + "variables": { + "workOrderId": "work_order_id-fixture" + }, + "call": "$result = $fleetbase->workOrders->sendWorkOrder($workOrderId);", + "code": "workOrders->sendWorkOrder($workOrderId);" }, "fleetbase-api-work-orders-update-a-work-order": { "collection": "Fleetbase API", "group": "Work Orders", "name": "Update a Work Order", "implementation": "Fleetbase\\Sdk\\Services\\WorkOrderService::updateWorkOrder", - "call": "$result = $fleetbase->workOrders->updateWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n 'body' => [\n 'status' => 'in_progress',\n ],\n ],\n []\n);", - "code": "workOrders->updateWorkOrder(\n [\n 'work_order_id' => 'work_order_id-fixture',\n 'body' => [\n 'status' => 'in_progress',\n ],\n ],\n []\n);" + "variables": { + "workOrderId": "work_order_id-fixture" + }, + "call": "$result = $fleetbase->workOrders->updateWorkOrder(\n $workOrderId,\n [\n 'status' => 'in_progress',\n ]\n);", + "code": "workOrders->updateWorkOrder(\n $workOrderId,\n [\n 'status' => 'in_progress',\n ]\n);" }, "fleetbase-api-zones-create-a-zone": { "collection": "Fleetbase API", "group": "Zones", "name": "Create a Zone", "implementation": "Fleetbase\\Sdk\\Services\\ZoneService::createZone", - "call": "$result = $fleetbase->zones->createZone(\n [\n 'body' => [\n 'name' => 'Center of Singapore',\n 'service_area' => 'service_area_id-fixture',\n 'color' => '#66e0ff',\n 'stroke_color' => '#00bfff',\n 'border' => [\n 'type' => 'Polygon',\n 'bbox' => [\n 103.867493,\n 1.35085,\n 103.912125,\n 1.383113,\n ],\n 'coordinates' => [\n [\n [\n 103.907661,\n 1.362863,\n ],\n [\n 103.892555,\n 1.357714,\n ],\n [\n 103.891525,\n 1.353252,\n ],\n [\n 103.883629,\n 1.35085,\n ],\n [\n 103.874702,\n 1.351193,\n ],\n [\n 103.870583,\n 1.358744,\n ],\n [\n 103.867493,\n 1.368354,\n ],\n [\n 103.870926,\n 1.377621,\n ],\n [\n 103.875732,\n 1.38174,\n ],\n [\n 103.886032,\n 1.383113,\n ],\n [\n 103.900452,\n 1.383113,\n ],\n [\n 103.909721,\n 1.381397,\n ],\n [\n 103.912125,\n 1.374189,\n ],\n [\n 103.907661,\n 1.362863,\n ],\n ],\n ],\n ],\n ],\n ],\n []\n);", - "code": "zones->createZone(\n [\n 'body' => [\n 'name' => 'Center of Singapore',\n 'service_area' => 'service_area_id-fixture',\n 'color' => '#66e0ff',\n 'stroke_color' => '#00bfff',\n 'border' => [\n 'type' => 'Polygon',\n 'bbox' => [\n 103.867493,\n 1.35085,\n 103.912125,\n 1.383113,\n ],\n 'coordinates' => [\n [\n [\n 103.907661,\n 1.362863,\n ],\n [\n 103.892555,\n 1.357714,\n ],\n [\n 103.891525,\n 1.353252,\n ],\n [\n 103.883629,\n 1.35085,\n ],\n [\n 103.874702,\n 1.351193,\n ],\n [\n 103.870583,\n 1.358744,\n ],\n [\n 103.867493,\n 1.368354,\n ],\n [\n 103.870926,\n 1.377621,\n ],\n [\n 103.875732,\n 1.38174,\n ],\n [\n 103.886032,\n 1.383113,\n ],\n [\n 103.900452,\n 1.383113,\n ],\n [\n 103.909721,\n 1.381397,\n ],\n [\n 103.912125,\n 1.374189,\n ],\n [\n 103.907661,\n 1.362863,\n ],\n ],\n ],\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->zones->createZone(\n [\n 'name' => 'Center of Singapore',\n 'service_area' => 'service_area_id-fixture',\n 'color' => '#66e0ff',\n 'stroke_color' => '#00bfff',\n 'border' => [\n 'type' => 'Polygon',\n 'bbox' => [\n 103.867493,\n 1.35085,\n 103.912125,\n 1.383113,\n ],\n 'coordinates' => [\n [\n [\n 103.907661,\n 1.362863,\n ],\n [\n 103.892555,\n 1.357714,\n ],\n [\n 103.891525,\n 1.353252,\n ],\n [\n 103.883629,\n 1.35085,\n ],\n [\n 103.874702,\n 1.351193,\n ],\n [\n 103.870583,\n 1.358744,\n ],\n [\n 103.867493,\n 1.368354,\n ],\n [\n 103.870926,\n 1.377621,\n ],\n [\n 103.875732,\n 1.38174,\n ],\n [\n 103.886032,\n 1.383113,\n ],\n [\n 103.900452,\n 1.383113,\n ],\n [\n 103.909721,\n 1.381397,\n ],\n [\n 103.912125,\n 1.374189,\n ],\n [\n 103.907661,\n 1.362863,\n ],\n ],\n ],\n ],\n ]\n);", + "code": "zones->createZone(\n [\n 'name' => 'Center of Singapore',\n 'service_area' => 'service_area_id-fixture',\n 'color' => '#66e0ff',\n 'stroke_color' => '#00bfff',\n 'border' => [\n 'type' => 'Polygon',\n 'bbox' => [\n 103.867493,\n 1.35085,\n 103.912125,\n 1.383113,\n ],\n 'coordinates' => [\n [\n [\n 103.907661,\n 1.362863,\n ],\n [\n 103.892555,\n 1.357714,\n ],\n [\n 103.891525,\n 1.353252,\n ],\n [\n 103.883629,\n 1.35085,\n ],\n [\n 103.874702,\n 1.351193,\n ],\n [\n 103.870583,\n 1.358744,\n ],\n [\n 103.867493,\n 1.368354,\n ],\n [\n 103.870926,\n 1.377621,\n ],\n [\n 103.875732,\n 1.38174,\n ],\n [\n 103.886032,\n 1.383113,\n ],\n [\n 103.900452,\n 1.383113,\n ],\n [\n 103.909721,\n 1.381397,\n ],\n [\n 103.912125,\n 1.374189,\n ],\n [\n 103.907661,\n 1.362863,\n ],\n ],\n ],\n ],\n ]\n);" }, "fleetbase-api-zones-delete-a-zone": { "collection": "Fleetbase API", "group": "Zones", "name": "Delete a Zone", "implementation": "Fleetbase\\Sdk\\Services\\ZoneService::deleteZone", - "call": "$result = $fleetbase->zones->deleteZone(\n [\n 'id' => 'zone_id-fixture',\n ],\n []\n);", - "code": "zones->deleteZone(\n [\n 'id' => 'zone_id-fixture',\n ],\n []\n);" + "variables": { + "zoneId": "zone_id-fixture" + }, + "call": "$result = $fleetbase->zones->deleteZone($zoneId);", + "code": "zones->deleteZone($zoneId);" }, "fleetbase-api-zones-query-zones": { "collection": "Fleetbase API", "group": "Zones", "name": "Query Zones", "implementation": "Fleetbase\\Sdk\\Services\\ZoneService::queryZones", - "call": "$result = $fleetbase->zones->queryZones(\n [],\n [\n 'query' => [\n 'name' => 'zone_name-fixture',\n ],\n ]\n);", - "code": "zones->queryZones(\n [],\n [\n 'query' => [\n 'name' => 'zone_name-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->zones->queryZones(\n [\n 'name' => 'zone_name-fixture',\n ]\n);", + "code": "zones->queryZones(\n [\n 'name' => 'zone_name-fixture',\n ]\n);" }, "fleetbase-api-zones-retrieve-a-zone": { "collection": "Fleetbase API", "group": "Zones", "name": "Retrieve a zone", "implementation": "Fleetbase\\Sdk\\Services\\ZoneService::retrieveZone", - "call": "$result = $fleetbase->zones->retrieveZone(\n [\n 'id' => 'zone_id-fixture',\n ],\n []\n);", - "code": "zones->retrieveZone(\n [\n 'id' => 'zone_id-fixture',\n ],\n []\n);" + "variables": { + "zoneId": "zone_id-fixture" + }, + "call": "$result = $fleetbase->zones->retrieveZone($zoneId);", + "code": "zones->retrieveZone($zoneId);" }, "fleetbase-api-zones-update-a-zone": { "collection": "Fleetbase API", "group": "Zones", "name": "Update a Zone", "implementation": "Fleetbase\\Sdk\\Services\\ZoneService::updateZone", - "call": "$result = $fleetbase->zones->updateZone(\n [\n 'id' => 'zone_id-fixture',\n 'body' => [\n 'color' => '#ff00000',\n ],\n ],\n []\n);", - "code": "zones->updateZone(\n [\n 'id' => 'zone_id-fixture',\n 'body' => [\n 'color' => '#ff00000',\n ],\n ],\n []\n);" + "variables": { + "zoneId": "zone_id-fixture" + }, + "call": "$result = $fleetbase->zones->updateZone(\n $zoneId,\n [\n 'color' => '#ff00000',\n ]\n);", + "code": "zones->updateZone(\n $zoneId,\n [\n 'color' => '#ff00000',\n ]\n);" }, "fleetbase-core-api-chat-channels-add-participant": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Add Participant", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::addParticipant", - "call": "$result = $fleetbase->chatChannels->addParticipant(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'user' => 'user_id-fixture',\n ],\n ],\n []\n);", - "code": "chatChannels->addParticipant(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'user' => 'user_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "chatChannelId": "chat_channel_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->addParticipant(\n $chatChannelId,\n [\n 'user' => 'user_id-fixture',\n ]\n);", + "code": "chatChannels->addParticipant(\n $chatChannelId,\n [\n 'user' => 'user_id-fixture',\n ]\n);" }, "fleetbase-core-api-chat-channels-create-chat-channel": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Create Chat Channel", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::createChatChannel", - "call": "$result = $fleetbase->chatChannels->createChatChannel(\n [\n 'body' => [\n 'name' => 'Dispatch',\n 'participants' => [\n 'user_id-fixture',\n ],\n ],\n ],\n []\n);", - "code": "chatChannels->createChatChannel(\n [\n 'body' => [\n 'name' => 'Dispatch',\n 'participants' => [\n 'user_id-fixture',\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->chatChannels->createChatChannel(\n [\n 'name' => 'Dispatch',\n 'participants' => [\n 'user_id-fixture',\n ],\n ]\n);", + "code": "chatChannels->createChatChannel(\n [\n 'name' => 'Dispatch',\n 'participants' => [\n 'user_id-fixture',\n ],\n ]\n);" }, "fleetbase-core-api-chat-channels-create-read-receipt": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Create Read Receipt", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::createReadReceipt", - "call": "$result = $fleetbase->chatChannels->createReadReceipt(\n [\n 'chatMessageId' => 'chat_message_id-fixture',\n 'body' => [\n 'participant' => 'chat_participant_id-fixture',\n ],\n ],\n []\n);", - "code": "chatChannels->createReadReceipt(\n [\n 'chatMessageId' => 'chat_message_id-fixture',\n 'body' => [\n 'participant' => 'chat_participant_id-fixture',\n ],\n ],\n []\n);" + "variables": { + "chatMessageId": "chat_message_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->createReadReceipt(\n $chatMessageId,\n [\n 'participant' => 'chat_participant_id-fixture',\n ]\n);", + "code": "chatChannels->createReadReceipt(\n $chatMessageId,\n [\n 'participant' => 'chat_participant_id-fixture',\n ]\n);" }, "fleetbase-core-api-chat-channels-delete-chat-channel": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Delete Chat Channel", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::deleteChatChannel", - "call": "$result = $fleetbase->chatChannels->deleteChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n ],\n []\n);", - "code": "chatChannels->deleteChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n ],\n []\n);" + "variables": { + "chatChannelId": "chat_channel_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->deleteChatChannel($chatChannelId);", + "code": "chatChannels->deleteChatChannel($chatChannelId);" }, "fleetbase-core-api-chat-channels-delete-message": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Delete Message", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::deleteMessage", - "call": "$result = $fleetbase->chatChannels->deleteMessage(\n [\n 'chatMessageId' => 'chat_message_id-fixture',\n ],\n []\n);", - "code": "chatChannels->deleteMessage(\n [\n 'chatMessageId' => 'chat_message_id-fixture',\n ],\n []\n);" + "variables": { + "chatMessageId": "chat_message_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->deleteMessage($chatMessageId);", + "code": "chatChannels->deleteMessage($chatMessageId);" }, "fleetbase-core-api-chat-channels-list-available-participants": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "List Available Participants", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::listAvailableParticipants", - "call": "$result = $fleetbase->chatChannels->listAvailableParticipants(\n [],\n [\n 'query' => [\n 'channel' => 'chat_channel_id-fixture',\n ],\n ]\n);", - "code": "chatChannels->listAvailableParticipants(\n [],\n [\n 'query' => [\n 'channel' => 'chat_channel_id-fixture',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->chatChannels->listAvailableParticipants(\n [\n 'channel' => 'chat_channel_id-fixture',\n ]\n);", + "code": "chatChannels->listAvailableParticipants(\n [\n 'channel' => 'chat_channel_id-fixture',\n ]\n);" }, "fleetbase-core-api-chat-channels-query-chat-channels": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Query Chat Channels", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::queryChatChannels", - "call": "$result = $fleetbase->chatChannels->queryChatChannels(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "chatChannels->queryChatChannels(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->chatChannels->queryChatChannels(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "chatChannels->queryChatChannels(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-core-api-chat-channels-remove-participant": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Remove Participant", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::removeParticipant", - "call": "$result = $fleetbase->chatChannels->removeParticipant(\n [\n 'participantId' => 'chat_participant_id-fixture',\n ],\n []\n);", - "code": "chatChannels->removeParticipant(\n [\n 'participantId' => 'chat_participant_id-fixture',\n ],\n []\n);" + "variables": { + "participantId": "chat_participant_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->removeParticipant($participantId);", + "code": "chatChannels->removeParticipant($participantId);" }, "fleetbase-core-api-chat-channels-retrieve-chat-channel": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Retrieve Chat Channel", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::retrieveChatChannel", - "call": "$result = $fleetbase->chatChannels->retrieveChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n ],\n []\n);", - "code": "chatChannels->retrieveChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n ],\n []\n);" + "variables": { + "chatChannelId": "chat_channel_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->retrieveChatChannel($chatChannelId);", + "code": "chatChannels->retrieveChatChannel($chatChannelId);" }, "fleetbase-core-api-chat-channels-send-message": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Send Message", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::sendMessage", - "call": "$result = $fleetbase->chatChannels->sendMessage(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'sender' => 'chat_participant_id-fixture',\n 'content' => 'Hello from Fleetbase API',\n 'files' => [],\n ],\n ],\n []\n);", - "code": "chatChannels->sendMessage(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'sender' => 'chat_participant_id-fixture',\n 'content' => 'Hello from Fleetbase API',\n 'files' => [],\n ],\n ],\n []\n);" + "variables": { + "chatChannelId": "chat_channel_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->sendMessage(\n $chatChannelId,\n [\n 'sender' => 'chat_participant_id-fixture',\n 'content' => 'Hello from Fleetbase API',\n 'files' => [],\n ]\n);", + "code": "chatChannels->sendMessage(\n $chatChannelId,\n [\n 'sender' => 'chat_participant_id-fixture',\n 'content' => 'Hello from Fleetbase API',\n 'files' => [],\n ]\n);" }, "fleetbase-core-api-chat-channels-update-chat-channel": { "collection": "Fleetbase Core API", "group": "Chat Channels", "name": "Update Chat Channel", "implementation": "Fleetbase\\Sdk\\Services\\ChatChannelService::updateChatChannel", - "call": "$result = $fleetbase->chatChannels->updateChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'name' => 'Dispatch Updates',\n ],\n ],\n []\n);", - "code": "chatChannels->updateChatChannel(\n [\n 'id' => 'chat_channel_id-fixture',\n 'body' => [\n 'name' => 'Dispatch Updates',\n ],\n ],\n []\n);" + "variables": { + "chatChannelId": "chat_channel_id-fixture" + }, + "call": "$result = $fleetbase->chatChannels->updateChatChannel(\n $chatChannelId,\n [\n 'name' => 'Dispatch Updates',\n ]\n);", + "code": "chatChannels->updateChatChannel(\n $chatChannelId,\n [\n 'name' => 'Dispatch Updates',\n ]\n);" }, "fleetbase-core-api-comments-create-comment": { "collection": "Fleetbase Core API", "group": "Comments", "name": "Create Comment", "implementation": "Fleetbase\\Sdk\\Services\\CommentService::createComment", - "call": "$result = $fleetbase->comments->createComment(\n [\n 'body' => [\n 'content' => 'Example comment',\n 'subject' => [\n 'id' => 'file_id-fixture',\n 'type' => 'file',\n ],\n ],\n ],\n []\n);", - "code": "comments->createComment(\n [\n 'body' => [\n 'content' => 'Example comment',\n 'subject' => [\n 'id' => 'file_id-fixture',\n 'type' => 'file',\n ],\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->comments->createComment(\n [\n 'content' => 'Example comment',\n 'subject' => [\n 'id' => 'file_id-fixture',\n 'type' => 'file',\n ],\n ]\n);", + "code": "comments->createComment(\n [\n 'content' => 'Example comment',\n 'subject' => [\n 'id' => 'file_id-fixture',\n 'type' => 'file',\n ],\n ]\n);" }, "fleetbase-core-api-comments-delete-comment": { "collection": "Fleetbase Core API", "group": "Comments", "name": "Delete Comment", "implementation": "Fleetbase\\Sdk\\Services\\CommentService::deleteComment", - "call": "$result = $fleetbase->comments->deleteComment(\n [\n 'id' => 'comment_id-fixture',\n ],\n []\n);", - "code": "comments->deleteComment(\n [\n 'id' => 'comment_id-fixture',\n ],\n []\n);" + "variables": { + "commentId": "comment_id-fixture" + }, + "call": "$result = $fleetbase->comments->deleteComment($commentId);", + "code": "comments->deleteComment($commentId);" }, "fleetbase-core-api-comments-query-comments": { "collection": "Fleetbase Core API", "group": "Comments", "name": "Query Comments", "implementation": "Fleetbase\\Sdk\\Services\\CommentService::queryComments", - "call": "$result = $fleetbase->comments->queryComments(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "comments->queryComments(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->comments->queryComments(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "comments->queryComments(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-core-api-comments-retrieve-comment": { "collection": "Fleetbase Core API", "group": "Comments", "name": "Retrieve Comment", "implementation": "Fleetbase\\Sdk\\Services\\CommentService::retrieveComment", - "call": "$result = $fleetbase->comments->retrieveComment(\n [\n 'id' => 'comment_id-fixture',\n ],\n []\n);", - "code": "comments->retrieveComment(\n [\n 'id' => 'comment_id-fixture',\n ],\n []\n);" + "variables": { + "commentId": "comment_id-fixture" + }, + "call": "$result = $fleetbase->comments->retrieveComment($commentId);", + "code": "comments->retrieveComment($commentId);" }, "fleetbase-core-api-comments-update-comment": { "collection": "Fleetbase Core API", "group": "Comments", "name": "Update Comment", "implementation": "Fleetbase\\Sdk\\Services\\CommentService::updateComment", - "call": "$result = $fleetbase->comments->updateComment(\n [\n 'id' => 'comment_id-fixture',\n 'body' => [\n 'content' => 'Updated comment',\n ],\n ],\n []\n);", - "code": "comments->updateComment(\n [\n 'id' => 'comment_id-fixture',\n 'body' => [\n 'content' => 'Updated comment',\n ],\n ],\n []\n);" + "variables": { + "commentId": "comment_id-fixture" + }, + "call": "$result = $fleetbase->comments->updateComment(\n $commentId,\n [\n 'content' => 'Updated comment',\n ]\n);", + "code": "comments->updateComment(\n $commentId,\n [\n 'content' => 'Updated comment',\n ]\n);" }, "fleetbase-core-api-files-delete-a-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Delete a File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::deleteFile", - "call": "$result = $fleetbase->files->deleteFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);", - "code": "files->deleteFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);" + "variables": { + "fileId": "file_id-fixture" + }, + "call": "$result = $fleetbase->files->deleteFile($fileId);", + "code": "files->deleteFile($fileId);" }, "fleetbase-core-api-files-download-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Download File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::downloadFile", - "call": "$result = $fleetbase->files->downloadFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);", - "code": "files->downloadFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);" + "variables": { + "fileId": "file_id-fixture" + }, + "call": "$result = $fleetbase->files->downloadFile($fileId);", + "code": "files->downloadFile($fileId);" }, "fleetbase-core-api-files-query-files": { "collection": "Fleetbase Core API", "group": "Files", "name": "Query Files", "implementation": "Fleetbase\\Sdk\\Services\\FileService::queryFiles", - "call": "$result = $fleetbase->files->queryFiles(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);", - "code": "files->queryFiles(\n [],\n [\n 'query' => [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->files->queryFiles(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);", + "code": "files->queryFiles(\n [\n 'limit' => '25',\n 'offset' => '0',\n 'sort' => 'created_at',\n ]\n);" }, "fleetbase-core-api-files-retrieve-a-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Retrieve a File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::retrieveFile", - "call": "$result = $fleetbase->files->retrieveFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);", - "code": "files->retrieveFile(\n [\n 'id' => 'file_id-fixture',\n ],\n []\n);" + "variables": { + "fileId": "file_id-fixture" + }, + "call": "$result = $fleetbase->files->retrieveFile($fileId);", + "code": "files->retrieveFile($fileId);" }, "fleetbase-core-api-files-update-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Update File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::updateFile", - "call": "$result = $fleetbase->files->updateFile(\n [\n 'id' => 'file_id-fixture',\n 'body' => [\n 'caption' => 'Updated caption',\n 'meta' => [],\n ],\n ],\n []\n);", - "code": "files->updateFile(\n [\n 'id' => 'file_id-fixture',\n 'body' => [\n 'caption' => 'Updated caption',\n 'meta' => [],\n ],\n ],\n []\n);" + "variables": { + "fileId": "file_id-fixture" + }, + "call": "$result = $fleetbase->files->updateFile(\n $fileId,\n [\n 'caption' => 'Updated caption',\n 'meta' => [],\n ]\n);", + "code": "files->updateFile(\n $fileId,\n [\n 'caption' => 'Updated caption',\n 'meta' => [],\n ]\n);" }, "fleetbase-core-api-files-upload-base64-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Upload Base64 File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::uploadBase64File", - "call": "$result = $fleetbase->files->uploadBase64File(\n [\n 'body' => [\n 'data' => 'base64_file_data-fixture',\n 'file_name' => 'example.png',\n 'file_type' => 'image',\n 'content_type' => 'image/png',\n 'path' => 'uploads',\n ],\n ],\n []\n);", - "code": "files->uploadBase64File(\n [\n 'body' => [\n 'data' => 'base64_file_data-fixture',\n 'file_name' => 'example.png',\n 'file_type' => 'image',\n 'content_type' => 'image/png',\n 'path' => 'uploads',\n ],\n ],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->files->uploadBase64File(\n [\n 'data' => 'base64_file_data-fixture',\n 'file_name' => 'example.png',\n 'file_type' => 'image',\n 'content_type' => 'image/png',\n 'path' => 'uploads',\n ]\n);", + "code": "files->uploadBase64File(\n [\n 'data' => 'base64_file_data-fixture',\n 'file_name' => 'example.png',\n 'file_type' => 'image',\n 'content_type' => 'image/png',\n 'path' => 'uploads',\n ]\n);" }, "fleetbase-core-api-files-upload-file": { "collection": "Fleetbase Core API", "group": "Files", "name": "Upload File", "implementation": "Fleetbase\\Sdk\\Services\\FileService::uploadFile", - "call": "$result = $fleetbase->files->uploadFile(\n [],\n [\n 'multipart' => [\n [\n 'name' => 'file',\n 'contents' => 'replace-with-file-contents',\n ],\n [\n 'name' => 'path',\n 'contents' => 'uploads',\n ],\n [\n 'name' => 'type',\n 'contents' => 'attachment',\n ],\n ],\n ]\n);", - "code": "files->uploadFile(\n [],\n [\n 'multipart' => [\n [\n 'name' => 'file',\n 'contents' => 'replace-with-file-contents',\n ],\n [\n 'name' => 'path',\n 'contents' => 'uploads',\n ],\n [\n 'name' => 'type',\n 'contents' => 'attachment',\n ],\n ],\n ]\n);" + "variables": [], + "call": "$result = $fleetbase->files->uploadFile(\n [\n [\n 'name' => 'file',\n 'contents' => 'replace-with-file-contents',\n ],\n [\n 'name' => 'path',\n 'contents' => 'uploads',\n ],\n [\n 'name' => 'type',\n 'contents' => 'attachment',\n ],\n ]\n);", + "code": "files->uploadFile(\n [\n [\n 'name' => 'file',\n 'contents' => 'replace-with-file-contents',\n ],\n [\n 'name' => 'path',\n 'contents' => 'uploads',\n ],\n [\n 'name' => 'type',\n 'contents' => 'attachment',\n ],\n ]\n);" }, "fleetbase-core-api-organizations-get-current-organization": { "collection": "Fleetbase Core API", "group": "Organizations", "name": "Get Current Organization", "implementation": "Fleetbase\\Sdk\\Services\\OrganizationService::getCurrentOrganization", - "call": "$result = $fleetbase->organizations->getCurrentOrganization(\n [],\n []\n);", - "code": "organizations->getCurrentOrganization(\n [],\n []\n);" + "variables": [], + "call": "$result = $fleetbase->organizations->getCurrentOrganization();", + "code": "organizations->getCurrentOrganization();" } } } diff --git a/contracts/postman-manifest.json b/contracts/postman-manifest.json index e9bd5c5..06db0bd 100644 --- a/contracts/postman-manifest.json +++ b/contracts/postman-manifest.json @@ -56,7 +56,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-contacts-delete-a-contact", @@ -87,7 +93,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-contacts-query-contacts", @@ -121,7 +135,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-contacts-retrieve-a-contact", @@ -152,7 +172,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-contacts-update-a-contact", @@ -191,7 +219,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-create-a-customer", @@ -229,7 +265,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-create-a-customer-order", @@ -280,7 +322,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-forgot-customer-password", @@ -306,7 +354,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-list-customer-orders", @@ -330,7 +384,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-list-customer-places", @@ -354,7 +414,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-login-customer", @@ -381,7 +447,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-logout-all-customer-sessions", @@ -405,7 +477,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-logout-customer", @@ -429,7 +507,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-register-customer-device", @@ -456,7 +540,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-request-customer-creation-code", @@ -485,7 +575,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-request-customer-login-sms", @@ -511,7 +607,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-reset-customer-password", @@ -539,7 +641,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-retrieve-authenticated-customer", @@ -563,7 +671,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-retrieve-a-customer-order", @@ -587,7 +701,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "customer_order_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-update-authenticated-customer", @@ -615,7 +737,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-customers-verify-customer-login-code", @@ -643,7 +771,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-attach-device", @@ -674,7 +808,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "device_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-create-a-device", @@ -709,7 +851,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-delete-a-device", @@ -738,7 +886,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "device_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-detach-device", @@ -767,7 +923,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "device_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-query-devices", @@ -796,7 +960,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-retrieve-a-device", @@ -825,7 +995,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "device_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-devices-update-a-device", @@ -856,7 +1034,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "device_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-change-driver-password", @@ -887,7 +1073,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-create-a-driver", @@ -921,7 +1115,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-delete-a-driver", @@ -952,7 +1152,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-get-driver-current-organization", @@ -978,7 +1186,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-list-driver-manifests", @@ -1004,7 +1220,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-list-driver-organizations", @@ -1030,7 +1254,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-login-driver", @@ -1057,7 +1289,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-query-drivers", @@ -1088,7 +1326,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-register-device", @@ -1115,7 +1359,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-register-driver-device", @@ -1144,7 +1394,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-request-driver-login-sms", @@ -1170,7 +1428,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-request-driver-password-reset", @@ -1196,7 +1460,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-reset-driver-password", @@ -1224,7 +1494,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-retrieve-a-driver", @@ -1255,7 +1531,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-simulate-driver-route", @@ -1290,7 +1574,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-switch-driver-organization", @@ -1318,7 +1610,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-toggle-driver-online", @@ -1346,7 +1646,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-track-driver", @@ -1372,7 +1680,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "raw", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-update-a-driver", @@ -1407,7 +1723,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-drivers-verify-driver-login-code", @@ -1434,7 +1758,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-entities-create-an-entity", @@ -1486,7 +1816,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-entities-delete-a-entity", @@ -1517,7 +1853,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-entities-query-entities", @@ -1546,7 +1890,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-entities-retrieve-an-entity", @@ -1581,7 +1931,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-entities-update-a-entity", @@ -1618,7 +1976,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-equipment-create-equipment", @@ -1656,7 +2022,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-equipment-delete-equipment", @@ -1685,7 +2057,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "equipment_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-equipment-query-equipment", @@ -1714,7 +2094,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-equipment-retrieve-equipment", @@ -1743,7 +2129,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "equipment_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-equipment-update-equipment", @@ -1774,7 +2168,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "equipment_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fleets-create-a-fleet", @@ -1806,7 +2208,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fleets-delete-a-fleet", @@ -1837,7 +2245,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fleets-query-fleets", @@ -1870,7 +2286,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fleets-retrieve-a-fleet", @@ -1901,7 +2323,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fleets-update-a-fleet", @@ -1935,7 +2365,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-reports-create-a-fuel-report", @@ -1971,7 +2409,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-reports-delete-a-fuel-report", @@ -1997,7 +2441,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-reports-query-fuel-reports", @@ -2025,7 +2477,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-reports-retrieve-a-fuel-report", @@ -2051,7 +2509,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-reports-update-a-fuel-report", @@ -2084,7 +2550,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-create-a-fuel-transaction", @@ -2123,7 +2597,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-delete-a-fuel-transaction", @@ -2152,7 +2632,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-match-fuel-transaction-order", @@ -2183,7 +2671,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-match-fuel-transaction-vehicle", @@ -2214,7 +2710,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-query-fuel-transactions", @@ -2243,7 +2747,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-reprocess-fuel-transaction", @@ -2272,7 +2782,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-retrieve-a-fuel-transaction", @@ -2301,7 +2819,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-review-fuel-transaction", @@ -2332,7 +2858,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-fuel-transactions-update-a-fuel-transaction", @@ -2363,7 +2897,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "fuel_transaction_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-geofences-get-driver-geofence-history", @@ -2391,7 +2933,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "driverId" + ], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-geofences-get-geofence-dwell-report", @@ -2418,7 +2968,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-geofences-get-geofence-inventory", @@ -2442,7 +2998,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-geofences-list-geofence-events", @@ -2469,7 +3031,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-issues-create-an-issue", @@ -2504,7 +3072,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-issues-delete-an-issue", @@ -2530,7 +3104,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-issues-query-issues", @@ -2558,7 +3140,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-issues-retrieve-an-issue", @@ -2584,7 +3172,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-issues-update-an-issue", @@ -2616,7 +3212,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-labels-render-label", @@ -2645,7 +3249,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-manifests-optimize-a-manifest", @@ -2674,7 +3286,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-manifests-retrieve-a-manifest", @@ -2700,7 +3320,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-manifests-update-a-manifest-stop", @@ -2728,7 +3356,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-onboard-get-driver-onboard-settings", @@ -2754,7 +3390,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "companyId" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orchestrator-commit-orchestrator-plan", @@ -2796,7 +3440,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orchestrator-run-orchestrator", @@ -2855,7 +3505,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-order-configs-query-order-configs", @@ -2879,7 +3535,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-order-configs-retrieve-an-order-config", @@ -2903,7 +3565,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "order_config_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-cancel-an-order", @@ -2934,7 +3604,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-capture-photo-for-order", @@ -2967,7 +3645,16 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id", + "subjectId" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-capture-qr-code-for-order", @@ -3003,7 +3690,16 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id", + "subject-id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-capture-signature-for-order", @@ -3038,7 +3734,16 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id", + "subject-id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-complete-an-order", @@ -3064,7 +3769,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order", @@ -3130,7 +3843,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-complete-payload", @@ -3161,7 +3880,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-coordinates", @@ -3194,7 +3919,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-geojson-points", @@ -3233,7 +3964,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-payload", @@ -3286,7 +4023,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-waypoints-and-entities-with-photos", @@ -3347,7 +4090,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-waypoints-and-entity-destinations", @@ -3405,7 +4154,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-only-pickup-dropoff", @@ -3432,7 +4187,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-create-an-order-using-only-waypoints", @@ -3468,7 +4229,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-delete-an-order", @@ -3494,7 +4261,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-dispatch-an-order", @@ -3525,7 +4300,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-get-editable-entity-fields", @@ -3551,7 +4334,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-get-order-distance-and-time", @@ -3577,7 +4368,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-get-order-eta", @@ -3603,7 +4402,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-get-order-next-activity", @@ -3636,7 +4443,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-get-order-tracker", @@ -3662,7 +4477,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-list-order-comments", @@ -3688,7 +4511,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-list-order-proofs", @@ -3715,7 +4546,16 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id", + "subjectId" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-query-orders", @@ -3744,7 +4584,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-retrieve-an-order", @@ -3773,7 +4619,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "order_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-schedule-an-order", @@ -3808,7 +4662,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-set-order-destination", @@ -3840,7 +4702,16 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id", + "placeId" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-start-an-order", @@ -3873,7 +4744,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-update-order-activity", @@ -3907,7 +4786,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-orders-update-an-order", @@ -3940,7 +4827,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-organizations-get-current-organization", @@ -3964,7 +4859,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-organizations-list-organizations", @@ -3991,7 +4892,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-parts-create-a-part", @@ -4027,7 +4934,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-parts-delete-a-part", @@ -4056,7 +4969,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "part_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-parts-query-parts", @@ -4085,7 +5006,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-parts-retrieve-a-part", @@ -4114,7 +5041,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "part_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-parts-update-a-part", @@ -4145,7 +5080,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "part_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-payloads-create-a-payload", @@ -4196,7 +5139,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-payloads-delete-a-payload", @@ -4227,7 +5176,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-payloads-query-payloads", @@ -4255,7 +5212,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-payloads-retrieve-a-payload", @@ -4281,7 +5244,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-payloads-update-a-payload", @@ -4345,7 +5316,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-create-a-place", @@ -4398,7 +5377,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-delete-a-place", @@ -4429,7 +5414,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-list-all-places", @@ -4457,7 +5450,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-query-places", @@ -4486,7 +5485,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-retrieve-a-place", @@ -4512,7 +5517,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-search-places", @@ -4540,7 +5553,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-places-update-a-place", @@ -4583,7 +5602,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-purchase-rates-create-a-purchase-rate", @@ -4614,7 +5641,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-purchase-rates-query-purchase-rates", @@ -4642,7 +5675,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-purchase-rates-retrieve-a-purchase-rate", @@ -4673,7 +5712,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-sensors-create-a-sensor", @@ -4710,7 +5757,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-sensors-delete-a-sensor", @@ -4739,7 +5792,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "sensor_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-sensors-query-sensors", @@ -4768,7 +5829,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-sensors-retrieve-a-sensor", @@ -4797,7 +5864,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "sensor_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-sensors-update-a-sensor", @@ -4829,7 +5904,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "sensor_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-areas-create-a-service-area", @@ -4870,7 +5953,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-areas-delete-a-service-area", @@ -4901,7 +5990,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-areas-query-service-areas", @@ -4927,7 +6024,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-areas-retrieve-a-service-area", @@ -4962,7 +6065,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-areas-update-a-service-area", @@ -4995,7 +6106,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-quotes-query-service-quotes", @@ -5026,7 +6145,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-quotes-retrieve-a-service-quote", @@ -5052,7 +6177,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-rates-create-a-service-rate", @@ -5101,7 +6234,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-rates-delete-a-service-rate", @@ -5132,7 +6271,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-rates-query-service-rates", @@ -5160,7 +6307,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-rates-retrieve-a-service-rate", @@ -5186,7 +6339,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-service-rates-update-a-service-rate", @@ -5221,7 +6382,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-numbers-create-a-tracking-number", @@ -5253,7 +6422,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-numbers-decode-tracking-number-qr", @@ -5279,7 +6454,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-numbers-delete-a-tracking-number", @@ -5310,7 +6491,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-numbers-query-tracking-numbers", @@ -5344,7 +6533,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-numbers-retrieve-a-tracking-number", @@ -5375,7 +6570,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-statuses-create-a-tracking-status", @@ -5414,7 +6617,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-statuses-delete-a-tracking-status", @@ -5445,7 +6654,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-statuses-query-tracking-statuses", @@ -5477,7 +6694,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-statuses-retrieve-a-tracking-status", @@ -5508,7 +6731,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-tracking-statuses-update-a-tracking-status", @@ -5541,7 +6772,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-create-a-vehicle", @@ -5579,7 +6818,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-delete-a-vehicle", @@ -5610,7 +6855,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-query-vehicles", @@ -5644,7 +6897,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-retrieve-a-vehicle", @@ -5675,7 +6934,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-track-vehicle", @@ -5701,7 +6968,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "raw", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vehicles-update-a-vehicle", @@ -5738,7 +7013,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vendors-create-a-vendor", @@ -5772,7 +7055,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vendors-delete-a-vendor", @@ -5803,7 +7092,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vendors-query-vendors", @@ -5834,7 +7131,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vendors-retrieve-a-vendor", @@ -5865,7 +7168,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-vendors-update-a-vendor", @@ -5901,7 +7212,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-create-a-work-order", @@ -5939,7 +7258,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-delete-a-work-order", @@ -5968,7 +7293,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "work_order_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-query-work-orders", @@ -5997,7 +7330,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-retrieve-a-work-order", @@ -6026,7 +7365,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "work_order_id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-send-work-order", @@ -6055,7 +7402,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "work_order_id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-work-orders-update-a-work-order", @@ -6086,7 +7441,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "work_order_id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-zones-create-a-zone", @@ -6193,7 +7556,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-api-zones-delete-a-zone", @@ -6224,7 +7593,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-zones-query-zones", @@ -6255,7 +7632,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-api-zones-retrieve-a-zone", @@ -6286,7 +7669,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-api-zones-update-a-zone", @@ -6319,7 +7710,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-add-participant", @@ -6347,7 +7746,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-create-chat-channel", @@ -6376,7 +7783,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-create-read-receipt", @@ -6404,7 +7817,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "chatMessageId" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-delete-chat-channel", @@ -6430,7 +7851,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-delete-message", @@ -6456,7 +7885,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "chatMessageId" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-list-available-participants", @@ -6482,7 +7919,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-query-chat-channels", @@ -6510,7 +7953,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-remove-participant", @@ -6536,7 +7985,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "participantId" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-retrieve-chat-channel", @@ -6562,7 +8019,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-send-message", @@ -6592,7 +8057,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-chat-channels-update-chat-channel", @@ -6620,7 +8093,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-comments-create-comment", @@ -6650,7 +8131,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-comments-delete-comment", @@ -6676,7 +8163,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-comments-query-comments", @@ -6704,7 +8199,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-comments-retrieve-comment", @@ -6730,7 +8231,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-comments-update-comment", @@ -6758,7 +8267,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-delete-a-file", @@ -6784,7 +8301,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-download-file", @@ -6810,7 +8335,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-query-files", @@ -6838,7 +8371,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "query", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-retrieve-a-file", @@ -6864,7 +8403,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-update-file", @@ -6893,7 +8440,15 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [ + "id" + ], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-upload-base64-file", @@ -6923,7 +8478,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "body", + "contract_payload": "json", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-files-upload-file", @@ -6963,7 +8524,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "multipart", + "contract_payload": "multipart", + "legacy_envelope": true + } }, { "id": "fleetbase-core-api-organizations-get-current-organization", @@ -6987,7 +8554,13 @@ "tests/Contract/EndpointContractTest.php::testEveryEndpointContract" ], "status": "complete", - "exception": null + "exception": null, + "sdk_signature": { + "path_parameters": [], + "request_data": "query", + "contract_payload": "none", + "legacy_envelope": true + } } ] } diff --git a/contracts/public-api-1.1.0.json b/contracts/public-api-1.1.0.json new file mode 100644 index 0000000..059b50b --- /dev/null +++ b/contracts/public-api-1.1.0.json @@ -0,0 +1,9892 @@ +{ + "schema_version": 1, + "release": "1.1.0", + "namespace": "Fleetbase\\Sdk", + "classes": { + "Fleetbase\\Sdk\\Arr": { + "final": false, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "any", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "arr", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "predicate", + "type": "callable", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "every", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "arr", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "predicate", + "type": "callable", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "first", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "arr", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Configuration": { + "final": true, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "apiKey", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "debug", + "type": "bool", + "by_reference": false, + "variadic": false, + "optional": true, + "default": false + } + ] + }, + { + "name": "getApiKey", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getBaseUri", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getHost", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getNamespace", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getVersion", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "isDebug", + "visibility": "public", + "static": false, + "return_type": "bool", + "parameters": [] + }, + { + "name": "toArray", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + } + ] + }, + "Fleetbase\\Sdk\\EndpointService": { + "final": false, + "parent": "Fleetbase\\Sdk\\Service", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Fleetbase": { + "final": false, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [ + { + "name": "chatChannels", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "client", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "comments", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "contacts", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "customers", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "devices", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "drivers", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "entities", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "equipment", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "files", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "fleets", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "fuelReports", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "fuelTransactions", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "geofences", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "issues", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "labels", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "manifests", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "onboard", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "orchestrator", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "orderConfigs", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "orders", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "organizations", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "parts", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "payloads", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "places", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "purchaseRates", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "sensors", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "serviceAreas", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "serviceQuotes", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "serviceRates", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "trackingNumbers", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "trackingStatuses", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "vehicles", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "vendors", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "workOrders", + "visibility": "public", + "static": false, + "type": null + }, + { + "name": "zones", + "visibility": "public", + "static": false, + "type": null + } + ], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "publicKey", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "config", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "debug", + "type": "bool", + "by_reference": false, + "variadic": false, + "optional": true, + "default": false + } + ] + }, + { + "name": "chatChannels", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "comments", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "contacts", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "customers", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\CustomerService", + "parameters": [] + }, + { + "name": "devices", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\DeviceService", + "parameters": [] + }, + { + "name": "drivers", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "entities", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\EntityService", + "parameters": [] + }, + { + "name": "equipment", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\EquipmentService", + "parameters": [] + }, + { + "name": "files", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "fleets", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\FleetService", + "parameters": [] + }, + { + "name": "fuelReports", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\FuelReportService", + "parameters": [] + }, + { + "name": "fuelTransactions", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\FuelTransactionService", + "parameters": [] + }, + { + "name": "geofences", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\GeofenceService", + "parameters": [] + }, + { + "name": "getOptions", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "getVersion", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "issues", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\IssueService", + "parameters": [] + }, + { + "name": "labels", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\LabelService", + "parameters": [] + }, + { + "name": "manifests", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\ManifestService", + "parameters": [] + }, + { + "name": "newInstance", + "visibility": "public", + "static": true, + "return_type": "Fleetbase\\Sdk\\Fleetbase", + "parameters": [] + }, + { + "name": "onboard", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\OnboardService", + "parameters": [] + }, + { + "name": "orchestrator", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\OrchestratorService", + "parameters": [] + }, + { + "name": "orderConfigs", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\OrderConfigService", + "parameters": [] + }, + { + "name": "orders", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\OrderService", + "parameters": [] + }, + { + "name": "organizations", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "parts", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\PartService", + "parameters": [] + }, + { + "name": "payloads", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "places", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "purchaseRates", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\PurchaseRateService", + "parameters": [] + }, + { + "name": "sensors", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\SensorService", + "parameters": [] + }, + { + "name": "service", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [ + { + "name": "name", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "serviceAreas", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\ServiceAreaService", + "parameters": [] + }, + { + "name": "serviceQuotes", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\ServiceQuoteService", + "parameters": [] + }, + { + "name": "serviceRates", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\ServiceRateService", + "parameters": [] + }, + { + "name": "setApiKey", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Fleetbase", + "parameters": [ + { + "name": "publicKey", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "trackingNumbers", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\TrackingNumberService", + "parameters": [] + }, + { + "name": "trackingStatuses", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\TrackingStatusService", + "parameters": [] + }, + { + "name": "vehicles", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "vendors", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "workOrders", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\WorkOrderService", + "parameters": [] + }, + { + "name": "zones", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Services\\ZoneService", + "parameters": [] + } + ] + }, + "Fleetbase\\Sdk\\FleetbaseException": { + "final": false, + "parent": "RuntimeException", + "interfaces": [ + "Stringable", + "Throwable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "message", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "statusCode", + "type": "?int", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "errorCode", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "details", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "requestId", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "method", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "url", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "previous", + "type": "?Throwable", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + } + ] + }, + { + "name": "getDetails", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "getErrorCode", + "visibility": "public", + "static": false, + "return_type": "?string", + "parameters": [] + }, + { + "name": "getRequestId", + "visibility": "public", + "static": false, + "return_type": "?string", + "parameters": [] + }, + { + "name": "getRequestMethod", + "visibility": "public", + "static": false, + "return_type": "?string", + "parameters": [] + }, + { + "name": "getRequestUrl", + "visibility": "public", + "static": false, + "return_type": "?string", + "parameters": [] + }, + { + "name": "getStatusCode", + "visibility": "public", + "static": false, + "return_type": "?int", + "parameters": [] + } + ] + }, + "Fleetbase\\Sdk\\HttpClient": { + "final": false, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "delete", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "get", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getHost", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getLastPsrResponse", + "visibility": "public", + "static": false, + "return_type": "?Psr\\Http\\Message\\ResponseInterface", + "parameters": [] + }, + { + "name": "getLastResponse", + "visibility": "public", + "static": false, + "return_type": "GuzzleHttp\\Psr7\\Response", + "parameters": [] + }, + { + "name": "getNamespace", + "visibility": "public", + "static": false, + "return_type": "string", + "parameters": [] + }, + { + "name": "getOptions", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "patch", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "post", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "put", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "request", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "method", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "setHost", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\HttpClient", + "parameters": [ + { + "name": "host", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "setNamespace", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\HttpClient", + "parameters": [ + { + "name": "namespace", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resource": { + "final": false, + "parent": null, + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [ + { + "name": "attributes", + "visibility": "protected", + "static": false, + "type": "array" + }, + { + "name": "options", + "visibility": "protected", + "static": false, + "type": "array" + }, + { + "name": "originalAttributes", + "visibility": "protected", + "static": false, + "type": "array" + }, + { + "name": "service", + "visibility": "protected", + "static": false, + "type": "?Fleetbase\\Sdk\\Service" + } + ], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "?array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "__get", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "name", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "__isset", + "visibility": "public", + "static": false, + "return_type": "bool", + "parameters": [ + { + "name": "name", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "__set", + "visibility": "public", + "static": false, + "return_type": "void", + "parameters": [ + { + "name": "name", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "value", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "create", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "destroy", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getAttribute", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attribute", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "defaultValue", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + } + ] + }, + { + "name": "getAttributes", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "properties", + "type": "?array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getChanges", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "getDirtyAttributes", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "getService", + "visibility": "public", + "static": false, + "return_type": "?Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "hasAttribute", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "property", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "isAttributeFilled", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "property", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "isDirty", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attribute", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "jsonSerialize", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "offsetExists", + "visibility": "public", + "static": false, + "return_type": "bool", + "parameters": [ + { + "name": "offset", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "offsetGet", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "offset", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "offsetSet", + "visibility": "public", + "static": false, + "return_type": "void", + "parameters": [ + { + "name": "offset", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "value", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "offsetUnset", + "visibility": "public", + "static": false, + "return_type": "void", + "parameters": [ + { + "name": "offset", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "reload", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Resource", + "parameters": [ + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "requireService", + "visibility": "protected", + "static": false, + "return_type": "Fleetbase\\Sdk\\Service", + "parameters": [] + }, + { + "name": "save", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "options", + "type": "?array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "setAttribute", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\Resource", + "parameters": [ + { + "name": "attribute", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "value", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "toArray", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "update", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\ChatChannel": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Comment": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Contact": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Customer": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Device": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Driver": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Entity": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Equipment": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\File": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Fleet": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\FuelReport": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\FuelTransaction": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Geofence": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Issue": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Label": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Manifest": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Onboard": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Orchestrator": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Order": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Services\\OrderService", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "cancel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureQrCode", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "subjectId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureSignature", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "subjectId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "complete", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "dispatch", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getDistanceAndTime", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getNextActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "setDestination", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "destinationId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "start", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\OrderConfig": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Organization": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Part": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Payload": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Place": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\PurchaseRate": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Sensor": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\ServiceArea": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\ServiceQuote": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\ServiceRate": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\TrackingNumber": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\TrackingStatus": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Vehicle": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Vendor": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\Waypoint": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Resources\\WorkOrder": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [] + }, + "Fleetbase\\Sdk\\Resources\\Zone": { + "final": false, + "parent": "Fleetbase\\Sdk\\Resource", + "interfaces": [ + "JsonSerializable" + ], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__constructor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "service", + "type": "?Fleetbase\\Sdk\\Service", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Service": { + "final": false, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [ + { + "name": "client", + "visibility": "protected", + "static": false, + "type": "Fleetbase\\Sdk\\HttpClient" + }, + { + "name": "namespace", + "visibility": "protected", + "static": false, + "type": "string" + }, + { + "name": "options", + "visibility": "protected", + "static": false, + "type": "array" + }, + { + "name": "resource", + "visibility": "protected", + "static": false, + "type": "string" + } + ], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "resource", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "action", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "method", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "path", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "data", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "create", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "destroy", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "endpoint", + "visibility": "protected", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "method", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "template", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "findAll", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "findRecord", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getClient", + "visibility": "public", + "static": false, + "return_type": "Fleetbase\\Sdk\\HttpClient", + "parameters": [] + }, + { + "name": "getOptions", + "visibility": "public", + "static": false, + "return_type": "array", + "parameters": [] + }, + { + "name": "query", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "query", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryRecord", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "query", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "resolve", + "visibility": "protected", + "static": false, + "return_type": "Fleetbase\\Sdk\\Resource", + "parameters": [ + { + "name": "data", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "resolveCollection", + "visibility": "protected", + "static": false, + "return_type": "?array", + "parameters": [ + { + "name": "data", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "update", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "attributes", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "uri", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "path", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + } + ] + }, + { + "name": "uriForResource", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "path", + "type": "?string", + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ChatChannelService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "addParticipant", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createChatChannel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createReadReceipt", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteChatChannel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteMessage", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listAvailableParticipants", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryChatChannels", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "removeParticipant", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveChatChannel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "sendMessage", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateChatChannel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\CommentService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createComment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteComment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryComments", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveComment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateComment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ContactService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createContact", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteContact", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryContacts", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveContact", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateContact", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\CustomerService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createCustomer", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createCustomerOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "forgotCustomerPassword", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listCustomerOrders", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listCustomerPlaces", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "loginCustomer", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "logoutAllCustomerSessions", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "logoutCustomer", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "registerCustomerDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "requestCustomerCreationCode", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "requestCustomerLoginSms", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "resetCustomerPassword", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveAuthenticatedCustomer", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveCustomerOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateAuthenticatedCustomer", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "verifyCustomerLoginCode", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\DeviceService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "attachDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "detachDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryDevices", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\DriverService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "changeDriverPassword", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getDriverCurrentOrganization", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listDriverManifests", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listDriverOrganizations", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "loginDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryDrivers", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "registerDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "registerDriverDevice", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "requestDriverLoginSms", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "requestDriverPasswordReset", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "resetDriverPassword", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "simulateDriverRoute", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "switchDriverOrganization", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "toggleDriverOnline", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "trackDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateDriver", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "verifyDriverLoginCode", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\EntityService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createEntity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteEntity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryEntities", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveEntity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateEntity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\EquipmentService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createEquipment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteEquipment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryEquipment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveEquipment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateEquipment", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\FileService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteFile", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "downloadFile", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryFiles", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveFile", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateFile", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "uploadBase64File", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "uploadFile", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\FleetService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createFleet", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteFleet", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryFleets", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveFleet", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateFleet", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\FuelReportService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createFuelReport", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteFuelReport", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryFuelReports", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveFuelReport", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateFuelReport", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\FuelTransactionService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "matchFuelTransactionOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "matchFuelTransactionVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryFuelTransactions", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "reprocessFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "reviewFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateFuelTransaction", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\GeofenceService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getDriverGeofenceHistory", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getGeofenceDwellReport", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getGeofenceInventory", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listGeofenceEvents", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\IssueService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createIssue", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteIssue", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryIssues", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveIssue", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateIssue", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\LabelService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "renderLabel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ManifestService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "optimizeManifest", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveManifest", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateManifestStop", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\OnboardService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getDriverOnboardSettings", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\OrchestratorService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "commitOrchestratorPlan", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "runOrchestrator", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\OrderConfigService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryOrderConfigs", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveOrderConfig", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\OrderService": { + "final": false, + "parent": "Fleetbase\\Sdk\\Service", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "cancel", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "cancelOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "capturePhotoForOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureQrCode", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "subjectId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureQrCodeForOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureSignature", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "subjectId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "captureSignatureForOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "complete", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "completeOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingCompletePayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingCoordinates", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingGeojsonPoints", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingOnlyPickupDropoff", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingOnlyWaypoints", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingPayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingWaypointsAndEntitiesWithPhotos", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createOrderUsingWaypointsAndEntityDestinations", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "dispatch", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "dispatchOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getDistanceAndTime", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getEditableEntityFields", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getNextActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getOrderDistanceAndTime", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getOrderEta", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getOrderNextActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getOrderTracker", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listOrderComments", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listOrderProofs", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryOrders", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "scheduleOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "setDestination", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "destinationId", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "setOrderDestination", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "start", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "startOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "id", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "params", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateOrderActivity", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\OrganizationService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "getCurrentOrganization", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listOrganizations", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\PartService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createPart", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deletePart", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryParts", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrievePart", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updatePart", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\PayloadService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createPayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deletePayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryPayloads", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrievePayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updatePayload", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\PlaceService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createPlace", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deletePlace", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "listAllPlaces", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryPlaces", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrievePlace", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "searchPlaces", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updatePlace", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\PurchaseRateService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createPurchaseRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryPurchaseRates", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrievePurchaseRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\SensorService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createSensor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteSensor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "querySensors", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveSensor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateSensor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ServiceAreaService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createServiceArea", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteServiceArea", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryServiceAreas", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveServiceArea", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateServiceArea", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ServiceQuoteService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryServiceQuotes", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveServiceQuote", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ServiceRateService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createServiceRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteServiceRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryServiceRates", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveServiceRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateServiceRate", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\TrackingNumberService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createTrackingNumber", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "decodeTrackingNumberQr", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteTrackingNumber", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryTrackingNumbers", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveTrackingNumber", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\TrackingStatusService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createTrackingStatus", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteTrackingStatus", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryTrackingStatuses", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveTrackingStatus", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateTrackingStatus", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\VehicleService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryVehicles", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "trackVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateVehicle", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\VendorService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createVendor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteVendor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryVendors", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveVendor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateVendor", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\WorkOrderService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createWorkOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteWorkOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryWorkOrders", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveWorkOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "sendWorkOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateWorkOrder", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Services\\ZoneService": { + "final": false, + "parent": "Fleetbase\\Sdk\\EndpointService", + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "__construct", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "client", + "type": "Fleetbase\\Sdk\\HttpClient", + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "createZone", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "deleteZone", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "queryZones", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "retrieveZone", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + }, + { + "name": "updateZone", + "visibility": "public", + "static": false, + "return_type": null, + "parameters": [ + { + "name": "parameters", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + }, + { + "name": "options", + "type": "array", + "by_reference": false, + "variadic": false, + "optional": true, + "default": [] + } + ] + } + ] + }, + "Fleetbase\\Sdk\\Utils": { + "final": false, + "parent": null, + "interfaces": [], + "constants": [], + "properties": [], + "methods": [ + { + "name": "classify", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "string", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "createNamespace", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "namespace", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "dd", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [] + }, + { + "name": "get", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "target", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "key", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + }, + { + "name": "default", + "type": null, + "by_reference": false, + "variadic": false, + "optional": true, + "default": null + } + ] + }, + { + "name": "pluralize", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "string", + "type": "string", + "by_reference": false, + "variadic": false, + "optional": false + } + ] + }, + { + "name": "value", + "visibility": "public", + "static": true, + "return_type": null, + "parameters": [ + { + "name": "value", + "type": null, + "by_reference": false, + "variadic": false, + "optional": false + } + ] + } + ] + } + }, + "runtime_properties": { + "Fleetbase\\Sdk\\Fleetbase": [ + "chatChannels", + "client", + "comments", + "contacts", + "customers", + "devices", + "drivers", + "entities", + "equipment", + "files", + "fleets", + "fuelReports", + "fuelTransactions", + "geofences", + "issues", + "labels", + "manifests", + "onboard", + "orchestrator", + "orderConfigs", + "orders", + "organizations", + "parts", + "payloads", + "places", + "purchaseRates", + "sensors", + "serviceAreas", + "serviceQuotes", + "serviceRates", + "trackingNumbers", + "trackingStatuses", + "vehicles", + "vendors", + "workOrders", + "zones" + ] + } +} diff --git a/docs/adr/0007-generated-endpoint-arguments.md b/docs/adr/0007-generated-endpoint-arguments.md new file mode 100644 index 0000000..6f1fbd3 --- /dev/null +++ b/docs/adr/0007-generated-endpoint-arguments.md @@ -0,0 +1,33 @@ +# ADR 0007: Generated endpoint argument conventions + +## Status + +Accepted for 1.1.1. + +## Context + +The 1.1.0 generated methods exposed the generator's transport envelope. A caller had to pass URL identifiers and API bodies inside arrays named `parameters` and then pass lower-level request options separately. That made otherwise ordinary calls such as changing a driver password look structurally different from `dispatchOrder($orderId)` and from the SDK's standard resource methods. + +The generated surface has 220 requests. Their contract payloads are 97 JSON, 30 query, two raw JSON, one multipart, and 90 without a payload. Five URLs contain two identifiers; no URL contains more than two. PHP 8 named arguments make the published parameter names part of the compatibility contract. + +## Decision + +Public examples use this order: + +1. URL identifiers, in URL order; +2. direct API body, query, or multipart data; +3. optional request/transport options. + +For example, `changeDriverPassword($driverId, $data, $requestOptions)` and `capturePhotoForOrder($orderId, $subjectId, $data, $requestOptions)`. + +Generated methods retain the published parameter names `parameters` and `options` and accept the 1.1.0 envelope whenever the first argument is an array on an endpoint with path identifiers. Runtime normalization is centralized in `Service`; generated traits contain no endpoint-specific overload logic. Ambiguous double specification is rejected. The implementation remains valid on PHP 7.4 and does not rely on union types or named-argument-only syntax. + +Collection endpoints keep their existing two-array signature because their direct API data is already the first argument. Multipart data is a standard list of parts rather than an SDK-specific wrapper. + +## Consequences + +- Existing 1.1.0 positional and named calls remain source compatible. +- New examples match how callers think about URL identifiers and API data. +- HTTP transport keys remain an internal concern except when deliberately supplied as advanced request options. +- Generator metadata records path order and request-data placement, so tests, documentation, and the disposable live bridge use one source of truth. +- Every locked request is tested in both forms, and compatibility is checked against the authoritative 1.1.0 public API snapshot. diff --git a/docs/api-examples.md b/docs/api-examples.md index 3ab96fc..c1a8820 100644 --- a/docs/api-examples.md +++ b/docs/api-examples.md @@ -15,15 +15,12 @@ Creates a contact for the current company. Contacts are used as customers, facil ```php $result = $fleetbase->contacts->createContact( [ - 'body' => [ - 'name' => 'John Doe', - 'type' => 'customer', - 'title' => 'Mr', - 'email' => 'john@exampleco.com', - 'phone' => '+1 563-920-4264', - ], - ], - [] + 'name' => 'John Doe', + 'type' => 'customer', + 'title' => 'Mr', + 'email' => 'john@exampleco.com', + 'phone' => '+1 563-920-4264', + ] ); ``` @@ -34,12 +31,7 @@ Delete a Contact. `DELETE {{base_url}}/{{namespace}}/contacts/:id` ```php -$result = $fleetbase->contacts->deleteContact( - [ - 'id' => 'contact_id-fixture', - ], - [] -); +$result = $fleetbase->contacts->deleteContact($contactId); ``` ### Query Contacts @@ -50,14 +42,11 @@ Returns a paginated list of contacts for the current organization. Use filters s ```php $result = $fleetbase->contacts->queryContacts( - [], [ - 'query' => [ - 'query' => 'contact_name-fixture', - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'query' => 'contact_name-fixture', + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -69,12 +58,7 @@ Retrieve a Contact. `GET {{base_url}}/{{namespace}}/contacts/:id` ```php -$result = $fleetbase->contacts->retrieveContact( - [ - 'id' => 'contact_id-fixture', - ], - [] -); +$result = $fleetbase->contacts->retrieveContact($contactId); ``` ### Update a Contact @@ -85,19 +69,16 @@ Updates a contact's profile, type, primary place, photo, or metadata. ```php $result = $fleetbase->contacts->updateContact( + $contactId, [ - 'id' => 'contact_id-fixture', - 'body' => [ - 'name' => 'John Doe', - 'title' => 'Mr', - 'email' => 'john@exampleco.com', - 'phone' => '563-920-4264', - 'meta' => [ - 'external_ref' => 'john-doe', - ], + 'name' => 'John Doe', + 'title' => 'Mr', + 'email' => 'john@exampleco.com', + 'phone' => '563-920-4264', + 'meta' => [ + 'external_ref' => 'john-doe', ], - ], - [] + ] ); ``` @@ -112,23 +93,20 @@ Creates a customer account (Contact + linked User) after verifying the code from ```php $result = $fleetbase->customers->createCustomer( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - 'code' => 'verification_code-fixture', - 'name' => 'Jane Customer', - 'password' => 'customer_password-fixture', - 'phone' => 'randomPhoneNumber-fixture', - 'place' => [ - 'name' => 'Home', - 'street1' => '123 Main Street', - 'city' => 'Kingston', - 'province' => 'Kingston', - 'postal_code' => '00000', - 'country' => 'JM', - ], + 'identity' => 'customer_identity-fixture', + 'code' => 'verification_code-fixture', + 'name' => 'Jane Customer', + 'password' => 'customer_password-fixture', + 'phone' => 'randomPhoneNumber-fixture', + 'place' => [ + 'name' => 'Home', + 'street1' => '123 Main Street', + 'city' => 'Kingston', + 'province' => 'Kingston', + 'postal_code' => '00000', + 'country' => 'JM', ], - ], - [] + ] ); ``` @@ -141,36 +119,33 @@ Creates an Order on behalf of the authenticated customer. Accepts the canonical ```php $result = $fleetbase->customers->createCustomerOrder( [ - 'body' => [ - 'type' => 'transport', - 'scheduled_at' => '2026-05-25T10:00:00Z', - 'notes' => 'Handle with care.', - 'pickup' => [ - 'name' => 'Pickup', - 'street1' => '4169 N State RD 7', - 'city' => 'Lauderdale Lakes', - 'province' => 'FL', - 'postal_code' => '33319', - 'country' => 'US', - ], - 'dropoff' => [ - 'name' => 'Dropoff', - 'city' => 'Kingston', - 'country' => 'JM', - ], - 'entities' => [ - [ - 'name' => 'Wireless Headphones', - 'description' => 'Electronics', - 'weight' => 2.5, - 'weight_unit' => 'lb', - 'declared_value' => 150, - 'currency' => 'USD', - ], + 'type' => 'transport', + 'scheduled_at' => '2026-05-25T10:00:00Z', + 'notes' => 'Handle with care.', + 'pickup' => [ + 'name' => 'Pickup', + 'street1' => '4169 N State RD 7', + 'city' => 'Lauderdale Lakes', + 'province' => 'FL', + 'postal_code' => '33319', + 'country' => 'US', + ], + 'dropoff' => [ + 'name' => 'Dropoff', + 'city' => 'Kingston', + 'country' => 'JM', + ], + 'entities' => [ + [ + 'name' => 'Wireless Headphones', + 'description' => 'Electronics', + 'weight' => 2.5, + 'weight_unit' => 'lb', + 'declared_value' => 150, + 'currency' => 'USD', ], ], - ], - [] + ] ); ``` @@ -183,11 +158,8 @@ Sends a password-reset verification code to the customer's email or phone. Alway ```php $result = $fleetbase->customers->forgotCustomerPassword( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - ], - ], - [] + 'identity' => 'customer_identity-fixture', + ] ); ``` @@ -198,10 +170,7 @@ Lists orders owned by the authenticated customer (scoped to `orders.customer_uui `GET {{base_url}}/{{namespace}}/customers/orders` ```php -$result = $fleetbase->customers->listCustomerOrders( - [], - [] -); +$result = $fleetbase->customers->listCustomerOrders(); ``` ### List Customer Places @@ -211,10 +180,7 @@ Lists the authenticated customer's saved Places (delivery addresses, etc.). `GET {{base_url}}/{{namespace}}/customers/places` ```php -$result = $fleetbase->customers->listCustomerPlaces( - [], - [] -); +$result = $fleetbase->customers->listCustomerPlaces(); ``` ### Login Customer @@ -226,12 +192,9 @@ Authenticates a customer with email/phone + password. Returns the customer with ```php $result = $fleetbase->customers->loginCustomer( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - 'password' => 'customer_password-fixture', - ], - ], - [] + 'identity' => 'customer_identity-fixture', + 'password' => 'customer_password-fixture', + ] ); ``` @@ -242,10 +205,7 @@ Revokes every Sanctum token issued to the customer's linked user (sign out every `POST {{base_url}}/{{namespace}}/customers/logout-all` ```php -$result = $fleetbase->customers->logoutAllCustomerSessions( - [], - [] -); +$result = $fleetbase->customers->logoutAllCustomerSessions(); ``` ### Logout Customer @@ -255,10 +215,7 @@ Revokes the Sanctum token used to make this request. The customer's other active `POST {{base_url}}/{{namespace}}/customers/logout` ```php -$result = $fleetbase->customers->logoutCustomer( - [], - [] -); +$result = $fleetbase->customers->logoutCustomer(); ``` ### Register Customer Device @@ -270,12 +227,9 @@ Registers a push-notification device token against the authenticated customer's ```php $result = $fleetbase->customers->registerCustomerDevice( [ - 'body' => [ - 'token' => 'push_token-fixture', - 'platform' => 'ios', - ], - ], - [] + 'token' => 'push_token-fixture', + 'platform' => 'ios', + ] ); ``` @@ -288,14 +242,11 @@ Sends an email or SMS verification code to start a customer signup. Required bef ```php $result = $fleetbase->customers->requestCustomerCreationCode( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - 'mode' => 'email', - 'name' => 'customer_name-fixture', - 'phone' => 'customer_phone-fixture', - ], - ], - [] + 'identity' => 'customer_identity-fixture', + 'mode' => 'email', + 'name' => 'customer_name-fixture', + 'phone' => 'customer_phone-fixture', + ] ); ``` @@ -308,11 +259,8 @@ Starts SMS-based passwordless login by sending a verification code to the custom ```php $result = $fleetbase->customers->requestCustomerLoginSms( [ - 'body' => [ - 'phone' => 'customer_phone-fixture', - ], - ], - [] + 'phone' => 'customer_phone-fixture', + ] ); ``` @@ -325,13 +273,10 @@ Verifies the reset code from `Forgot Customer Password` and sets a new password. ```php $result = $fleetbase->customers->resetCustomerPassword( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - 'code' => 'verification_code-fixture', - 'password' => 'customer_password-fixture', - ], - ], - [] + 'identity' => 'customer_identity-fixture', + 'code' => 'verification_code-fixture', + 'password' => 'customer_password-fixture', + ] ); ``` @@ -342,10 +287,7 @@ Returns the profile of the customer identified by the `Customer-Token` header. `GET {{base_url}}/{{namespace}}/customers/me` ```php -$result = $fleetbase->customers->retrieveAuthenticatedCustomer( - [], - [] -); +$result = $fleetbase->customers->retrieveAuthenticatedCustomer(); ``` ### Retrieve a Customer Order @@ -355,12 +297,7 @@ Fetches a single order by id, public id, or tracking number. Returns 404 if the `GET {{base_url}}/{{namespace}}/customers/orders/{{customer_order_id}}` ```php -$result = $fleetbase->customers->retrieveCustomerOrder( - [ - 'customer_order_id' => 'customer_order_id-fixture', - ], - [] -); +$result = $fleetbase->customers->retrieveCustomerOrder($customerOrderId); ``` ### Update Authenticated Customer @@ -372,13 +309,10 @@ Updates the authenticated customer's profile. Changes to `name`, `email`, and `p ```php $result = $fleetbase->customers->updateAuthenticatedCustomer( [ - 'body' => [ - 'name' => 'customer_name-fixture', - 'phone' => 'customer_phone-fixture', - 'email' => 'customer_email-fixture', - ], - ], - [] + 'name' => 'customer_name-fixture', + 'phone' => 'customer_phone-fixture', + 'email' => 'customer_email-fixture', + ] ); ``` @@ -391,13 +325,10 @@ Verifies the SMS/email code from `Request Customer Login SMS` and returns the cu ```php $result = $fleetbase->customers->verifyCustomerLoginCode( [ - 'body' => [ - 'identity' => 'customer_identity-fixture', - 'code' => 'verification_code-fixture', - 'for' => 'fleetops_customer_login', - ], - ], - [] + 'identity' => 'customer_identity-fixture', + 'code' => 'verification_code-fixture', + 'for' => 'fleetops_customer_login', + ] ); ``` @@ -411,13 +342,10 @@ Attach this device to a vehicle. ```php $result = $fleetbase->devices->attachDevice( + $deviceId, [ - 'device_id' => 'device_id-fixture', - 'body' => [ - 'vehicle' => 'vehicle_id-fixture', - ], - ], - [] + 'vehicle' => 'vehicle_id-fixture', + ] ); ``` @@ -430,15 +358,12 @@ Create a device. ```php $result = $fleetbase->devices->createDevice( [ - 'body' => [ - 'name' => 'OBD Tracker 12', - 'type' => 'obd', - 'device_id' => 'OBD-12', - 'serial_number' => 'SN-10001', - 'status' => 'active', - ], - ], - [] + 'name' => 'OBD Tracker 12', + 'type' => 'obd', + 'device_id' => 'OBD-12', + 'serial_number' => 'SN-10001', + 'status' => 'active', + ] ); ``` @@ -449,12 +374,7 @@ Delete a device. `DELETE {{base_url}}/{{namespace}}/devices/{{device_id}}` ```php -$result = $fleetbase->devices->deleteDevice( - [ - 'device_id' => 'device_id-fixture', - ], - [] -); +$result = $fleetbase->devices->deleteDevice($deviceId); ``` ### Detach Device @@ -464,12 +384,7 @@ Detach this device from its current resource. `POST {{base_url}}/{{namespace}}/devices/{{device_id}}/detach` ```php -$result = $fleetbase->devices->detachDevice( - [ - 'device_id' => 'device_id-fixture', - ], - [] -); +$result = $fleetbase->devices->detachDevice($deviceId); ``` ### Query Devices @@ -479,10 +394,7 @@ Query devices. `GET {{base_url}}/{{namespace}}/devices` ```php -$result = $fleetbase->devices->queryDevices( - [], - [] -); +$result = $fleetbase->devices->queryDevices(); ``` ### Retrieve a Device @@ -492,12 +404,7 @@ Retrieve a device. `GET {{base_url}}/{{namespace}}/devices/{{device_id}}` ```php -$result = $fleetbase->devices->retrieveDevice( - [ - 'device_id' => 'device_id-fixture', - ], - [] -); +$result = $fleetbase->devices->retrieveDevice($deviceId); ``` ### Update a Device @@ -508,13 +415,10 @@ Update a device. ```php $result = $fleetbase->devices->updateDevice( + $deviceId, [ - 'device_id' => 'device_id-fixture', - 'body' => [ - 'status' => 'maintenance', - ], - ], - [] + 'status' => 'maintenance', + ] ); ``` @@ -528,16 +432,13 @@ Changes the password of a driver who is signed in, proving the current one. A pa ```php $result = $fleetbase->drivers->changeDriverPassword( + $driverId, [ - 'id' => 'driver_id-fixture', - 'body' => [ - 'current_password' => 'created_driver_password-fixture', - 'password' => 'driver_new_password-fixture', - 'password_confirmation' => 'driver_new_password-fixture', - 'device_name' => 'navigator', - ], - ], - [] + 'current_password' => 'created_driver_password-fixture', + 'password' => 'driver_new_password-fixture', + 'password_confirmation' => 'driver_new_password-fixture', + 'device_name' => 'navigator', + ] ); ``` @@ -550,14 +451,11 @@ Creates a driver profile and linked user account. Provide a unique email and pho ```php $result = $fleetbase->drivers->createDriver( [ - 'body' => [ - 'name' => 'John Doe', - 'email' => 'randomEmail-fixture', - 'phone' => 'randomPhoneNumber-fixture', - 'password' => 'driver_seed_password-fixture', - ], - ], - [] + 'name' => 'John Doe', + 'email' => 'randomEmail-fixture', + 'phone' => 'randomPhoneNumber-fixture', + 'password' => 'driver_seed_password-fixture', + ] ); ``` @@ -568,12 +466,7 @@ Use this endpoint to delete a driver. `DELETE {{base_url}}/{{namespace}}/drivers/:id` ```php -$result = $fleetbase->drivers->deleteDriver( - [ - 'id' => 'driver_id-fixture', - ], - [] -); +$result = $fleetbase->drivers->deleteDriver($driverId); ``` ### Get Driver Current Organization @@ -583,12 +476,7 @@ Returns the driver current organization. `GET {{base_url}}/{{namespace}}/drivers/:id/current-organization` ```php -$result = $fleetbase->drivers->getDriverCurrentOrganization( - [ - 'id' => 'driver_id-fixture', - ], - [] -); +$result = $fleetbase->drivers->getDriverCurrentOrganization($driverId); ``` ### List Driver Manifests @@ -598,12 +486,7 @@ Lists the manifests assigned to a driver, newest first. A manifest is a driver's `GET {{base_url}}/{{namespace}}/drivers/:id/manifests` ```php -$result = $fleetbase->drivers->listDriverManifests( - [ - 'id' => 'driver_id-fixture', - ], - [] -); +$result = $fleetbase->drivers->listDriverManifests($driverId); ``` ### List Driver Organizations @@ -613,12 +496,7 @@ Lists organizations a driver belongs to. `GET {{base_url}}/{{namespace}}/drivers/:id/organizations` ```php -$result = $fleetbase->drivers->listDriverOrganizations( - [ - 'id' => 'driver_id-fixture', - ], - [] -); +$result = $fleetbase->drivers->listDriverOrganizations($driverId); ``` ### Login Driver @@ -630,12 +508,9 @@ Authenticates a driver with email/phone and password. ```php $result = $fleetbase->drivers->loginDriver( [ - 'body' => [ - 'identity' => 'driver_identity-fixture', - 'password' => 'driver_password-fixture', - ], - ], - [] + 'identity' => 'driver_identity-fixture', + 'password' => 'driver_password-fixture', + ] ); ``` @@ -647,11 +522,8 @@ Returns drivers for the current company. Use filters such as `vendor`, search, p ```php $result = $fleetbase->drivers->queryDrivers( - [], [ - 'query' => [ - 'id' => 'driver_id-fixture', - ], + 'id' => 'driver_id-fixture', ] ); ``` @@ -665,12 +537,9 @@ Registers a driver device token through the non-id route. ```php $result = $fleetbase->drivers->registerDevice( [ - 'body' => [ - 'token' => 'device_token-fixture', - 'platform' => 'ios', - ], - ], - [] + 'token' => 'device_token-fixture', + 'platform' => 'ios', + ] ); ``` @@ -682,14 +551,11 @@ Registers a device token for a specific driver. ```php $result = $fleetbase->drivers->registerDriverDevice( + $driverId, [ - 'id' => 'driver_id-fixture', - 'body' => [ - 'token' => 'device_token-fixture', - 'platform' => 'ios', - ], - ], - [] + 'token' => 'device_token-fixture', + 'platform' => 'ios', + ] ); ``` @@ -702,11 +568,8 @@ Starts driver SMS verification login. ```php $result = $fleetbase->drivers->requestDriverLoginSms( [ - 'body' => [ - 'phone' => 'driver_phone-fixture', - ], - ], - [] + 'phone' => 'driver_phone-fixture', + ] ); ``` @@ -719,11 +582,8 @@ Sends a password reset code to a driver who cannot sign in. The code goes by ema ```php $result = $fleetbase->drivers->requestDriverPasswordReset( [ - 'body' => [ - 'identity' => 'driver_reset_identity-fixture', - ], - ], - [] + 'identity' => 'driver_reset_identity-fixture', + ] ); ``` @@ -736,13 +596,10 @@ Sets a new password using the code sent by `POST /drivers/forgot-password`. A wr ```php $result = $fleetbase->drivers->resetDriverPassword( [ - 'body' => [ - 'identity' => 'driver_identity-fixture', - 'code' => 'driver_password_reset_code-fixture', - 'password' => 'driver_password-fixture', - ], - ], - [] + 'identity' => 'driver_identity-fixture', + 'code' => 'driver_password_reset_code-fixture', + 'password' => 'driver_password-fixture', + ] ); ``` @@ -753,12 +610,7 @@ This endpoint allows you to retrieve a driver object to view it's details. `GET {{base_url}}/{{namespace}}/drivers/:id` ```php -$result = $fleetbase->drivers->retrieveDriver( - [ - 'id' => 'driver_id-fixture', - ], - [] -); +$result = $fleetbase->drivers->retrieveDriver($driverId); ``` ### Simulate Driver Route @@ -769,20 +621,17 @@ Simulates driver movement between two resolvable points, or pass order to simula ```php $result = $fleetbase->drivers->simulateDriverRoute( + $driverId, [ - 'id' => 'driver_id-fixture', - 'body' => [ - 'start' => [ - 'latitude' => 1.3521, - 'longitude' => 103.8198, - ], - 'end' => [ - 'latitude' => 1.2903, - 'longitude' => 103.8519, - ], + 'start' => [ + 'latitude' => 1.3521, + 'longitude' => 103.8198, ], - ], - [] + 'end' => [ + 'latitude' => 1.2903, + 'longitude' => 103.8519, + ], + ] ); ``` @@ -794,13 +643,10 @@ Switches the driver session to another organization. The driver must already bel ```php $result = $fleetbase->drivers->switchDriverOrganization( + $driverId, [ - 'id' => 'multi_org_driver_id-fixture', - 'body' => [ - 'next' => 'secondary_organization_id-fixture', - ], - ], - [] + 'next' => 'secondary_organization_id-fixture', + ] ); ``` @@ -812,13 +658,10 @@ Toggles or sets driver online status. ```php $result = $fleetbase->drivers->toggleDriverOnline( + $driverId, [ - 'id' => 'driver_id-fixture', - 'body' => [ - 'online' => true, - ], - ], - [] + 'online' => true, + ] ); ``` @@ -828,10 +671,12 @@ $result = $fleetbase->drivers->toggleDriverOnline( ```php $result = $fleetbase->drivers->trackDriver( + $driverId, [ - 'id' => 'driver_id-fixture', - ], - [] + 'latitude' => -19.288195, + 'longitude' => 146.795965, + 'speed' => 100, + ] ); ``` @@ -843,15 +688,12 @@ Updates a driver's account fields, assignment, status, location, photo, or metad ```php $result = $fleetbase->drivers->updateDriver( + $driverId, [ - 'id' => 'driver_id-fixture', - 'body' => [ - 'name' => 'John Doe', - 'email' => 'randomEmail-fixture', - 'phone' => 'randomPhoneNumber-fixture', - ], - ], - [] + 'name' => 'John Doe', + 'email' => 'randomEmail-fixture', + 'phone' => 'randomPhoneNumber-fixture', + ] ); ``` @@ -864,12 +706,9 @@ Verifies driver login code and returns a driver token. ```php $result = $fleetbase->drivers->verifyDriverLoginCode( [ - 'body' => [ - 'identity' => 'driver_identity-fixture', - 'code' => 'verification_code-fixture', - ], - ], - [] + 'identity' => 'driver_identity-fixture', + 'code' => 'verification_code-fixture', + ] ); ``` @@ -884,32 +723,29 @@ Creates an entity such as a parcel, package, or item. Attach it to a payload and ```php $result = $fleetbase->entities->createEntity( [ - 'body' => [ - 'name' => 'SampleEntity', - 'type' => 'parcel', - 'payload' => 'payload_id-fixture', - 'customer' => 'ACustomer', - 'internal_id' => 'ENTITY001', - 'description' => 'Sample description', - 'meta' => [ - 'warehouse_bin' => '1', - 'warehouse_rack' => '3', - 'warehouse_section' => '4', - ], - 'weight' => 2.5, - 'weight_unit' => 'kg', - 'length' => 10, - 'width' => 5, - 'height' => 8, - 'dimensions_unit' => 'mm', - 'declared_value' => 1500, - 'price' => 1200, - 'sale_price' => 900, - 'sku' => 'SKU123', - 'currency' => 'USD', - ], - ], - [] + 'name' => 'SampleEntity', + 'type' => 'parcel', + 'payload' => 'payload_id-fixture', + 'customer' => 'ACustomer', + 'internal_id' => 'ENTITY001', + 'description' => 'Sample description', + 'meta' => [ + 'warehouse_bin' => '1', + 'warehouse_rack' => '3', + 'warehouse_section' => '4', + ], + 'weight' => 2.5, + 'weight_unit' => 'kg', + 'length' => 10, + 'width' => 5, + 'height' => 8, + 'dimensions_unit' => 'mm', + 'declared_value' => 1500, + 'price' => 1200, + 'sale_price' => 900, + 'sku' => 'SKU123', + 'currency' => 'USD', + ] ); ``` @@ -920,12 +756,7 @@ Delete an Entity. `DELETE {{base_url}}/{{namespace}}/entities/:id` ```php -$result = $fleetbase->entities->deleteEntity( - [ - 'id' => 'entity_id-fixture', - ], - [] -); +$result = $fleetbase->entities->deleteEntity($entityId); ``` ### Query Entities @@ -936,14 +767,11 @@ Returns entities for the current company. Use filters such as `type`, `payload`, ```php $result = $fleetbase->entities->queryEntities( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - 'type' => 'parcel', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', + 'type' => 'parcel', ] ); ``` @@ -955,12 +783,7 @@ Retrieve an Entity. `GET {{base_url}}/{{namespace}}/entities/:id` ```php -$result = $fleetbase->entities->retrieveEntity( - [ - 'id' => 'entity_id-fixture', - ], - [] -); +$result = $fleetbase->entities->retrieveEntity($entityId); ``` ### Update a Entity @@ -971,17 +794,14 @@ Updates an entity's descriptive fields, payload assignment, destination, dimensi ```php $result = $fleetbase->entities->updateEntity( + $entityId, [ - 'id' => 'entity_id-fixture', - 'body' => [ - 'internal_id' => 'ENTITY001-1', - 'description' => 'New entity description', - 'destination' => '', - 'sku' => 'SKUABC123', - 'currency' => 'SGD', - ], - ], - [] + 'internal_id' => 'ENTITY001-1', + 'description' => 'New entity description', + 'destination' => '', + 'sku' => 'SKUABC123', + 'currency' => 'SGD', + ] ); ``` @@ -996,18 +816,15 @@ Create equipment. ```php $result = $fleetbase->equipment->createEquipment( [ - 'body' => [ - 'name' => 'Liftgate LG-12', - 'code' => 'LG-12', - 'type' => 'liftgate', - 'status' => 'available', - 'serial_number' => 'LG120045', - 'manufacturer' => 'Maxon', - 'model' => 'BMR', - 'currency' => 'USD', - ], - ], - [] + 'name' => 'Liftgate LG-12', + 'code' => 'LG-12', + 'type' => 'liftgate', + 'status' => 'available', + 'serial_number' => 'LG120045', + 'manufacturer' => 'Maxon', + 'model' => 'BMR', + 'currency' => 'USD', + ] ); ``` @@ -1018,12 +835,7 @@ Delete equipment. `DELETE {{base_url}}/{{namespace}}/equipment/{{equipment_id}}` ```php -$result = $fleetbase->equipment->deleteEquipment( - [ - 'equipment_id' => 'equipment_id-fixture', - ], - [] -); +$result = $fleetbase->equipment->deleteEquipment($equipmentId); ``` ### Query Equipment @@ -1033,10 +845,7 @@ Query equipment. `GET {{base_url}}/{{namespace}}/equipment` ```php -$result = $fleetbase->equipment->queryEquipment( - [], - [] -); +$result = $fleetbase->equipment->queryEquipment(); ``` ### Retrieve Equipment @@ -1046,12 +855,7 @@ Retrieve equipment. `GET {{base_url}}/{{namespace}}/equipment/{{equipment_id}}` ```php -$result = $fleetbase->equipment->retrieveEquipment( - [ - 'equipment_id' => 'equipment_id-fixture', - ], - [] -); +$result = $fleetbase->equipment->retrieveEquipment($equipmentId); ``` ### Update Equipment @@ -1062,13 +866,10 @@ Update equipment. ```php $result = $fleetbase->equipment->updateEquipment( + $equipmentId, [ - 'equipment_id' => 'equipment_id-fixture', - 'body' => [ - 'status' => 'maintenance', - ], - ], - [] + 'status' => 'maintenance', + ] ); ``` @@ -1083,12 +884,9 @@ Creates a fleet for grouping drivers and vehicles. Assign a service area when th ```php $result = $fleetbase->fleets->createFleet( [ - 'body' => [ - 'name' => 'Haulers', - 'service_area' => 'service_area_id-fixture', - ], - ], - [] + 'name' => 'Haulers', + 'service_area' => 'service_area_id-fixture', + ] ); ``` @@ -1099,12 +897,7 @@ Deletes a fleet. `DELETE {{base_url}}/{{namespace}}/fleets/:id` ```php -$result = $fleetbase->fleets->deleteFleet( - [ - 'id' => 'fleet_id-fixture', - ], - [] -); +$result = $fleetbase->fleets->deleteFleet($fleetId); ``` ### Query Fleets @@ -1115,13 +908,10 @@ Returns a paginated list of fleets for the current organization. Use pagination ```php $result = $fleetbase->fleets->queryFleets( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -1133,12 +923,7 @@ Retrieves a fleet. `GET {{base_url}}/{{namespace}}/fleets/:id` ```php -$result = $fleetbase->fleets->retrieveFleet( - [ - 'id' => 'fleet_id-fixture', - ], - [] -); +$result = $fleetbase->fleets->retrieveFleet($fleetId); ``` ### Update a Fleet @@ -1149,14 +934,11 @@ Updates a fleet's name or assigned service area. ```php $result = $fleetbase->fleets->updateFleet( + $fleetId, [ - 'id' => 'fleet_id-fixture', - 'body' => [ - 'name' => 'Haulers', - 'service_area' => 'service_area_id-fixture', - ], - ], - [] + 'name' => 'Haulers', + 'service_area' => 'service_area_id-fixture', + ] ); ``` @@ -1171,21 +953,18 @@ Create a Fuel Report ```php $result = $fleetbase->fuelReports->createFuelReport( [ - 'body' => [ - 'driver' => 'driver_id-fixture', - 'odometer' => 12042, - 'volume' => 42.5, - 'metric_unit' => 'liter', - 'location' => [ - 'latitude' => 1.3521, - 'longitude' => 103.8198, - ], - 'amount' => 120.5, - 'currency' => 'USD', - 'status' => 'submitted', + 'driver' => 'driver_id-fixture', + 'odometer' => 12042, + 'volume' => 42.5, + 'metric_unit' => 'liter', + 'location' => [ + 'latitude' => 1.3521, + 'longitude' => 103.8198, ], - ], - [] + 'amount' => 120.5, + 'currency' => 'USD', + 'status' => 'submitted', + ] ); ``` @@ -1196,12 +975,7 @@ Delete a Fuel Report `DELETE {{base_url}}/{{namespace}}/fuel-reports/:id` ```php -$result = $fleetbase->fuelReports->deleteFuelReport( - [ - 'id' => 'fuel_report_id-fixture', - ], - [] -); +$result = $fleetbase->fuelReports->deleteFuelReport($fuelReportId); ``` ### Query Fuel Reports @@ -1212,13 +986,10 @@ Query Fuel Reports ```php $result = $fleetbase->fuelReports->queryFuelReports( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -1230,12 +1001,7 @@ Retrieve a Fuel Report `GET {{base_url}}/{{namespace}}/fuel-reports/:id` ```php -$result = $fleetbase->fuelReports->retrieveFuelReport( - [ - 'id' => 'fuel_report_id-fixture', - ], - [] -); +$result = $fleetbase->fuelReports->retrieveFuelReport($fuelReportId); ``` ### Update a Fuel Report @@ -1246,18 +1012,15 @@ Update a Fuel Report ```php $result = $fleetbase->fuelReports->updateFuelReport( - [ - 'id' => 'fuel_report_id-fixture', - 'body' => [ - 'odometer' => 12050, - 'volume' => 43.1, - 'metric_unit' => 'liter', - 'amount' => 122.75, - 'currency' => 'USD', - 'status' => 'approved', - ], - ], - [] + $fuelReportId, + [ + 'odometer' => 12050, + 'volume' => 43.1, + 'metric_unit' => 'liter', + 'amount' => 122.75, + 'currency' => 'USD', + 'status' => 'approved', + ] ); ``` @@ -1272,19 +1035,16 @@ Create a fuel transaction. ```php $result = $fleetbase->fuelTransactions->createFuelTransaction( [ - 'body' => [ - 'provider' => 'petroapp', - 'provider_transaction_id' => 'TX-timestamp-fixture', - 'vehicle' => 'vehicle_id-fixture', - 'station_name' => 'North Depot Fuel', - 'transaction_at' => '2026-05-07T08:30:00Z', - 'volume' => 42.5, - 'metric_unit' => 'liter', - 'amount' => 6500, - 'currency' => 'USD', - ], - ], - [] + 'provider' => 'petroapp', + 'provider_transaction_id' => 'TX-timestamp-fixture', + 'vehicle' => 'vehicle_id-fixture', + 'station_name' => 'North Depot Fuel', + 'transaction_at' => '2026-05-07T08:30:00Z', + 'volume' => 42.5, + 'metric_unit' => 'liter', + 'amount' => 6500, + 'currency' => 'USD', + ] ); ``` @@ -1295,12 +1055,7 @@ Delete a fuel transaction. `DELETE {{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}` ```php -$result = $fleetbase->fuelTransactions->deleteFuelTransaction( - [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - ], - [] -); +$result = $fleetbase->fuelTransactions->deleteFuelTransaction($fuelTransactionId); ``` ### Match Fuel Transaction Order @@ -1311,13 +1066,10 @@ Match this fuel transaction to an order. ```php $result = $fleetbase->fuelTransactions->matchFuelTransactionOrder( + $fuelTransactionId, [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - 'body' => [ - 'order' => 'order_id-fixture', - ], - ], - [] + 'order' => 'order_id-fixture', + ] ); ``` @@ -1329,13 +1081,10 @@ Match this fuel transaction to a vehicle. ```php $result = $fleetbase->fuelTransactions->matchFuelTransactionVehicle( + $fuelTransactionId, [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - 'body' => [ - 'vehicle' => 'vehicle_id-fixture', - ], - ], - [] + 'vehicle' => 'vehicle_id-fixture', + ] ); ``` @@ -1346,10 +1095,7 @@ Query fuel transactions. `GET {{base_url}}/{{namespace}}/fuel-transactions` ```php -$result = $fleetbase->fuelTransactions->queryFuelTransactions( - [], - [] -); +$result = $fleetbase->fuelTransactions->queryFuelTransactions(); ``` ### Reprocess Fuel Transaction @@ -1359,12 +1105,7 @@ Reprocess matching and fuel report generation for this fuel transaction. `POST {{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/reprocess` ```php -$result = $fleetbase->fuelTransactions->reprocessFuelTransaction( - [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - ], - [] -); +$result = $fleetbase->fuelTransactions->reprocessFuelTransaction($fuelTransactionId); ``` ### Retrieve a Fuel Transaction @@ -1374,12 +1115,7 @@ Retrieve a fuel transaction. `GET {{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}` ```php -$result = $fleetbase->fuelTransactions->retrieveFuelTransaction( - [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - ], - [] -); +$result = $fleetbase->fuelTransactions->retrieveFuelTransaction($fuelTransactionId); ``` ### Review Fuel Transaction @@ -1390,13 +1126,10 @@ Mark this fuel transaction as reviewed or ignored. ```php $result = $fleetbase->fuelTransactions->reviewFuelTransaction( + $fuelTransactionId, [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - 'body' => [ - 'status' => 'reviewed', - ], - ], - [] + 'status' => 'reviewed', + ] ); ``` @@ -1408,13 +1141,10 @@ Update a fuel transaction. ```php $result = $fleetbase->fuelTransactions->updateFuelTransaction( + $fuelTransactionId, [ - 'fuel_transaction_id' => 'fuel_transaction_id-fixture', - 'body' => [ - 'sync_status' => 'reviewed', - ], - ], - [] + 'sync_status' => 'reviewed', + ] ); ``` @@ -1428,13 +1158,9 @@ Get Driver Geofence History ```php $result = $fleetbase->geofences->getDriverGeofenceHistory( + $driverId, [ - 'driverId' => 'driver_id-fixture', - ], - [ - 'query' => [ - 'per_page' => '50', - ], + 'per_page' => '50', ] ); ``` @@ -1447,12 +1173,9 @@ Get Geofence Dwell Report ```php $result = $fleetbase->geofences->getGeofenceDwellReport( - [], [ - 'query' => [ - 'from' => 'from_datetime-fixture', - 'to' => 'to_datetime-fixture', - ], + 'from' => 'from_datetime-fixture', + 'to' => 'to_datetime-fixture', ] ); ``` @@ -1464,10 +1187,7 @@ Get Geofence Inventory `GET {{base_url}}/{{namespace}}/geofences/inventory` ```php -$result = $fleetbase->geofences->getGeofenceInventory( - [], - [] -); +$result = $fleetbase->geofences->getGeofenceInventory(); ``` ### List Geofence Events @@ -1478,12 +1198,9 @@ List Geofence Events ```php $result = $fleetbase->geofences->listGeofenceEvents( - [], [ - 'query' => [ - 'per_page' => '50', - 'event_type' => 'entered', - ], + 'per_page' => '50', + 'event_type' => 'entered', ] ); ``` @@ -1499,20 +1216,17 @@ Create an Issue ```php $result = $fleetbase->issues->createIssue( [ - 'body' => [ - 'driver' => 'driver_id-fixture', - 'location' => [ - 'latitude' => 1.3521, - 'longitude' => 103.8198, - ], - 'report' => 'Vehicle tire pressure warning', - 'category' => 'vehicle', - 'type' => 'maintenance', - 'priority' => 'medium', - 'status' => 'open', + 'driver' => 'driver_id-fixture', + 'location' => [ + 'latitude' => 1.3521, + 'longitude' => 103.8198, ], - ], - [] + 'report' => 'Vehicle tire pressure warning', + 'category' => 'vehicle', + 'type' => 'maintenance', + 'priority' => 'medium', + 'status' => 'open', + ] ); ``` @@ -1523,12 +1237,7 @@ Delete an Issue `DELETE {{base_url}}/{{namespace}}/issues/:id` ```php -$result = $fleetbase->issues->deleteIssue( - [ - 'id' => 'issue_id-fixture', - ], - [] -); +$result = $fleetbase->issues->deleteIssue($issueId); ``` ### Query Issues @@ -1539,13 +1248,10 @@ Query Issues ```php $result = $fleetbase->issues->queryIssues( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -1557,12 +1263,7 @@ Retrieve an Issue `GET {{base_url}}/{{namespace}}/issues/:id` ```php -$result = $fleetbase->issues->retrieveIssue( - [ - 'id' => 'issue_id-fixture', - ], - [] -); +$result = $fleetbase->issues->retrieveIssue($issueId); ``` ### Update an Issue @@ -1573,17 +1274,14 @@ Update an Issue ```php $result = $fleetbase->issues->updateIssue( + $issueId, [ - 'id' => 'issue_id-fixture', - 'body' => [ - 'report' => 'Updated issue report', - 'category' => 'vehicle', - 'type' => 'maintenance', - 'priority' => 'high', - 'status' => 'resolved', - ], - ], - [] + 'report' => 'Updated issue report', + 'category' => 'vehicle', + 'type' => 'maintenance', + 'priority' => 'high', + 'status' => 'resolved', + ] ); ``` @@ -1597,14 +1295,10 @@ Renders a PDF, text, or base64 label for an order, waypoint, or entity id. ```php $result = $fleetbase->labels->renderLabel( + $labelId, [ - 'id' => 'order_id-fixture', - ], - [ - 'query' => [ - 'format' => 'stream', - 'type' => 'order', - ], + 'format' => 'stream', + 'type' => 'order', ] ); ``` @@ -1619,14 +1313,11 @@ Re-sequences the stops a driver has not done yet, nearest first. This is the dri ```php $result = $fleetbase->manifests->optimizeManifest( + $manifestId, [ - 'id' => 'manifest_id-fixture', - 'body' => [ - 'latitude' => 1.3521, - 'longitude' => 103.8198, - ], - ], - [] + 'latitude' => 1.3521, + 'longitude' => 103.8198, + ] ); ``` @@ -1637,12 +1328,7 @@ Retrieves a manifest with its stops, in the sequence they are to be driven. Each `GET {{base_url}}/{{namespace}}/manifests/:id` ```php -$result = $fleetbase->manifests->retrieveManifest( - [ - 'id' => 'manifest_id-fixture', - ], - [] -); +$result = $fleetbase->manifests->retrieveManifest($manifestId); ``` ### Update a Manifest Stop @@ -1653,13 +1339,10 @@ Marks a stop on a manifest as arrived, completed or skipped. Status changes run ```php $result = $fleetbase->manifests->updateManifestStop( + $manifestId, [ - 'id' => 'manifest_stop_id-fixture', - 'body' => [ - 'status' => 'arrived', - ], - ], - [] + 'status' => 'arrived', + ] ); ``` @@ -1672,12 +1355,7 @@ Returns driver onboarding settings for an organization. `GET {{base_url}}/{{namespace}}/onboard/driver-onboard-settings/:companyId` ```php -$result = $fleetbase->onboard->getDriverOnboardSettings( - [ - 'companyId' => 'organization_id-fixture', - ], - [] -); +$result = $fleetbase->onboard->getDriverOnboardSettings($companyId); ``` ## Orchestrator @@ -1691,22 +1369,19 @@ Commits a proposed orchestrator plan by creating manifests and applying vehicle ```php $result = $fleetbase->orchestrator->commitOrchestratorPlan( [ - 'body' => [ - 'scheduled_date' => '2026-05-16', - 'assignments' => [ - [ - 'order_id' => 'order_id-fixture', - 'vehicle_id' => 'vehicle_id-fixture', - 'driver_id' => 'driver_id-fixture', - 'sequence' => 1, - 'arrival' => 1778918400, - 'duration' => 900, - 'distance' => 4200, - ], + 'scheduled_date' => '2026-05-16', + 'assignments' => [ + [ + 'order_id' => 'order_id-fixture', + 'vehicle_id' => 'vehicle_id-fixture', + 'driver_id' => 'driver_id-fixture', + 'sequence' => 1, + 'arrival' => 1778918400, + 'duration' => 900, + 'distance' => 4200, ], ], - ], - [] + ] ); ``` @@ -1719,27 +1394,24 @@ Runs an orchestration phase and returns a proposed assignment plan without commi ```php $result = $fleetbase->orchestrator->runOrchestrator( [ - 'body' => [ - 'mode' => 'assign_vehicles', - 'order_ids' => [ - 'order_id-fixture', - ], - 'vehicle_ids' => [ - 'vehicle_id-fixture', - ], - 'driver_ids' => [], - 'prior_assignments' => [], - 'options' => [ - 'engine' => 'greedy', - 'allocation_strategy' => 'route_aware', - 'geometry' => false, - 'respect_capacity' => true, - 'respect_skills' => true, - 'return_to_depot' => false, - ], + 'mode' => 'assign_vehicles', + 'order_ids' => [ + 'order_id-fixture', ], - ], - [] + 'vehicle_ids' => [ + 'vehicle_id-fixture', + ], + 'driver_ids' => [], + 'prior_assignments' => [], + 'options' => [ + 'engine' => 'greedy', + 'allocation_strategy' => 'route_aware', + 'geometry' => false, + 'respect_capacity' => true, + 'respect_skills' => true, + 'return_to_depot' => false, + ], + ] ); ``` @@ -1752,10 +1424,7 @@ Lists OrderConfigs available to the company resolved from the API credential. `GET {{base_url}}/{{namespace}}/order-configs` ```php -$result = $fleetbase->orderConfigs->queryOrderConfigs( - [], - [] -); +$result = $fleetbase->orderConfigs->queryOrderConfigs(); ``` ### Retrieve an Order Config @@ -1765,12 +1434,7 @@ Fetches a single OrderConfig. The `{id}` segment accepts any identifier supporte `GET {{base_url}}/{{namespace}}/order-configs/{{order_config_id}}` ```php -$result = $fleetbase->orderConfigs->retrieveOrderConfig( - [ - 'order_config_id' => 'order_config_id-fixture', - ], - [] -); +$result = $fleetbase->orderConfigs->retrieveOrderConfig($orderConfigId); ``` ## Orders @@ -1782,12 +1446,7 @@ Cancels an order without deleting the order resource. `DELETE {{base_url}}/{{namespace}}/orders/:id/cancel` ```php -$result = $fleetbase->orders->cancelOrder( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->cancelOrder($orderId); ``` ### Capture Photo for Order @@ -1798,18 +1457,15 @@ Captures proof photos for an order or order subject. ```php $result = $fleetbase->orders->capturePhotoForOrder( + $orderId, + $subjectId, [ - 'id' => 'order_id-fixture', - 'subjectId' => 'subject_id-fixture', - 'body' => [ - 'photos' => [ - 'proof_photo_base64-fixture', - ], - 'remarks' => 'Verified by Photo', - 'data' => [], + 'photos' => [ + 'proof_photo_base64-fixture', ], - ], - [] + 'remarks' => 'Verified by Photo', + 'data' => [], + ] ); ``` @@ -1821,16 +1477,13 @@ Captures a QR code proof for an order or order subject. The response includes th ```php $result = $fleetbase->orders->captureQrCodeForOrder( + $orderId, + $subjectId, [ - 'id' => 'order_id-fixture', - 'subject-id' => '', - 'body' => [ - 'code' => 'qr_code-fixture', - 'data' => [], - 'raw_data' => [], - ], - ], - [] + 'code' => 'qr_code-fixture', + 'data' => [], + 'raw_data' => [], + ] ); ``` @@ -1842,15 +1495,12 @@ Captures a signature proof for an order or order subject. Use this when a workfl ```php $result = $fleetbase->orders->captureSignatureForOrder( + $orderId, + $subjectId, [ - 'id' => 'order_id-fixture', - 'subject-id' => '', - 'body' => [ - 'signature' => 'proof_signature_base64-fixture', - 'data' => [], - ], - ], - [] + 'signature' => 'proof_signature_base64-fixture', + 'data' => [], + ] ); ``` @@ -1861,12 +1511,7 @@ Completes an order after all waypoints are complete. `POST {{base_url}}/{{namespace}}/orders/:id/complete` ```php -$result = $fleetbase->orders->completeOrder( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->completeOrder($orderId); ``` ### Create an Order @@ -1878,26 +1523,23 @@ Creates a new order for the current company. Provide an existing payload ID, an ```php $result = $fleetbase->orders->createOrder( [ - 'body' => [ - 'pickup' => 'Singapore 018971', - 'dropoff' => '321 Orchard Rd, Singapore', - 'waypoints' => [ - '10 Bayfront Avenue, Singapore 018956', - '18 Marina Gardens Drive, Singapore 018953', - '80 Mandai Lake Rd, Singapore 729826', - '1 Beach Road, Singapore 189673', - ], - 'dispatch' => false, - 'driver' => 'driver_id-fixture', - 'facilitator' => 'vendor_id-fixture', - 'customer' => 'contact_id-fixture', - 'meta' => [ - 'Warehouse' => 'WAREHOUSE-123', - ], - 'notes' => 'Order notes', - ], - ], - [] + 'pickup' => 'Singapore 018971', + 'dropoff' => '321 Orchard Rd, Singapore', + 'waypoints' => [ + '10 Bayfront Avenue, Singapore 018956', + '18 Marina Gardens Drive, Singapore 018953', + '80 Mandai Lake Rd, Singapore 729826', + '1 Beach Road, Singapore 189673', + ], + 'dispatch' => false, + 'driver' => 'driver_id-fixture', + 'facilitator' => 'vendor_id-fixture', + 'customer' => 'contact_id-fixture', + 'meta' => [ + 'Warehouse' => 'WAREHOUSE-123', + ], + 'notes' => 'Order notes', + ] ); ``` @@ -1910,16 +1552,13 @@ Creates an order using the Complete Payload payload shape. Promoted from a store ```php $result = $fleetbase->orders->createOrderUsingCompletePayload( [ - 'body' => [ - 'pickup' => 'Singapore 018971', - 'dropoff' => '321 Orchard Rd, Singapore', - 'dispatch' => false, - 'driver' => 'driver_id-fixture', - 'customer' => 'contact_id-fixture', - 'notes' => 'Deliver through receiving bay.', - ], - ], - [] + 'pickup' => 'Singapore 018971', + 'dropoff' => '321 Orchard Rd, Singapore', + 'dispatch' => false, + 'driver' => 'driver_id-fixture', + 'customer' => 'contact_id-fixture', + 'notes' => 'Deliver through receiving bay.', + ] ); ``` @@ -1932,18 +1571,15 @@ Creates an order with `pickup` and `dropoff` given as coordinate objects. `Place ```php $result = $fleetbase->orders->createOrderUsingCoordinates( [ - 'body' => [ - 'pickup' => [ - 'latitude' => 1.2830632, - 'longitude' => 103.8579965, - ], - 'dropoff' => [ - 'lat' => 1.4043, - 'lng' => 103.793, - ], + 'pickup' => [ + 'latitude' => 1.2830632, + 'longitude' => 103.8579965, + ], + 'dropoff' => [ + 'lat' => 1.4043, + 'lng' => 103.793, ], - ], - [] + ] ); ``` @@ -1956,24 +1592,21 @@ Creates an order with `pickup` and `dropoff` given as GeoJSON Point objects. `Pl ```php $result = $fleetbase->orders->createOrderUsingGeojsonPoints( [ - 'body' => [ - 'pickup' => [ - 'type' => 'Point', - 'coordinates' => [ - 103.8579965, - 1.2830632, - ], + 'pickup' => [ + 'type' => 'Point', + 'coordinates' => [ + 103.8579965, + 1.2830632, ], - 'dropoff' => [ - 'type' => 'Point', - 'coordinates' => [ - 103.793, - 1.4043, - ], + ], + 'dropoff' => [ + 'type' => 'Point', + 'coordinates' => [ + 103.793, + 1.4043, ], ], - ], - [] + ] ); ``` @@ -1986,38 +1619,35 @@ Creates an order using the Payload payload shape. Promoted from a stored example ```php $result = $fleetbase->orders->createOrderUsingPayload( [ - 'body' => [ - 'payload' => [ - 'pickup' => 'Singapore 018971', - 'dropoff' => '321 Orchard Rd, Singapore', - 'entities' => [ - [ - 'name' => 'UltraHD 4K Smart TV', - 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', - 'currency' => 'USD', - 'price' => 1200, - ], - [ - 'name' => 'Bluetooth Wireless Headphones', - 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', - 'currency' => 'USD', - 'price' => 250, - ], - [ - 'name' => 'Smart Fitness Watch', - 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', - 'currency' => 'USD', - 'price' => 199.99, - ], + 'payload' => [ + 'pickup' => 'Singapore 018971', + 'dropoff' => '321 Orchard Rd, Singapore', + 'entities' => [ + [ + 'name' => 'UltraHD 4K Smart TV', + 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', + 'currency' => 'USD', + 'price' => 1200, ], - ], - 'meta' => [ - 'Warehouse' => 'WAREHOUSE-123', - ], - 'notes' => 'Order notes', - ], - ], - [] + [ + 'name' => 'Bluetooth Wireless Headphones', + 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', + 'currency' => 'USD', + 'price' => 250, + ], + [ + 'name' => 'Smart Fitness Watch', + 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', + 'currency' => 'USD', + 'price' => 199.99, + ], + ], + ], + 'meta' => [ + 'Warehouse' => 'WAREHOUSE-123', + ], + 'notes' => 'Order notes', + ] ); ``` @@ -2030,46 +1660,43 @@ Creates an order using the Waypoints and Entities with Photos payload shape. Pro ```php $result = $fleetbase->orders->createOrderUsingWaypointsAndEntitiesWithPhotos( [ - 'body' => [ - 'payload' => [ - 'waypoints' => [ - 'Singapore 018971', - '321 Orchard Rd, Singapore', + 'payload' => [ + 'waypoints' => [ + 'Singapore 018971', + '321 Orchard Rd, Singapore', + ], + 'entities' => [ + [ + 'destination' => 0, + 'name' => 'UltraHD 4K Smart TV', + 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', + 'currency' => 'USD', + 'price' => 1200, + 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', ], - 'entities' => [ - [ - 'destination' => 0, - 'name' => 'UltraHD 4K Smart TV', - 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', - 'currency' => 'USD', - 'price' => 1200, - 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', - ], - [ - 'destination' => 0, - 'name' => 'Bluetooth Wireless Headphones', - 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', - 'currency' => 'USD', - 'price' => 250, - 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', - ], - [ - 'destination' => 1, - 'name' => 'Smart Fitness Watch', - 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', - 'currency' => 'USD', - 'price' => 199.99, - 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', - ], + [ + 'destination' => 0, + 'name' => 'Bluetooth Wireless Headphones', + 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', + 'currency' => 'USD', + 'price' => 250, + 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', + ], + [ + 'destination' => 1, + 'name' => 'Smart Fitness Watch', + 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', + 'currency' => 'USD', + 'price' => 199.99, + 'photo' => 'https://cdn.thewirecutter.com/wp-content/media/2025/07/BEST-BUDGET-4K-TV-2048px-3185-2x1-1.jpg?width=1024&quality=75&crop=2:1&auto=webp', ], ], - 'meta' => [ - 'Warehouse' => 'WAREHOUSE-123', - ], - 'notes' => 'Order notes', ], - ], - [] + 'meta' => [ + 'Warehouse' => 'WAREHOUSE-123', + ], + 'notes' => 'Order notes', + ] ); ``` @@ -2082,43 +1709,40 @@ Creates an order using the Waypoints and Entity Destinations payload shape. Prom ```php $result = $fleetbase->orders->createOrderUsingWaypointsAndEntityDestinations( [ - 'body' => [ - 'payload' => [ - 'waypoints' => [ - 'Singapore 018971', - '321 Orchard Rd, Singapore', + 'payload' => [ + 'waypoints' => [ + 'Singapore 018971', + '321 Orchard Rd, Singapore', + ], + 'entities' => [ + [ + 'destination' => 0, + 'name' => 'UltraHD 4K Smart TV', + 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', + 'currency' => 'USD', + 'price' => 1200, ], - 'entities' => [ - [ - 'destination' => 0, - 'name' => 'UltraHD 4K Smart TV', - 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', - 'currency' => 'USD', - 'price' => 1200, - ], - [ - 'destination' => 0, - 'name' => 'Bluetooth Wireless Headphones', - 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', - 'currency' => 'USD', - 'price' => 250, - ], - [ - 'destination' => 1, - 'name' => 'Smart Fitness Watch', - 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', - 'currency' => 'USD', - 'price' => 199.99, - ], + [ + 'destination' => 0, + 'name' => 'Bluetooth Wireless Headphones', + 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', + 'currency' => 'USD', + 'price' => 250, + ], + [ + 'destination' => 1, + 'name' => 'Smart Fitness Watch', + 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', + 'currency' => 'USD', + 'price' => 199.99, ], ], - 'meta' => [ - 'Warehouse' => 'WAREHOUSE-123', - ], - 'notes' => 'Order notes', ], - ], - [] + 'meta' => [ + 'Warehouse' => 'WAREHOUSE-123', + ], + 'notes' => 'Order notes', + ] ); ``` @@ -2131,12 +1755,9 @@ Creates an order using the only Pickup Dropoff payload shape. Promoted from a st ```php $result = $fleetbase->orders->createOrderUsingOnlyPickupDropoff( [ - 'body' => [ - 'pickup' => 'Singapore 018971', - 'dropoff' => '321 Orchard Rd, Singapore', - ], - ], - [] + 'pickup' => 'Singapore 018971', + 'dropoff' => '321 Orchard Rd, Singapore', + ] ); ``` @@ -2149,21 +1770,18 @@ Creates an order using the only Waypoints payload shape. Promoted from a stored ```php $result = $fleetbase->orders->createOrderUsingOnlyWaypoints( [ - 'body' => [ - 'waypoints' => [ - [ - 1.3521, - 103.8198, - ], - '10 Bayfront Avenue, Singapore 018956', - '18 Marina Gardens Drive, Singapore 018953', - '80 Mandai Lake Rd, Singapore 729826', - '1 Beach Road, Singapore 189673', - 'Sentosa, Singapore', + 'waypoints' => [ + [ + 1.3521, + 103.8198, ], + '10 Bayfront Avenue, Singapore 018956', + '18 Marina Gardens Drive, Singapore 018953', + '80 Mandai Lake Rd, Singapore 729826', + '1 Beach Road, Singapore 189673', + 'Sentosa, Singapore', ], - ], - [] + ] ); ``` @@ -2174,12 +1792,7 @@ Deletes an order resource. `DELETE {{base_url}}/{{namespace}}/orders/:id` ```php -$result = $fleetbase->orders->deleteOrder( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->deleteOrder($orderId); ``` ### Dispatch an Order @@ -2189,7 +1802,7 @@ Dispatches an order to an assigned or eligible driver. The response returns the `PATCH {{base_url}}/{{namespace}}/orders/:id/dispatch` ```php -$result = $fleetbase->orders->dispatchOrder('order_id-fixture'); +$result = $fleetbase->orders->dispatchOrder($orderId); ``` ### Get Editable Entity Fields @@ -2199,12 +1812,7 @@ Returns configured editable entity fields for an order. `GET {{base_url}}/{{namespace}}/orders/:id/editable-entity-fields` ```php -$result = $fleetbase->orders->getEditableEntityFields( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->getEditableEntityFields($orderId); ``` ### Get Order Distance and Time @@ -2214,12 +1822,7 @@ Returns and updates the order distance/time matrix. `GET {{base_url}}/{{namespace}}/orders/:id/distance-and-time` ```php -$result = $fleetbase->orders->getOrderDistanceAndTime( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->getOrderDistanceAndTime($orderId); ``` ### Get Order ETA @@ -2229,12 +1832,7 @@ Returns ETA data for an order. `GET {{base_url}}/{{namespace}}/orders/:id/eta` ```php -$result = $fleetbase->orders->getOrderEta( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->getOrderEta($orderId); ``` ### Get Order Next Activity @@ -2245,13 +1843,9 @@ Returns the next workflow activity for an order. Use it to determine the next op ```php $result = $fleetbase->orders->getOrderNextActivity( + $orderId, [ - 'id' => 'order_id-fixture', - ], - [ - 'query' => [ - 'waypoint' => 'current_waypoint_id-fixture', - ], + 'waypoint' => 'current_waypoint_id-fixture', ] ); ``` @@ -2263,12 +1857,7 @@ Returns public tracking data for an order. `GET {{base_url}}/{{namespace}}/orders/:id/tracker` ```php -$result = $fleetbase->orders->getOrderTracker( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->getOrderTracker($orderId); ``` ### List Order Comments @@ -2278,12 +1867,7 @@ Lists comments attached to an order. `GET {{base_url}}/{{namespace}}/orders/:id/comments` ```php -$result = $fleetbase->orders->listOrderComments( - [ - 'id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->listOrderComments($orderId); ``` ### List Order Proofs @@ -2293,13 +1877,7 @@ Lists proof of delivery resources for an order or subject. `GET {{base_url}}/{{namespace}}/orders/:id/proofs/:subjectId` ```php -$result = $fleetbase->orders->listOrderProofs( - [ - 'id' => 'order_id-fixture', - 'subjectId' => 'subject_id-fixture', - ], - [] -); +$result = $fleetbase->orders->listOrderProofs($orderId, $subjectId); ``` ### Query Orders @@ -2310,14 +1888,11 @@ Returns orders for the current company. Use filters such as `status`, `payload`, ```php $result = $fleetbase->orders->queryOrders( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - 'status' => 'created', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', + 'status' => 'created', ] ); ``` @@ -2329,12 +1904,7 @@ Retrieves a single order by ID. The response includes the public order fields pl `GET {{base_url}}/{{namespace}}/orders/{{order_id}}` ```php -$result = $fleetbase->orders->retrieveOrder( - [ - 'order_id' => 'order_id-fixture', - ], - [] -); +$result = $fleetbase->orders->retrieveOrder($orderId); ``` ### Schedule an Order @@ -2345,15 +1915,12 @@ Schedules an order for a specific date and optional time. Fleetbase parses the s ```php $result = $fleetbase->orders->scheduleOrder( + $orderId, [ - 'id' => 'order_id-fixture', - 'body' => [ - 'date' => '2024-02-11', - 'time' => '8am', - 'timezone' => 'Asia/Singapore', - ], - ], - [] + 'date' => '2024-02-11', + 'time' => '8am', + 'timezone' => 'Asia/Singapore', + ] ); ``` @@ -2364,13 +1931,7 @@ Sets the destination waypoint or place for an order. The response returns the up `PATCH {{base_url}}/{{namespace}}/orders/:id/set-destination/:placeId` ```php -$result = $fleetbase->orders->setOrderDestination( - [ - 'id' => 'order_id-fixture', - 'placeId' => 'waypoint_id-fixture', - ], - [] -); +$result = $fleetbase->orders->setOrderDestination($orderId, $placeId); ``` ### Start an Order @@ -2381,13 +1942,10 @@ Starts an order and transitions it into active execution. Use this when a driver ```php $result = $fleetbase->orders->startOrder( + $orderId, [ - 'id' => 'order_id-fixture', - 'body' => [ - 'skip_dispatch' => false, - ], - ], - [] + 'skip_dispatch' => false, + ] ); ``` @@ -2399,14 +1957,11 @@ Updates the current activity state for an order. The response returns the order ```php $result = $fleetbase->orders->updateOrderActivity( + $orderId, [ - 'id' => 'order_id-fixture', - 'body' => [ - 'activity' => 'next_activity-fixture', - 'skip_dispatch' => false, - ], - ], - [] + 'activity' => 'next_activity-fixture', + 'skip_dispatch' => false, + ] ); ``` @@ -2418,13 +1973,10 @@ Updates an order and returns the updated order resource. You can update order me ```php $result = $fleetbase->orders->updateOrder( + $orderId, [ - 'id' => 'order_id-fixture', - 'body' => [ - 'service_quote' => 'service_quote_id-fixture', - ], - ], - [] + 'service_quote' => 'service_quote_id-fixture', + ] ); ``` @@ -2437,10 +1989,7 @@ Returns the organization associated with the API key on the request. Use it to c `GET {{base_url}}/{{namespace}}/organizations/current` ```php -$result = $fleetbase->organizations->getCurrentOrganization( - [], - [] -); +$result = $fleetbase->organizations->getCurrentOrganization(); ``` ### List Organizations @@ -2451,12 +2000,9 @@ Lists organizations available for driver onboarding and organization selection. ```php $result = $fleetbase->organizations->listOrganizations( - [], [ - 'query' => [ - 'limit' => '10', - 'with_driver_onboard' => 'false', - ], + 'limit' => '10', + 'with_driver_onboard' => 'false', ] ); ``` @@ -2472,16 +2018,13 @@ Create a part. ```php $result = $fleetbase->parts->createPart( [ - 'body' => [ - 'sku' => 'FLT-OIL-timestamp-fixture', - 'name' => 'Oil Filter', - 'quantity_on_hand' => 24, - 'unit_cost' => 1200, - 'currency' => 'USD', - 'status' => 'in_stock', - ], - ], - [] + 'sku' => 'FLT-OIL-timestamp-fixture', + 'name' => 'Oil Filter', + 'quantity_on_hand' => 24, + 'unit_cost' => 1200, + 'currency' => 'USD', + 'status' => 'in_stock', + ] ); ``` @@ -2492,12 +2035,7 @@ Delete a part. `DELETE {{base_url}}/{{namespace}}/parts/{{part_id}}` ```php -$result = $fleetbase->parts->deletePart( - [ - 'part_id' => 'part_id-fixture', - ], - [] -); +$result = $fleetbase->parts->deletePart($partId); ``` ### Query Parts @@ -2507,10 +2045,7 @@ Query parts. `GET {{base_url}}/{{namespace}}/parts` ```php -$result = $fleetbase->parts->queryParts( - [], - [] -); +$result = $fleetbase->parts->queryParts(); ``` ### Retrieve a Part @@ -2520,12 +2055,7 @@ Retrieve a part. `GET {{base_url}}/{{namespace}}/parts/{{part_id}}` ```php -$result = $fleetbase->parts->retrievePart( - [ - 'part_id' => 'part_id-fixture', - ], - [] -); +$result = $fleetbase->parts->retrievePart($partId); ``` ### Update a Part @@ -2536,13 +2066,10 @@ Update a part. ```php $result = $fleetbase->parts->updatePart( + $partId, [ - 'part_id' => 'part_id-fixture', - 'body' => [ - 'quantity_on_hand' => 18, - ], - ], - [] + 'quantity_on_hand' => 18, + ] ); ``` @@ -2557,23 +2084,20 @@ Creates a payload containing route endpoints and optional entities. Provide eith ```php $result = $fleetbase->payloads->createPayload( [ - 'body' => [ - 'pickup' => [ - 'street1' => '10 Bayfront Avenue', - 'city' => 'Singapore', - 'postal_code' => '018956', - 'country' => 'SG', - ], - 'dropoff' => [ - 'street1' => '80 Mandai Lake Rd', - 'city' => 'Singapore', - 'postal_code' => '729826', - 'country' => 'SG', - ], - 'type' => 'food_delivery', + 'pickup' => [ + 'street1' => '10 Bayfront Avenue', + 'city' => 'Singapore', + 'postal_code' => '018956', + 'country' => 'SG', + ], + 'dropoff' => [ + 'street1' => '80 Mandai Lake Rd', + 'city' => 'Singapore', + 'postal_code' => '729826', + 'country' => 'SG', ], - ], - [] + 'type' => 'food_delivery', + ] ); ``` @@ -2584,12 +2108,7 @@ Delete a Payload. `DELETE {{base_url}}/{{namespace}}/payloads/:id` ```php -$result = $fleetbase->payloads->deletePayload( - [ - 'id' => 'payload_id-fixture', - ], - [] -); +$result = $fleetbase->payloads->deletePayload($payloadId); ``` ### Query Payloads @@ -2600,13 +2119,10 @@ Returns payloads for the current company. Use pagination and sort parameters to ```php $result = $fleetbase->payloads->queryPayloads( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -2618,12 +2134,7 @@ Retrieve a Payload. `GET {{base_url}}/{{namespace}}/payloads/:id` ```php -$result = $fleetbase->payloads->retrievePayload( - [ - 'id' => 'payload_id-fixture', - ], - [] -); +$result = $fleetbase->payloads->retrievePayload($payloadId); ``` ### Update a Payload @@ -2634,44 +2145,41 @@ Updates a payload's route endpoints, waypoints, entities, cash-on-delivery setti ```php $result = $fleetbase->payloads->updatePayload( + $payloadId, [ - 'id' => 'payload_id-fixture', - 'body' => [ - 'pickup' => [ - 'street1' => '10 Bayfront Avenue', - 'city' => 'Singapore', - 'postal_code' => '018956', - 'country' => 'SG', + 'pickup' => [ + 'street1' => '10 Bayfront Avenue', + 'city' => 'Singapore', + 'postal_code' => '018956', + 'country' => 'SG', + ], + 'dropoff' => [ + 'street1' => '80 Mandai Lake Rd', + 'city' => 'Singapore', + 'postal_code' => '729826', + 'country' => 'SG', + ], + 'entities' => [ + [ + 'name' => 'UltraHD 4K Smart TV', + 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', + 'currency' => 'USD', + 'price' => 1200, ], - 'dropoff' => [ - 'street1' => '80 Mandai Lake Rd', - 'city' => 'Singapore', - 'postal_code' => '729826', - 'country' => 'SG', + [ + 'name' => 'Bluetooth Wireless Headphones', + 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', + 'currency' => 'USD', + 'price' => 250, ], - 'entities' => [ - [ - 'name' => 'UltraHD 4K Smart TV', - 'description' => '65-inch high-definition smart TV with vibrant colors and a sleek design.', - 'currency' => 'USD', - 'price' => 1200, - ], - [ - 'name' => 'Bluetooth Wireless Headphones', - 'description' => 'Noise-cancelling, over-ear headphones with long-lasting battery life.', - 'currency' => 'USD', - 'price' => 250, - ], - [ - 'name' => 'Smart Fitness Watch', - 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', - 'currency' => 'USD', - 'price' => 199.99, - ], + [ + 'name' => 'Smart Fitness Watch', + 'description' => 'Water-resistant fitness watch with heart rate monitor and GPS tracking.', + 'currency' => 'USD', + 'price' => 199.99, ], ], - ], - [] + ] ); ``` @@ -2686,21 +2194,18 @@ Creates a place for the current company. Provide structured address fields, a fr ```php $result = $fleetbase->places->createPlace( [ - 'body' => [ - 'name' => 'Central Park', - 'street1' => '830 5th Ave', - 'city' => 'New York', - 'province' => 'New York', - 'postal_code' => '10065', - 'neighborhood' => 'Manhattan', - 'district' => 'Midtown', - 'building' => 'Park Area', - 'country' => 'US', - 'phone' => '+12123106600', - 'type' => 'Park', - ], - ], - [] + 'name' => 'Central Park', + 'street1' => '830 5th Ave', + 'city' => 'New York', + 'province' => 'New York', + 'postal_code' => '10065', + 'neighborhood' => 'Manhattan', + 'district' => 'Midtown', + 'building' => 'Park Area', + 'country' => 'US', + 'phone' => '+12123106600', + 'type' => 'Park', + ] ); ``` @@ -2711,12 +2216,7 @@ Permanently deletes a place. It cannot be undone. `DELETE {{base_url}}/{{namespace}}/places/:id` ```php -$result = $fleetbase->places->deletePlace( - [ - 'id' => 'place_id-fixture', - ], - [] -); +$result = $fleetbase->places->deletePlace($placeId); ``` ### List all Places @@ -2727,13 +2227,10 @@ Returns a paginated list of places for the current organization. Places are sort ```php $result = $fleetbase->places->listAllPlaces( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -2746,14 +2243,11 @@ Searches and filters places for the current organization. Use query and paginati ```php $result = $fleetbase->places->queryPlaces( - [], [ - 'query' => [ - 'query' => 'place_name-fixture', - 'limit' => '25', - 'offset' => '', - 'sort' => 'created_at', - ], + 'query' => 'place_name-fixture', + 'limit' => '25', + 'offset' => '', + 'sort' => 'created_at', ] ); ``` @@ -2765,12 +2259,7 @@ This endpoint allows you to retrieve a place object to view it's details. `GET {{base_url}}/{{namespace}}/places/:id` ```php -$result = $fleetbase->places->retrievePlace( - [ - 'id' => 'place_id-fixture', - ], - [] -); +$result = $fleetbase->places->retrievePlace($placeId); ``` ### Search Places @@ -2781,13 +2270,10 @@ Searches places by free-form query and optional lat/lng locale context. ```php $result = $fleetbase->places->searchPlaces( - [], [ - 'query' => [ - 'query' => 'place_query-fixture', - 'll' => 'place_ll-fixture', - 'locale' => 'locale-fixture', - ], + 'query' => 'place_query-fixture', + 'll' => 'place_ll-fixture', + 'locale' => 'locale-fixture', ] ); ``` @@ -2800,23 +2286,20 @@ Updates a place by setting the fields included in the request. Send address fiel ```php $result = $fleetbase->places->updatePlace( - [ - 'id' => 'place_id-fixture', - 'body' => [ - 'name' => 'Central Park Edit', - 'street1' => '830 5th Ave a ', - 'city' => 'New York', - 'province' => 'New York', - 'postal_code' => '10065', - 'neighborhood' => 'Manhattan', - 'district' => 'Midtown', - 'building' => 'Park Area', - 'country' => 'US', - 'phone' => '+12123106600', - 'type' => 'Park', - ], - ], - [] + $placeId, + [ + 'name' => 'Central Park Edit', + 'street1' => '830 5th Ave a ', + 'city' => 'New York', + 'province' => 'New York', + 'postal_code' => '10065', + 'neighborhood' => 'Manhattan', + 'district' => 'Midtown', + 'building' => 'Park Area', + 'country' => 'US', + 'phone' => '+12123106600', + 'type' => 'Park', + ] ); ``` @@ -2831,11 +2314,8 @@ Only ServiceQuote objects generated using a Payload object may be used to create ```php $result = $fleetbase->purchaseRates->createPurchaseRate( [ - 'body' => [ - 'service_quote' => 'service_quote_id-fixture', - ], - ], - [] + 'service_quote' => 'service_quote_id-fixture', + ] ); ``` @@ -2847,13 +2327,10 @@ This endpoint allows you to query purchase-rates you have created, it also provi ```php $result = $fleetbase->purchaseRates->queryPurchaseRates( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -2865,12 +2342,7 @@ This endpoint allows you to retrieve a purchase-rate object to view it's details `GET {{base_url}}/{{namespace}}/purchase-rates/:id` ```php -$result = $fleetbase->purchaseRates->retrievePurchaseRate( - [ - 'id' => 'purchase_rate_id-fixture', - ], - [] -); +$result = $fleetbase->purchaseRates->retrievePurchaseRate($purchaseRateId); ``` ## Sensors @@ -2884,17 +2356,14 @@ Create a sensor. ```php $result = $fleetbase->sensors->createSensor( [ - 'body' => [ - 'name' => 'Cargo Temperature', - 'type' => 'temperature', - 'device' => 'device_id-fixture', - 'unit' => 'celsius', - 'status' => 'active', - 'min_threshold' => 0, - 'max_threshold' => 8, - ], - ], - [] + 'name' => 'Cargo Temperature', + 'type' => 'temperature', + 'device' => 'device_id-fixture', + 'unit' => 'celsius', + 'status' => 'active', + 'min_threshold' => 0, + 'max_threshold' => 8, + ] ); ``` @@ -2905,12 +2374,7 @@ Delete a sensor. `DELETE {{base_url}}/{{namespace}}/sensors/{{sensor_id}}` ```php -$result = $fleetbase->sensors->deleteSensor( - [ - 'sensor_id' => 'sensor_id-fixture', - ], - [] -); +$result = $fleetbase->sensors->deleteSensor($sensorId); ``` ### Query Sensors @@ -2920,10 +2384,7 @@ Query sensors. `GET {{base_url}}/{{namespace}}/sensors` ```php -$result = $fleetbase->sensors->querySensors( - [], - [] -); +$result = $fleetbase->sensors->querySensors(); ``` ### Retrieve a Sensor @@ -2933,12 +2394,7 @@ Retrieve a sensor. `GET {{base_url}}/{{namespace}}/sensors/{{sensor_id}}` ```php -$result = $fleetbase->sensors->retrieveSensor( - [ - 'sensor_id' => 'sensor_id-fixture', - ], - [] -); +$result = $fleetbase->sensors->retrieveSensor($sensorId); ``` ### Update a Sensor @@ -2949,14 +2405,11 @@ Update a sensor. ```php $result = $fleetbase->sensors->updateSensor( + $sensorId, [ - 'sensor_id' => 'sensor_id-fixture', - 'body' => [ - 'last_value' => '4.2', - 'last_reading_at' => '2026-05-07T08:30:00Z', - ], - ], - [] + 'last_value' => '4.2', + 'last_reading_at' => '2026-05-07T08:30:00Z', + ] ); ``` @@ -2971,17 +2424,14 @@ A service area is created by simply providing a city, province or country in whi ```php $result = $fleetbase->serviceAreas->createServiceArea( [ - 'body' => [ - 'name' => 'Singapore', - 'type' => 'city', - 'latitude' => '1.3521', - 'longitude' => '103.8198', - 'radius' => '30000', - 'country' => 'SG', - 'status' => 'active', - ], - ], - [] + 'name' => 'Singapore', + 'type' => 'city', + 'latitude' => '1.3521', + 'longitude' => '103.8198', + 'radius' => '30000', + 'country' => 'SG', + 'status' => 'active', + ] ); ``` @@ -2992,12 +2442,7 @@ Use this endpoint to delete a service area, deleting a service area will also de `DELETE {{base_url}}/{{namespace}}/service-areas/:id` ```php -$result = $fleetbase->serviceAreas->deleteServiceArea( - [ - 'id' => 'service_area_id-fixture', - ], - [] -); +$result = $fleetbase->serviceAreas->deleteServiceArea($serviceAreaId); ``` ### Query Service Areas @@ -3008,11 +2453,8 @@ Returns service areas matching the supplied filters. Use this to find configured ```php $result = $fleetbase->serviceAreas->queryServiceAreas( - [], [ - 'query' => [ - 'name' => 'service_area_name-fixture', - ], + 'name' => 'service_area_name-fixture', ] ); ``` @@ -3024,12 +2466,7 @@ This endpoint allows you to retrieve a service area object to view it's details. `GET {{base_url}}/{{namespace}}/service-areas/:id` ```php -$result = $fleetbase->serviceAreas->retrieveServiceArea( - [ - 'id' => 'service_area_id-fixture', - ], - [] -); +$result = $fleetbase->serviceAreas->retrieveServiceArea($serviceAreaId); ``` ### Update a Service Area @@ -3040,13 +2477,10 @@ You are only able to update the service area status ```php $result = $fleetbase->serviceAreas->updateServiceArea( + $serviceAreaId, [ - 'id' => 'service_area_id-fixture', - 'body' => [ - 'status' => 'active', - ], - ], - [] + 'status' => 'active', + ] ); ``` @@ -3060,11 +2494,8 @@ This endpoint is used to get the ServiceRate quotes based on pickup point locati ```php $result = $fleetbase->serviceQuotes->queryServiceQuotes( - [], [ - 'query' => [ - 'payload' => 'payload_id-fixture', - ], + 'payload' => 'payload_id-fixture', ] ); ``` @@ -3076,12 +2507,7 @@ Retrieves a service quote by id. `GET {{base_url}}/{{namespace}}/service-quotes/:id` ```php -$result = $fleetbase->serviceQuotes->retrieveServiceQuote( - [ - 'id' => 'service_quote_id-fixture', - ], - [] -); +$result = $fleetbase->serviceQuotes->retrieveServiceQuote($serviceQuoteId); ``` ## Service Rates @@ -3095,29 +2521,26 @@ Create a Service Rate. ```php $result = $fleetbase->serviceRates->createServiceRate( [ - 'body' => [ - 'service_name' => 'Food Delivery', - 'service_type' => 'food_delivery', - 'rate_calculation_method' => 'per_meter', - 'currency' => 'USD', - 'base_fee' => 10, - 'per_meter_unit' => 'km', - 'per_meter_flat_rate_fee' => 25, - 'has_cod_fee' => true, - 'cod_calculation_method' => 'percentage', - 'cod_flat_fee' => 1, - 'cod_percent' => 0, - 'has_peak_hours_fee' => true, - 'peak_hours_calculation_method' => 'percentage', - 'peak_hours_flat_fee' => 3, - 'peak_hours_percent' => 0, - 'peak_hours_start' => '17:00', - 'peak_hours_end' => '18:45', - 'duration_terms' => 'Standard', - 'estimated_days' => 3, - ], - ], - [] + 'service_name' => 'Food Delivery', + 'service_type' => 'food_delivery', + 'rate_calculation_method' => 'per_meter', + 'currency' => 'USD', + 'base_fee' => 10, + 'per_meter_unit' => 'km', + 'per_meter_flat_rate_fee' => 25, + 'has_cod_fee' => true, + 'cod_calculation_method' => 'percentage', + 'cod_flat_fee' => 1, + 'cod_percent' => 0, + 'has_peak_hours_fee' => true, + 'peak_hours_calculation_method' => 'percentage', + 'peak_hours_flat_fee' => 3, + 'peak_hours_percent' => 0, + 'peak_hours_start' => '17:00', + 'peak_hours_end' => '18:45', + 'duration_terms' => 'Standard', + 'estimated_days' => 3, + ] ); ``` @@ -3128,12 +2551,7 @@ Delete a Service Rate. `DELETE {{base_url}}/{{namespace}}/service-rates/:id` ```php -$result = $fleetbase->serviceRates->deleteServiceRate( - [ - 'id' => 'service_rate_id-fixture', - ], - [] -); +$result = $fleetbase->serviceRates->deleteServiceRate($serviceRateId); ``` ### Query Service Rates @@ -3144,13 +2562,10 @@ List all service rates. ```php $result = $fleetbase->serviceRates->queryServiceRates( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'currency' => 'USD', - ], + 'limit' => '25', + 'offset' => '0', + 'currency' => 'USD', ] ); ``` @@ -3162,12 +2577,7 @@ Retrieves a service rate by ID. `GET {{base_url}}/{{namespace}}/service-rates/:id` ```php -$result = $fleetbase->serviceRates->retrieveServiceRate( - [ - 'id' => 'service_rate_id-fixture', - ], - [] -); +$result = $fleetbase->serviceRates->retrieveServiceRate($serviceRateId); ``` ### Update a Service Rate @@ -3178,15 +2588,12 @@ Update a Service Rate. ```php $result = $fleetbase->serviceRates->updateServiceRate( + $serviceRateId, [ - 'id' => 'service_rate_id-fixture', - 'body' => [ - 'currency' => 'SGD', - 'base_fee' => 12.66, - 'estimated_days' => 6, - ], - ], - [] + 'currency' => 'SGD', + 'base_fee' => 12.66, + 'estimated_days' => 6, + ] ); ``` @@ -3201,12 +2608,9 @@ This endpoint allows you to retrieve a tracking-number object to view it's detai ```php $result = $fleetbase->trackingNumbers->createTrackingNumber( [ - 'body' => [ - 'region' => 'SG', - 'owner' => 'order_id-fixture', - ], - ], - [] + 'region' => 'SG', + 'owner' => 'order_id-fixture', + ] ); ``` @@ -3219,11 +2623,8 @@ Decodes a tracking/entity/order QR code UUID and returns the matching resource. ```php $result = $fleetbase->trackingNumbers->decodeTrackingNumberQr( [ - 'body' => [ - 'code' => 'qr_code-fixture', - ], - ], - [] + 'code' => 'qr_code-fixture', + ] ); ``` @@ -3234,12 +2635,7 @@ Deletes a tracking number by ID. `DELETE {{base_url}}/{{namespace}}/tracking-numbers/:id` ```php -$result = $fleetbase->trackingNumbers->deleteTrackingNumber( - [ - 'id' => 'tracking_number_id-fixture', - ], - [] -); +$result = $fleetbase->trackingNumbers->deleteTrackingNumber($trackingNumberId); ``` ### Query Tracking Numbers @@ -3250,14 +2646,11 @@ This endpoint allows you to query tracking-numbers you have created, it also pro ```php $result = $fleetbase->trackingNumbers->queryTrackingNumbers( - [], [ - 'query' => [ - 'query' => 'SG', - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'query' => 'SG', + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -3269,12 +2662,7 @@ This endpoint allows you to retrieve a tracking-number object to view it's detai `GET {{base_url}}/{{namespace}}/tracking-numbers/:id` ```php -$result = $fleetbase->trackingNumbers->retrieveTrackingNumber( - [ - 'id' => 'tracking_number_id-fixture', - ], - [] -); +$result = $fleetbase->trackingNumbers->retrieveTrackingNumber($trackingNumberId); ``` ## Tracking Statuses @@ -3288,19 +2676,16 @@ Create a new Tracking Status. ```php $result = $fleetbase->trackingStatuses->createTrackingStatus( [ - 'body' => [ - 'status' => 'Delivery is en-route', - 'code' => 'delivery-en-route', - 'details' => 'Our driver has picked up your order and is on the way to your address!', - 'tracking_number' => 'tracking_number_id-fixture', - 'location' => [ - 1.3521, - 103.8198, - ], - 'city' => 'Singapore', + 'status' => 'Delivery is en-route', + 'code' => 'delivery-en-route', + 'details' => 'Our driver has picked up your order and is on the way to your address!', + 'tracking_number' => 'tracking_number_id-fixture', + 'location' => [ + 1.3521, + 103.8198, ], - ], - [] + 'city' => 'Singapore', + ] ); ``` @@ -3311,12 +2696,7 @@ Delete a Tracking Status. `DELETE {{base_url}}/{{namespace}}/tracking-statuses/:id` ```php -$result = $fleetbase->trackingStatuses->deleteTrackingStatus( - [ - 'id' => 'tracking_status_id-fixture', - ], - [] -); +$result = $fleetbase->trackingStatuses->deleteTrackingStatus($trackingStatusId); ``` ### Query Tracking Statuses @@ -3327,12 +2707,9 @@ List all Tracking Statuses ```php $result = $fleetbase->trackingStatuses->queryTrackingStatuses( - [], [ - 'query' => [ - 'limit' => '25', - 'tracking_number' => 'tracking_number_id-fixture', - ], + 'limit' => '25', + 'tracking_number' => 'tracking_number_id-fixture', ] ); ``` @@ -3344,12 +2721,7 @@ Retrieve a Tracking Status. `GET {{base_url}}/{{namespace}}/tracking-statuses/:id` ```php -$result = $fleetbase->trackingStatuses->retrieveTrackingStatus( - [ - 'id' => 'tracking_status_id-fixture', - ], - [] -); +$result = $fleetbase->trackingStatuses->retrieveTrackingStatus($trackingStatusId); ``` ### Update a Tracking Status @@ -3360,13 +2732,10 @@ Updates an existing tracking status. The response returns the tracking status wi ```php $result = $fleetbase->trackingStatuses->updateTrackingStatus( + $trackingStatusId, [ - 'id' => 'tracking_status_id-fixture', - 'body' => [ - 'country' => 'SG', - ], - ], - [] + 'country' => 'SG', + ] ); ``` @@ -3381,18 +2750,15 @@ Creates a vehicle for the current company. Send VIN, make/model fields, assignme ```php $result = $fleetbase->vehicles->createVehicle( [ - 'body' => [ - 'vin' => '1GCGSBEA0G1111111', - 'year' => 2023, - 'make' => 'Toyota', - 'model' => 'Camry', - 'trim' => 'SE', - 'plate_number' => 'ABC123', - 'status' => 'maintenance', - 'online' => false, - ], - ], - [] + 'vin' => '1GCGSBEA0G1111111', + 'year' => 2023, + 'make' => 'Toyota', + 'model' => 'Camry', + 'trim' => 'SE', + 'plate_number' => 'ABC123', + 'status' => 'maintenance', + 'online' => false, + ] ); ``` @@ -3403,12 +2769,7 @@ Permanently deletes a `Vehicle`. It cannot be undone. `DELETE {{base_url}}/{{namespace}}/vehicles/:id` ```php -$result = $fleetbase->vehicles->deleteVehicle( - [ - 'id' => 'vehicle_id-fixture', - ], - [] -); +$result = $fleetbase->vehicles->deleteVehicle($vehicleId); ``` ### Query Vehicles @@ -3419,14 +2780,11 @@ This endpoint allows you to query vehicles you have created, it also provides pa ```php $result = $fleetbase->vehicles->queryVehicles( - [], [ - 'query' => [ - 'query' => 'vehicle_name-fixture', - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'query' => 'vehicle_name-fixture', + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -3438,12 +2796,7 @@ Retrieve details for a specific `Vehicle`. `GET {{base_url}}/{{namespace}}/vehicles/:id` ```php -$result = $fleetbase->vehicles->retrieveVehicle( - [ - 'id' => 'vehicle_id-fixture', - ], - [] -); +$result = $fleetbase->vehicles->retrieveVehicle($vehicleId); ``` ### Track Vehicle @@ -3452,10 +2805,12 @@ $result = $fleetbase->vehicles->retrieveVehicle( ```php $result = $fleetbase->vehicles->trackVehicle( + $vehicleId, [ - 'id' => 'vehicle_id-fixture', - ], - [] + 'latitude' => -19.288195, + 'longitude' => 146.795965, + 'speed' => 100, + ] ); ``` @@ -3467,17 +2822,14 @@ Updates a vehicle's identity, operational status, vendor assignment, location, c ```php $result = $fleetbase->vehicles->updateVehicle( + $vehicleId, [ - 'id' => 'vehicle_id-fixture', - 'body' => [ - 'plate_number' => 'ABC123', - 'status' => 'operational', - 'latitude' => 40.7484, - 'longitude' => -73.9857, - 'speed' => 90, - ], - ], - [] + 'plate_number' => 'ABC123', + 'status' => 'operational', + 'latitude' => 40.7484, + 'longitude' => -73.9857, + 'speed' => 90, + ] ); ``` @@ -3492,14 +2844,11 @@ Creates a vendor for the current company. Vendors can be assigned to orders, veh ```php $result = $fleetbase->vendors->createVendor( [ - 'body' => [ - 'name' => 'ABC Corporation', - 'type' => 'Supplier', - 'email' => 'abc@example.com', - 'phone' => '1234567890', - ], - ], - [] + 'name' => 'ABC Corporation', + 'type' => 'Supplier', + 'email' => 'abc@example.com', + 'phone' => '1234567890', + ] ); ``` @@ -3510,12 +2859,7 @@ Use this endpoint to delete a vendor. `DELETE {{base_url}}/{{namespace}}/vendors/:id` ```php -$result = $fleetbase->vendors->deleteVendor( - [ - 'id' => 'vendor_id-fixture', - ], - [] -); +$result = $fleetbase->vendors->deleteVendor($vendorId); ``` ### Query Vendors @@ -3526,11 +2870,8 @@ Returns vendors for the current company. Use search, pagination, and sort parame ```php $result = $fleetbase->vendors->queryVendors( - [], [ - 'query' => [ - 'id' => 'vendor_id-fixture', - ], + 'id' => 'vendor_id-fixture', ] ); ``` @@ -3542,12 +2883,7 @@ This endpoint allows you to retrieve a vendor object to view it's details. `GET {{base_url}}/{{namespace}}/vendors/:id` ```php -$result = $fleetbase->vendors->retrieveVendor( - [ - 'id' => 'vendor_id-fixture', - ], - [] -); +$result = $fleetbase->vendors->retrieveVendor($vendorId); ``` ### Update a Vendor @@ -3558,16 +2894,13 @@ Updates a vendor's profile, primary address, type, contact fields, or metadata. ```php $result = $fleetbase->vendors->updateVendor( + $vendorId, [ - 'id' => 'vendor_id-fixture', - 'body' => [ - 'name' => 'ABC Corporation', - 'type' => 'Supplier', - 'email' => 'abc@example.com', - 'phone' => '1234567890', - ], - ], - [] + 'name' => 'ABC Corporation', + 'type' => 'Supplier', + 'email' => 'abc@example.com', + 'phone' => '1234567890', + ] ); ``` @@ -3582,18 +2915,15 @@ Create a work order. ```php $result = $fleetbase->workOrders->createWorkOrder( [ - 'body' => [ - 'subject' => 'Replace rear tire', - 'category' => 'corrective_maintenance', - 'status' => 'open', - 'priority' => 'high', - 'target_type' => 'fleet-ops:vehicle', - 'target' => 'vehicle_id-fixture', - 'assignee_type' => 'fleet-ops:vendor', - 'assignee' => 'vendor_id-fixture', - ], - ], - [] + 'subject' => 'Replace rear tire', + 'category' => 'corrective_maintenance', + 'status' => 'open', + 'priority' => 'high', + 'target_type' => 'fleet-ops:vehicle', + 'target' => 'vehicle_id-fixture', + 'assignee_type' => 'fleet-ops:vendor', + 'assignee' => 'vendor_id-fixture', + ] ); ``` @@ -3604,12 +2934,7 @@ Delete a work order. `DELETE {{base_url}}/{{namespace}}/work-orders/{{work_order_id}}` ```php -$result = $fleetbase->workOrders->deleteWorkOrder( - [ - 'work_order_id' => 'work_order_id-fixture', - ], - [] -); +$result = $fleetbase->workOrders->deleteWorkOrder($workOrderId); ``` ### Query Work Orders @@ -3619,10 +2944,7 @@ Query work orders. `GET {{base_url}}/{{namespace}}/work-orders` ```php -$result = $fleetbase->workOrders->queryWorkOrders( - [], - [] -); +$result = $fleetbase->workOrders->queryWorkOrders(); ``` ### Retrieve a Work Order @@ -3632,12 +2954,7 @@ Retrieve a work order. `GET {{base_url}}/{{namespace}}/work-orders/{{work_order_id}}` ```php -$result = $fleetbase->workOrders->retrieveWorkOrder( - [ - 'work_order_id' => 'work_order_id-fixture', - ], - [] -); +$result = $fleetbase->workOrders->retrieveWorkOrder($workOrderId); ``` ### Send Work Order @@ -3647,12 +2964,7 @@ Send this work order to its assigned vendor or contact. `POST {{base_url}}/{{namespace}}/work-orders/{{work_order_id}}/send` ```php -$result = $fleetbase->workOrders->sendWorkOrder( - [ - 'work_order_id' => 'work_order_id-fixture', - ], - [] -); +$result = $fleetbase->workOrders->sendWorkOrder($workOrderId); ``` ### Update a Work Order @@ -3663,13 +2975,10 @@ Update a work order. ```php $result = $fleetbase->workOrders->updateWorkOrder( + $workOrderId, [ - 'work_order_id' => 'work_order_id-fixture', - 'body' => [ - 'status' => 'in_progress', - ], - ], - [] + 'status' => 'in_progress', + ] ); ``` @@ -3684,83 +2993,80 @@ Creates a zone inside a service area. Provide either a GeoJSON boundary or a cen ```php $result = $fleetbase->zones->createZone( [ - 'body' => [ - 'name' => 'Center of Singapore', - 'service_area' => 'service_area_id-fixture', - 'color' => '#66e0ff', - 'stroke_color' => '#00bfff', - 'border' => [ - 'type' => 'Polygon', - 'bbox' => [ - 103.867493, - 1.35085, - 103.912125, - 1.383113, - ], - 'coordinates' => [ + 'name' => 'Center of Singapore', + 'service_area' => 'service_area_id-fixture', + 'color' => '#66e0ff', + 'stroke_color' => '#00bfff', + 'border' => [ + 'type' => 'Polygon', + 'bbox' => [ + 103.867493, + 1.35085, + 103.912125, + 1.383113, + ], + 'coordinates' => [ + [ + [ + 103.907661, + 1.362863, + ], + [ + 103.892555, + 1.357714, + ], + [ + 103.891525, + 1.353252, + ], [ - [ - 103.907661, - 1.362863, - ], - [ - 103.892555, - 1.357714, - ], - [ - 103.891525, - 1.353252, - ], - [ - 103.883629, - 1.35085, - ], - [ - 103.874702, - 1.351193, - ], - [ - 103.870583, - 1.358744, - ], - [ - 103.867493, - 1.368354, - ], - [ - 103.870926, - 1.377621, - ], - [ - 103.875732, - 1.38174, - ], - [ - 103.886032, - 1.383113, - ], - [ - 103.900452, - 1.383113, - ], - [ - 103.909721, - 1.381397, - ], - [ - 103.912125, - 1.374189, - ], - [ - 103.907661, - 1.362863, - ], + 103.883629, + 1.35085, + ], + [ + 103.874702, + 1.351193, + ], + [ + 103.870583, + 1.358744, + ], + [ + 103.867493, + 1.368354, + ], + [ + 103.870926, + 1.377621, + ], + [ + 103.875732, + 1.38174, + ], + [ + 103.886032, + 1.383113, + ], + [ + 103.900452, + 1.383113, + ], + [ + 103.909721, + 1.381397, + ], + [ + 103.912125, + 1.374189, + ], + [ + 103.907661, + 1.362863, ], ], ], ], - ], - [] + ] ); ``` @@ -3771,12 +3077,7 @@ Use this endpoint to delete a zone. `DELETE {{base_url}}/{{namespace}}/zones/:id` ```php -$result = $fleetbase->zones->deleteZone( - [ - 'id' => 'zone_id-fixture', - ], - [] -); +$result = $fleetbase->zones->deleteZone($zoneId); ``` ### Query Zones @@ -3787,11 +3088,8 @@ Returns zones matching the supplied filters. Use this to find configured geofenc ```php $result = $fleetbase->zones->queryZones( - [], [ - 'query' => [ - 'name' => 'zone_name-fixture', - ], + 'name' => 'zone_name-fixture', ] ); ``` @@ -3803,12 +3101,7 @@ Retrieves a single zone by ID. The response includes the zone geometry, display `GET {{base_url}}/{{namespace}}/zones/:id` ```php -$result = $fleetbase->zones->retrieveZone( - [ - 'id' => 'zone_id-fixture', - ], - [] -); +$result = $fleetbase->zones->retrieveZone($zoneId); ``` ### Update a Zone @@ -3819,13 +3112,10 @@ You can update all properties of the Zone. ```php $result = $fleetbase->zones->updateZone( + $zoneId, [ - 'id' => 'zone_id-fixture', - 'body' => [ - 'color' => '#ff00000', - ], - ], - [] + 'color' => '#ff00000', + ] ); ``` @@ -3839,13 +3129,10 @@ Adds a user in the current organization to an existing chat channel. The respons ```php $result = $fleetbase->chatChannels->addParticipant( + $chatChannelId, [ - 'id' => 'chat_channel_id-fixture', - 'body' => [ - 'user' => 'user_id-fixture', - ], - ], - [] + 'user' => 'user_id-fixture', + ] ); ``` @@ -3858,14 +3145,11 @@ Creates a chat channel for the current organization. Include participant user ID ```php $result = $fleetbase->chatChannels->createChatChannel( [ - 'body' => [ - 'name' => 'Dispatch', - 'participants' => [ - 'user_id-fixture', - ], + 'name' => 'Dispatch', + 'participants' => [ + 'user_id-fixture', ], - ], - [] + ] ); ``` @@ -3877,13 +3161,10 @@ Marks a chat message as read for a participant. If a receipt already exists for ```php $result = $fleetbase->chatChannels->createReadReceipt( + $chatMessageId, [ - 'chatMessageId' => 'chat_message_id-fixture', - 'body' => [ - 'participant' => 'chat_participant_id-fixture', - ], - ], - [] + 'participant' => 'chat_participant_id-fixture', + ] ); ``` @@ -3894,12 +3175,7 @@ Deletes a chat channel by ID. The response returns a deleted-resource envelope f `DELETE {{base_url}}/{{namespace}}/chat-channels/:id` ```php -$result = $fleetbase->chatChannels->deleteChatChannel( - [ - 'id' => 'chat_channel_id-fixture', - ], - [] -); +$result = $fleetbase->chatChannels->deleteChatChannel($chatChannelId); ``` ### Delete Message @@ -3909,12 +3185,7 @@ Deletes a chat message by ID. Use this when a previously sent message should be `DELETE {{base_url}}/{{namespace}}/chat-channels/delete-message/:chatMessageId` ```php -$result = $fleetbase->chatChannels->deleteMessage( - [ - 'chatMessageId' => 'chat_message_id-fixture', - ], - [] -); +$result = $fleetbase->chatChannels->deleteMessage($chatMessageId); ``` ### List Available Participants @@ -3925,11 +3196,8 @@ Lists users in the current organization that can be added to a chat channel. Whe ```php $result = $fleetbase->chatChannels->listAvailableParticipants( - [], [ - 'query' => [ - 'channel' => 'chat_channel_id-fixture', - ], + 'channel' => 'chat_channel_id-fixture', ] ); ``` @@ -3942,13 +3210,10 @@ Returns chat channels visible to the current organization. Use query parameters ```php $result = $fleetbase->chatChannels->queryChatChannels( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -3960,12 +3225,7 @@ Removes a participant from a chat channel by participant ID. The channel remains `DELETE {{base_url}}/{{namespace}}/chat-channels/remove-participant/:participantId` ```php -$result = $fleetbase->chatChannels->removeParticipant( - [ - 'participantId' => 'chat_participant_id-fixture', - ], - [] -); +$result = $fleetbase->chatChannels->removeParticipant($participantId); ``` ### Retrieve Chat Channel @@ -3975,12 +3235,7 @@ Retrieves a chat channel by ID, including its participants, feed, and latest mes `GET {{base_url}}/{{namespace}}/chat-channels/:id` ```php -$result = $fleetbase->chatChannels->retrieveChatChannel( - [ - 'id' => 'chat_channel_id-fixture', - ], - [] -); +$result = $fleetbase->chatChannels->retrieveChatChannel($chatChannelId); ``` ### Send Message @@ -3991,15 +3246,12 @@ Sends a message to a chat channel as an existing chat participant. File IDs can ```php $result = $fleetbase->chatChannels->sendMessage( + $chatChannelId, [ - 'id' => 'chat_channel_id-fixture', - 'body' => [ - 'sender' => 'chat_participant_id-fixture', - 'content' => 'Hello from Fleetbase API', - 'files' => [], - ], - ], - [] + 'sender' => 'chat_participant_id-fixture', + 'content' => 'Hello from Fleetbase API', + 'files' => [], + ] ); ``` @@ -4011,13 +3263,10 @@ Updates a chat channel's name. The response returns the updated chat channel res ```php $result = $fleetbase->chatChannels->updateChatChannel( + $chatChannelId, [ - 'id' => 'chat_channel_id-fixture', - 'body' => [ - 'name' => 'Dispatch Updates', - ], - ], - [] + 'name' => 'Dispatch Updates', + ] ); ``` @@ -4032,15 +3281,12 @@ Creates a comment on a subject resource or as a reply to an existing comment. Pr ```php $result = $fleetbase->comments->createComment( [ - 'body' => [ - 'content' => 'Example comment', - 'subject' => [ - 'id' => 'file_id-fixture', - 'type' => 'file', - ], + 'content' => 'Example comment', + 'subject' => [ + 'id' => 'file_id-fixture', + 'type' => 'file', ], - ], - [] + ] ); ``` @@ -4051,12 +3297,7 @@ Deletes a comment by ID. The response returns a deleted-resource envelope for th `DELETE {{base_url}}/{{namespace}}/comments/:id` ```php -$result = $fleetbase->comments->deleteComment( - [ - 'id' => 'comment_id-fixture', - ], - [] -); +$result = $fleetbase->comments->deleteComment($commentId); ``` ### Query Comments @@ -4067,13 +3308,10 @@ Returns comments for the current organization. Use query parameters to filter, s ```php $result = $fleetbase->comments->queryComments( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -4085,12 +3323,7 @@ Retrieves a comment by ID, including its author and any nested replies returned `GET {{base_url}}/{{namespace}}/comments/:id` ```php -$result = $fleetbase->comments->retrieveComment( - [ - 'id' => 'comment_id-fixture', - ], - [] -); +$result = $fleetbase->comments->retrieveComment($commentId); ``` ### Update Comment @@ -4101,13 +3334,10 @@ Updates the content of an existing comment. The subject and parent linkage are n ```php $result = $fleetbase->comments->updateComment( + $commentId, [ - 'id' => 'comment_id-fixture', - 'body' => [ - 'content' => 'Updated comment', - ], - ], - [] + 'content' => 'Updated comment', + ] ); ``` @@ -4120,12 +3350,7 @@ Deletes a file record by ID. The response returns a deleted-resource envelope fo `DELETE {{base_url}}/{{namespace}}/files/:id` ```php -$result = $fleetbase->files->deleteFile( - [ - 'id' => 'file_id-fixture', - ], - [] -); +$result = $fleetbase->files->deleteFile($fileId); ``` ### Download File @@ -4135,12 +3360,7 @@ Downloads the binary contents of a file by ID. The API streams the stored file u `GET {{base_url}}/{{namespace}}/files/:id/download` ```php -$result = $fleetbase->files->downloadFile( - [ - 'id' => 'file_id-fixture', - ], - [] -); +$result = $fleetbase->files->downloadFile($fileId); ``` ### Query Files @@ -4151,13 +3371,10 @@ Returns uploaded files for the current organization. Use query parameters to fil ```php $result = $fleetbase->files->queryFiles( - [], [ - 'query' => [ - 'limit' => '25', - 'offset' => '0', - 'sort' => 'created_at', - ], + 'limit' => '25', + 'offset' => '0', + 'sort' => 'created_at', ] ); ``` @@ -4169,12 +3386,7 @@ Retrieves a file record by ID, including its URL, original filename, content typ `GET {{base_url}}/{{namespace}}/files/:id` ```php -$result = $fleetbase->files->retrieveFile( - [ - 'id' => 'file_id-fixture', - ], - [] -); +$result = $fleetbase->files->retrieveFile($fileId); ``` ### Update File @@ -4185,14 +3397,11 @@ Updates a file record's caption, metadata, or original filename. The uploaded bi ```php $result = $fleetbase->files->updateFile( + $fileId, [ - 'id' => 'file_id-fixture', - 'body' => [ - 'caption' => 'Updated caption', - 'meta' => [], - ], - ], - [] + 'caption' => 'Updated caption', + 'meta' => [], + ] ); ``` @@ -4205,15 +3414,12 @@ Creates a file from base64-encoded data. Fleetbase stores the decoded file, crea ```php $result = $fleetbase->files->uploadBase64File( [ - 'body' => [ - 'data' => 'base64_file_data-fixture', - 'file_name' => 'example.png', - 'file_type' => 'image', - 'content_type' => 'image/png', - 'path' => 'uploads', - ], - ], - [] + 'data' => 'base64_file_data-fixture', + 'file_name' => 'example.png', + 'file_type' => 'image', + 'content_type' => 'image/png', + 'path' => 'uploads', + ] ); ``` @@ -4225,21 +3431,18 @@ Uploads a multipart file and creates a file record. The response includes the st ```php $result = $fleetbase->files->uploadFile( - [], [ - 'multipart' => [ - [ - 'name' => 'file', - 'contents' => 'replace-with-file-contents', - ], - [ - 'name' => 'path', - 'contents' => 'uploads', - ], - [ - 'name' => 'type', - 'contents' => 'attachment', - ], + [ + 'name' => 'file', + 'contents' => 'replace-with-file-contents', + ], + [ + 'name' => 'path', + 'contents' => 'uploads', + ], + [ + 'name' => 'type', + 'contents' => 'attachment', ], ] ); @@ -4254,8 +3457,5 @@ Returns the organization associated with the API credential. `GET {{base_url}}/{{namespace}}/organizations/current` ```php -$result = $fleetbase->organizations->getCurrentOrganization( - [], - [] -); +$result = $fleetbase->organizations->getCurrentOrganization(); ``` diff --git a/docs/api-reference-handoff.md b/docs/api-reference-handoff.md index d0b2259..05184f8 100644 --- a/docs/api-reference-handoff.md +++ b/docs/api-reference-handoff.md @@ -20,3 +20,5 @@ The coordinated API-reference change should: 6. Add a fixture test proving all 220 request IDs render a real SDK call. The coordinated `fleetbase/fleetbase.io` pull request vendors this generated catalog, retains concise calls for canonical CRUD operations, uses exact SDK methods for custom endpoints, and fails generation unless all 220 stable request IDs are consumed. It should be refreshed whenever the SDK contract changes. + +Each catalog row includes the variables required by its standalone `code` example. Displayed calls use positional path identifiers and direct API data arrays. Documentation consumers must render the generated call as-is and must not reconstruct the SDK's legacy internal `id`/`body`/`query` envelope. diff --git a/docs/migration-guide.md b/docs/migration-guide.md index c229769..e5ce98e 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -1,4 +1,4 @@ -# Migrating from 1.0.x to 1.1.0 +# Migrating from 1.0.x to 1.1.x This guide is being completed with the v1.1.0 implementation. It records changes that downstream consumers must assess before upgrading. @@ -15,3 +15,24 @@ The runtime constraint widens from `^7.4` to `^7.4 || ^8.0`. PHP 7.4 and 8.0 are The 1.1.0 release preserves the `Fleetbase\Sdk` namespace, facade constructor, existing store properties, `HttpClient` verbs and accessors, generic service methods, resource lifecycle/attribute methods, resource classes, and published order actions. Demonstrably unusable behavior is corrected with regression tests and changelog entries. The final guide will list every corrected behavior, new exception type, transport injection option, and framework recipe before release. Fleetbase API v1 does not expose an SDK pagination contract, so 1.1.0 retains the legacy array return from `findAll()` and `query()` and does not introduce a speculative pagination method. + +## Endpoint calls in 1.1.1 + +Version 1.1.1 adds an ergonomic form for every generated endpoint without removing the form published in 1.1.0. New code should pass URL identifiers positionally, followed by the request data and then optional transport options: + +```php +$fleetbase->drivers->changeDriverPassword($driverId, $passwordData); +$fleetbase->orders->scheduleOrder($orderId, $scheduleData); +$fleetbase->orders->dispatchOrder($orderId); +``` + +The equivalent 1.1.0 envelope remains valid: + +```php +$fleetbase->drivers->changeDriverPassword([ + 'id' => $driverId, + 'body' => $passwordData, +], $requestOptions); +``` + +This is additive: existing positional arrays and PHP 8 named calls using `parameters:` and `options:` continue to work. The SDK translates both forms to the same HTTP request. It rejects ambiguous calls that provide the same body, query, or multipart data in both the direct data argument and request options. diff --git a/docs/progress.md b/docs/progress.md index 0ed90dc..5a78914 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -87,3 +87,12 @@ The disposable native Postman run requires a repository or organization `POSTMAN - Refactored the PHP SDK live contract to use the same published API image, clean database volume, pre-boot CI environment, non-interactive installer, health gate, and Fleetbase-owned seed-and-mint action used by the Core API and Fleet-Ops Postman workflows. - Retained the SDK-specific bridge on the same runner so both official collections still execute through PHP SDK methods rather than bypassing the library; the evidence gate requires every one of the 220 locked requests. - Added the canonical secret gate, optional Google Maps fixture configuration, test-only Stripe fixture inputs, API image digest reporting, and failure-safe stack diagnostics and teardown. + +## 2026-09-03 — ergonomic generated endpoint signatures + +- Classified all 220 locked requests by ordered URL identifiers and payload placement, then generated positional/direct calls for JSON, query, raw JSON, multipart, and empty-payload endpoints. +- Centralized overload normalization in the base service while preserving the full published 1.1.0 parameter-array envelope, including PHP 8 named `parameters:` and `options:` calls. +- Generated hermetic tests now invoke every endpoint in both forms and compare verb, encoded URL, query, JSON semantics, multipart content, and request-option forwarding. The focused edge-case suite rejects missing identifiers, invalid data/options, and ambiguous duplicate payloads. +- Added the authoritative 1.1.0 public API snapshot to the compatibility gate. Local PHPUnit evidence is 35 tests and 3,906 assertions; fresh Xdebug evidence remains exactly 100.00% lines and 100.00% branches. +- Switched the disposable bridge to positional/direct invocations so a successful 220-request run proves the documented SDK shape against Fleetbase rather than only exercising the legacy envelope. +- The fresh full-source mutation run generated 1,802 mutants: 1,583 killed, 215 escaped, four timed out, and none uncovered, errored, skipped, or ignored. MSI and covered-code MSI are both 87.85%, above the approved 85% floor, with 100% mutation-code coverage. diff --git a/docs/release-checklist.md b/docs/release-checklist.md index 229e081..03bd563 100644 --- a/docs/release-checklist.md +++ b/docs/release-checklist.md @@ -5,7 +5,7 @@ The release workflow starts automatically when a semantic `release/` branch is m ## Maintainer decisions before publication - Fleetbase ownership and authorization to publish the new release under `AGPL-3.0-or-later` was confirmed by the maintainer. -- An 85% minimum mutation score was approved. The final pre-release baseline measured 86.02% with 100% mutation-code coverage and no ignored source. +- An 85% minimum mutation score was approved. The current 1.1.1 candidate measures 87.85% with 100% mutation-code coverage, four timeouts, and no ignored source. - Select protected `release` environment approvers and the signing/attestation identity. - Verify Packagist ownership and the GitHub update hook. - Review the coordinated Fleetbase API-reference generator update. diff --git a/docs/releases/1.1.1.md b/docs/releases/1.1.1.md index 891f92a..3957219 100644 --- a/docs/releases/1.1.1.md +++ b/docs/releases/1.1.1.md @@ -10,8 +10,11 @@ Highlights: - `dispatchOrder($orderId)`, `dispatch($orderId)`, and the legacy `dispatchOrder(['id' => $orderId])` form use the same official `PATCH` endpoint; - the order destination action uses the HTTP verb defined by the official API contract; - the public API-reference generator receives a stable-ID-keyed PHP SDK example catalog; +- all generated endpoint methods accept positional URL identifiers and direct body, query, or multipart arrays while retaining every published 1.1.0 envelope call; - release candidates include reproducible archives, coverage evidence, an SBOM, checksums, and provenance. +The generated surface contains 220 methods: 90 requests with no payload, 97 JSON requests, 30 query requests, two raw-JSON requests, and one multipart request. Five methods have two URL identifiers; all remaining methods have zero or one. Every method is exercised in both the ergonomic and 1.1.0-compatible form by the hermetic contract suite, and the disposable workflow invokes the ergonomic form against Fleetbase. + Version 1.1.1 is distributed under `AGPL-3.0-or-later`, as is version 1.1.0. Published 1.0.x tags remain under the MIT license shipped with those releases. Merging `release/v1.1.1` into `main` starts the release workflow. It derives version `1.1.1` from the merged branch, reruns the live SDK contract and release gates, waits for any configured protected `release` environment approval, and creates the immutable tag and GitHub Release. No manual workflow trigger or version input is used. diff --git a/src/Service.php b/src/Service.php index d5d3b9c..4bc06a1 100644 --- a/src/Service.php +++ b/src/Service.php @@ -139,6 +139,176 @@ public function action(string $method, string $path, array $data = [], array $op return $this->client->request($method, $this->uri($path), $data, $options); } + /** + * Normalize ergonomic generated-method arguments while retaining the 1.1.0 + * endpoint-envelope form. + * + * @param array $pathParameters + * @param array $arguments + * @return mixed + */ + protected function endpointFromArguments( + string $method, + string $template, + array $pathParameters, + string $requestData, + array $arguments + ) { + if (!in_array($requestData, ['body', 'query', 'multipart'], true)) { + throw new \InvalidArgumentException('Endpoint request data must be body, query, or multipart.'); + } + + if ($pathParameters === []) { + return $this->endpointFromCollectionArguments($method, $template, $requestData, $arguments); + } + + $first = $arguments[0] ?? []; + if (is_array($first)) { + if (count($arguments) > 2) { + throw new \InvalidArgumentException('Legacy endpoint envelopes accept only parameters and request options.'); + } + $legacyOptions = $arguments[1] ?? []; + if (!is_array($legacyOptions)) { + throw new \InvalidArgumentException('Legacy endpoint request options must be an array.'); + } + return $this->endpoint( + $method, + $template, + $this->stringKeyedArray($first), + $this->stringKeyedArray($legacyOptions) + ); + } + + $parameters = []; + foreach ($pathParameters as $index => $name) { + if (!array_key_exists($index, $arguments)) { + throw new \InvalidArgumentException(sprintf('Endpoint path parameter "%s" is required.', $name)); + } + $parameters[$name] = $this->endpointIdentifier($arguments[$index], $name); + } + + $dataIndex = count($pathParameters); + if (count($arguments) > $dataIndex + 2) { + throw new \InvalidArgumentException('Too many endpoint arguments were provided.'); + } + $data = $arguments[$dataIndex] ?? []; + $requestOptions = $arguments[$dataIndex + 1] ?? []; + if (!is_array($data)) { + throw new \InvalidArgumentException('Endpoint request data must be an array.'); + } + if (!is_array($requestOptions)) { + throw new \InvalidArgumentException('Endpoint request options must be an array.'); + } + $requestOptions = $this->stringKeyedArray($requestOptions); + + if ($requestData === 'query') { + if ($data !== [] && isset($requestOptions['query'])) { + throw new \InvalidArgumentException('Query parameters must be passed directly, not in both data and request options.'); + } + if ($data !== []) { + $requestOptions['query'] = $data; + } + } elseif ($requestData === 'multipart') { + if ($data !== [] && isset($requestOptions['multipart'])) { + throw new \InvalidArgumentException('Multipart parts must be passed directly, not in both data and request options.'); + } + if ($data !== []) { + $this->assertMultipartParts($data); + $requestOptions['multipart'] = $data; + } + } else { + foreach (['body', 'multipart', 'form_params'] as $option) { + if ($data !== [] && array_key_exists($option, $requestOptions)) { + throw new \InvalidArgumentException('Request data conflicts with the raw or encoded body in request options.'); + } + } + if ($data !== []) { + $parameters['body'] = $data; + } + } + + return $this->endpoint($method, $template, $parameters, $requestOptions); + } + + /** + * @param array $arguments + * @return mixed + */ + private function endpointFromCollectionArguments(string $method, string $template, string $requestData, array $arguments) + { + if (count($arguments) > 2) { + throw new \InvalidArgumentException('Collection endpoints accept only request data and request options.'); + } + $data = $arguments[0] ?? []; + $requestOptions = $arguments[1] ?? []; + if (!is_array($data)) { + throw new \InvalidArgumentException('Collection endpoint request data must be an array.'); + } + if (!is_array($requestOptions)) { + throw new \InvalidArgumentException('Collection endpoint request options must be an array.'); + } + $requestOptions = $this->stringKeyedArray($requestOptions); + + if ($requestData === 'query') { + if ($data !== [] && isset($requestOptions['query'])) { + throw new \InvalidArgumentException('Query parameters must be passed directly, not in both data and request options.'); + } + if ($data !== []) { + $requestOptions['query'] = $data; + } + return $this->endpoint($method, $template, [], $requestOptions); + } + if ($requestData === 'body') { + if (isset($data['body']) && is_array($data['body'])) { + return $this->endpoint($method, $template, $this->stringKeyedArray($data), $requestOptions); + } + foreach (['body', 'multipart', 'form_params'] as $option) { + if ($data !== [] && array_key_exists($option, $requestOptions)) { + throw new \InvalidArgumentException('Request data conflicts with the raw or encoded body in request options.'); + } + } + $parameters = $data === [] ? [] : ['body' => $data]; + return $this->endpoint($method, $template, $parameters, $requestOptions); + } + + if (isset($requestOptions['multipart'])) { + return $this->endpoint($method, $template, [], $requestOptions); + } + if ($data !== []) { + $this->assertMultipartParts($data); + $requestOptions['multipart'] = $data; + } + return $this->endpoint($method, $template, [], $requestOptions); + } + + /** + * @param mixed $value + * @return bool|float|int|string + */ + private function endpointIdentifier($value, string $name) + { + if ($value instanceof Resource) { + $value = $value->getAttribute('id'); + } + if (!is_scalar($value) || (string) $value === '') { + throw new \InvalidArgumentException(sprintf('Endpoint path parameter "%s" must be a non-empty scalar or resource.', $name)); + } + return $value; + } + + /** @param array $parts */ + private function assertMultipartParts(array $parts): void + { + if (array_keys($parts) !== range(0, count($parts) - 1)) { + throw new \InvalidArgumentException('Multipart request data must be a list of parts.'); + } + foreach ($parts as $part) { + if (!is_array($part) || !is_string($part['name'] ?? null) || !array_key_exists('contents', $part)) { + throw new \InvalidArgumentException('Each multipart part must contain a string name and contents.'); + } + } + } + /** * Execute an endpoint copied from the locked official API contract. * diff --git a/src/Services/Concerns/ChatChannelServiceEndpoints.php b/src/Services/Concerns/ChatChannelServiceEndpoints.php index 44ccdea..7085669 100644 --- a/src/Services/Concerns/ChatChannelServiceEndpoints.php +++ b/src/Services/Concerns/ChatChannelServiceEndpoints.php @@ -16,13 +16,14 @@ trait ChatChannelServiceEndpoints /** * Add Participant. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function addParticipant(array $parameters = [], array $options = []) + public function addParticipant($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/chat-channels/:id/add-participant', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/chat-channels/:id/add-participant', ['id'], 'body', func_get_args()); } /** @@ -34,43 +35,46 @@ public function addParticipant(array $parameters = [], array $options = []) */ public function createChatChannel(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/chat-channels', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/chat-channels', [], 'body', func_get_args()); } /** * Create Read Receipt. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function createReadReceipt(array $parameters = [], array $options = []) + public function createReadReceipt($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/chat-channels/read-message/:chatMessageId', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/chat-channels/read-message/:chatMessageId', ['chatMessageId'], 'body', func_get_args()); } /** * Delete Chat Channel. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteChatChannel(array $parameters = [], array $options = []) + public function deleteChatChannel($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/chat-channels/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/chat-channels/:id', ['id'], 'body', func_get_args()); } /** * Delete Message. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteMessage(array $parameters = [], array $options = []) + public function deleteMessage($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/chat-channels/delete-message/:chatMessageId', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/chat-channels/delete-message/:chatMessageId', ['chatMessageId'], 'body', func_get_args()); } /** @@ -82,7 +86,7 @@ public function deleteMessage(array $parameters = [], array $options = []) */ public function listAvailableParticipants(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/chat-channels/available-participants', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/chat-channels/available-participants', [], 'query', func_get_args()); } /** @@ -94,54 +98,58 @@ public function listAvailableParticipants(array $parameters = [], array $options */ public function queryChatChannels(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/chat-channels', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/chat-channels', [], 'query', func_get_args()); } /** * Remove Participant. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function removeParticipant(array $parameters = [], array $options = []) + public function removeParticipant($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/chat-channels/remove-participant/:participantId', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/chat-channels/remove-participant/:participantId', ['participantId'], 'body', func_get_args()); } /** * Retrieve Chat Channel. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveChatChannel(array $parameters = [], array $options = []) + public function retrieveChatChannel($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/chat-channels/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/chat-channels/:id', ['id'], 'query', func_get_args()); } /** * Send Message. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function sendMessage(array $parameters = [], array $options = []) + public function sendMessage($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/chat-channels/:id/send-message', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/chat-channels/:id/send-message', ['id'], 'body', func_get_args()); } /** * Update Chat Channel. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateChatChannel(array $parameters = [], array $options = []) + public function updateChatChannel($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/chat-channels/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/chat-channels/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/CommentServiceEndpoints.php b/src/Services/Concerns/CommentServiceEndpoints.php index 5d2fc50..6f260c3 100644 --- a/src/Services/Concerns/CommentServiceEndpoints.php +++ b/src/Services/Concerns/CommentServiceEndpoints.php @@ -22,19 +22,20 @@ trait CommentServiceEndpoints */ public function createComment(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/comments', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/comments', [], 'body', func_get_args()); } /** * Delete Comment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteComment(array $parameters = [], array $options = []) + public function deleteComment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/comments/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/comments/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteComment(array $parameters = [], array $options = []) */ public function queryComments(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/comments', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/comments', [], 'query', func_get_args()); } /** * Retrieve Comment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveComment(array $parameters = [], array $options = []) + public function retrieveComment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/comments/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/comments/:id', ['id'], 'query', func_get_args()); } /** * Update Comment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateComment(array $parameters = [], array $options = []) + public function updateComment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/comments/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/comments/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/ContactServiceEndpoints.php b/src/Services/Concerns/ContactServiceEndpoints.php index eb81f60..48b47c8 100644 --- a/src/Services/Concerns/ContactServiceEndpoints.php +++ b/src/Services/Concerns/ContactServiceEndpoints.php @@ -22,19 +22,20 @@ trait ContactServiceEndpoints */ public function createContact(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/contacts', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/contacts', [], 'body', func_get_args()); } /** * Delete a Contact. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteContact(array $parameters = [], array $options = []) + public function deleteContact($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/contacts/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/contacts/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteContact(array $parameters = [], array $options = []) */ public function queryContacts(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/contacts', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/contacts', [], 'query', func_get_args()); } /** * Retrieve a Contact. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveContact(array $parameters = [], array $options = []) + public function retrieveContact($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/contacts/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/contacts/:id', ['id'], 'query', func_get_args()); } /** * Update a Contact. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateContact(array $parameters = [], array $options = []) + public function updateContact($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/contacts/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/contacts/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/CustomerServiceEndpoints.php b/src/Services/Concerns/CustomerServiceEndpoints.php index 88f711c..df6c409 100644 --- a/src/Services/Concerns/CustomerServiceEndpoints.php +++ b/src/Services/Concerns/CustomerServiceEndpoints.php @@ -22,7 +22,7 @@ trait CustomerServiceEndpoints */ public function createCustomer(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers', [], 'body', func_get_args()); } /** @@ -34,7 +34,7 @@ public function createCustomer(array $parameters = [], array $options = []) */ public function createCustomerOrder(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/orders', [], 'body', func_get_args()); } /** @@ -46,7 +46,7 @@ public function createCustomerOrder(array $parameters = [], array $options = []) */ public function forgotCustomerPassword(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/forgot-password', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/forgot-password', [], 'body', func_get_args()); } /** @@ -58,7 +58,7 @@ public function forgotCustomerPassword(array $parameters = [], array $options = */ public function listCustomerOrders(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/customers/orders', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/customers/orders', [], 'query', func_get_args()); } /** @@ -70,7 +70,7 @@ public function listCustomerOrders(array $parameters = [], array $options = []) */ public function listCustomerPlaces(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/customers/places', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/customers/places', [], 'query', func_get_args()); } /** @@ -82,7 +82,7 @@ public function listCustomerPlaces(array $parameters = [], array $options = []) */ public function loginCustomer(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/login', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/login', [], 'body', func_get_args()); } /** @@ -94,7 +94,7 @@ public function loginCustomer(array $parameters = [], array $options = []) */ public function logoutAllCustomerSessions(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/logout-all', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/logout-all', [], 'body', func_get_args()); } /** @@ -106,7 +106,7 @@ public function logoutAllCustomerSessions(array $parameters = [], array $options */ public function logoutCustomer(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/logout', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/logout', [], 'body', func_get_args()); } /** @@ -118,7 +118,7 @@ public function logoutCustomer(array $parameters = [], array $options = []) */ public function registerCustomerDevice(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/register-device', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/register-device', [], 'body', func_get_args()); } /** @@ -130,7 +130,7 @@ public function registerCustomerDevice(array $parameters = [], array $options = */ public function requestCustomerCreationCode(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/request-creation-code', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/request-creation-code', [], 'body', func_get_args()); } /** @@ -142,7 +142,7 @@ public function requestCustomerCreationCode(array $parameters = [], array $optio */ public function requestCustomerLoginSms(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/login-with-sms', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/login-with-sms', [], 'body', func_get_args()); } /** @@ -154,7 +154,7 @@ public function requestCustomerLoginSms(array $parameters = [], array $options = */ public function resetCustomerPassword(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/reset-password', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/reset-password', [], 'body', func_get_args()); } /** @@ -166,19 +166,20 @@ public function resetCustomerPassword(array $parameters = [], array $options = [ */ public function retrieveAuthenticatedCustomer(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/customers/me', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/customers/me', [], 'query', func_get_args()); } /** * Retrieve a Customer Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveCustomerOrder(array $parameters = [], array $options = []) + public function retrieveCustomerOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/customers/orders/{{customer_order_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/customers/orders/{{customer_order_id}}', ['customer_order_id'], 'query', func_get_args()); } /** @@ -190,7 +191,7 @@ public function retrieveCustomerOrder(array $parameters = [], array $options = [ */ public function updateAuthenticatedCustomer(array $parameters = [], array $options = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/customers/me', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/customers/me', [], 'body', func_get_args()); } /** @@ -202,6 +203,6 @@ public function updateAuthenticatedCustomer(array $parameters = [], array $optio */ public function verifyCustomerLoginCode(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/customers/verify-code', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/customers/verify-code', [], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/DeviceServiceEndpoints.php b/src/Services/Concerns/DeviceServiceEndpoints.php index 8490195..62cf9dd 100644 --- a/src/Services/Concerns/DeviceServiceEndpoints.php +++ b/src/Services/Concerns/DeviceServiceEndpoints.php @@ -16,13 +16,14 @@ trait DeviceServiceEndpoints /** * Attach Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function attachDevice(array $parameters = [], array $options = []) + public function attachDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/devices/{{device_id}}/attach', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/devices/{{device_id}}/attach', ['device_id'], 'body', func_get_args()); } /** @@ -34,31 +35,33 @@ public function attachDevice(array $parameters = [], array $options = []) */ public function createDevice(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/devices', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/devices', [], 'body', func_get_args()); } /** * Delete a Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteDevice(array $parameters = [], array $options = []) + public function deleteDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/devices/{{device_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/devices/{{device_id}}', ['device_id'], 'body', func_get_args()); } /** * Detach Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function detachDevice(array $parameters = [], array $options = []) + public function detachDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/devices/{{device_id}}/detach', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/devices/{{device_id}}/detach', ['device_id'], 'body', func_get_args()); } /** @@ -70,30 +73,32 @@ public function detachDevice(array $parameters = [], array $options = []) */ public function queryDevices(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/devices', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/devices', [], 'query', func_get_args()); } /** * Retrieve a Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveDevice(array $parameters = [], array $options = []) + public function retrieveDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/devices/{{device_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/devices/{{device_id}}', ['device_id'], 'query', func_get_args()); } /** * Update a Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateDevice(array $parameters = [], array $options = []) + public function updateDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/devices/{{device_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/devices/{{device_id}}', ['device_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/DriverServiceEndpoints.php b/src/Services/Concerns/DriverServiceEndpoints.php index d463363..1169d1f 100644 --- a/src/Services/Concerns/DriverServiceEndpoints.php +++ b/src/Services/Concerns/DriverServiceEndpoints.php @@ -16,13 +16,14 @@ trait DriverServiceEndpoints /** * Change Driver Password. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function changeDriverPassword(array $parameters = [], array $options = []) + public function changeDriverPassword($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/:id/change-password', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/:id/change-password', ['id'], 'body', func_get_args()); } /** @@ -34,55 +35,59 @@ public function changeDriverPassword(array $parameters = [], array $options = [] */ public function createDriver(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers', [], 'body', func_get_args()); } /** * Delete a Driver. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteDriver(array $parameters = [], array $options = []) + public function deleteDriver($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/drivers/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/drivers/:id', ['id'], 'body', func_get_args()); } /** * Get Driver Current Organization. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getDriverCurrentOrganization(array $parameters = [], array $options = []) + public function getDriverCurrentOrganization($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/drivers/:id/current-organization', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/drivers/:id/current-organization', ['id'], 'query', func_get_args()); } /** * List Driver Manifests. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function listDriverManifests(array $parameters = [], array $options = []) + public function listDriverManifests($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/drivers/:id/manifests', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/drivers/:id/manifests', ['id'], 'query', func_get_args()); } /** * List Driver Organizations. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function listDriverOrganizations(array $parameters = [], array $options = []) + public function listDriverOrganizations($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/drivers/:id/organizations', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/drivers/:id/organizations', ['id'], 'query', func_get_args()); } /** @@ -94,7 +99,7 @@ public function listDriverOrganizations(array $parameters = [], array $options = */ public function loginDriver(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/login', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/login', [], 'body', func_get_args()); } /** @@ -106,7 +111,7 @@ public function loginDriver(array $parameters = [], array $options = []) */ public function queryDrivers(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/drivers', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/drivers', [], 'query', func_get_args()); } /** @@ -118,19 +123,20 @@ public function queryDrivers(array $parameters = [], array $options = []) */ public function registerDevice(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/register-device', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/register-device', [], 'body', func_get_args()); } /** * Register Driver Device. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function registerDriverDevice(array $parameters = [], array $options = []) + public function registerDriverDevice($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/:id/register-device', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/:id/register-device', ['id'], 'body', func_get_args()); } /** @@ -142,7 +148,7 @@ public function registerDriverDevice(array $parameters = [], array $options = [] */ public function requestDriverLoginSms(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/login-with-sms', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/login-with-sms', [], 'body', func_get_args()); } /** @@ -154,7 +160,7 @@ public function requestDriverLoginSms(array $parameters = [], array $options = [ */ public function requestDriverPasswordReset(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/forgot-password', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/forgot-password', [], 'body', func_get_args()); } /** @@ -166,79 +172,85 @@ public function requestDriverPasswordReset(array $parameters = [], array $option */ public function resetDriverPassword(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/reset-password', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/reset-password', [], 'body', func_get_args()); } /** * Retrieve a Driver. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveDriver(array $parameters = [], array $options = []) + public function retrieveDriver($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/drivers/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/drivers/:id', ['id'], 'query', func_get_args()); } /** * Simulate Driver Route. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function simulateDriverRoute(array $parameters = [], array $options = []) + public function simulateDriverRoute($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/:id/simulate', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/:id/simulate', ['id'], 'body', func_get_args()); } /** * Switch Driver Organization. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function switchDriverOrganization(array $parameters = [], array $options = []) + public function switchDriverOrganization($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/:id/switch-organization', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/:id/switch-organization', ['id'], 'body', func_get_args()); } /** * Toggle Driver Online. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function toggleDriverOnline(array $parameters = [], array $options = []) + public function toggleDriverOnline($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/:id/toggle-online', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/:id/toggle-online', ['id'], 'body', func_get_args()); } /** * Track Driver. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function trackDriver(array $parameters = [], array $options = []) + public function trackDriver($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/drivers/:id/track', $parameters, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/drivers/:id/track', ['id'], 'body', func_get_args()); } /** * Update a Driver. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateDriver(array $parameters = [], array $options = []) + public function updateDriver($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/drivers/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/drivers/:id', ['id'], 'body', func_get_args()); } /** @@ -250,6 +262,6 @@ public function updateDriver(array $parameters = [], array $options = []) */ public function verifyDriverLoginCode(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/drivers/verify-code', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/drivers/verify-code', [], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/EntityServiceEndpoints.php b/src/Services/Concerns/EntityServiceEndpoints.php index 5c5e00c..241de06 100644 --- a/src/Services/Concerns/EntityServiceEndpoints.php +++ b/src/Services/Concerns/EntityServiceEndpoints.php @@ -22,19 +22,20 @@ trait EntityServiceEndpoints */ public function createEntity(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/entities', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/entities', [], 'body', func_get_args()); } /** * Delete a Entity. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteEntity(array $parameters = [], array $options = []) + public function deleteEntity($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/entities/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/entities/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteEntity(array $parameters = [], array $options = []) */ public function queryEntities(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/entities', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/entities', [], 'query', func_get_args()); } /** * Retrieve an Entity. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveEntity(array $parameters = [], array $options = []) + public function retrieveEntity($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/entities/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/entities/:id', ['id'], 'query', func_get_args()); } /** * Update a Entity. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateEntity(array $parameters = [], array $options = []) + public function updateEntity($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/entities/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/entities/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/EquipmentServiceEndpoints.php b/src/Services/Concerns/EquipmentServiceEndpoints.php index da1508f..a93429c 100644 --- a/src/Services/Concerns/EquipmentServiceEndpoints.php +++ b/src/Services/Concerns/EquipmentServiceEndpoints.php @@ -22,19 +22,20 @@ trait EquipmentServiceEndpoints */ public function createEquipment(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/equipment', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/equipment', [], 'body', func_get_args()); } /** * Delete Equipment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteEquipment(array $parameters = [], array $options = []) + public function deleteEquipment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', ['equipment_id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteEquipment(array $parameters = [], array $options = []) */ public function queryEquipment(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/equipment', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/equipment', [], 'query', func_get_args()); } /** * Retrieve Equipment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveEquipment(array $parameters = [], array $options = []) + public function retrieveEquipment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', ['equipment_id'], 'query', func_get_args()); } /** * Update Equipment. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateEquipment(array $parameters = [], array $options = []) + public function updateEquipment($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/equipment/{{equipment_id}}', ['equipment_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/FileServiceEndpoints.php b/src/Services/Concerns/FileServiceEndpoints.php index b893ddb..512b1be 100644 --- a/src/Services/Concerns/FileServiceEndpoints.php +++ b/src/Services/Concerns/FileServiceEndpoints.php @@ -16,25 +16,27 @@ trait FileServiceEndpoints /** * Delete a File. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteFile(array $parameters = [], array $options = []) + public function deleteFile($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/files/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/files/:id', ['id'], 'body', func_get_args()); } /** * Download File. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function downloadFile(array $parameters = [], array $options = []) + public function downloadFile($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/files/:id/download', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/files/:id/download', ['id'], 'query', func_get_args()); } /** @@ -46,31 +48,33 @@ public function downloadFile(array $parameters = [], array $options = []) */ public function queryFiles(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/files', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/files', [], 'query', func_get_args()); } /** * Retrieve a File. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveFile(array $parameters = [], array $options = []) + public function retrieveFile($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/files/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/files/:id', ['id'], 'query', func_get_args()); } /** * Update File. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateFile(array $parameters = [], array $options = []) + public function updateFile($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/files/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/files/:id', ['id'], 'body', func_get_args()); } /** @@ -82,7 +86,7 @@ public function updateFile(array $parameters = [], array $options = []) */ public function uploadBase64File(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/files/base64', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/files/base64', [], 'body', func_get_args()); } /** @@ -94,6 +98,6 @@ public function uploadBase64File(array $parameters = [], array $options = []) */ public function uploadFile(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/files', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/files', [], 'multipart', func_get_args()); } } diff --git a/src/Services/Concerns/FleetServiceEndpoints.php b/src/Services/Concerns/FleetServiceEndpoints.php index b745417..f8e335e 100644 --- a/src/Services/Concerns/FleetServiceEndpoints.php +++ b/src/Services/Concerns/FleetServiceEndpoints.php @@ -22,19 +22,20 @@ trait FleetServiceEndpoints */ public function createFleet(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fleets', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fleets', [], 'body', func_get_args()); } /** * Delete a Fleet. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteFleet(array $parameters = [], array $options = []) + public function deleteFleet($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/fleets/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/fleets/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteFleet(array $parameters = [], array $options = []) */ public function queryFleets(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fleets', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fleets', [], 'query', func_get_args()); } /** * Retrieve a Fleet. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveFleet(array $parameters = [], array $options = []) + public function retrieveFleet($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fleets/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fleets/:id', ['id'], 'query', func_get_args()); } /** * Update a Fleet. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateFleet(array $parameters = [], array $options = []) + public function updateFleet($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/fleets/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/fleets/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/FuelReportServiceEndpoints.php b/src/Services/Concerns/FuelReportServiceEndpoints.php index 1f2f64e..5cfb459 100644 --- a/src/Services/Concerns/FuelReportServiceEndpoints.php +++ b/src/Services/Concerns/FuelReportServiceEndpoints.php @@ -22,19 +22,20 @@ trait FuelReportServiceEndpoints */ public function createFuelReport(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-reports', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-reports', [], 'body', func_get_args()); } /** * Delete a Fuel Report. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteFuelReport(array $parameters = [], array $options = []) + public function deleteFuelReport($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/fuel-reports/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/fuel-reports/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteFuelReport(array $parameters = [], array $options = []) */ public function queryFuelReports(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fuel-reports', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fuel-reports', [], 'query', func_get_args()); } /** * Retrieve a Fuel Report. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveFuelReport(array $parameters = [], array $options = []) + public function retrieveFuelReport($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fuel-reports/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fuel-reports/:id', ['id'], 'query', func_get_args()); } /** * Update a Fuel Report. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateFuelReport(array $parameters = [], array $options = []) + public function updateFuelReport($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/fuel-reports/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/fuel-reports/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/FuelTransactionServiceEndpoints.php b/src/Services/Concerns/FuelTransactionServiceEndpoints.php index 162cedd..3871859 100644 --- a/src/Services/Concerns/FuelTransactionServiceEndpoints.php +++ b/src/Services/Concerns/FuelTransactionServiceEndpoints.php @@ -22,43 +22,46 @@ trait FuelTransactionServiceEndpoints */ public function createFuelTransaction(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-transactions', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-transactions', [], 'body', func_get_args()); } /** * Delete a Fuel Transaction. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteFuelTransaction(array $parameters = [], array $options = []) + public function deleteFuelTransaction($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', ['fuel_transaction_id'], 'body', func_get_args()); } /** * Match Fuel Transaction Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function matchFuelTransactionOrder(array $parameters = [], array $options = []) + public function matchFuelTransactionOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/match-order', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/match-order', ['fuel_transaction_id'], 'body', func_get_args()); } /** * Match Fuel Transaction Vehicle. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function matchFuelTransactionVehicle(array $parameters = [], array $options = []) + public function matchFuelTransactionVehicle($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/match-vehicle', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/match-vehicle', ['fuel_transaction_id'], 'body', func_get_args()); } /** @@ -70,54 +73,58 @@ public function matchFuelTransactionVehicle(array $parameters = [], array $optio */ public function queryFuelTransactions(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fuel-transactions', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fuel-transactions', [], 'query', func_get_args()); } /** * Reprocess Fuel Transaction. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function reprocessFuelTransaction(array $parameters = [], array $options = []) + public function reprocessFuelTransaction($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/reprocess', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/reprocess', ['fuel_transaction_id'], 'body', func_get_args()); } /** * Retrieve a Fuel Transaction. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveFuelTransaction(array $parameters = [], array $options = []) + public function retrieveFuelTransaction($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', ['fuel_transaction_id'], 'query', func_get_args()); } /** * Review Fuel Transaction. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function reviewFuelTransaction(array $parameters = [], array $options = []) + public function reviewFuelTransaction($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/review', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}/review', ['fuel_transaction_id'], 'body', func_get_args()); } /** * Update a Fuel Transaction. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateFuelTransaction(array $parameters = [], array $options = []) + public function updateFuelTransaction($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/fuel-transactions/{{fuel_transaction_id}}', ['fuel_transaction_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/GeofenceServiceEndpoints.php b/src/Services/Concerns/GeofenceServiceEndpoints.php index 0fa1e3c..012b04e 100644 --- a/src/Services/Concerns/GeofenceServiceEndpoints.php +++ b/src/Services/Concerns/GeofenceServiceEndpoints.php @@ -16,13 +16,14 @@ trait GeofenceServiceEndpoints /** * Get Driver Geofence History. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getDriverGeofenceHistory(array $parameters = [], array $options = []) + public function getDriverGeofenceHistory($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/geofences/driver/:driverId/history', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/geofences/driver/:driverId/history', ['driverId'], 'query', func_get_args()); } /** @@ -34,7 +35,7 @@ public function getDriverGeofenceHistory(array $parameters = [], array $options */ public function getGeofenceDwellReport(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/geofences/dwell-report', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/geofences/dwell-report', [], 'query', func_get_args()); } /** @@ -46,7 +47,7 @@ public function getGeofenceDwellReport(array $parameters = [], array $options = */ public function getGeofenceInventory(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/geofences/inventory', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/geofences/inventory', [], 'query', func_get_args()); } /** @@ -58,6 +59,6 @@ public function getGeofenceInventory(array $parameters = [], array $options = [] */ public function listGeofenceEvents(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/geofences/events', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/geofences/events', [], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/IssueServiceEndpoints.php b/src/Services/Concerns/IssueServiceEndpoints.php index abdcb9f..62fbacb 100644 --- a/src/Services/Concerns/IssueServiceEndpoints.php +++ b/src/Services/Concerns/IssueServiceEndpoints.php @@ -22,19 +22,20 @@ trait IssueServiceEndpoints */ public function createIssue(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/issues', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/issues', [], 'body', func_get_args()); } /** * Delete an Issue. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteIssue(array $parameters = [], array $options = []) + public function deleteIssue($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/issues/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/issues/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteIssue(array $parameters = [], array $options = []) */ public function queryIssues(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/issues', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/issues', [], 'query', func_get_args()); } /** * Retrieve an Issue. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveIssue(array $parameters = [], array $options = []) + public function retrieveIssue($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/issues/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/issues/:id', ['id'], 'query', func_get_args()); } /** * Update an Issue. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateIssue(array $parameters = [], array $options = []) + public function updateIssue($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/issues/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/issues/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/LabelServiceEndpoints.php b/src/Services/Concerns/LabelServiceEndpoints.php index af714c4..47e9293 100644 --- a/src/Services/Concerns/LabelServiceEndpoints.php +++ b/src/Services/Concerns/LabelServiceEndpoints.php @@ -16,12 +16,13 @@ trait LabelServiceEndpoints /** * Render Label. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function renderLabel(array $parameters = [], array $options = []) + public function renderLabel($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/labels/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/labels/:id', ['id'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/ManifestServiceEndpoints.php b/src/Services/Concerns/ManifestServiceEndpoints.php index c20ddd3..ab0d106 100644 --- a/src/Services/Concerns/ManifestServiceEndpoints.php +++ b/src/Services/Concerns/ManifestServiceEndpoints.php @@ -16,36 +16,39 @@ trait ManifestServiceEndpoints /** * Optimize a Manifest. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function optimizeManifest(array $parameters = [], array $options = []) + public function optimizeManifest($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/manifests/:id/optimize', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/manifests/:id/optimize', ['id'], 'body', func_get_args()); } /** * Retrieve a Manifest. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveManifest(array $parameters = [], array $options = []) + public function retrieveManifest($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/manifests/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/manifests/:id', ['id'], 'query', func_get_args()); } /** * Update a Manifest Stop. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateManifestStop(array $parameters = [], array $options = []) + public function updateManifestStop($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/manifest-stops/:id', $parameters, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/manifest-stops/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/OnboardServiceEndpoints.php b/src/Services/Concerns/OnboardServiceEndpoints.php index 1e79904..2eb4637 100644 --- a/src/Services/Concerns/OnboardServiceEndpoints.php +++ b/src/Services/Concerns/OnboardServiceEndpoints.php @@ -16,12 +16,13 @@ trait OnboardServiceEndpoints /** * Get Driver Onboard Settings. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getDriverOnboardSettings(array $parameters = [], array $options = []) + public function getDriverOnboardSettings($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/onboard/driver-onboard-settings/:companyId', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/onboard/driver-onboard-settings/:companyId', ['companyId'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/OrchestratorServiceEndpoints.php b/src/Services/Concerns/OrchestratorServiceEndpoints.php index 7e1c9db..7ace9bd 100644 --- a/src/Services/Concerns/OrchestratorServiceEndpoints.php +++ b/src/Services/Concerns/OrchestratorServiceEndpoints.php @@ -22,7 +22,7 @@ trait OrchestratorServiceEndpoints */ public function commitOrchestratorPlan(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orchestrator/commit', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orchestrator/commit', [], 'body', func_get_args()); } /** @@ -34,6 +34,6 @@ public function commitOrchestratorPlan(array $parameters = [], array $options = */ public function runOrchestrator(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orchestrator/run', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orchestrator/run', [], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/OrderConfigServiceEndpoints.php b/src/Services/Concerns/OrderConfigServiceEndpoints.php index 43b5f2f..e0eb3a3 100644 --- a/src/Services/Concerns/OrderConfigServiceEndpoints.php +++ b/src/Services/Concerns/OrderConfigServiceEndpoints.php @@ -22,18 +22,19 @@ trait OrderConfigServiceEndpoints */ public function queryOrderConfigs(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/order-configs', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/order-configs', [], 'query', func_get_args()); } /** * Retrieve an Order Config. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveOrderConfig(array $parameters = [], array $options = []) + public function retrieveOrderConfig($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/order-configs/{{order_config_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/order-configs/{{order_config_id}}', ['order_config_id'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/OrderServiceEndpoints.php b/src/Services/Concerns/OrderServiceEndpoints.php index f4f63b9..d8aa10f 100644 --- a/src/Services/Concerns/OrderServiceEndpoints.php +++ b/src/Services/Concerns/OrderServiceEndpoints.php @@ -16,61 +16,69 @@ trait OrderServiceEndpoints /** * Cancel an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function cancelOrder(array $parameters = [], array $options = []) + public function cancelOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/orders/:id/cancel', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/orders/:id/cancel', ['id'], 'body', func_get_args()); } /** * Capture Photo for Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $data + * @param array $requestOptions * @return mixed */ - public function capturePhotoForOrder(array $parameters = [], array $options = []) + public function capturePhotoForOrder($parameters = [], $options = [], $data = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-photo/:subjectId', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-photo/:subjectId', ['id', 'subjectId'], 'body', func_get_args()); } /** * Capture QR Code for Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $data + * @param array $requestOptions * @return mixed */ - public function captureQrCodeForOrder(array $parameters = [], array $options = []) + public function captureQrCodeForOrder($parameters = [], $options = [], $data = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-qr/:subject-id', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-qr/:subject-id', ['id', 'subject-id'], 'body', func_get_args()); } /** * Capture Signature for Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $data + * @param array $requestOptions * @return mixed */ - public function captureSignatureForOrder(array $parameters = [], array $options = []) + public function captureSignatureForOrder($parameters = [], $options = [], $data = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-signature/:subject-id', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/capture-signature/:subject-id', ['id', 'subject-id'], 'body', func_get_args()); } /** * Complete an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function completeOrder(array $parameters = [], array $options = []) + public function completeOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/complete', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/complete', ['id'], 'body', func_get_args()); } /** @@ -82,7 +90,7 @@ public function completeOrder(array $parameters = [], array $options = []) */ public function createOrder(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -94,7 +102,7 @@ public function createOrder(array $parameters = [], array $options = []) */ public function createOrderUsingCompletePayload(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -106,7 +114,7 @@ public function createOrderUsingCompletePayload(array $parameters = [], array $o */ public function createOrderUsingCoordinates(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -118,7 +126,7 @@ public function createOrderUsingCoordinates(array $parameters = [], array $optio */ public function createOrderUsingGeojsonPoints(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -130,7 +138,7 @@ public function createOrderUsingGeojsonPoints(array $parameters = [], array $opt */ public function createOrderUsingOnlyPickupDropoff(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -142,7 +150,7 @@ public function createOrderUsingOnlyPickupDropoff(array $parameters = [], array */ public function createOrderUsingOnlyWaypoints(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -154,7 +162,7 @@ public function createOrderUsingOnlyWaypoints(array $parameters = [], array $opt */ public function createOrderUsingPayload(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -166,7 +174,7 @@ public function createOrderUsingPayload(array $parameters = [], array $options = */ public function createOrderUsingWaypointsAndEntitiesWithPhotos(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** @@ -178,121 +186,125 @@ public function createOrderUsingWaypointsAndEntitiesWithPhotos(array $parameters */ public function createOrderUsingWaypointsAndEntityDestinations(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders', [], 'body', func_get_args()); } /** * Delete an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteOrder(array $parameters = [], array $options = []) + public function deleteOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/orders/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/orders/:id', ['id'], 'body', func_get_args()); } /** * Dispatch an Order. * - * @param string|array $idOrParameters - * @param array $parametersOrOptions - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function dispatchOrder($idOrParameters = [], array $parametersOrOptions = [], array $options = []) + public function dispatchOrder($parameters = [], $options = [], $requestOptions = []) { - if (is_array($idOrParameters)) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/orders/:id/dispatch', $idOrParameters, $parametersOrOptions); - } - - $parametersOrOptions['id'] = $idOrParameters; - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/orders/:id/dispatch', $parametersOrOptions, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/orders/:id/dispatch', ['id'], 'body', func_get_args()); } /** * Get Editable Entity Fields. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getEditableEntityFields(array $parameters = [], array $options = []) + public function getEditableEntityFields($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/editable-entity-fields', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/editable-entity-fields', ['id'], 'query', func_get_args()); } /** * Get Order Distance and Time. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getOrderDistanceAndTime(array $parameters = [], array $options = []) + public function getOrderDistanceAndTime($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/distance-and-time', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/distance-and-time', ['id'], 'query', func_get_args()); } /** * Get Order ETA. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getOrderEta(array $parameters = [], array $options = []) + public function getOrderEta($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/eta', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/eta', ['id'], 'query', func_get_args()); } /** * Get Order Next Activity. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getOrderNextActivity(array $parameters = [], array $options = []) + public function getOrderNextActivity($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/next-activity', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/next-activity', ['id'], 'query', func_get_args()); } /** * Get Order Tracker. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function getOrderTracker(array $parameters = [], array $options = []) + public function getOrderTracker($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/tracker', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/tracker', ['id'], 'query', func_get_args()); } /** * List Order Comments. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function listOrderComments(array $parameters = [], array $options = []) + public function listOrderComments($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/comments', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/comments', ['id'], 'query', func_get_args()); } /** * List Order Proofs. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $data + * @param array $requestOptions * @return mixed */ - public function listOrderProofs(array $parameters = [], array $options = []) + public function listOrderProofs($parameters = [], $options = [], $data = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/:id/proofs/:subjectId', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/:id/proofs/:subjectId', ['id', 'subjectId'], 'query', func_get_args()); } /** @@ -304,78 +316,85 @@ public function listOrderProofs(array $parameters = [], array $options = []) */ public function queryOrders(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders', [], 'query', func_get_args()); } /** * Retrieve an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveOrder(array $parameters = [], array $options = []) + public function retrieveOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/orders/{{order_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/orders/{{order_id}}', ['order_id'], 'query', func_get_args()); } /** * Schedule an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function scheduleOrder(array $parameters = [], array $options = []) + public function scheduleOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/orders/:id/schedule', $parameters, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/orders/:id/schedule', ['id'], 'body', func_get_args()); } /** * Set Order Destination. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $data + * @param array $requestOptions * @return mixed */ - public function setOrderDestination(array $parameters = [], array $options = []) + public function setOrderDestination($parameters = [], $options = [], $data = [], $requestOptions = []) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/orders/:id/set-destination/:placeId', $parameters, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/orders/:id/set-destination/:placeId', ['id', 'placeId'], 'body', func_get_args()); } /** * Start an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function startOrder(array $parameters = [], array $options = []) + public function startOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/start', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/start', ['id'], 'body', func_get_args()); } /** * Update an Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateOrder(array $parameters = [], array $options = []) + public function updateOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/orders/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/orders/:id', ['id'], 'body', func_get_args()); } /** * Update Order Activity. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateOrderActivity(array $parameters = [], array $options = []) + public function updateOrderActivity($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/orders/:id/update-activity', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/orders/:id/update-activity', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/OrganizationServiceEndpoints.php b/src/Services/Concerns/OrganizationServiceEndpoints.php index 091760a..ae58bc1 100644 --- a/src/Services/Concerns/OrganizationServiceEndpoints.php +++ b/src/Services/Concerns/OrganizationServiceEndpoints.php @@ -22,7 +22,7 @@ trait OrganizationServiceEndpoints */ public function getCurrentOrganization(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/organizations/current', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/organizations/current', [], 'query', func_get_args()); } /** @@ -34,6 +34,6 @@ public function getCurrentOrganization(array $parameters = [], array $options = */ public function listOrganizations(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/organizations', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/organizations', [], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/PartServiceEndpoints.php b/src/Services/Concerns/PartServiceEndpoints.php index 5acce27..5557131 100644 --- a/src/Services/Concerns/PartServiceEndpoints.php +++ b/src/Services/Concerns/PartServiceEndpoints.php @@ -22,19 +22,20 @@ trait PartServiceEndpoints */ public function createPart(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/parts', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/parts', [], 'body', func_get_args()); } /** * Delete a Part. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deletePart(array $parameters = [], array $options = []) + public function deletePart($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/parts/{{part_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/parts/{{part_id}}', ['part_id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deletePart(array $parameters = [], array $options = []) */ public function queryParts(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/parts', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/parts', [], 'query', func_get_args()); } /** * Retrieve a Part. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrievePart(array $parameters = [], array $options = []) + public function retrievePart($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/parts/{{part_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/parts/{{part_id}}', ['part_id'], 'query', func_get_args()); } /** * Update a Part. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updatePart(array $parameters = [], array $options = []) + public function updatePart($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/parts/{{part_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/parts/{{part_id}}', ['part_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/PayloadServiceEndpoints.php b/src/Services/Concerns/PayloadServiceEndpoints.php index d008024..7c00cfd 100644 --- a/src/Services/Concerns/PayloadServiceEndpoints.php +++ b/src/Services/Concerns/PayloadServiceEndpoints.php @@ -22,19 +22,20 @@ trait PayloadServiceEndpoints */ public function createPayload(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/payloads', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/payloads', [], 'body', func_get_args()); } /** * Delete a Payload. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deletePayload(array $parameters = [], array $options = []) + public function deletePayload($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/payloads/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/payloads/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deletePayload(array $parameters = [], array $options = []) */ public function queryPayloads(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/payloads', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/payloads', [], 'query', func_get_args()); } /** * Retrieve a Payload. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrievePayload(array $parameters = [], array $options = []) + public function retrievePayload($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/payloads/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/payloads/:id', ['id'], 'query', func_get_args()); } /** * Update a Payload. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updatePayload(array $parameters = [], array $options = []) + public function updatePayload($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/payloads/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/payloads/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/PlaceServiceEndpoints.php b/src/Services/Concerns/PlaceServiceEndpoints.php index 57d55c7..94f53d7 100644 --- a/src/Services/Concerns/PlaceServiceEndpoints.php +++ b/src/Services/Concerns/PlaceServiceEndpoints.php @@ -22,19 +22,20 @@ trait PlaceServiceEndpoints */ public function createPlace(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/places', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/places', [], 'body', func_get_args()); } /** * Delete a Place. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deletePlace(array $parameters = [], array $options = []) + public function deletePlace($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/places/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/places/:id', ['id'], 'body', func_get_args()); } /** @@ -46,7 +47,7 @@ public function deletePlace(array $parameters = [], array $options = []) */ public function listAllPlaces(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/places', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/places', [], 'query', func_get_args()); } /** @@ -58,19 +59,20 @@ public function listAllPlaces(array $parameters = [], array $options = []) */ public function queryPlaces(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/places', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/places', [], 'query', func_get_args()); } /** * Retrieve a Place. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrievePlace(array $parameters = [], array $options = []) + public function retrievePlace($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/places/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/places/:id', ['id'], 'query', func_get_args()); } /** @@ -82,18 +84,19 @@ public function retrievePlace(array $parameters = [], array $options = []) */ public function searchPlaces(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/places/search', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/places/search', [], 'query', func_get_args()); } /** * Update a Place. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updatePlace(array $parameters = [], array $options = []) + public function updatePlace($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/places/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/places/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/PurchaseRateServiceEndpoints.php b/src/Services/Concerns/PurchaseRateServiceEndpoints.php index 62b2cb3..4951a92 100644 --- a/src/Services/Concerns/PurchaseRateServiceEndpoints.php +++ b/src/Services/Concerns/PurchaseRateServiceEndpoints.php @@ -22,7 +22,7 @@ trait PurchaseRateServiceEndpoints */ public function createPurchaseRate(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/purchase-rates', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/purchase-rates', [], 'body', func_get_args()); } /** @@ -34,18 +34,19 @@ public function createPurchaseRate(array $parameters = [], array $options = []) */ public function queryPurchaseRates(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/purchase-rates', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/purchase-rates', [], 'query', func_get_args()); } /** * Retrieve a Purchase Rate. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrievePurchaseRate(array $parameters = [], array $options = []) + public function retrievePurchaseRate($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/purchase-rates/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/purchase-rates/:id', ['id'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/SensorServiceEndpoints.php b/src/Services/Concerns/SensorServiceEndpoints.php index 772d0d3..af4fafa 100644 --- a/src/Services/Concerns/SensorServiceEndpoints.php +++ b/src/Services/Concerns/SensorServiceEndpoints.php @@ -22,19 +22,20 @@ trait SensorServiceEndpoints */ public function createSensor(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/sensors', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/sensors', [], 'body', func_get_args()); } /** * Delete a Sensor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteSensor(array $parameters = [], array $options = []) + public function deleteSensor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', ['sensor_id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteSensor(array $parameters = [], array $options = []) */ public function querySensors(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/sensors', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/sensors', [], 'query', func_get_args()); } /** * Retrieve a Sensor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveSensor(array $parameters = [], array $options = []) + public function retrieveSensor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', ['sensor_id'], 'query', func_get_args()); } /** * Update a Sensor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateSensor(array $parameters = [], array $options = []) + public function updateSensor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/sensors/{{sensor_id}}', ['sensor_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/ServiceAreaServiceEndpoints.php b/src/Services/Concerns/ServiceAreaServiceEndpoints.php index 1f7d5f1..04bdd65 100644 --- a/src/Services/Concerns/ServiceAreaServiceEndpoints.php +++ b/src/Services/Concerns/ServiceAreaServiceEndpoints.php @@ -22,19 +22,20 @@ trait ServiceAreaServiceEndpoints */ public function createServiceArea(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/service-areas', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/service-areas', [], 'body', func_get_args()); } /** * Delete a Service Area. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteServiceArea(array $parameters = [], array $options = []) + public function deleteServiceArea($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/service-areas/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/service-areas/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteServiceArea(array $parameters = [], array $options = []) */ public function queryServiceAreas(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-areas', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-areas', [], 'query', func_get_args()); } /** * Retrieve a Service Area. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveServiceArea(array $parameters = [], array $options = []) + public function retrieveServiceArea($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-areas/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-areas/:id', ['id'], 'query', func_get_args()); } /** * Update a Service Area. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateServiceArea(array $parameters = [], array $options = []) + public function updateServiceArea($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/service-areas/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/service-areas/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/ServiceQuoteServiceEndpoints.php b/src/Services/Concerns/ServiceQuoteServiceEndpoints.php index 9c93768..4ec22b2 100644 --- a/src/Services/Concerns/ServiceQuoteServiceEndpoints.php +++ b/src/Services/Concerns/ServiceQuoteServiceEndpoints.php @@ -22,18 +22,19 @@ trait ServiceQuoteServiceEndpoints */ public function queryServiceQuotes(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-quotes', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-quotes', [], 'query', func_get_args()); } /** * Retrieve a Service Quote. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveServiceQuote(array $parameters = [], array $options = []) + public function retrieveServiceQuote($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-quotes/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-quotes/:id', ['id'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/ServiceRateServiceEndpoints.php b/src/Services/Concerns/ServiceRateServiceEndpoints.php index 5b1237d..c8255cb 100644 --- a/src/Services/Concerns/ServiceRateServiceEndpoints.php +++ b/src/Services/Concerns/ServiceRateServiceEndpoints.php @@ -22,19 +22,20 @@ trait ServiceRateServiceEndpoints */ public function createServiceRate(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/service-rates', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/service-rates', [], 'body', func_get_args()); } /** * Delete a Service Rate. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteServiceRate(array $parameters = [], array $options = []) + public function deleteServiceRate($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/service-rates/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/service-rates/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteServiceRate(array $parameters = [], array $options = []) */ public function queryServiceRates(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-rates', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-rates', [], 'query', func_get_args()); } /** * Retrieve a Service Rate. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveServiceRate(array $parameters = [], array $options = []) + public function retrieveServiceRate($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/service-rates/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/service-rates/:id', ['id'], 'query', func_get_args()); } /** * Update a Service Rate. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateServiceRate(array $parameters = [], array $options = []) + public function updateServiceRate($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/service-rates/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/service-rates/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/TrackingNumberServiceEndpoints.php b/src/Services/Concerns/TrackingNumberServiceEndpoints.php index 043251c..1d1dbd2 100644 --- a/src/Services/Concerns/TrackingNumberServiceEndpoints.php +++ b/src/Services/Concerns/TrackingNumberServiceEndpoints.php @@ -22,7 +22,7 @@ trait TrackingNumberServiceEndpoints */ public function createTrackingNumber(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/tracking-numbers', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/tracking-numbers', [], 'body', func_get_args()); } /** @@ -34,19 +34,20 @@ public function createTrackingNumber(array $parameters = [], array $options = [] */ public function decodeTrackingNumberQr(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/tracking-numbers/from-qr', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/tracking-numbers/from-qr', [], 'body', func_get_args()); } /** * Delete a Tracking Number. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteTrackingNumber(array $parameters = [], array $options = []) + public function deleteTrackingNumber($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/tracking-numbers/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/tracking-numbers/:id', ['id'], 'body', func_get_args()); } /** @@ -58,18 +59,19 @@ public function deleteTrackingNumber(array $parameters = [], array $options = [] */ public function queryTrackingNumbers(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/tracking-numbers', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/tracking-numbers', [], 'query', func_get_args()); } /** * Retrieve a Tracking Number. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveTrackingNumber(array $parameters = [], array $options = []) + public function retrieveTrackingNumber($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/tracking-numbers/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/tracking-numbers/:id', ['id'], 'query', func_get_args()); } } diff --git a/src/Services/Concerns/TrackingStatusServiceEndpoints.php b/src/Services/Concerns/TrackingStatusServiceEndpoints.php index 81fd874..8f88779 100644 --- a/src/Services/Concerns/TrackingStatusServiceEndpoints.php +++ b/src/Services/Concerns/TrackingStatusServiceEndpoints.php @@ -22,19 +22,20 @@ trait TrackingStatusServiceEndpoints */ public function createTrackingStatus(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/tracking-statuses', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/tracking-statuses', [], 'body', func_get_args()); } /** * Delete a Tracking Status. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteTrackingStatus(array $parameters = [], array $options = []) + public function deleteTrackingStatus($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/tracking-statuses/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/tracking-statuses/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteTrackingStatus(array $parameters = [], array $options = [] */ public function queryTrackingStatuses(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/tracking-statuses', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/tracking-statuses', [], 'query', func_get_args()); } /** * Retrieve a Tracking Status. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveTrackingStatus(array $parameters = [], array $options = []) + public function retrieveTrackingStatus($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/tracking-statuses/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/tracking-statuses/:id', ['id'], 'query', func_get_args()); } /** * Update a Tracking Status. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateTrackingStatus(array $parameters = [], array $options = []) + public function updateTrackingStatus($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/tracking-statuses/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/tracking-statuses/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/VehicleServiceEndpoints.php b/src/Services/Concerns/VehicleServiceEndpoints.php index c730b36..c30dec0 100644 --- a/src/Services/Concerns/VehicleServiceEndpoints.php +++ b/src/Services/Concerns/VehicleServiceEndpoints.php @@ -22,19 +22,20 @@ trait VehicleServiceEndpoints */ public function createVehicle(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/vehicles', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/vehicles', [], 'body', func_get_args()); } /** * Delete a Vehicle. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteVehicle(array $parameters = [], array $options = []) + public function deleteVehicle($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/vehicles/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/vehicles/:id', ['id'], 'body', func_get_args()); } /** @@ -46,42 +47,45 @@ public function deleteVehicle(array $parameters = [], array $options = []) */ public function queryVehicles(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/vehicles', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/vehicles', [], 'query', func_get_args()); } /** * Retrieve a Vehicle. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveVehicle(array $parameters = [], array $options = []) + public function retrieveVehicle($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/vehicles/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/vehicles/:id', ['id'], 'query', func_get_args()); } /** * Track Vehicle. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function trackVehicle(array $parameters = [], array $options = []) + public function trackVehicle($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PATCH', '{{base_url}}/{{namespace}}/vehicles/:id/track', $parameters, $options); + return $this->endpointFromArguments('PATCH', '{{base_url}}/{{namespace}}/vehicles/:id/track', ['id'], 'body', func_get_args()); } /** * Update a Vehicle. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateVehicle(array $parameters = [], array $options = []) + public function updateVehicle($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/vehicles/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/vehicles/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/VendorServiceEndpoints.php b/src/Services/Concerns/VendorServiceEndpoints.php index fa413b6..98fb8c3 100644 --- a/src/Services/Concerns/VendorServiceEndpoints.php +++ b/src/Services/Concerns/VendorServiceEndpoints.php @@ -22,19 +22,20 @@ trait VendorServiceEndpoints */ public function createVendor(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/vendors', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/vendors', [], 'body', func_get_args()); } /** * Delete a Vendor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteVendor(array $parameters = [], array $options = []) + public function deleteVendor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/vendors/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/vendors/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteVendor(array $parameters = [], array $options = []) */ public function queryVendors(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/vendors', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/vendors', [], 'query', func_get_args()); } /** * Retrieve a Vendor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveVendor(array $parameters = [], array $options = []) + public function retrieveVendor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/vendors/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/vendors/:id', ['id'], 'query', func_get_args()); } /** * Update a Vendor. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateVendor(array $parameters = [], array $options = []) + public function updateVendor($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/vendors/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/vendors/:id', ['id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/WorkOrderServiceEndpoints.php b/src/Services/Concerns/WorkOrderServiceEndpoints.php index 2717e0e..632ecd9 100644 --- a/src/Services/Concerns/WorkOrderServiceEndpoints.php +++ b/src/Services/Concerns/WorkOrderServiceEndpoints.php @@ -22,19 +22,20 @@ trait WorkOrderServiceEndpoints */ public function createWorkOrder(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/work-orders', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/work-orders', [], 'body', func_get_args()); } /** * Delete a Work Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteWorkOrder(array $parameters = [], array $options = []) + public function deleteWorkOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', ['work_order_id'], 'body', func_get_args()); } /** @@ -46,42 +47,45 @@ public function deleteWorkOrder(array $parameters = [], array $options = []) */ public function queryWorkOrders(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/work-orders', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/work-orders', [], 'query', func_get_args()); } /** * Retrieve a Work Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveWorkOrder(array $parameters = [], array $options = []) + public function retrieveWorkOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', ['work_order_id'], 'query', func_get_args()); } /** * Send Work Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function sendWorkOrder(array $parameters = [], array $options = []) + public function sendWorkOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}/send', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}/send', ['work_order_id'], 'body', func_get_args()); } /** * Update a Work Order. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateWorkOrder(array $parameters = [], array $options = []) + public function updateWorkOrder($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/work-orders/{{work_order_id}}', ['work_order_id'], 'body', func_get_args()); } } diff --git a/src/Services/Concerns/ZoneServiceEndpoints.php b/src/Services/Concerns/ZoneServiceEndpoints.php index f5267a2..9f8bb0e 100644 --- a/src/Services/Concerns/ZoneServiceEndpoints.php +++ b/src/Services/Concerns/ZoneServiceEndpoints.php @@ -22,19 +22,20 @@ trait ZoneServiceEndpoints */ public function createZone(array $parameters = [], array $options = []) { - return $this->endpoint('POST', '{{base_url}}/{{namespace}}/zones', $parameters, $options); + return $this->endpointFromArguments('POST', '{{base_url}}/{{namespace}}/zones', [], 'body', func_get_args()); } /** * Delete a Zone. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function deleteZone(array $parameters = [], array $options = []) + public function deleteZone($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('DELETE', '{{base_url}}/{{namespace}}/zones/:id', $parameters, $options); + return $this->endpointFromArguments('DELETE', '{{base_url}}/{{namespace}}/zones/:id', ['id'], 'body', func_get_args()); } /** @@ -46,30 +47,32 @@ public function deleteZone(array $parameters = [], array $options = []) */ public function queryZones(array $parameters = [], array $options = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/zones', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/zones', [], 'query', func_get_args()); } /** * Retrieve a zone. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function retrieveZone(array $parameters = [], array $options = []) + public function retrieveZone($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('GET', '{{base_url}}/{{namespace}}/zones/:id', $parameters, $options); + return $this->endpointFromArguments('GET', '{{base_url}}/{{namespace}}/zones/:id', ['id'], 'query', func_get_args()); } /** * Update a Zone. * - * @param array $parameters - * @param array $options + * @param scalar|\Fleetbase\Sdk\Resource|array $parameters First path value, or the legacy endpoint envelope. + * @param mixed $options Request data, a second path value, or legacy request options. + * @param array $requestOptions * @return mixed */ - public function updateZone(array $parameters = [], array $options = []) + public function updateZone($parameters = [], $options = [], $requestOptions = []) { - return $this->endpoint('PUT', '{{base_url}}/{{namespace}}/zones/:id', $parameters, $options); + return $this->endpointFromArguments('PUT', '{{base_url}}/{{namespace}}/zones/:id', ['id'], 'body', func_get_args()); } } diff --git a/tests/Contract/ApiExamplesTest.php b/tests/Contract/ApiExamplesTest.php index a33ffa9..a8fb2a9 100644 --- a/tests/Contract/ApiExamplesTest.php +++ b/tests/Contract/ApiExamplesTest.php @@ -33,9 +33,23 @@ public function testEveryGeneratedDocumentationSnippetExecutes(): void $dispatchExample = $catalogExamples['fleetbase-api-orders-dispatch-an-order'] ?? null; self::assertIsArray($dispatchExample); self::assertSame( - '$result = $fleetbase->orders->dispatchOrder(\'order_id-fixture\');', + '$result = $fleetbase->orders->dispatchOrder($orderId);', $dispatchExample['call'] ?? null ); + $passwordExample = $catalogExamples['fleetbase-api-drivers-change-driver-password'] ?? null; + $scheduleExample = $catalogExamples['fleetbase-api-orders-schedule-an-order'] ?? null; + self::assertIsArray($passwordExample); + self::assertIsArray($scheduleExample); + $passwordCall = $passwordExample['call'] ?? null; + $scheduleCall = $scheduleExample['call'] ?? null; + self::assertIsString($passwordCall); + self::assertIsString($scheduleCall); + self::assertStringContainsString("changeDriverPassword(\n \$driverId,\n [", $passwordCall); + self::assertStringContainsString("scheduleOrder(\n \$orderId,\n [", $scheduleCall); + foreach ($snippets as $snippet) { + self::assertStringNotContainsString("'body' =>", $snippet); + self::assertStringNotContainsString("\n [],\n []\n", $snippet); + } $history = []; $responses = array_fill(0, count($snippets), new Response(200, ['Content-Type' => 'application/json'], '{}')); @@ -50,8 +64,17 @@ public function testEveryGeneratedDocumentationSnippetExecutes(): void 'httpClient' => new Client(['handler' => $handler]), ]); + $exampleRows = array_values($catalogExamples); foreach ($snippets as $index => $snippet) { self::assertIsString($snippet); + $exampleRow = $exampleRows[$index] ?? null; + self::assertIsArray($exampleRow); + $variables = $exampleRow['variables'] ?? null; + self::assertIsArray($variables); + foreach ($variables as $name => $value) { + self::assertIsString($name); + ${$name} = $value; + } eval($snippet); self::assertCount($index + 1, $history); } diff --git a/tests/Contract/EndpointContractTest.php b/tests/Contract/EndpointContractTest.php index 23b7fa4..4a0d0e7 100644 --- a/tests/Contract/EndpointContractTest.php +++ b/tests/Contract/EndpointContractTest.php @@ -15,70 +15,119 @@ final class EndpointContractTest extends TestCase public function testEveryEndpointContract(): void { foreach (self::endpointCases() as $case) { - [$serviceClass, $method, $httpMethod, $urlTemplate, $parameters, $requestFixture] = $case; - $options = []; - $query = self::normalizeFixture($requestFixture['query'] ?? []); - if (is_array($query) && $query !== []) { - $options['query'] = $query; - } - $bodyType = $requestFixture['body_type'] ?? null; - $body = self::normalizeFixture($requestFixture['body'] ?? null); - $expectedBody = null; - $expectedMultipart = []; - if ($bodyType === 'json' && is_array($body)) { - $parameters['body'] = $body; - $expectedBody = $body; - } elseif ($bodyType === 'formdata' && is_array($body)) { - foreach ($body as $part) { - if (!is_array($part) || !is_string($part['key'] ?? null)) { - continue; - } - $normalizedValue = self::normalizeFixture($part['value'] ?? ''); - $contents = ($part['type'] ?? null) === 'file' - ? 'fixture-file-content' - : (is_scalar($normalizedValue) ? (string) $normalizedValue : ''); - $options['multipart'][] = ['name' => $part['key'], 'contents' => $contents]; - $expectedMultipart[$part['key']] = $contents; - } - } - $client = $this->mockHttpClient([new Response(200, ['Content-Type' => 'application/json'], '{}')]); + [$serviceClass, $method, $httpMethod, $urlTemplate, $pathValues, $requestFixture] = $case; + [$legacyArguments, $ergonomicArguments, $query, $expectedBody, $expectedMultipart] = + self::invocations($pathValues, $requestFixture); + $client = $this->mockHttpClient([ + new Response(200, ['Content-Type' => 'application/json'], '{}'), + new Response(200, ['Content-Type' => 'application/json'], '{}'), + ]); $reflection = new ReflectionClass($serviceClass); $service = $reflection->newInstance($client); - $service->{$method}($parameters, $options); + $service->{$method}(...$legacyArguments); + $service->{$method}(...$ergonomicArguments); - $transaction = $this->history[0] ?? null; - self::assertIsArray($transaction); - $request = $transaction['request'] ?? null; - self::assertInstanceOf(RequestInterface::class, $request); - self::assertSame($httpMethod, $request->getMethod()); + $legacyRequest = self::requestFrom($this->history, 0); + $ergonomicRequest = self::requestFrom($this->history, 1); + self::assertSame($httpMethod, $legacyRequest->getMethod()); + self::assertSame($httpMethod, $ergonomicRequest->getMethod()); + self::assertSame('legacy', $legacyRequest->getHeaderLine('X-SDK-Invocation')); + self::assertSame('ergonomic', $ergonomicRequest->getHeaderLine('X-SDK-Invocation')); $expected = preg_replace('#^\{\{base_url\}\}/\{\{namespace\}\}/?#i', '', $urlTemplate); self::assertIsString($expected); - foreach ($parameters as $name => $value) { - if ($name === 'body') { - continue; - } - if (!is_scalar($value)) { - throw new \RuntimeException('Endpoint path parameters must be scalar.'); - } + foreach ($pathValues as $name => $value) { $expected = str_replace('{{' . $name . '}}', rawurlencode((string) $value), $expected); $expected = preg_replace('/:' . preg_quote($name, '/') . '(?![A-Za-z0-9_-])/', rawurlencode((string) $value), $expected); self::assertIsString($expected); } - if (is_array($query) && $query !== []) { + if ($query !== []) { $expected .= (strpos($expected, '?') === false ? '?' : '&') . http_build_query($query, '', '&', PHP_QUERY_RFC3986); } - self::assertSame('/v1/' . ltrim($expected, '/'), $request->getUri()->getPath() - . ($request->getUri()->getQuery() !== '' ? '?' . $request->getUri()->getQuery() : '')); + $expectedUri = '/v1/' . ltrim($expected, '/'); + self::assertSame($expectedUri, self::pathAndQuery($legacyRequest)); + self::assertSame($expectedUri, self::pathAndQuery($ergonomicRequest)); if (is_array($expectedBody)) { - self::assertSame($expectedBody, json_decode((string) $request->getBody(), true, 512, JSON_THROW_ON_ERROR)); + self::assertSame($expectedBody, json_decode((string) $legacyRequest->getBody(), true, 512, JSON_THROW_ON_ERROR)); + self::assertSame($expectedBody, json_decode((string) $ergonomicRequest->getBody(), true, 512, JSON_THROW_ON_ERROR)); } foreach ($expectedMultipart as $name => $contents) { - self::assertStringContainsString('name="' . $name . '"', (string) $request->getBody()); - self::assertStringContainsString($contents, (string) $request->getBody()); + self::assertStringContainsString('name="' . $name . '"', (string) $legacyRequest->getBody()); + self::assertStringContainsString('name="' . $name . '"', (string) $ergonomicRequest->getBody()); + self::assertStringContainsString($contents, (string) $legacyRequest->getBody()); + self::assertStringContainsString($contents, (string) $ergonomicRequest->getBody()); + } + } + } + + /** + * @param array $pathValues + * @param array $requestFixture + * @return array{array, array, array, array|null, array} + */ + private static function invocations(array $pathValues, array $requestFixture): array + { + $query = self::normalizeFixture($requestFixture['query'] ?? []); + $query = is_array($query) ? $query : []; + $bodyType = $requestFixture['body_type'] ?? null; + $body = self::normalizeFixture($requestFixture['body'] ?? null); + $data = $query; + $legacyParameters = $pathValues; + $legacyOptions = ['headers' => ['X-SDK-Invocation' => 'legacy']]; + $expectedBody = null; + $expectedMultipart = []; + if ($bodyType === 'json' && is_array($body)) { + $data = $body; + $legacyParameters['body'] = $body; + $expectedBody = $body; + } elseif ($bodyType === 'text' && is_string($body)) { + $decoded = json_decode($body, true, 512, JSON_THROW_ON_ERROR); + if (!is_array($decoded)) { + throw new \RuntimeException('Raw endpoint fixture must decode to an object.'); + } + $data = $decoded; + $legacyOptions['body'] = $body; + $expectedBody = $decoded; + } elseif ($bodyType === 'formdata' && is_array($body)) { + $data = []; + foreach ($body as $part) { + if (!is_array($part) || !is_string($part['key'] ?? null)) { + continue; + } + $normalizedValue = self::normalizeFixture($part['value'] ?? ''); + $contents = ($part['type'] ?? null) === 'file' + ? 'fixture-file-content' + : (is_scalar($normalizedValue) ? (string) $normalizedValue : ''); + $data[] = ['name' => $part['key'], 'contents' => $contents]; + $legacyOptions['multipart'][] = ['name' => $part['key'], 'contents' => $contents]; + $expectedMultipart[$part['key']] = $contents; } + } elseif ($query !== []) { + $legacyOptions['query'] = $query; + } + + $legacyArguments = [$legacyParameters, $legacyOptions]; + $ergonomicArguments = array_values($pathValues); + $ergonomicArguments[] = $data; + $ergonomicArguments[] = ['headers' => ['X-SDK-Invocation' => 'ergonomic']]; + return [$legacyArguments, $ergonomicArguments, $query, $expectedBody, $expectedMultipart]; + } + + /** @param array $history */ + private static function requestFrom(array $history, int $index): RequestInterface + { + $transaction = $history[$index] ?? null; + if (!is_array($transaction) || !($transaction['request'] ?? null) instanceof RequestInterface) { + throw new \RuntimeException('Endpoint invocation did not issue an HTTP request.'); } + return $transaction['request']; + } + + private static function pathAndQuery(RequestInterface $request): string + { + return $request->getUri()->getPath() + . ($request->getUri()->getQuery() !== '' ? '?' . $request->getUri()->getQuery() : ''); } /** @return iterable, string, string, string, array, array}> */ @@ -122,8 +171,8 @@ private static function endpointCases(): iterable $bracedName = $match[1] ?? ''; $colonName = $match[2] ?? ''; $name = $bracedName !== '' ? $bracedName : $colonName; - if (!in_array($name, ['base_url', 'namespace'], true)) { - $parameters[$name] = $name . '-fixture'; + if (!in_array($name, ['base_url', 'namespace'], true) && !array_key_exists($name, $parameters)) { + $parameters[$name] = $name . '/fixture'; } } yield $id => [ diff --git a/tests/ResourceServiceTest.php b/tests/ResourceServiceTest.php index 2718e0a..5b14a0c 100644 --- a/tests/ResourceServiceTest.php +++ b/tests/ResourceServiceTest.php @@ -9,6 +9,7 @@ use Fleetbase\Sdk\Service; use GuzzleHttp\Psr7\Response; use JsonSerializable; +use Psr\Http\Message\RequestInterface; final class ResourceServiceTest extends TestCase { @@ -263,6 +264,7 @@ public function callEndpoint(string $method, string $template, array $parameters { return $this->endpoint($method, $template, $parameters, $options); } + }; $all = $service->findAll(); @@ -300,6 +302,81 @@ public function callEndpoint(string $method, string $template, array $parameters } } + public function testGeneratedEndpointArgumentNormalizationRejectsAmbiguityAndInvalidValues(): void + { + $client = $this->mockHttpClient([ + $this->jsonResponse(['ok' => true]), + $this->jsonResponse(['ok' => true]), + ]); + $service = new class ('Place', $client) extends Service { + /** + * @param array $pathParameters + * @param array $arguments + * @return mixed + */ + public function callArguments( + string $method, + string $template, + array $pathParameters, + string $requestData, + array $arguments + ) { + return $this->endpointFromArguments($method, $template, $pathParameters, $requestData, $arguments); + } + }; + + $service->callArguments('GET', 'places/:id', ['id'], 'query', [new Resource(['id' => 'resource/id']), []]); + $resourceTransaction = $this->history[0] ?? null; + self::assertIsArray($resourceTransaction); + $resourceRequest = $resourceTransaction['request'] ?? null; + self::assertInstanceOf(RequestInterface::class, $resourceRequest); + self::assertSame('/v1/places/resource%2Fid', $resourceRequest->getUri()->getPath()); + $service->callArguments('POST', 'places/:id/files', ['id'], 'multipart', [ + 'place_1', + [['name' => 'file', 'contents' => 'contents']], + ]); + $multipartTransaction = $this->history[1] ?? null; + self::assertIsArray($multipartTransaction); + $multipartRequest = $multipartTransaction['request'] ?? null; + self::assertInstanceOf(RequestInterface::class, $multipartRequest); + self::assertStringContainsString('name="file"', (string) $multipartRequest->getBody()); + + $invalidCases = [ + ['body', 'places', [], 'unsupported', []], + ['accept only', 'places', [], 'body', [[], [], []]], + ['request data', 'places', [], 'body', ['invalid']], + ['request options', 'places', [], 'body', [[], 'invalid']], + ['both data and request options', 'places', [], 'query', [['page' => 1], ['query' => ['page' => 2]]]], + ['conflicts', 'places', [], 'body', [['name' => 'x'], ['body' => '{}']]], + ['conflicts', 'places', [], 'body', [['name' => 'x'], ['multipart' => []]]], + ['conflicts', 'places', [], 'body', [['name' => 'x'], ['form_params' => []]]], + ['parameters and request options', 'places/:id', ['id'], 'body', [['id' => 'place_1'], [], []]], + ['request options', 'places/:id', ['id'], 'body', [['id' => 'place_1'], 'invalid']], + ['child', 'places/:id/children/:child', ['id', 'child'], 'body', ['place_1']], + ['non-empty scalar', 'places/:id', ['id'], 'body', [new \stdClass()]], + ['non-empty scalar', 'places/:id', ['id'], 'body', ['']], + ['Too many', 'places/:id', ['id'], 'body', ['place_1', [], [], []]], + ['request data', 'places/:id', ['id'], 'body', ['place_1', 'invalid']], + ['request options', 'places/:id', ['id'], 'body', ['place_1', [], 'invalid']], + ['both data and request options', 'places/:id', ['id'], 'query', ['place_1', ['page' => 1], ['query' => ['page' => 2]]]], + ['both data and request options', 'places/:id', ['id'], 'multipart', ['place_1', [['name' => 'file', 'contents' => 'x']], ['multipart' => []]]], + ['conflicts', 'places/:id', ['id'], 'body', ['place_1', ['name' => 'x'], ['body' => '{}']]], + ['conflicts', 'places/:id', ['id'], 'body', ['place_1', ['name' => 'x'], ['multipart' => []]]], + ['conflicts', 'places/:id', ['id'], 'body', ['place_1', ['name' => 'x'], ['form_params' => []]]], + ['list of parts', 'files', [], 'multipart', [['file' => 'x']]], + ['string name and contents', 'files', [], 'multipart', [[['name' => 1, 'contents' => 'x']]]], + ]; + + foreach ($invalidCases as [$message, $template, $pathParameters, $requestData, $arguments]) { + try { + $service->callArguments('POST', $template, $pathParameters, $requestData, $arguments); + self::fail('Expected invalid generated endpoint arguments.'); + } catch (\InvalidArgumentException $exception) { + self::assertStringContainsString($message, $exception->getMessage()); + } + } + } + public function testReloadRejectsUnexpectedServiceResultAndRestoresState(): void { $service = new class ('Place', $this->mockHttpClient([])) extends Service { diff --git a/tools/check-api-compatibility.php b/tools/check-api-compatibility.php index 298148f..b5e7335 100644 --- a/tools/check-api-compatibility.php +++ b/tools/check-api-compatibility.php @@ -159,11 +159,14 @@ function compareMethods(array &$errors, string $className, array $baselineMethod && !hasCompatibleNamedParameter($baselineParameter, $currentParameters)) { $errors[] = sprintf('Class %s removed named parameter %s from method %s', $className, $baselineParameter['name'], $name); } - foreach (['type', 'by_reference', 'variadic'] as $field) { + foreach (['by_reference', 'variadic'] as $field) { if (($baselineParameter[$field] ?? null) !== ($currentParameter[$field] ?? null)) { $errors[] = sprintf('Class %s changed parameter %d %s of method %s', $className, $index + 1, $field, $name); } } + if (!isCompatibleParameterType($baselineParameter['type'] ?? null, $currentParameter['type'] ?? null)) { + $errors[] = sprintf('Class %s narrowed parameter %d type of method %s', $className, $index + 1, $name); + } if (($baselineParameter['optional'] ?? false) !== ($currentParameter['optional'] ?? false)) { $errors[] = sprintf('Class %s changed optionality of parameter %d on method %s', $className, $index + 1, $name); } @@ -181,6 +184,12 @@ function compareMethods(array &$errors, string $className, array $baselineMethod } } +/** @param mixed $baselineType @param mixed $currentType */ +function isCompatibleParameterType($baselineType, $currentType): bool +{ + return $baselineType === $currentType || $currentType === null || $currentType === 'mixed'; +} + /** * PHP 8 named calls remain compatible when an optional parameter moves to a * later optional position with the same name and declaration. @@ -195,11 +204,14 @@ function hasCompatibleNamedParameter(array $baselineParameter, array $currentPar continue; } - foreach (['type', 'by_reference', 'variadic', 'optional'] as $field) { + foreach (['by_reference', 'variadic', 'optional'] as $field) { if (($currentParameter[$field] ?? null) !== ($baselineParameter[$field] ?? null)) { return false; } } + if (!isCompatibleParameterType($baselineParameter['type'] ?? null, $currentParameter['type'] ?? null)) { + return false; + } return !array_key_exists('default', $baselineParameter) || (array_key_exists('default', $currentParameter) && $currentParameter['default'] === $baselineParameter['default']); diff --git a/tools/check-contract-manifest.php b/tools/check-contract-manifest.php index 0fd46cb..0ce578c 100644 --- a/tools/check-contract-manifest.php +++ b/tools/check-contract-manifest.php @@ -59,6 +59,38 @@ $ids[$id] = true; $sources[$source] = true; + $signature = $request['sdk_signature'] ?? null; + if (!is_array($signature)) { + $errors[] = sprintf('Request %s has no SDK signature metadata', $id); + } else { + $pathParameters = $signature['path_parameters'] ?? null; + $requestData = $signature['request_data'] ?? null; + $contractPayload = $signature['contract_payload'] ?? null; + if (!is_array($pathParameters) || array_filter($pathParameters, 'is_string') !== $pathParameters) { + $errors[] = sprintf('Request %s has invalid SDK path parameters', $id); + } else { + preg_match_all('/\{\{([^}]+)\}\}|:([A-Za-z][A-Za-z0-9_-]*)/', (string) ($request['url'] ?? ''), $matches, PREG_SET_ORDER); + $expectedPathParameters = array_map(static function (array $match): string { + return $match[1] !== '' ? $match[1] : $match[2]; + }, $matches); + $expectedPathParameters = array_values(array_filter($expectedPathParameters, static function (string $name): bool { + return !in_array($name, ['base_url', 'namespace'], true); + })); + if ($pathParameters !== $expectedPathParameters) { + $errors[] = sprintf('Request %s SDK path parameter order does not match its URL', $id); + } + } + if (!in_array($requestData, ['body', 'query', 'multipart'], true)) { + $errors[] = sprintf('Request %s has invalid SDK request data placement', $id); + } + if (!in_array($contractPayload, ['none', 'json', 'raw', 'multipart', 'query'], true)) { + $errors[] = sprintf('Request %s has invalid SDK contract payload', $id); + } + if (($signature['legacy_envelope'] ?? null) !== true) { + $errors[] = sprintf('Request %s does not preserve the legacy SDK envelope', $id); + } + } + $status = $request['status'] ?? ''; if ($status === 'complete') { ++$counts['mapped']; diff --git a/tools/generate-api-examples.php b/tools/generate-api-examples.php index 1d782a3..6dae39c 100644 --- a/tools/generate-api-examples.php +++ b/tools/generate-api-examples.php @@ -52,23 +52,8 @@ fail(sprintf('Fleetbase has no service property for group %s.', $group)); } - [$parameters, $callOptions] = arguments($request); - if ($method === 'dispatchOrder' && is_string($parameters['id'] ?? null)) { - $call = sprintf( - '$result = $fleetbase->%s->%s(%s);', - $property, - $method, - var_export($parameters['id'], true) - ); - } else { - $call = sprintf( - "\$result = \$fleetbase->%s->%s(\n %s,\n %s\n);", - $property, - $method, - exported($parameters, 1), - exported($callOptions, 1) - ); - } + [$arguments, $variables] = arguments($request); + $call = renderCall($property, $method, $arguments); $id = requiredString($request, 'id'); $catalog['examples'][$id] = [ @@ -76,8 +61,9 @@ 'group' => $group, 'name' => requiredString($request, 'name'), 'implementation' => requiredString($request, 'implementation'), + 'variables' => $variables, 'call' => $call, - 'code' => " standaloneCode($variables, $call), ]; $lines[] = ''; @@ -114,45 +100,122 @@ printf("Generated %d executable API examples and the website catalog.\n", count($manifest['requests'])); -/** @param array $request @return array{array, array} */ +final class PhpExpression +{ + public string $code; + + public function __construct(string $code) + { + $this->code = $code; + } +} + +/** @param array $request @return array{array, array} */ function arguments(array $request): array { $fixture = is_array($request['request_fixture'] ?? null) ? $request['request_fixture'] : []; $pathVariables = is_array($fixture['path_variables'] ?? null) ? $fixture['path_variables'] : []; - $parameters = []; - preg_match_all('/(?:\{\{([^}]+)\}\}|:([A-Za-z][A-Za-z0-9_-]*))/', requiredString($request, 'url'), $matches, PREG_SET_ORDER); - foreach ($matches as $match) { - $name = ($match[1] ?? '') !== '' ? $match[1] : ($match[2] ?? ''); - if ($name === '' || in_array($name, ['base_url', 'namespace'], true)) { - continue; + $signature = is_array($request['sdk_signature'] ?? null) ? $request['sdk_signature'] : []; + $pathParameters = is_array($signature['path_parameters'] ?? null) ? $signature['path_parameters'] : []; + $arguments = []; + $variables = []; + foreach ($pathParameters as $name) { + if (!is_string($name) || $name === '') { + fail('An SDK signature has an invalid path parameter.'); } - $parameters[$name] = normalized($pathVariables[$name] ?? $name . '-fixture'); + $variable = variableName($name, requiredString($request, 'group')); + $fixtureValue = normalized($pathVariables[$name] ?? $name . '-fixture'); + $variables[$variable] = $fixtureValue === '' ? $name . '-fixture' : $fixtureValue; + $arguments[] = new PhpExpression('$' . $variable); } - $callOptions = []; $query = normalized($fixture['query'] ?? []); - if (is_array($query) && $query !== []) { - $callOptions['query'] = $query; - } $body = normalized($fixture['body'] ?? null); + $data = []; if (($fixture['body_type'] ?? null) === 'json' && is_array($body)) { - $parameters['body'] = $body; + $data = $body; + } elseif (($fixture['body_type'] ?? null) === 'text' && is_string($body)) { + $decoded = json_decode($body, true); + if (is_array($decoded)) { + $data = $decoded; + } } elseif (($fixture['body_type'] ?? null) === 'formdata' && is_array($body)) { foreach ($body as $part) { if (!is_array($part) || !is_string($part['key'] ?? null)) { continue; } $value = normalized($part['value'] ?? ''); - $callOptions['multipart'][] = [ + $data[] = [ 'name' => $part['key'], 'contents' => ($part['type'] ?? null) === 'file' ? 'replace-with-file-contents' : (is_scalar($value) ? (string) $value : ''), ]; } + } elseif (is_array($query)) { + $data = $query; + } + + if ($data !== []) { + $arguments[] = $data; + } + + return [$arguments, $variables]; +} + +function variableName(string $pathParameter, string $group): string +{ + $source = $pathParameter === 'id' + ? Doctrine\Inflector\InflectorFactory::create()->build()->singularize($group) . '_id' + : $pathParameter; + $source = preg_replace('/([a-z0-9])([A-Z])/', '$1 $2', $source) ?? $source; + $source = preg_replace('/[^A-Za-z0-9]+/', ' ', $source) ?? $source; + $name = lcfirst(Doctrine\Inflector\InflectorFactory::create()->build()->classify(strtolower(trim($source)))); + return $name !== '' ? $name : 'resourceId'; +} + +/** @param array $arguments */ +function renderCall(string $property, string $method, array $arguments): string +{ + $prefix = sprintf('$result = $fleetbase->%s->%s', $property, $method); + if ($arguments === []) { + return $prefix . '();'; + } + + $containsArray = false; + foreach ($arguments as $argument) { + if (is_array($argument)) { + $containsArray = true; + break; + } + } + if (!$containsArray) { + return $prefix . '(' . implode(', ', array_map(static function ($argument): string { + return exported($argument, 0); + }, $arguments)) . ');'; + } + + $rendered = []; + foreach ($arguments as $argument) { + $rendered[] = ' ' . exported($argument, 1); } + return $prefix . "(\n" . implode(",\n", $rendered) . "\n);"; +} - return [$parameters, $callOptions]; +/** @param array $variables */ +function standaloneCode(array $variables, string $call): string +{ + $lines = [ + ' $value) { + $lines[] = '$' . $name . ' = ' . exported($value, 0) . ';'; + } + $lines[] = ''; + $lines[] = $call; + return implode("\n", $lines); } /** @param mixed $value @return mixed */ @@ -175,6 +238,9 @@ function normalized($value) /** @param mixed $value */ function exported($value, int $level): string { + if ($value instanceof PhpExpression) { + return $value->code; + } if (!is_array($value)) { return var_export($value, true); } diff --git a/tools/generate-endpoint-services.php b/tools/generate-endpoint-services.php index 051c0d1..3f4b01c 100644 --- a/tools/generate-endpoint-services.php +++ b/tools/generate-endpoint-services.php @@ -30,6 +30,7 @@ $group = requiredString($request, 'group'); $service = serviceName($group); $method = methodName(requiredString($request, 'name')); + $request['sdk_signature'] = signatureForRequest($request); $key = $service . '::' . $method; if (isset($groups[$service]['methods'][$method])) { $existing = $groups[$service]['methods'][$method]; @@ -41,10 +42,11 @@ $groups[$service]['methods'][$method] = $request; } - $requests[$index]['implementation'] = 'Fleetbase\\Sdk\\Services\\' . $service . '::' . $method; - $requests[$index]['tests'] = ['tests/Contract/EndpointContractTest.php::testEveryEndpointContract']; - $requests[$index]['status'] = 'complete'; - $requests[$index]['exception'] = null; + $request['implementation'] = 'Fleetbase\\Sdk\\Services\\' . $service . '::' . $method; + $request['tests'] = ['tests/Contract/EndpointContractTest.php::testEveryEndpointContract']; + $request['status'] = 'complete'; + $request['exception'] = null; + $requests[$index] = $request; } ksort($groups); @@ -133,6 +135,53 @@ function methodName(string $name): string return lcfirst($classified); } +/** @param array $request @return array */ +function signatureForRequest(array $request): array +{ + $pathParameters = pathParameters(requiredString($request, 'url')); + $fixture = is_array($request['request_fixture'] ?? null) ? $request['request_fixture'] : []; + $bodyType = is_string($fixture['body_type'] ?? null) ? $fixture['body_type'] : null; + $body = $fixture['body'] ?? null; + $query = $fixture['query'] ?? []; + $contractPayload = 'none'; + if ($bodyType === 'formdata' && is_array($body)) { + $contractPayload = 'multipart'; + } elseif ($bodyType === 'text' && is_string($body) && $body !== '') { + $contractPayload = 'raw'; + } elseif ($bodyType === 'json' && is_array($body)) { + $contractPayload = 'json'; + } elseif (is_array($query) && $query !== []) { + $contractPayload = 'query'; + } + + $method = strtoupper(requiredString($request, 'method')); + $requestData = in_array($method, ['GET', 'HEAD'], true) ? 'query' : 'body'; + if ($bodyType === 'formdata') { + $requestData = 'multipart'; + } + + return [ + 'path_parameters' => $pathParameters, + 'request_data' => $requestData, + 'contract_payload' => $contractPayload, + 'legacy_envelope' => true, + ]; +} + +/** @return array */ +function pathParameters(string $url): array +{ + preg_match_all('/(?:\{\{([^}]+)\}\}|:([A-Za-z][A-Za-z0-9_-]*))/', $url, $matches, PREG_SET_ORDER); + $parameters = []; + foreach ($matches as $match) { + $name = ($match[1] ?? '') !== '' ? $match[1] : ($match[2] ?? ''); + if ($name !== '' && !in_array($name, ['base_url', 'namespace'], true) && !in_array($name, $parameters, true)) { + $parameters[] = $name; + } + } + return $parameters; +} + /** @param array> $methods */ function renderTrait(string $trait, array $methods): string { @@ -142,36 +191,49 @@ function renderTrait(string $trait, array $methods): string $verb = var_export(requiredString($request, 'method'), true); $url = var_export(requiredString($request, 'url'), true); $description = str_replace('*/', '* /', requiredString($request, 'name')); + $signature = is_array($request['sdk_signature'] ?? null) ? $request['sdk_signature'] : signatureForRequest($request); + $pathParameters = is_array($signature['path_parameters'] ?? null) ? $signature['path_parameters'] : []; + $requestData = var_export(is_string($signature['request_data'] ?? null) ? $signature['request_data'] : 'body', true); $code .= " /**\n"; $code .= " * {$description}.\n"; $code .= " *\n"; - if ($method === 'dispatchOrder') { - $code .= " * @param string|array \$idOrParameters\n"; - $code .= " * @param array \$parametersOrOptions\n"; + if ($pathParameters !== []) { + $code .= " * @param scalar|\\Fleetbase\\Sdk\\Resource|array \$parameters First path value, or the legacy endpoint envelope.\n"; + $code .= " * @param mixed \$options Request data, a second path value, or legacy request options.\n"; + if (count($pathParameters) === 1) { + $code .= " * @param array \$requestOptions\n"; + } else { + $code .= " * @param array \$data\n"; + $code .= " * @param array \$requestOptions\n"; + } } else { $code .= " * @param array \$parameters\n"; + $code .= " * @param array \$options\n"; } - $code .= " * @param array \$options\n"; $code .= " * @return mixed\n"; $code .= " */\n"; - if ($method === 'dispatchOrder') { - $code .= " public function {$method}(\$idOrParameters = [], array \$parametersOrOptions = [], array \$options = [])\n"; - $code .= " {\n"; - $code .= " if (is_array(\$idOrParameters)) {\n"; - $code .= " return \$this->endpoint({$verb}, {$url}, \$idOrParameters, \$parametersOrOptions);\n"; - $code .= " }\n\n"; - $code .= " \$parametersOrOptions['id'] = \$idOrParameters;\n"; - $code .= " return \$this->endpoint({$verb}, {$url}, \$parametersOrOptions, \$options);\n"; + if (count($pathParameters) === 1) { + $code .= " public function {$method}(\$parameters = [], \$options = [], \$requestOptions = [])\n"; + } elseif (count($pathParameters) === 2) { + $code .= " public function {$method}(\$parameters = [], \$options = [], \$data = [], \$requestOptions = [])\n"; } else { $code .= " public function {$method}(array \$parameters = [], array \$options = [])\n"; - $code .= " {\n"; - $code .= " return \$this->endpoint({$verb}, {$url}, \$parameters, \$options);\n"; } + $code .= " {\n"; + $code .= ' return $this->endpointFromArguments(' . $verb . ', ' . $url . ', ' . exportedStringList($pathParameters) . ", {$requestData}, func_get_args());\n"; $code .= " }\n\n"; } return rtrim($code) . "\n}\n"; } +/** @param array $values */ +function exportedStringList(array $values): string +{ + return '[' . implode(', ', array_map(static function (string $value): string { + return var_export($value, true); + }, $values)) . ']'; +} + function renderService(string $service, string $trait, string $resource, string $namespace): string { $code = generatedHeader('Fleetbase\\Sdk\\Services'); @@ -238,70 +300,119 @@ final class EndpointContractTest extends TestCase public function testEveryEndpointContract(): void { foreach (self::endpointCases() as $case) { - [$serviceClass, $method, $httpMethod, $urlTemplate, $parameters, $requestFixture] = $case; - $options = []; - $query = self::normalizeFixture($requestFixture['query'] ?? []); - if (is_array($query) && $query !== []) { - $options['query'] = $query; - } - $bodyType = $requestFixture['body_type'] ?? null; - $body = self::normalizeFixture($requestFixture['body'] ?? null); - $expectedBody = null; - $expectedMultipart = []; - if ($bodyType === 'json' && is_array($body)) { - $parameters['body'] = $body; - $expectedBody = $body; - } elseif ($bodyType === 'formdata' && is_array($body)) { - foreach ($body as $part) { - if (!is_array($part) || !is_string($part['key'] ?? null)) { - continue; - } - $normalizedValue = self::normalizeFixture($part['value'] ?? ''); - $contents = ($part['type'] ?? null) === 'file' - ? 'fixture-file-content' - : (is_scalar($normalizedValue) ? (string) $normalizedValue : ''); - $options['multipart'][] = ['name' => $part['key'], 'contents' => $contents]; - $expectedMultipart[$part['key']] = $contents; - } - } - $client = $this->mockHttpClient([new Response(200, ['Content-Type' => 'application/json'], '{}')]); + [$serviceClass, $method, $httpMethod, $urlTemplate, $pathValues, $requestFixture] = $case; + [$legacyArguments, $ergonomicArguments, $query, $expectedBody, $expectedMultipart] = + self::invocations($pathValues, $requestFixture); + $client = $this->mockHttpClient([ + new Response(200, ['Content-Type' => 'application/json'], '{}'), + new Response(200, ['Content-Type' => 'application/json'], '{}'), + ]); $reflection = new ReflectionClass($serviceClass); $service = $reflection->newInstance($client); - $service->{$method}($parameters, $options); + $service->{$method}(...$legacyArguments); + $service->{$method}(...$ergonomicArguments); - $transaction = $this->history[0] ?? null; - self::assertIsArray($transaction); - $request = $transaction['request'] ?? null; - self::assertInstanceOf(RequestInterface::class, $request); - self::assertSame($httpMethod, $request->getMethod()); + $legacyRequest = self::requestFrom($this->history, 0); + $ergonomicRequest = self::requestFrom($this->history, 1); + self::assertSame($httpMethod, $legacyRequest->getMethod()); + self::assertSame($httpMethod, $ergonomicRequest->getMethod()); + self::assertSame('legacy', $legacyRequest->getHeaderLine('X-SDK-Invocation')); + self::assertSame('ergonomic', $ergonomicRequest->getHeaderLine('X-SDK-Invocation')); $expected = preg_replace('#^\{\{base_url\}\}/\{\{namespace\}\}/?#i', '', $urlTemplate); self::assertIsString($expected); - foreach ($parameters as $name => $value) { - if ($name === 'body') { - continue; - } - if (!is_scalar($value)) { - throw new \RuntimeException('Endpoint path parameters must be scalar.'); - } + foreach ($pathValues as $name => $value) { $expected = str_replace('{{' . $name . '}}', rawurlencode((string) $value), $expected); $expected = preg_replace('/:' . preg_quote($name, '/') . '(?![A-Za-z0-9_-])/', rawurlencode((string) $value), $expected); self::assertIsString($expected); } - if (is_array($query) && $query !== []) { + if ($query !== []) { $expected .= (strpos($expected, '?') === false ? '?' : '&') . http_build_query($query, '', '&', PHP_QUERY_RFC3986); } - self::assertSame('/v1/' . ltrim($expected, '/'), $request->getUri()->getPath() - . ($request->getUri()->getQuery() !== '' ? '?' . $request->getUri()->getQuery() : '')); + $expectedUri = '/v1/' . ltrim($expected, '/'); + self::assertSame($expectedUri, self::pathAndQuery($legacyRequest)); + self::assertSame($expectedUri, self::pathAndQuery($ergonomicRequest)); if (is_array($expectedBody)) { - self::assertSame($expectedBody, json_decode((string) $request->getBody(), true, 512, JSON_THROW_ON_ERROR)); + self::assertSame($expectedBody, json_decode((string) $legacyRequest->getBody(), true, 512, JSON_THROW_ON_ERROR)); + self::assertSame($expectedBody, json_decode((string) $ergonomicRequest->getBody(), true, 512, JSON_THROW_ON_ERROR)); } foreach ($expectedMultipart as $name => $contents) { - self::assertStringContainsString('name="' . $name . '"', (string) $request->getBody()); - self::assertStringContainsString($contents, (string) $request->getBody()); + self::assertStringContainsString('name="' . $name . '"', (string) $legacyRequest->getBody()); + self::assertStringContainsString('name="' . $name . '"', (string) $ergonomicRequest->getBody()); + self::assertStringContainsString($contents, (string) $legacyRequest->getBody()); + self::assertStringContainsString($contents, (string) $ergonomicRequest->getBody()); + } + } + } + + /** + * @param array $pathValues + * @param array $requestFixture + * @return array{array, array, array, array|null, array} + */ + private static function invocations(array $pathValues, array $requestFixture): array + { + $query = self::normalizeFixture($requestFixture['query'] ?? []); + $query = is_array($query) ? $query : []; + $bodyType = $requestFixture['body_type'] ?? null; + $body = self::normalizeFixture($requestFixture['body'] ?? null); + $data = $query; + $legacyParameters = $pathValues; + $legacyOptions = ['headers' => ['X-SDK-Invocation' => 'legacy']]; + $expectedBody = null; + $expectedMultipart = []; + if ($bodyType === 'json' && is_array($body)) { + $data = $body; + $legacyParameters['body'] = $body; + $expectedBody = $body; + } elseif ($bodyType === 'text' && is_string($body)) { + $decoded = json_decode($body, true, 512, JSON_THROW_ON_ERROR); + if (!is_array($decoded)) { + throw new \RuntimeException('Raw endpoint fixture must decode to an object.'); + } + $data = $decoded; + $legacyOptions['body'] = $body; + $expectedBody = $decoded; + } elseif ($bodyType === 'formdata' && is_array($body)) { + $data = []; + foreach ($body as $part) { + if (!is_array($part) || !is_string($part['key'] ?? null)) { + continue; + } + $normalizedValue = self::normalizeFixture($part['value'] ?? ''); + $contents = ($part['type'] ?? null) === 'file' + ? 'fixture-file-content' + : (is_scalar($normalizedValue) ? (string) $normalizedValue : ''); + $data[] = ['name' => $part['key'], 'contents' => $contents]; + $legacyOptions['multipart'][] = ['name' => $part['key'], 'contents' => $contents]; + $expectedMultipart[$part['key']] = $contents; } + } elseif ($query !== []) { + $legacyOptions['query'] = $query; + } + + $legacyArguments = [$legacyParameters, $legacyOptions]; + $ergonomicArguments = array_values($pathValues); + $ergonomicArguments[] = $data; + $ergonomicArguments[] = ['headers' => ['X-SDK-Invocation' => 'ergonomic']]; + return [$legacyArguments, $ergonomicArguments, $query, $expectedBody, $expectedMultipart]; + } + + /** @param array $history */ + private static function requestFrom(array $history, int $index): RequestInterface + { + $transaction = $history[$index] ?? null; + if (!is_array($transaction) || !($transaction['request'] ?? null) instanceof RequestInterface) { + throw new \RuntimeException('Endpoint invocation did not issue an HTTP request.'); } + return $transaction['request']; + } + + private static function pathAndQuery(RequestInterface $request): string + { + return $request->getUri()->getPath() + . ($request->getUri()->getQuery() !== '' ? '?' . $request->getUri()->getQuery() : ''); } /** @return iterable, string, string, string, array, array}> */ @@ -345,8 +456,8 @@ private static function endpointCases(): iterable $bracedName = $match[1] ?? ''; $colonName = $match[2] ?? ''; $name = $bracedName !== '' ? $bracedName : $colonName; - if (!in_array($name, ['base_url', 'namespace'], true)) { - $parameters[$name] = $name . '-fixture'; + if (!in_array($name, ['base_url', 'namespace'], true) && !array_key_exists($name, $parameters)) { + $parameters[$name] = $name . '/fixture'; } } yield $id => [ diff --git a/tools/live-sdk-contract-router.php b/tools/live-sdk-contract-router.php index 3c86c06..3187e92 100644 --- a/tools/live-sdk-contract-router.php +++ b/tools/live-sdk-contract-router.php @@ -45,10 +45,10 @@ $serviceClass = $implementation[0] ?? ''; $serviceMethod = $implementation[1] ?? ''; $service = resolveService($fleetbase, $serviceClass); - [$parameters, $options] = invocation($request, $relativePath, $headers); + $arguments = invocation($request, $relativePath, $headers); try { - $service->{$serviceMethod}($parameters, $options); + $service->{$serviceMethod}(...$arguments); } catch (Throwable $exception) { $response = $fleetbase->client->getLastPsrResponse(); if (!$response instanceof ResponseInterface) { @@ -285,13 +285,36 @@ function resolveService(Fleetbase $fleetbase, string $serviceClass): Service throw new RuntimeException('Unable to resolve SDK service ' . $serviceClass . '.'); } -/** @param array $request @param array $headers @return array{array, array} */ +/** + * Build the same positional/direct arguments shown in the public SDK examples. + * + * @param array $request + * @param array $headers + * @return array + */ function invocation(array $request, string $path, array $headers): array { - $parameters = matchTemplate(requiredString($request, 'url'), $path) ?? []; + $pathValues = matchTemplate(requiredString($request, 'url'), $path) ?? []; + $signature = $request['sdk_signature'] ?? null; + if (!is_array($signature) || !is_array($signature['path_parameters'] ?? null)) { + throw new RuntimeException('Missing SDK signature metadata.'); + } + $requestData = requiredString($signature, 'request_data'); + $arguments = []; + foreach ($signature['path_parameters'] as $name) { + if (!is_string($name) || !array_key_exists($name, $pathValues)) { + throw new RuntimeException('Unable to resolve SDK path argument.'); + } + $arguments[] = $pathValues[$name]; + } + $options = requestOptions($headers); - if ($_GET !== []) { - $options['query'] = requestData(); + $data = []; + $query = $_GET !== [] ? requestData() : []; + if ($requestData === 'query') { + $data = $query; + } elseif ($query !== []) { + $options['query'] = $query; } $contentType = strtolower(headerValue($headers, 'Content-Type')); @@ -299,7 +322,7 @@ function invocation(array $request, string $path, array $headers): array if (strpos($contentType, 'application/json') !== false && $raw !== '') { $body = json_decode($raw, true, 512, JSON_THROW_ON_ERROR); if (is_array($body)) { - $parameters['body'] = $body; + $data = $body; if ($body === []) { $options['body'] = $raw; } @@ -322,16 +345,23 @@ function invocation(array $request, string $path, array $headers): array } $parts[] = $part; } - $options['multipart'] = $parts; + $data = $parts; foreach (array_keys(is_array($options['headers'] ?? null) ? $options['headers'] : []) as $name) { if (is_string($name) && strcasecmp($name, 'Content-Type') === 0) { unset($options['headers'][$name]); } } } elseif ($raw !== '') { - $options['body'] = $raw; + $decoded = json_decode($raw, true); + if (is_array($decoded)) { + $data = $decoded; + } else { + $options['body'] = $raw; + } } - return [$parameters, $options]; + $arguments[] = $data; + $arguments[] = $options; + return $arguments; } /** @param array $data */ From 3e7e608dd4dd25fd76c71cf78d530effcd7921b0 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 3 Sep 2026 16:19:45 +0800 Subject: [PATCH 2/2] chore: prepare the 1.1.2 release --- CHANGELOG.md | 12 +++++++++--- docs/adr/0007-generated-endpoint-arguments.md | 2 +- docs/migration-guide.md | 4 ++-- docs/progress.md | 2 +- docs/release-checklist.md | 16 ++++++++-------- docs/releases/1.1.1.md | 3 --- docs/releases/1.1.2.md | 19 +++++++++++++++++++ 7 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 docs/releases/1.1.2.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a33af..f0606b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.1.2] - 2026-09-03 + +### Changed + +- Added positional path identifiers and direct body, query, and multipart arrays to all 220 generated methods while preserving the complete published 1.1.0 envelope and named-argument surface. +- Updated the generated catalog and public examples to hide internal transport envelopes and execute the documented ergonomic calls. + ## [1.1.1] - 2026-09-03 ### Added @@ -19,8 +26,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Normalized order dispatch calls so `dispatch($orderId)`, `dispatchOrder($orderId)`, and the legacy parameter-array form use the same official `PATCH` endpoint. -- Added positional path identifiers and direct body, query, and multipart arrays to all 220 generated methods while preserving the complete published 1.1.0 envelope and named-argument surface. -- Updated the generated catalog and public examples to hide internal transport envelopes and execute the documented ergonomic calls. - Corrected the order destination action to use the HTTP verb defined by the official API contract. ## [1.1.0] - 2026-08-31 @@ -67,7 +72,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Latest baseline whose public API is explicitly preserved by 1.1.0. -[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.1.1...HEAD +[Unreleased]: https://github.com/fleetbase/fleetbase-php/compare/1.1.2...HEAD +[1.1.2]: https://github.com/fleetbase/fleetbase-php/compare/1.1.1...1.1.2 [1.1.1]: https://github.com/fleetbase/fleetbase-php/compare/1.1.0...1.1.1 [1.1.0]: https://github.com/fleetbase/fleetbase-php/compare/1.0.3...1.1.0 [1.0.3]: https://github.com/fleetbase/fleetbase-php/compare/1.0.2...1.0.3 diff --git a/docs/adr/0007-generated-endpoint-arguments.md b/docs/adr/0007-generated-endpoint-arguments.md index 6f1fbd3..72f1c98 100644 --- a/docs/adr/0007-generated-endpoint-arguments.md +++ b/docs/adr/0007-generated-endpoint-arguments.md @@ -2,7 +2,7 @@ ## Status -Accepted for 1.1.1. +Accepted for 1.1.2. ## Context diff --git a/docs/migration-guide.md b/docs/migration-guide.md index e5ce98e..431e6bc 100644 --- a/docs/migration-guide.md +++ b/docs/migration-guide.md @@ -16,9 +16,9 @@ The 1.1.0 release preserves the `Fleetbase\Sdk` namespace, facade constructor, e The final guide will list every corrected behavior, new exception type, transport injection option, and framework recipe before release. Fleetbase API v1 does not expose an SDK pagination contract, so 1.1.0 retains the legacy array return from `findAll()` and `query()` and does not introduce a speculative pagination method. -## Endpoint calls in 1.1.1 +## Endpoint calls in 1.1.2 -Version 1.1.1 adds an ergonomic form for every generated endpoint without removing the form published in 1.1.0. New code should pass URL identifiers positionally, followed by the request data and then optional transport options: +Version 1.1.2 adds an ergonomic form for every generated endpoint without removing the form published in 1.1.0. New code should pass URL identifiers positionally, followed by the request data and then optional transport options: ```php $fleetbase->drivers->changeDriverPassword($driverId, $passwordData); diff --git a/docs/progress.md b/docs/progress.md index 5a78914..168c198 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -93,6 +93,6 @@ The disposable native Postman run requires a repository or organization `POSTMAN - Classified all 220 locked requests by ordered URL identifiers and payload placement, then generated positional/direct calls for JSON, query, raw JSON, multipart, and empty-payload endpoints. - Centralized overload normalization in the base service while preserving the full published 1.1.0 parameter-array envelope, including PHP 8 named `parameters:` and `options:` calls. - Generated hermetic tests now invoke every endpoint in both forms and compare verb, encoded URL, query, JSON semantics, multipart content, and request-option forwarding. The focused edge-case suite rejects missing identifiers, invalid data/options, and ambiguous duplicate payloads. -- Added the authoritative 1.1.0 public API snapshot to the compatibility gate. Local PHPUnit evidence is 35 tests and 3,906 assertions; fresh Xdebug evidence remains exactly 100.00% lines and 100.00% branches. +- Added the authoritative 1.1.0 public API snapshot to the compatibility gate. Local PHPUnit evidence is 35 tests and 3,906 assertions; fresh Xdebug evidence remains exactly 100.00% lines and 100.00% branches for the 1.1.2 candidate. - Switched the disposable bridge to positional/direct invocations so a successful 220-request run proves the documented SDK shape against Fleetbase rather than only exercising the legacy envelope. - The fresh full-source mutation run generated 1,802 mutants: 1,583 killed, 215 escaped, four timed out, and none uncovered, errored, skipped, or ignored. MSI and covered-code MSI are both 87.85%, above the approved 85% floor, with 100% mutation-code coverage. diff --git a/docs/release-checklist.md b/docs/release-checklist.md index 03bd563..60bbe0c 100644 --- a/docs/release-checklist.md +++ b/docs/release-checklist.md @@ -1,18 +1,18 @@ -# 1.1.1 release checklist +# 1.1.2 release checklist The release workflow starts automatically when a semantic `release/` branch is merged into `main`. Publication remains subject to the protected `release` environment policy. ## Maintainer decisions before publication - Fleetbase ownership and authorization to publish the new release under `AGPL-3.0-or-later` was confirmed by the maintainer. -- An 85% minimum mutation score was approved. The current 1.1.1 candidate measures 87.85% with 100% mutation-code coverage, four timeouts, and no ignored source. +- An 85% minimum mutation score was approved. The current 1.1.2 candidate measures 87.85% with 100% mutation-code coverage, four timeouts, and no ignored source. - Select protected `release` environment approvers and the signing/attestation identity. - Verify Packagist ownership and the GitHub update hook. - Review the coordinated Fleetbase API-reference generator update. ## Repository preparation -1. Create `release/v1.1.1`, update its dated changelog section and `docs/releases/1.1.1.md`, and open a pull request to `main`. +1. Create `release/v1.1.2`, update its dated changelog section and `docs/releases/1.1.2.md`, and open a pull request to `main`. 2. Require every pull-request check, including the disposable 220-request SDK contract, before merge. 3. Configure required checks and the protected `release` environment without granting workflow bypasses. 4. Add `POSTMAN_API_KEY` at repository or organization scope and retain the live-contract artifacts. @@ -20,17 +20,17 @@ The release workflow starts automatically when a semantic `release/` branch is m ## Publication -1. Merge the reviewed `release/v1.1.1` pull request into `main`; this automatically starts the release workflow and derives version `1.1.1`. +1. Merge the reviewed `release/v1.1.2` pull request into `main`; this automatically starts the release workflow and derives version `1.1.2`. 2. Confirm the live SDK contract and validation jobs pass, then approve the protected `release` environment if an approval rule is configured. -3. Confirm the immutable `1.1.1` tag and GitHub Release target the reviewed commit and contain the expected artifacts and provenance. -4. Verify GitHub and Packagist identify `AGPL-3.0-or-later` for 1.1.1 while 1.0.x tags retain their original MIT terms. +3. Confirm the immutable `1.1.2` tag and GitHub Release target the reviewed commit and contain the expected artifacts and provenance. +4. Verify GitHub and Packagist identify `AGPL-3.0-or-later` for 1.1.2 while 1.0.x tags retain their original MIT terms. 5. Install the exact public package into clean plain PHP, Laravel, and Symfony fixtures: ```bash -composer require fleetbase/fleetbase-php:1.1.1 +composer require fleetbase/fleetbase-php:1.1.2 composer install --no-dev --optimize-autoloader ``` -6. Confirm the public API reference renders the checked-in 1.1.1 PHP examples. +6. Confirm the public API reference renders the checked-in 1.1.2 PHP examples. Never reuse, move, or rewrite a published tag. If validation fails after publication, publish a new patch release. diff --git a/docs/releases/1.1.1.md b/docs/releases/1.1.1.md index 3957219..891f92a 100644 --- a/docs/releases/1.1.1.md +++ b/docs/releases/1.1.1.md @@ -10,11 +10,8 @@ Highlights: - `dispatchOrder($orderId)`, `dispatch($orderId)`, and the legacy `dispatchOrder(['id' => $orderId])` form use the same official `PATCH` endpoint; - the order destination action uses the HTTP verb defined by the official API contract; - the public API-reference generator receives a stable-ID-keyed PHP SDK example catalog; -- all generated endpoint methods accept positional URL identifiers and direct body, query, or multipart arrays while retaining every published 1.1.0 envelope call; - release candidates include reproducible archives, coverage evidence, an SBOM, checksums, and provenance. -The generated surface contains 220 methods: 90 requests with no payload, 97 JSON requests, 30 query requests, two raw-JSON requests, and one multipart request. Five methods have two URL identifiers; all remaining methods have zero or one. Every method is exercised in both the ergonomic and 1.1.0-compatible form by the hermetic contract suite, and the disposable workflow invokes the ergonomic form against Fleetbase. - Version 1.1.1 is distributed under `AGPL-3.0-or-later`, as is version 1.1.0. Published 1.0.x tags remain under the MIT license shipped with those releases. Merging `release/v1.1.1` into `main` starts the release workflow. It derives version `1.1.1` from the merged branch, reruns the live SDK contract and release gates, waits for any configured protected `release` environment approval, and creates the immutable tag and GitHub Release. No manual workflow trigger or version input is used. diff --git a/docs/releases/1.1.2.md b/docs/releases/1.1.2.md new file mode 100644 index 0000000..89037b9 --- /dev/null +++ b/docs/releases/1.1.2.md @@ -0,0 +1,19 @@ +# Fleetbase PHP SDK 1.1.2 + +Version 1.1.2 makes the generated SDK surface consistent and ergonomic while preserving every call shape published in 1.1.0 and 1.1.1. + +Highlights: + +- URL identifiers are positional and follow their order in the endpoint template; +- JSON bodies, query parameters, and multipart parts are passed directly instead of through internal `id`, `body`, or `query` envelopes; +- request options such as headers, timeouts, callbacks, proxy, and TLS settings remain the final optional argument; +- all 220 locked endpoint methods share one generator-driven normalization system; +- the 1.1.0 structured-envelope form, including PHP 8 named `parameters:` and `options:` calls, remains supported; +- the public API-reference catalog and all generated SDK examples use the preferred form; +- the disposable Fleetbase contract invokes the ergonomic form for all 220 mapped requests. + +The generated surface contains 90 requests without a payload, 97 JSON requests, 30 query requests, two raw-JSON requests, and one multipart request. Five methods have two URL identifiers; none has more than two. The hermetic contract suite compares both public forms for verb, encoded URL, body/query semantics, multipart content, and request-option forwarding. + +Version 1.1.2 is distributed under `AGPL-3.0-or-later`. Published 1.0.x tags retain the MIT license shipped with those releases. + +Merging `release/v1.1.2` into `main` starts the release workflow. It derives version `1.1.2` from the merged branch, reruns the live SDK contract and all release gates, waits for any configured protected `release` environment approval, and then creates the immutable tag and GitHub Release. No manual version input is used.