@@ -3,6 +3,7 @@ const { Transaction } = require('../transaction/transaction.js');
33const { Transfer } = require ( '../transfer/transfer.js' ) ;
44const { UtilityPayment } = require ( '../utilityPayment/utilityPayment.js' ) ;
55const { BrcodePayment } = require ( '../brcodePayment/brcodePayment.js' ) ;
6+ const { TaxPayment } = require ( '../taxPayment/taxPayment.js' ) ;
67const rest = require ( '../utils/rest.js' ) ;
78const check = require ( 'starkcore' ) . check ;
89const Resource = require ( 'starkcore' ) . Resource ;
@@ -68,7 +69,8 @@ const parsePayment = function (payment, type) {
6869 ', transaction' +
6970 ', boleto-payment' +
7071 ', brcode-payment' +
71- 'or utility-payment' ;
72+ ', tax-payment' +
73+ ' or utility-payment' ;
7274 }
7375
7476 if ( payment instanceof Transfer )
@@ -81,6 +83,8 @@ const parsePayment = function (payment, type) {
8183 type = 'brcode-payment' ;
8284 if ( payment instanceof UtilityPayment )
8385 type = 'utility-payment' ;
86+ if ( payment instanceof TaxPayment )
87+ type = 'tax-payment' ;
8488
8589 if ( type )
8690 return { 'payment' : payment , 'type' : type } ;
@@ -91,6 +95,7 @@ const parsePayment = function (payment, type) {
9195 ', a starkbank.Transaction' +
9296 ', a starkbank.BoletoPayment' +
9397 ', a starkbank.BrcodePayment' +
98+ ', a starkbank.TaxPayment' +
9499 ' or a starkbank.UtilityPayment' +
95100 ', but not a ' + typeof ( payment )
96101 ) ;
0 commit comments