Skip to content

Commit

Permalink
fixup! Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Aug 20, 2024
1 parent 93f579f commit 749760f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,13 @@ default.
- fulfillmentOrder
- `cancel(id, params)`
- `close(id[, message])`
- `fulfillments(id)`
- `get(id)`
- `hold(id, params)`
- `list([params])`
- `locationsForMove(id)`
- `move(id, locationId)`
- `setFulfillmentOrdersDeadline(params)`
- `fulfillments(id)`
- fulfillmentRequest
- `accept(fulfillmentOrderId[, message])`
- `create(fulfillmentOrderId, params)`
Expand Down
6 changes: 3 additions & 3 deletions resources/fulfillment-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ FulfillmentOrder.prototype.fulfillments = function fulfillments(id) {
* Halts all fulfillment work on a fulfillment order with
* 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 An object containing the reason for the fulfillment
hold and additional optional information
* @param {Number} id Fulfillment Order ID
* @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
*/
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/fulfillment-order/req/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

exports.cancel = require('./cancel');
exports.close = require('./close');
exports.hold = require('./hold');
exports.move = require('./move');
exports.setFulfillmentOrdersDeadline = require('./set-fulfillment-orders-deadline');
exports.hold = require('./hold');
8 changes: 5 additions & 3 deletions test/fulfillment-order.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ describe('Shopify#fulfillmentOrder', () => {
.post('/admin/fulfillment_orders/1046000789/hold.json', input)
.reply(200, output);

return shopify.fulfillmentOrder.hold(1046000789).then((data) => {
expect(data).to.deep.equal(output.fulfillment_order);
});
return shopify.fulfillmentOrder
.hold(1046000789, input.fulfillment_hold)
.then((data) => {
expect(data).to.deep.equal(output.fulfillment_order);
});
});
});
12 changes: 6 additions & 6 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3572,6 +3572,11 @@ declare namespace Shopify {
updated_at: string;
}

interface IFulfillmentHoldFulfillmentOrderLineItem {
id: number;
quantity: number;
}

interface IFulfillmentHold {
reason:
| 'awaiting_payment'
Expand All @@ -3581,11 +3586,6 @@ declare namespace Shopify {
| 'other';
reason_notes?: string;
notify_merchant?: boolean;
fulfillment_order_line_items?: IUpdateFulfillmentOrderLineItem[];
}

interface IUpdateFulfillmentOrderLineItem {
id: number;
quantity: number;
fulfillment_order_line_items?: IFulfillmentHoldFulfillmentOrderLineItem[];
}
}

0 comments on commit 749760f

Please sign in to comment.