Skip to content

Commit 3ff6830

Browse files
authored
Apply suggestions from code review
1 parent c66e57d commit 3ff6830

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

resources/fulfillment-order.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,9 @@ FulfillmentOrder.prototype.fulfillments = function fulfillments(id) {
132132
* status OPEN and changes the status of the fulfillment order to ON_HOLD.
133133
*
134134
* @param {Number} id Fulfillment Order id (fulfillment_order_id).
135-
* @param {Object} params
136-
* @param {String} params.reason 'awaiting_paymet' | 'high_risk_of_fraud'
137-
* | 'incorrect_address' | 'inventory_out_of_stock' | 'other'.
138-
* @param {String} params.reason_notes (optiona) Additional information about
139-
* the fulfillment hold reason.
140-
* @param {Boolean} params.notify_merchant (optional) Whether the merchant
141-
* should receive a notification about the fulfillment hold.
142-
* If set to true, then the merchant will be notified on the Shopify
143-
* mobile app (if they use it to manage their store).
144-
* The default value is false.
145-
* @param {Array} params.fulfillment_order_line_items (optional) array of
146-
* fulfillment order line item ids and the quantity of each to move.
147-
* @return {Promise} Promise that resolves with the result.
135+
* @param {Object} params An object containing the reason for the fulfillment
136+
hold and additional optional information
137+
* @return {Promise} Promise that resolves with the result
148138
* @public
149139
*/
150140
FulfillmentOrder.prototype.hold = function hold(id, params) {

types/index.d.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ declare class Shopify {
391391
) => Promise<Shopify.IPaginatedResult<Shopify.IFulfillment>>;
392392
hold: (
393393
id: number,
394-
params: Shopify.IHoldFulfillmentOrder
394+
params: Shopify.IFulfillmentHold
395395
) => Promise<Shopify.IFulfillmentOrder>;
396396
};
397397
fulfillmentRequest: {
@@ -3572,17 +3572,16 @@ declare namespace Shopify {
35723572
updated_at: string;
35733573
}
35743574

3575-
interface IHoldFulfillmentOrder {
3575+
interface IFulfillmentHold {
35763576
reason:
35773577
| 'awaiting_payment'
35783578
| 'high_risk_of_fraud'
35793579
| 'incorrect_address'
35803580
| 'inventory_out_of_stock'
35813581
| 'other';
35823582
reason_notes?: string;
3583-
notify_merchant: boolean;
3584-
line_items: IUpdateFulfillmentOrderLineItem;
3585-
fulfillment_order_id: number;
3583+
notify_merchant?: boolean;
3584+
fulfillment_order_line_items?: IUpdateFulfillmentOrderLineItem[];
35863585
}
35873586

35883587
interface IUpdateFulfillmentOrderLineItem {

0 commit comments

Comments
 (0)