Logidav Docs

SaleApi extends MenzzoApi
in package

Class SaleApi

Table of Contents

Properties

$admin_password  : mixed
$admin_username  : mixed
$container  : ContainerInterface
$em  : EntityManager
$password  : mixed
$token_url  : mixed
$url  : mixed
$username  : mixed
$accessToken  : string
$apiKeyConfigCode  : string

Methods

__construct()  : mixed
Menzzo2Api constructor.
addRepository()  : void
Add a repository to this service
addService()  : void
Add a service to this service
changeOrderStatus()  : bool|mixed
Update order status
createCartRule()  : mixed
createInvoiceForOrder()  : bool|mixed
Create invoice for order
createOrder15()  : mixed
createOrderShipment()  : bool|mixed
Ship full sale or partial sale
generateCouponCodeForAmount()  : array<string|int, mixed>
Generate Coupon code for specific amount
generateCouponCodeForRule()  : array<string|int, mixed>
Generate Coupon code for rule
getAbandonedCarts()  : array<string|int, mixed>
Get Abandoned carts
getAbandonedCartsPayment()  : array<string|int, mixed>
Get Abandoned carts payment
getActiveShippingMethods()  : array<string|int, mixed>
Get Active Shipping methods
getApiToken()  : bool|mixed
Get Api Token
getByCriteria()  : bool
Get Order by criteria
getById()  : bool|mixed
Get order details by sale id
getEntityManager()  : EntityManager
Getter of the Entity Manager
getOrderInvoice()  : mixed
Get Invoice for order
getShipmentReports()  : mixed
getShipmentsByCriteria()  : mixed
getShipmentsCriteria()  : mixed
Get Shipment by criteria
importCoteCosySale()  : mixed
Import sale from cotecosy
refreshApiToken()  : bool|mixed|string
Refreshing Api Access
setChronopostReservationNumberForShipment()  : bool|mixed
Update or set chronopost reservation number for shipment
setEntityManager()  : mixed
Setter of the Entity Manager
updateCartRule()  : mixed
updateSaleAddress()  : mixed
updateSaleProduct()  : array<string|int, mixed>
Update sale product
execute()  : mixed
formatResponse()  : false|mixed
Returning array from response

Properties

$admin_password

protected mixed $admin_password
Tags
@var

$admin_username

protected mixed $admin_username
Tags
@var

$container

protected ContainerInterface $container

$password

protected mixed $password
Tags
@var

$token_url

protected mixed $token_url
Tags
@var

$username

protected mixed $username
Tags
@var

$accessToken

private string $accessToken = ''

$apiKeyConfigCode

private string $apiKeyConfigCode = 'MZ_MAGENTO_ACCESS_TOKEN'

Methods

__construct()

Menzzo2Api constructor.

public __construct(mixed $base_url, mixed $token_url, mixed $username, mixed $password) : mixed
Parameters
$base_url : mixed
$token_url : mixed
$username : mixed
$password : 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

changeOrderStatus()

Update order status

public changeOrderStatus(Sale $sale, string $status[, string $comment = '' ]) : bool|mixed
Parameters
$sale : Sale
$status : string
$comment : string = ''
Return values
bool|mixed

(array)

createCartRule()

public createCartRule(mixed $data) : mixed
Parameters
$data : mixed

createInvoiceForOrder()

Create invoice for order

public createInvoiceForOrder(Sale $sale) : bool|mixed
Parameters
$sale : Sale
Return values
bool|mixed

createOrder15()

public createOrder15(mixed $data) : mixed
Parameters
$data : mixed

createOrderShipment()

Ship full sale or partial sale

public createOrderShipment(Sale $sale, mixed $itemsToShip, mixed $trackings[, bool $notify = false ]) : bool|mixed
Parameters
$sale : Sale
$itemsToShip : mixed

[[itemId => $qty]]

$trackings : mixed

[['title' => '', 'carrier_code', 'track_number' => '']]

$notify : bool = false

notify customer

Return values
bool|mixed

generateCouponCodeForAmount()

Generate Coupon code for specific amount

public generateCouponCodeForAmount(mixed $amount[, mixed $autoGenerated = true ][, string $format = 'alphanum' ][, int $quantity = 1 ][, int $length = 13 ]) : array<string|int, mixed>
Parameters
$amount : mixed
$autoGenerated : mixed = true
$format : string = 'alphanum'
$quantity : int = 1
$length : int = 13
Tags
todo

