GeodisApi
extends TransactionalService
in package
Class GeodisApi
Table of Contents
Properties
- $em : EntityManager
- $geodisParams : mixed
Methods
- __construct() : mixed
- GeodisApi constructor.
- addRepository() : void
- Add a repository to this service
- addService() : void
- Add a service to this service
- getAllShippingFromDate() : mixed
- getEntityManager() : EntityManager
- Getter of the Entity Manager
- getIsShipped() : bool
- getTrackingInfoByTrackingid() : bool
- getTrackingNumberInfo() : bool|mixed
- getTrackLinkFromTrackingNumber() : array<string|int, mixed>
- Get track link from tracking number
- getTrackLinksForSaleProduct() : mixed
- Get Track links for sale product
- sendExpeditionToGeodis() : bool|mixed
- sendGeodis() : mixed
- setEntityManager() : mixed
- Setter of the Entity Manager
- validateGeodisExpedition() : bool|mixed
- getGeodisParam() : bool
- Get geodis params
- getHash() : string
- Get hash
- getToken() : string
- Get token
- prepareData() : array<string|int, mixed>
- Prepare request data
Properties
$em
protected
EntityManager
$em
The Entity Manager
$geodisParams
private
mixed
$geodisParams
Tags
Methods
__construct()
GeodisApi constructor.
public
__construct(mixed $geodisParams) : mixed
Parameters
- $geodisParams : mixed
addRepository()
Add a repository to this service
public
addRepository(int $key, string $class) : void
Parameters
- $key : int
-
Key
- $class : string
-
Class
addService()
Add a service to this service
public
addService(int $key, mixed $service) : void
Parameters
- $key : int
-
Key
- $service : mixed
getAllShippingFromDate()
public
getAllShippingFromDate(DateTime $from[, mixed $geodisAccount = ['Receive'] ]) : mixed
Parameters
- $from : DateTime
- $geodisAccount : mixed = ['Receive']
getEntityManager()
Getter of the Entity Manager
public
getEntityManager() : EntityManager
Return values
EntityManagergetIsShipped()
public
getIsShipped(mixed $trackingNumber[, mixed $sku = null ][, mixed $geodisAccount = ['Receive'] ][, mixed $return = false ][, mixed $warehouseId = 1 ][, mixed $asArray = false ]) : bool
Parameters
- $trackingNumber : mixed
- $sku : mixed = null
- $geodisAccount : mixed = ['Receive']
- $return : mixed = false
- $warehouseId : mixed = 1
- $asArray : mixed = false
Return values
boolgetTrackingInfoByTrackingid()
public
getTrackingInfoByTrackingid(mixed $trackingNumber[, mixed $sku = null ][, mixed $geodisAccount = ['Receive'] ][, mixed $return = false ]) : bool
Parameters
- $trackingNumber : mixed
- $sku : mixed = null
- $geodisAccount : mixed = ['Receive']
- $return : mixed = false
Return values
boolgetTrackingNumberInfo()
public
getTrackingNumberInfo(mixed $trackingNumber[, mixed $geodisAccount = ['Receive'] ][, mixed $warehouseId = 1 ]) : bool|mixed
Parameters
- $trackingNumber : mixed
- $geodisAccount : mixed = ['Receive']
- $warehouseId : mixed = 1
Return values
bool|mixedgetTrackLinkFromTrackingNumber()
Get track link from tracking number
public
getTrackLinkFromTrackingNumber(mixed $trackingNumber[, mixed $geodisAccount = ['Receive'] ]) : array<string|int, mixed>
Parameters
- $trackingNumber : mixed
- $geodisAccount : mixed = ['Receive']
Tags
Return values
array<string|int, mixed>getTrackLinksForSaleProduct()
Get Track links for sale product
public
getTrackLinksForSaleProduct(SaleProduct $saleProduct) : mixed
Parameters
- $saleProduct : SaleProduct
Tags
sendExpeditionToGeodis()
public
sendExpeditionToGeodis(mixed $body[, mixed $warehouseId = 1 ]) : bool|mixed
Parameters
- $body : mixed
- $warehouseId : mixed = 1
Return values
bool|mixedsendGeodis()
public
sendGeodis(mixed $url, mixed $data) : mixed
Parameters
- $url : mixed
- $data : mixed
setEntityManager()
Setter of the Entity Manager
public
setEntityManager(EntityManager $em) : mixed
Parameters
- $em : EntityManager
-
the Entity Manager
validateGeodisExpedition()
public
validateGeodisExpedition(mixed $body[, int $warehouseId = 1 ]) : bool|mixed
Parameters
- $body : mixed
- $warehouseId : int = 1
Return values
bool|mixedgetGeodisParam()
Get geodis params
private
getGeodisParam([mixed $type = "Send" ][, bool $key = false ], mixed $warehouseId) : bool
Parameters
- $type : mixed = "Send"
- $key : bool = false
- $warehouseId : mixed
Tags
Return values
boolgetHash()
Get hash
private
getHash(mixed $api_key, mixed $id, mixed $timestamp, mixed $lang, mixed $service, mixed $data) : string
Parameters
- $api_key : mixed
- $id : mixed
- $timestamp : mixed
- $lang : mixed
- $service : mixed
- $data : mixed
Return values
stringgetToken()
Get token
private
getToken(mixed $id, mixed $timestamp, mixed $lang, mixed $hash) : string
Parameters
- $id : mixed
- $timestamp : mixed
- $lang : mixed
- $hash : mixed
Return values
stringprepareData()
Prepare request data
private
prepareData(mixed $body, mixed $login, mixed $apiKey, mixed $service) : array<string|int, mixed>
Parameters
- $body : mixed
- $login : mixed
- $apiKey : mixed
- $service : mixed