Skip to main content

Voucher

This is a voucher table.

type Voucher implements Node {
id: ID!
name: String!
description: String!
code: String!
consumed: Boolean!
totalUsageCount: Int!
availableUsageCount: Int!
options: GQLTJson!
createdAt: GQLTDate!
updatedAt: GQLTDate!
productGroupId: ID
userId: ID
groupId: ID
invoice(
after: String
first: Int = 0
before: String
last: Int = 0
orderBy: [InvoiceOrderBy] = []
where: GQLTQueryInvoiceWhere
include: [GQLTInvoiceIncludeObject] = []
): InvoiceHasManyInvoiceList
invoiceItems(
after: String
first: Int = 0
before: String
last: Int = 0
orderBy: [InvoiceItemOrderBy] = []
where: GQLTQueryInvoiceItemWhere
include: [GQLTInvoiceItemIncludeObject] = []
): InvoiceItemHasManyInvoiceItemsList
productGroup: ProductGroup
voucherModifiers(
after: String
first: Int = 0
before: String
last: Int = 0
orderBy: [VoucherModifierOrderBy] = []
where: GQLTQueryVoucherModifierWhere
include: [GQLTVoucherModifierIncludeObject] = []
): VoucherModifierHasManyVoucherModifiersList
orders(
after: String
first: Int = 0
before: String
last: Int = 0
orderBy: [OrderOrderBy] = []
where: GQLTQueryOrderWhere
include: [GQLTOrderIncludeObject] = []
): OrderHasManyOrdersList
user: User
group: Group
}

Fields#

id (ID!)#

The ID of an object

name (String!)#

This is a name of voucher that will be displayed.

description (String!)#

This is the description of the voucher.

code (String!)#

This is the code that will be used for applying voucher in products.

consumed (Boolean!)#

This is an indicator if the voucher have been already used.

totalUsageCount (Int!)#

The total usage count that the voucher will be used.

availableUsageCount (Int!)#

The available usage count that the voucher can be applied.

options (GQLTJson!)#

This is where the metadata of voucher is being stored.

createdAt (GQLTDate!)#

updatedAt (GQLTDate!)#

productGroupId (ID)#

The ID of an object

userId (ID)#

The ID of an object

groupId (ID)#

The ID of an object

invoice (InvoiceHasManyInvoiceList)#

If provided it will return results after the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the first ${amount} of records.

If provided it will return results before the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the last ${amount} of records.

If provided this will sort the results by the supplied column and direction

invoiceItems (InvoiceItemHasManyInvoiceItemsList)#

If provided it will return results after the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the first ${amount} of records.

If provided it will return results before the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the last ${amount} of records.

If provided this will sort the results by the supplied column and direction

productGroup (ProductGroup)#

voucher belongsTo product group

voucherModifiers (VoucherModifierHasManyVoucherModifiersList)#

product hasMany voucher modifiers

If provided it will return results after the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the first ${amount} of records.

If provided it will return results before the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the last ${amount} of records.

If provided this will sort the results by the supplied column and direction

orders (OrderHasManyOrdersList)#

If provided it will return results after the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the first ${amount} of records.

If provided it will return results before the provided cursor

If provided the results will be the first ${amount} of records from provided cursor, if a cursor is not provided the results will be the last ${amount} of records.

If provided this will sort the results by the supplied column and direction

user (User)#

voucher belongsTo user

group (Group)#

voucher bekongsTo group

Interfaces#

Node#

An object with an ID