fix/cancel-order (#120)

* fix: adds ability to cancel order

* passing tests

* chore: clean up unused code
This commit is contained in:
Sebastian Rindom
2020-10-06 14:00:47 +02:00
committed by GitHub
parent 4bbb2a2367
commit 11bedf8c6f
29 changed files with 240 additions and 97 deletions
@@ -36,6 +36,7 @@ export const orders = {
},
quantity: 1,
},
fulfilled_quantity: 0,
quantity: 10,
},
],
@@ -56,6 +57,12 @@ export const orders = {
},
},
],
fulfillments: [
{
provider_id: "default_provider",
data: {},
},
],
fulfillment_status: "not_fulfilled",
payment_status: "awaiting",
status: "pending",
@@ -7,5 +7,6 @@ export default new mongoose.Schema({
data: { type: [mongoose.Schema.Types.Mixed], default: {} },
tracking_numbers: { type: [String], default: [] },
shipped_at: { type: String },
is_canceled: { type: Boolean, default: false },
metadata: { type: mongoose.Schema.Types.Mixed, default: {} },
})