Comparing version 1.52.0 to 1.53.0
@@ -28,3 +28,39 @@ var popbill = require('./'); | ||
// QString = '01012345678'; | ||
// | ||
var SubmitID = 'Node-bulk02'; | ||
var cashbillList = []; | ||
for (var i =0; i < 50; i++){ | ||
var cashbill = { | ||
mgtKey : SubmitID + '-' + i, | ||
tradeType : 'μΉμΈκ±°λ', | ||
tradeUsage : 'μλ곡μ μ©', | ||
taxationType : 'κ³ΌμΈ', | ||
identityNum : '0101112222', | ||
//orgConfirmNum : '820116333', | ||
//orgTradeDate : '20170710', | ||
franchiseCorpNum : '1234567890', | ||
franchiseCorpName : 'λ°νμ μνΈ_μμ ', | ||
franchiseCEOName : 'λ°νμ λνμ μ±λͺ ', | ||
franchiseAddr : 'λ°νμ μ£Όμ', | ||
franchiseTEL : '07075103710', | ||
smssendYN : false, | ||
customerName : 'κ³ κ°λͺ ', | ||
itemName : 'μνλͺ ', | ||
orderNumber : 'μ£Όλ¬Έλ²νΈ', | ||
email : 'code@text.com', | ||
hp : '000111222', | ||
fax : '07075103710', | ||
supplyCost : '10000', | ||
tax : '1000', | ||
serviceFee : '0', | ||
totalAmount : '11000', | ||
}; | ||
cashbillList.push(cashbill); | ||
} | ||
// cashbillService.search('1234567890', 'R', '20180901', '20180931', State, TradeType, TradeUsage, TradeOpt, TaxationType, QString, 'D', 1, 50, | ||
@@ -74,2 +110,18 @@ // function(response){ | ||
// }); | ||
cashbillService.bulkSubmit('1234567890', SubmitID, cashbillList, | ||
function(response){ | ||
console.log(response); | ||
}, | ||
function(error){ | ||
console.log(error); | ||
}); | ||
cashbillService.getBulkResult('1234567890', SubmitID, | ||
function(response){ | ||
console.log(response); | ||
}, | ||
function(error){ | ||
console.log(error); | ||
}); | ||
// | ||
@@ -326,8 +378,8 @@ // cashbillService.getBalance('1234567890', | ||
cashbillService.getViewURL('1234567890', '20210720PHP001','testkorea', | ||
function(response){ | ||
console.log(response); | ||
}, function(error){ | ||
console.log(error); | ||
}); | ||
// cashbillService.getViewURL('1234567890', '20210720PHP001','testkorea', | ||
// function(response){ | ||
// console.log(response); | ||
// }, function(error){ | ||
// console.log(error); | ||
// }); | ||
@@ -334,0 +386,0 @@ // cashbillService.getPDF('1234567890', '20201117-PS003','', |
@@ -638,3 +638,55 @@ var Util = require('util'); | ||
BaseService.addMethod(CashbillService.prototype, 'bulkSubmit', function(CorpNum, SubmitID, cashbillList, success, error){ | ||
this.bulkSubmit(CorpNum, SubmitID, cashbillList, '' , success, error) | ||
}); | ||
BaseService.addMethod(CashbillService.prototype, 'bulkSubmit', function(CorpNum, SubmitID, cashbillList, UserID, success, error){ | ||
if(!SubmitID || 0 === SubmitID.length) { | ||
this._throwError(-99999999,'μ μΆμμ΄λκ° μ λ ₯λμ§ μμμ΅λλ€.',error); | ||
return; | ||
} | ||
if(!cashbillList || 0 === cashbillList.length){ | ||
this._throwError(-99999999,'νκΈμμμ¦ μ λ³΄κ° μ λ ₯λμ§ μμμ΅λλ€.',error); | ||
return; | ||
} | ||
var bulkRequest = {}; | ||
bulkRequest.cashbills = cashbillList; | ||
var postData = this._stringify(bulkRequest); | ||
this._executeAction({ | ||
uri : '/Cashbill', | ||
Method : 'BULKISSUE', | ||
CorpNum : CorpNum, | ||
SubmitID : SubmitID, | ||
UserID : UserID, | ||
Data : postData, | ||
success : function(response){ | ||
if(success) success(response); | ||
}, | ||
error : error | ||
}); | ||
}); | ||
BaseService.addMethod(CashbillService.prototype, 'getBulkResult', function(CorpNum, SubmitID, success, error){ | ||
this.getBulkResult(CorpNum, SubmitID, '', success, error); | ||
}); | ||
BaseService.addMethod(CashbillService.prototype, 'getBulkResult', function(CorpNum, SubmitID, UserID, success, error){ | ||
if(!SubmitID || 0 === SubmitID.length) { | ||
this._throwError(-99999999,'μ μΆμμ΄λκ° μ λ ₯λμ§ μμμ΅λλ€.',error); | ||
return; | ||
} | ||
this._executeAction({ | ||
uri : '/Cashbill/BULK/' + SubmitID + '/State', | ||
Method : 'GET', | ||
CorpNum : CorpNum, | ||
UserID : UserID, | ||
success : function(response){ | ||
if(success) success(response); | ||
}, | ||
error : error | ||
}); | ||
}); | ||
// μ·¨μνκΈμμμ¦ μ¦μλ°ν API μΆκ°. 2017/08/17 | ||
@@ -641,0 +693,0 @@ BaseService.addMethod(CashbillService.prototype, "revokeRegistIssue", function(CorpNum, mgtKey, orgConfirmNum, orgTradeDate, success, error){ |
{ | ||
"name": "popbill", | ||
"version": "1.52.0", | ||
"version": "1.53.0", | ||
"description": "Popbill API SDK for node. see www.popbill.com", | ||
@@ -13,3 +13,3 @@ "author": "Kim Seongjun <pallet027@gmail.com>", | ||
"name": "JeongYohan", | ||
"email": "code@linkhub.co.kr" | ||
"email": "code@linkhubcorp.com" | ||
} | ||
@@ -16,0 +16,0 @@ ], |
# node-popbill | ||
νλΉ node.js SDK v1.52.0 | ||
νλΉ node.js SDK v1.53.0 | ||
@@ -4,0 +4,0 @@ ## Install |
407477
9566