Skip to content

Commit

Permalink
feat(transactions): vouchers
Browse files Browse the repository at this point in the history
add flag about voucher code creation to context

TM-5814
  • Loading branch information
alghanor committed Apr 18, 2020
1 parent f85b2a5 commit 4c9bea0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/v1/transactions/components/embedded/voucher/base.js
Expand Up @@ -47,6 +47,11 @@ module.exports = {
maxLength: 128,
description: 'Voucher number.'
},
code_is_api_generated: {
description: 'If the code was created by the API on request (opposed to e.g. read from exsiting cards)',
type: 'boolean',
default: false
},
system: {
type: 'string',
format: 'uuid',
Expand Down
1 change: 1 addition & 0 deletions lib/v1/transactions/legacy/items/base.js
Expand Up @@ -342,6 +342,7 @@ module.exports = {
'voucher_id', // If is_voucher, the Tillhub voucher resource used to create this item
'voucher_client_id', // If is_voucher, the client assigned id of the item\'s associated vocuher operation
'voucher_number', // If is_voucher, the used voucher code
'voucher_code_is_api_generated', // if voucher was newly created - indicates if an existing number was used or if the API created a new code
'voucher_ean', // If is_voucher, the EAN of the voucher\'s associated product
'voucher_product', // If is_voucher, the associated Tillhub product resource of the voucher
'voucher_user_id', // If is_voucher, the dynamic user component (user account or external system)
Expand Down
1 change: 1 addition & 0 deletions lib/v1/transactions/legacy/payments/base.js
Expand Up @@ -128,6 +128,7 @@ module.exports = {
'voucher_id', // If is_voucher, the Tillhub voucher resource used to create this item
'voucher_client_id', // If is_voucher, the client assigned id of the item\'s associated vocuher operation
'voucher_number', // If is_voucher, the used voucher code
// does never apply to payments ... 'voucher_code_is_api_generated', // if voucher was newly created - indicates if an existing number was used or if the API created a new code
'voucher_ean', // If is_voucher, the EAN of the voucher\'s associated product
'voucher_product', // If is_voucher, the associated Tillhub product resource of the voucher
'voucher_user_id', // If is_voucher, the dynamic user component (user account or external system)
Expand Down

0 comments on commit 4c9bea0

Please sign in to comment.