Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca authored Aug 20, 2024
1 parent c66e57d commit 3ff6830
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
16 changes: 3 additions & 13 deletions resources/fulfillment-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,9 @@ FulfillmentOrder.prototype.fulfillments = function fulfillments(id) {
* status OPEN and changes the status of the fulfillment order to ON_HOLD.
*
* @param {Number} id Fulfillment Order id (fulfillment_order_id).
* @param {Object} params
* @param {String} params.reason 'awaiting_paymet' | 'high_risk_of_fraud'
* | 'incorrect_address' | 'inventory_out_of_stock' | 'other'.
* @param {String} params.reason_notes (optiona) Additional information about
* the fulfillment hold reason.
* @param {Boolean} params.notify_merchant (optional) Whether the merchant
* should receive a notification about the fulfillment hold.
* If set to true, then the merchant will be notified on the Shopify
* mobile app (if they use it to manage their store).
* The default value is false.
* @param {Array} params.fulfillment_order_line_items (optional) array of
* fulfillment order line item ids and the quantity of each to move.
* @return {Promise} Promise that resolves with the result.
* @param {Object} params An object containing the reason for the fulfillment
hold and additional optional information
* @return {Promise} Promise that resolves with the result
* @public
*/
FulfillmentOrder.prototype.hold = function hold(id, params) {
Expand Down
9 changes: 4 additions & 5 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ declare class Shopify {
) => Promise<Shopify.IPaginatedResult<Shopify.IFulfillment>>;
hold: (
id: number,
params: Shopify.IHoldFulfillmentOrder
params: Shopify.IFulfillmentHold
) => Promise<Shopify.IFulfillmentOrder>;
};
fulfillmentRequest: {
Expand Down Expand Up @@ -3572,17 +3572,16 @@ declare namespace Shopify {
updated_at: string;
}

interface IHoldFulfillmentOrder {
interface IFulfillmentHold {
reason:
| 'awaiting_payment'
| 'high_risk_of_fraud'
| 'incorrect_address'
| 'inventory_out_of_stock'
| 'other';
reason_notes?: string;
notify_merchant: boolean;
line_items: IUpdateFulfillmentOrderLineItem;
fulfillment_order_id: number;
notify_merchant?: boolean;
fulfillment_order_line_items?: IUpdateFulfillmentOrderLineItem[];
}

interface IUpdateFulfillmentOrderLineItem {
Expand Down

0 comments on commit 3ff6830

Please sign in to comment.