SellsyService
extends TransactionalService
in package
Class SellsyService
Table of Contents
Constants
- SELLSY_API_URL = 'https://api.sellsy.com/v2'
- SELLSY_LOGIN_URL = 'https://login.sellsy.com'
Properties
- $container : mixed
- $em : EntityManager
- $_document : mixed
- $isEdenRed : mixed
- $sellsyAuthToken : mixed
- $sellsyExpireAt : mixed
- $stores : array<string|int, mixed>
- $usersMapping : mixed
- Mapping for sellsy account
Methods
- addRepository() : void
- Add a repository to this service
- addService() : void
- Add a service to this service
- batch() : string
- changeInvoiceStatus() : mixed
- createCatalogProduct() : bool
- createOrUpdateCatalogProductBarCodes() : bool|mixed
- createUser() : mixed
- getAllSellsyProducts() : bool|mixed
- Get sellsy product
- getAuthToken() : mixed
- getCatalogProductBySku() : bool|mixed
- getCatalogProductPrices() : bool|mixed
- getDocument() : mixed
- getEntityManager() : EntityManager
- Getter of the Entity Manager
- getShipment() : array<string|int, mixed>
- invoice() : array<string|int, mixed>
- requestApi() : mixed
- setEntityManager() : mixed
- Setter of the Entity Manager
- updateCatalogProduct() : bool|void
- updateCatalogProductPrices() : bool
- updateProductImage() : bool|mixed
- Update product image
- userExist() : bool
- getProductNotes() : string
- getUserId() : mixed
- convertTransportToSellsy() : string
- createDocument() : mixed
- formatDiscount() : mixed
- getIdFirst() : bool
- getLastId() : mixed
- getProduct() : bool|mixed
- Get sellsy product
- getProductForSellsy() : array<string|int, mixed>
- getShippingName() : string
- getUserByMail() : bool
- setInvoiceItems() : mixed
- updateProductCustomFields() : mixed
- Updating custom fields
Constants
SELLSY_API_URL
public
mixed
SELLSY_API_URL
= 'https://api.sellsy.com/v2'
SELLSY_LOGIN_URL
public
mixed
SELLSY_LOGIN_URL
= 'https://login.sellsy.com'
Properties
$container
protected
mixed
$container
Tags
$em
protected
EntityManager
$em
The Entity Manager
$_document
private
mixed
$_document
Tags
$isEdenRed
private
mixed
$isEdenRed
= false
$sellsyAuthToken
private
mixed
$sellsyAuthToken
= ''
$sellsyExpireAt
private
mixed
$sellsyExpireAt
= ''
$stores
private
array<string|int, mixed>
$stores
= [0 => 'admin', 4 => 'alfortville', 17 => 'bazarchic', 12 => 'buyshop_theme', 2 => 'de', 1 => 'default', 9 => 'drop', 13 => 'en', 15 => 'expedition', 3 => 'fr', 18 => 'groupon', 14 => 'it', 20 => 'iw', 8 => 'depot', 21 => 'nl', 11 => 'phone', 19 => 'pt', 16 => 'reexpedition', 'logidav_erp_lengow' => 'lengow', 'logidav_erp_lengowv2' => 'lengow', 'logidav_erp_shopdecoshopping' => 'depot', 'logidav_erp_lestendances' => 'drop', 'logidav_erp_parisprix' => 'drop', 'logidav_erp_shoppingfeed' => 'drop', 'logidav_erp_apishopping' => 'edenred']
value must be lowercase in erp sources!
$usersMapping
Mapping for sellsy account
private
mixed
$usersMapping
= ['LesTendances' => 12142715]
Methods
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
batch()
public
batch(mixed $batchData) : string
Parameters
- $batchData : mixed
Tags
Return values
stringchangeInvoiceStatus()
public
changeInvoiceStatus(mixed $id, mixed $status) : mixed
Parameters
- $id : mixed
- $status : mixed
createCatalogProduct()
public
createCatalogProduct(mixed $product) : bool
Parameters
- $product : mixed
Tags
Return values
boolcreateOrUpdateCatalogProductBarCodes()
public
createOrUpdateCatalogProductBarCodes(mixed $sellsyProduct, Product $product) : bool|mixed
Parameters
- $sellsyProduct : mixed
- $product : Product
Return values
bool|mixedcreateUser()
public
createUser(mixed $order) : mixed
Parameters
- $order : mixed
Tags
getAllSellsyProducts()
Get sellsy product
public
getAllSellsyProducts([mixed $page = 1 ]) : bool|mixed
Parameters
- $page : mixed = 1
Return values
bool|mixedgetAuthToken()
public
getAuthToken() : mixed
getCatalogProductBySku()
public
getCatalogProductBySku(mixed $sku) : bool|mixed
Parameters
- $sku : mixed
Return values
bool|mixedgetCatalogProductPrices()
public
getCatalogProductPrices(mixed $sellsyProduct) : bool|mixed
Parameters
- $sellsyProduct : mixed
Tags
Return values
bool|mixedgetDocument()
public
getDocument(mixed $idDocument[, mixed $type = 'invoice' ]) : mixed
Parameters
- $idDocument : mixed
- $type : mixed = 'invoice'
getEntityManager()
Getter of the Entity Manager
public
getEntityManager() : EntityManager
Return values
EntityManagergetShipment()
public
getShipment(mixed $order) : array<string|int, mixed>
Parameters
- $order : mixed
Return values
array<string|int, mixed>invoice()
public
invoice(mixed $sales[, array<string|int, mixed> $orderWithItems = [] ]) : array<string|int, mixed>
Parameters
- $sales : mixed
- $orderWithItems : array<string|int, mixed> = []
Return values
array<string|int, mixed>requestApi()
public
requestApi(mixed $requestSettings[, bool $requestFile = false ][, bool $showJSON = false ]) : mixed
Parameters
- $requestSettings : mixed
- $requestFile : bool = false
- $showJSON : bool = false
setEntityManager()
Setter of the Entity Manager
public
setEntityManager(EntityManager $em) : mixed
Parameters
- $em : EntityManager
-
the Entity Manager
updateCatalogProduct()
public
updateCatalogProduct(mixed $sellsyProduct, mixed $product) : bool|void
Parameters
- $sellsyProduct : mixed
- $product : mixed
Tags
Return values
bool|voidupdateCatalogProductPrices()
public
updateCatalogProductPrices(mixed $sellsyProduct, Product $product) : bool
Parameters
- $sellsyProduct : mixed
- $product : Product
Return values
boolupdateProductImage()
Update product image
public
updateProductImage(mixed $sellsyProduct, mixed $product) : bool|mixed
Parameters
- $sellsyProduct : mixed
- $product : mixed
Return values
bool|mixeduserExist()
public
userExist(mixed $mail) : bool
Parameters
- $mail : mixed
Return values
boolgetProductNotes()
protected
getProductNotes(mixed $order) : string
Parameters
- $order : mixed
Return values
stringgetUserId()
protected
getUserId(mixed $order) : mixed
Parameters
- $order : mixed
Tags
convertTransportToSellsy()
private
convertTransportToSellsy(mixed $method) : string
Parameters
- $method : mixed
Return values
stringcreateDocument()
private
createDocument(mixed $order) : mixed
Parameters
- $order : mixed
Tags
formatDiscount()
private
formatDiscount(mixed $sale) : mixed
Parameters
- $sale : mixed
getIdFirst()
private
getIdFirst(mixed $r) : bool
Parameters
- $r : mixed
Return values
boolgetLastId()
private
getLastId(mixed $r) : mixed
Parameters
- $r : mixed
getProduct()
Get sellsy product
private
getProduct(mixed $sku) : bool|mixed
Parameters
- $sku : mixed
Return values
bool|mixedgetProductForSellsy()
private
getProductForSellsy(mixed $product) : array<string|int, mixed>
Parameters
- $product : mixed
Return values
array<string|int, mixed>getShippingName()
private
getShippingName(mixed $order) : string
Parameters
- $order : mixed
Return values
stringgetUserByMail()
private
getUserByMail(mixed $mail) : bool
Parameters
- $mail : mixed
Return values
boolsetInvoiceItems()
private
setInvoiceItems(mixed $sale, mixed $orderItems) : mixed
Parameters
- $sale : mixed
- $orderItems : mixed
updateProductCustomFields()
Updating custom fields
private
updateProductCustomFields(mixed $sellsyProduct, mixed $product) : mixed
Parameters
- $sellsyProduct : mixed
- $product : mixed