refactor this function

Return values
array<string|int, mixed>

generateCouponCodeForRule()

Generate Coupon code for rule

public generateCouponCodeForRule(mixed $ruleId[, string $format = 'alphanum' ][, int $quantity = 1 ][, int $length = 13 ][, array<string|int, mixed> $customData = [] ]) : array<string|int, mixed>
Parameters
$ruleId : mixed
$format : string = 'alphanum'
$quantity : int = 1
$length : int = 13
$customData : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getAbandonedCarts()

Get Abandoned carts

public getAbandonedCarts(mixed $from, mixed $to) : array<string|int, mixed>
Parameters
$from : mixed
$to : mixed
Return values
array<string|int, mixed>

getAbandonedCartsPayment()

Get Abandoned carts payment

public getAbandonedCartsPayment(mixed $from, mixed $to) : array<string|int, mixed>
Parameters
$from : mixed
$to : mixed
Return values
array<string|int, mixed>

getActiveShippingMethods()

Get Active Shipping methods

public getActiveShippingMethods() : array<string|int, mixed>
Return values
array<string|int, mixed>

getApiToken()

Get Api Token

public getApiToken(mixed $username, mixed $password) : bool|mixed
Parameters
$username : mixed
$password : mixed
Tags
throws
GuzzleException
Return values
bool|mixed

(string) token

getByCriteria()

Get Order by criteria

public getByCriteria(mixed $searchCriteria[, bool $asArray = true ]) : bool
Parameters
$searchCriteria : mixed
$asArray : bool = true
Return values
bool

(array)

getById()

Get order details by sale id

public getById(mixed $id[, bool $searchCriteria = false ][, bool $asArray = false ]) : bool|mixed
Parameters
$id : mixed
$searchCriteria : bool = false
$asArray : bool = false
Return values
bool|mixed

(array)

getEntityManager()

Getter of the Entity Manager

public getEntityManager() : EntityManager
Return values
EntityManager

getOrderInvoice()

Get Invoice for order

public getOrderInvoice(Sale $sale) : mixed
Parameters
$sale : Sale

getShipmentReports()

public getShipmentReports(mixed $from, mixed $to) : mixed
Parameters
$from : mixed
$to : mixed

getShipmentsByCriteria()

public getShipmentsByCriteria(mixed $searchCriteria) : mixed
Parameters
$searchCriteria : mixed

getShipmentsCriteria()

Get Shipment by criteria

public getShipmentsCriteria(mixed $searchCriteria[, bool $asArray = true ]) : mixed
Parameters
$searchCriteria : mixed
$asArray : bool = true

importCoteCosySale()

Import sale from cotecosy

public importCoteCosySale(string $incrementId) : mixed
Parameters
$incrementId : string

refreshApiToken()

Refreshing Api Access

public refreshApiToken(mixed $username, mixed $password) : bool|mixed|string
Parameters
$username : mixed
$password : mixed
Tags
throws
GuzzleException
Return values
bool|mixed|string

setChronopostReservationNumberForShipment()

Update or set chronopost reservation number for shipment

public setChronopostReservationNumberForShipment(mixed $shipmentId, mixed $trackNumber, mixed $reservationNumber) : bool|mixed
Parameters
$shipmentId : mixed
$trackNumber : mixed
$reservationNumber : mixed
Return values
bool|mixed

setEntityManager()

Setter of the Entity Manager

public setEntityManager(EntityManager $em) : mixed
Parameters
$em : EntityManager

the Entity Manager

updateCartRule()

public updateCartRule(mixed $ruleId, mixed $body) : mixed
Parameters
$ruleId : mixed
$body : mixed

updateSaleAddress()

public updateSaleAddress(int $saleId, array<string|int, mixed> $data, string $type) : mixed
Parameters
$saleId : int
$data : array<string|int, mixed>
$type : string

updateSaleProduct()

Update sale product

public updateSaleProduct(mixed $data) : array<string|int, mixed>
Parameters
$data : mixed
Return values
array<string|int, mixed>

execute()

protected execute(mixed $requestType, mixed $endpoint[, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $headers = [] ]) : mixed
Parameters
$requestType : mixed
$endpoint : mixed
$body : array<string|int, mixed> = []
$headers : array<string|int, mixed> = []

formatResponse()

Returning array from response

protected formatResponse(mixed $response) : false|mixed
Parameters
$response : mixed
Return values
false|mixed

        
On this page

Search results