Download the PHP package aboodma/aramex-integration without Composer
On this page you can find all versions of the php package aboodma/aramex-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aboodma/aramex-integration
More information about aboodma/aramex-integration
Files in aboodma/aramex-integration
Package aramex-integration
Short Description Integration With Aramex Services (Tracking / Shipment / Rate Calculator)
License MIT
Informations about the package aramex-integration
Aramex Integration
This PHP library allows for easy integration with the Aramex shipping API. It provides a set of models and a client to interact with the API for creating shipments, generating labels, and more.
Requirements
- PHP 8 or higher
- Composer
Installation
Install the library using Composer:
Usage
Configuration
Create a configuration object with your Aramex account details:
Creating a Shipment
Models
Address
Represents an address.
setLine1(string $line1): self
setLine2(string $line2): self
setLine3(string $line3): self
setCity(string $city): self
setStateOrProvinceCode(string $stateOrProvinceCode): self
setPostCode(string $postCode): self
setCountryCode(string $countryCode): self
Contact
Represents a contact.
setPersonName(string $personName): self
setCompanyName(string $companyName): self
setPhoneNumber1(string $phoneNumber1): self
setPhoneNumber1Ext(string $phoneNumber1Ext): self
setPhoneNumber2(string $phoneNumber2): self
setPhoneNumber2Ext(string $phoneNumber2Ext): self
setFaxNumber(string $faxNumber): self
setCellPhone(string $cellPhone): self
setEmailAddress(string $emailAddress): self
setType(string $type): self
Party
Represents a party involved in the shipment (shipper or consignee).
setReference1(string $reference1): self
setReference2(string $reference2): self
setAccountNumber(string $accountNumber): self
setPartyAddress(Address $partyAddress): self
setContact(Contact $contact): self
Dimensions
Represents the dimensions of a shipment.
setLength(float $length): self
setWidth(float $width): self
setHeight(float $height): self
setUnit(string $unit): self
Weight
Represents the weight of a shipment.
setUnit(string $unit): self
setValue(float $value): self
Amount
Represents a monetary amount.
setCurrencyCode(string $currencyCode): self
setValue(float $value): self
ShipmentDetails
Represents the details of a shipment.
setDimensions(Dimensions $dimensions): self
setActualWeight(Weight $actualWeight): self
setChargeableWeight(Weight $chargeableWeight): self
setDescriptionOfGoods(string $descriptionOfGoods): self
setGoodsOriginCountry(string $goodsOriginCountry): self
setNumberOfPieces(int $numberOfPieces): self
setProductGroup(string $productGroup): self
setProductType(string $productType): self
setPaymentType(string $paymentType): self
setPaymentOptions(string $paymentOptions): self
setCustomsValueAmount(Amount $customsValueAmount): self
setCashOnDeliveryAmount(Amount $cashOnDeliveryAmount): self
setInsuranceAmount(Amount $insuranceAmount): self
setCashAdditionalAmount(Amount $cashAdditionalAmount): self
setCashAdditionalAmountDescription(string $cashAdditionalAmountDescription): self
setCollectAmount(Amount $collectAmount): self
setServices(string $services): self
setItems(array $items): self
setDeliveryInstructions(string $deliveryInstructions): self
setAdditionalProperties(string $additionalProperties): self
setContainsDangerousGoods(bool $containsDangerousGoods): self
Shipment
Represents a shipment.
setReference1(string $reference1): self
setReference2(string $reference2): self
setReference3(string $reference3): self
setShipper(Party $shipper): self
setConsignee(Party $consignee): self
setThirdParty(Party $thirdParty): self
setShippingDateTime(\DateTime $shippingDateTime): self
setDueDate(\DateTime $dueDate): self
setComments(string $comments): self
setPickupLocation(string $pickupLocation): self
setOperationsInstructions(string $operationsInstructions): self
setAccountingInstructions(string $accountingInstructions): self
setDetails(ShipmentDetails $details): self
setAttachments(array $attachments): self
setForeignHAWB(string $foreignHAWB): self
setTransportType(string $transportType): self
setPickupGUID(string $pickupGUID): self
setNumber(string $number): self
setScheduledDelivery(\DateTime $scheduledDelivery): self
LabelInfo
Represents label information for the shipment.
setReportID(int $reportID): self
setReportType(string $reportType): self
ClientInfo
Represents client information.
setUserName(string $userName): self
setPassword(string $password): self
setVersion(string $version): self
setAccountNumber(string $accountNumber): self
setAccountPin(string $accountPin): self
setAccountEntity(string $accountEntity): self
setAccountCountryCode(string $accountCountryCode): self
setSource(int $source): self
Error Handling
If the API request fails, an AramexException will be thrown. This exception contains the error message, HTTP status code, and error details returned by the API.
Logging
The library logs request payloads, response payloads, and error responses to log files for debugging purposes.
Contributing
Please submit issues and pull requests on the GitHub repository.
License
This project is licensed under the MIT License.