phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
568 stars 211 forks source link

add support for Order()->FulfillmentOrder and FulfillmentRequests #278

Closed jeroendelau closed 1 year ago

jeroendelau commented 1 year ago

This pull request aims to support the behavior required by: https://shopify.dev/apps/fulfillment/order-management-apps/manage-fulfillments#request-a-fulfillment https://shopify.dev/api/admin-rest/2022-10/resources/assignedfulfillmentorder

Example:

// Requesting the FulfilmentOrder for a given order
$fo = $client->Order("1234567890")->FulfillmentOrder()->get();

// Creating a FulfilmentRequest
// Follow instructions to get partial fulfilments
$fr = $client->FulfillmentOrder('0987654321')->FulfillmentRequest->post([]);

// Accepting \ Rejecting a FulfilmentRequest
$fr = $client->FulfillmentOrder('0987654321')->FulfillmentRequest->accept();
$fr = $client->FulfillmentOrder('0987654321')->FulfillmentRequest->reject();

// Communicating fulfillment
$client->Fulfillment->post($body)
jeroendelau commented 1 year ago

@tareqtms is there something holding up this merge? Anything needs changing or explaining?

tareqtms commented 1 year ago

@jeroendelau Sorry for the delay. I just need to add the examples somewhere in the readme file. It would be good if you can do it, otherwise I will do and merge thereafter.

jeroendelau commented 1 year ago

@tareqtms I added the docs

Coennie commented 1 year ago

Ah this is what I'm looking for in #288 Could it be merged asap?

tareqtms commented 1 year ago

@Coennie Yeah, I will merge it today or tomorrow.

Coennie commented 1 year ago

@Coennie Yeah, I will merge it today or tomorrow.

hi @tareqtms really hope you can make some time to merge this. Regards