GitHub

MockOrderPayment

import { MockOrderPayment } from '@daffodil/order/testing'
class MockOrderPayment implements DaffOrderPayment {
  id: faker.datatype.uuid()
  order_id: faker.datatype.uuid()
  created_at: faker.date.past().toString()
  updated_at: faker.date.past().toString()
  method: 'card'
  cc_type: 'visa'
  cc_last4: faker.datatype.number({ min: 1000, max: 9999 }).toString()
  cc_owner: 'owner'
  cc_exp_month: 'month'
  cc_exp_year: 'year'
}

Properties

Name Type Description
id faker.datatype.uuid()
order_id faker.datatype.uuid()
created_at faker.date.past().toString()
updated_at faker.date.past().toString()
method 'card'
cc_type 'visa'
cc_last4 faker.datatype.number({ min: 1000, max: 9999 }).toString()
cc_owner 'owner'
cc_exp_month 'month'
cc_exp_year 'year'