Download the PHP package altwebdesign/sameday-php-sdk without Composer
On this page you can find all versions of the php package altwebdesign/sameday-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download altwebdesign/sameday-php-sdk
More information about altwebdesign/sameday-php-sdk
Files in altwebdesign/sameday-php-sdk
Package sameday-php-sdk
Short Description Sameday Courier SDK for PHP — fork with countryCode support for counties and cities geolocation
License MIT
Homepage https://github.com/altwebdesign/sameday-php-sdk
Informations about the package sameday-php-sdk
Sameday Courier SDK for PHP
This repository contains the open source PHP SDK that allows you to access the Sameday Courier Platform from your PHP app. It was inspired by Facebook PHP-SDK.
This fork adds
countryCodesupport toSamedayGetCountiesRequestandSamedayGetCitiesRequest, and increases the default$countPerPagefrom50to500. This allows users with a Romanian Sameday account to query geolocation data for other countries (e.g. Hungary) without switching API hosts. Maintained by AltWeb.
Installation
Install this fork with Composer:
This is a fork of sameday-courier/php-sdk with added
countryCodesupport. All original features are preserved.
Usage
Note: This version of the Sameday SDK for PHP requires PHP 5.4 or greater.
Simple example to get available pickup points and services for a client, request a new AWB and download the PDF for it.
Complete documentation, installation instructions, and examples are available here.
Geolocation — Counties & Cities with countryCode Support
This feature is available in this fork: altwebdesign/sameday-php-sdk
By default the Sameday API returns Romanian counties and cities. This fork adds an optional countryCode parameter to both SamedayGetCountiesRequest and SamedayGetCitiesRequest, allowing you to fetch geolocation data for other supported countries (e.g. 'HU' for Hungary) using your existing Romanian account credentials, without needing to switch to a different API host.
Get Counties (PHP)
Get Cities by County (PHP)
Using Setters
You can also set the country code after instantiation:
Laravel Examples
Setup
Get Hungarian Counties (with Cache)
Get Hungarian Cities by County (with Cache)
Tip: Results are cached forever (
rememberForever) since county and city data rarely changes. Use a versioned cache key (e.g.sameday_counties_hu_v2) if you ever need to bust the cache manually.
Pagination Note
This fork increases the default $countPerPage from 50 to 500 in SamedayRequestPaginationTrait. This ensures all cities in a county are returned in a single API call, which is important for countries like Hungary where some counties have more than 50 cities.
Tests
- Composer is a prerequisite for running the tests. Install composer globally, then run
composer installto install required files. - The tests can be executed by running this command from the root directory:
Contributing
Please see CONTRIBUTING for details.
License
Please see the license file for more information.
All versions of sameday-php-sdk with dependencies
php Version ^5.6|^7.0|^8.0