MockOrderItem
import { MockOrderItem } from '@daffodil/order/driver/magento/2-4-1/testing'
class MockOrderItem implements MagentoOrderItem {
__typename: MagentoOrderItemTypenames.OrderItem
quantity_canceled: faker.datatype.number({ min: 1, max: 1000 })
quantity_invoiced: faker.datatype.number({ min: 1, max: 1000 })
quantity_ordered: faker.datatype.number({ min: 1, max: 1000 })
quantity_refunded: faker.datatype.number({ min: 1, max: 1000 })
quantity_returned: faker.datatype.number({ min: 1, max: 1000 })
quantity_shipped: faker.datatype.number({ min: 1, max: 1000 })
product_sku: faker.random.alphaNumeric(20)
product_type: MagentoOrderItemType.Simple
selected_options: []
entered_options: []
status: faker.random.word()
product_sale_price: this.moneyFactory.create()
product_name: faker.random.word()
product_url_key: faker.random.word()
discounts: this.createDiscounts()
}
Properties
Name | Type | Description |
---|---|---|
__typename | MagentoOrderItemTypenames.OrderItem | |
quantity_canceled | faker.datatype.number({ min: 1, max: 1000 }) | |
quantity_invoiced | faker.datatype.number({ min: 1, max: 1000 }) | |
quantity_ordered | faker.datatype.number({ min: 1, max: 1000 }) | |
quantity_refunded | faker.datatype.number({ min: 1, max: 1000 }) | |
quantity_returned | faker.datatype.number({ min: 1, max: 1000 }) | |
quantity_shipped | faker.datatype.number({ min: 1, max: 1000 }) | |
product_sku | faker.random.alphaNumeric(20) | |
product_type | MagentoOrderItemType.Simple | |
selected_options | [] | |
entered_options | [] | |
status | faker.random.word() | |
product_sale_price | this.moneyFactory.create() | |
product_name | faker.random.word() | |
product_url_key | faker.random.word() | |
discounts | this.createDiscounts() |