Logidav Docs

MosaikasaGraphQLClientService
in package

Table of Contents

Constants

SHOPIFY_FULFILLMENT_ORDER_ID_PREFIX  = "gid://shopify/FulfillmentOrder/"
SHOPIFY_FULFILLMENT_ORDER_LINE_ITEM_ID_PREFIX  = "gid://shopify/FulfillmentOrderLineItem/"

Properties

$client  : mixed

Methods

__construct()  : mixed
createDraftOrderFromOrder()  : array<string|int, mixed>|null
Crée une commande en brouillon (draft order) à partir d'une commande existante
deleteDraftOrder()  : array<string|int, mixed>|null
Supprime une commande en brouillon (draft order)
fetchPaidAndUnfulfilledOrdersCreatedBefore()  : array<string|int, mixed>|null
Fetches orders that are paid and unfulfilled, created before a specified timestamp.
fulfillmentCreateV2()  : array<string|int, mixed>|null
Creates a fulfillment using the provided data and executes the GraphQL query.
getDraftOrderInvoicePreview()  : array<string|int, mixed>|null
Génère une prévisualisation de facture pour une commande en brouillon
getProductVariants()  : array<string|int, mixed>|null
getVariantMetafields()  : array<string|int, mixed>|null
orderCancelInMosaikasa()  : array<string|int, mixed>|null
query()  : array<string|int, mixed>|null
Executes a GraphQL query and optionally passes variables to the query.
executeGraphqlQuery()  : array<string|int, mixed>|null
Executes a GraphQL query with specified variables and retrieves the result for the given mutation key.
getCreateDraftOrderFromOrderQuery()  : string
getCreateDraftOrderInvoice()  : string
getDeleteDraftOrderQuery()  : string
getFulfillmentCreateV2Query()  : string
Retourne la mutation GraphQL pour créer une expédition
getOrderCancelQuery()  : string
getPaidAndUnfulfilledOrdersQuery()  : string
Constructs a GraphQL query for retrieving paid, unfulfilled orders created from a specific date.
getProductVariantsQuery()  : string
getVariantMetafieldsQuery()  : string

Constants

SHOPIFY_FULFILLMENT_ORDER_LINE_ITEM_ID_PREFIX

public mixed SHOPIFY_FULFILLMENT_ORDER_LINE_ITEM_ID_PREFIX = "gid://shopify/FulfillmentOrderLineItem/"

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $mosaikasa_params) : mixed
Parameters
$mosaikasa_params : array<string|int, mixed>

createDraftOrderFromOrder()

Crée une commande en brouillon (draft order) à partir d'une commande existante

public createDraftOrderFromOrder(string $orderId) : array<string|int, mixed>|null
Parameters
$orderId : string

L'identifiant de la commande existante

Return values
array<string|int, mixed>|null

Un tableau contenant les informations sur la commande en brouillon créée, ou null en cas d'échec

deleteDraftOrder()

Supprime une commande en brouillon (draft order)

public deleteDraftOrder(string $draftOrderId) : array<string|int, mixed>|null
Parameters
$draftOrderId : string

L'identifiant de la commande en brouillon à supprimer

Return values
array<string|int, mixed>|null

Un tableau contenant les informations sur la suppression, ou null en cas d'échec

fetchPaidAndUnfulfilledOrdersCreatedBefore()

Fetches orders that are paid and unfulfilled, created before a specified timestamp.

public fetchPaidAndUnfulfilledOrdersCreatedBefore(string $createdAt) : array<string|int, mixed>|null
Parameters
$createdAt : string

The timestamp in string format used to filter orders created before this date and time.

Return values
array<string|int, mixed>|null

An array of orders that match the criteria, or null if the query fails.

fulfillmentCreateV2()

Creates a fulfillment using the provided data and executes the GraphQL query.

public fulfillmentCreateV2(array<string|int, mixed> $fulfillmentData) : array<string|int, mixed>|null
Parameters
$fulfillmentData : array<string|int, mixed>

An associative array containing the data required to create the fulfillment.

Return values
array<string|int, mixed>|null

The response from the GraphQL server, which may include the result of the fulfillment creation or null in case of failure.

getDraftOrderInvoicePreview()

Génère une prévisualisation de facture pour une commande en brouillon

public getDraftOrderInvoicePreview(string $draftOrderId) : array<string|int, mixed>|null
Parameters
$draftOrderId : string

L'identifiant de la commande en brouillon

Return values
array<string|int, mixed>|null

Un tableau contenant le HTML et le sujet de la prévisualisation de la facture, ou null en cas d'échec

getProductVariants()

public getProductVariants(string $productId) : array<string|int, mixed>|null
Parameters
$productId : string
Return values
array<string|int, mixed>|null

getVariantMetafields()

public getVariantMetafields(string $variantId) : array<string|int, mixed>|null
Parameters
$variantId : string
Return values
array<string|int, mixed>|null

orderCancelInMosaikasa()

public orderCancelInMosaikasa(array<string|int, mixed> $orderCancelData) : array<string|int, mixed>|null
Parameters
$orderCancelData : array<string|int, mixed>
Return values
array<string|int, mixed>|null

query()

Executes a GraphQL query and optionally passes variables to the query.

public query(string $query[, array<string|int, mixed> $variables = [] ]) : array<string|int, mixed>|null
Parameters
$query : string

The GraphQL query to be executed.

$variables : array<string|int, mixed> = []

An associative array of variables to be passed to the query. Defaults to an empty array.

Return values
array<string|int, mixed>|null

The decoded response from the GraphQL server, which may contain errors or data, or null in case of failure.

executeGraphqlQuery()

Executes a GraphQL query with specified variables and retrieves the result for the given mutation key.

private executeGraphqlQuery(string $query, array<string|int, mixed> $variables, string $mutationKey) : array<string|int, mixed>|null
Parameters
$query : string

The GraphQL query to execute.

$variables : array<string|int, mixed>

An associative array of variables to include in the query.

$mutationKey : string

The key in the response to extract data from after the query execution.

Tags
throws
Exception

If user errors are present in the response for the specified mutation key.

Return values
array<string|int, mixed>|null

The data corresponding to the mutation key in the response, or null if not found or on failure.

getFulfillmentCreateV2Query()

Retourne la mutation GraphQL pour créer une expédition

private getFulfillmentCreateV2Query() : string
Return values
string

getPaidAndUnfulfilledOrdersQuery()

Constructs a GraphQL query for retrieving paid, unfulfilled orders created from a specific date.

private getPaidAndUnfulfilledOrdersQuery(string $createdAt) : string
Parameters
$createdAt : string

The starting date (ISO 8601 format) for filtering orders, e.g., "YYYY-MM-DDTHH:MM:SSZ".

Return values
string

The GraphQL query string used to fetch the specified orders.


        
On this page

Search results