GitHub

MockOrderInvoice

import { MockOrderInvoice } from '@daffodil/order/driver/magento/2-4-1/testing'
class MockOrderInvoice implements MagentoOrderInvoice {
  __typename: <const>'Invoice'
  items: this.itemFactory.createMany(faker.datatype.number({ min: 1, max: 3 }))
  total: this.totalFactory.create({
      __typename: 'InvoiceTotal'
  })
}

Properties

Name Type Description
__typename <const>'Invoice'
items this.itemFactory.createMany(faker.datatype.number({ min: 1, max: 3 }))
total this.totalFactory.create({ __typename: 'InvoiceTotal' })