Skip to content

Commit 749760f

Browse files
committed
fixup! Apply suggestions from code review
1 parent 93f579f commit 749760f

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,13 @@ default.
482482
- fulfillmentOrder
483483
- `cancel(id, params)`
484484
- `close(id[, message])`
485+
- `fulfillments(id)`
485486
- `get(id)`
487+
- `hold(id, params)`
486488
- `list([params])`
487489
- `locationsForMove(id)`
488490
- `move(id, locationId)`
489491
- `setFulfillmentOrdersDeadline(params)`
490-
- `fulfillments(id)`
491492
- fulfillmentRequest
492493
- `accept(fulfillmentOrderId[, message])`
493494
- `create(fulfillmentOrderId, params)`

resources/fulfillment-order.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ FulfillmentOrder.prototype.fulfillments = function fulfillments(id) {
131131
* Halts all fulfillment work on a fulfillment order with
132132
* status OPEN and changes the status of the fulfillment order to ON_HOLD.
133133
*
134-
* @param {Number} id Fulfillment Order id (fulfillment_order_id).
135-
* @param {Object} params An object containing the reason for the fulfillment
136-
hold and additional optional information
134+
* @param {Number} id Fulfillment Order ID
135+
* @param {Object} params An object containing the reason for the fulfillment
136+
hold and additional optional information
137137
* @return {Promise} Promise that resolves with the result
138138
* @public
139139
*/

test/fixtures/fulfillment-order/req/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
exports.cancel = require('./cancel');
44
exports.close = require('./close');
5+
exports.hold = require('./hold');
56
exports.move = require('./move');
67
exports.setFulfillmentOrdersDeadline = require('./set-fulfillment-orders-deadline');
7-
exports.hold = require('./hold');

test/fulfillment-order.test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ describe('Shopify#fulfillmentOrder', () => {
143143
.post('/admin/fulfillment_orders/1046000789/hold.json', input)
144144
.reply(200, output);
145145

146-
return shopify.fulfillmentOrder.hold(1046000789).then((data) => {
147-
expect(data).to.deep.equal(output.fulfillment_order);
148-
});
146+
return shopify.fulfillmentOrder
147+
.hold(1046000789, input.fulfillment_hold)
148+
.then((data) => {
149+
expect(data).to.deep.equal(output.fulfillment_order);
150+
});
149151
});
150152
});

types/index.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3572,6 +3572,11 @@ declare namespace Shopify {
35723572
updated_at: string;
35733573
}
35743574

3575+
interface IFulfillmentHoldFulfillmentOrderLineItem {
3576+
id: number;
3577+
quantity: number;
3578+
}
3579+
35753580
interface IFulfillmentHold {
35763581
reason:
35773582
| 'awaiting_payment'
@@ -3581,11 +3586,6 @@ declare namespace Shopify {
35813586
| 'other';
35823587
reason_notes?: string;
35833588
notify_merchant?: boolean;
3584-
fulfillment_order_line_items?: IUpdateFulfillmentOrderLineItem[];
3585-
}
3586-
3587-
interface IUpdateFulfillmentOrderLineItem {
3588-
id: number;
3589-
quantity: number;
3589+
fulfillment_order_line_items?: IFulfillmentHoldFulfillmentOrderLineItem[];
35903590
}
35913591
}

0 commit comments

Comments
 (0)