437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
|
# File 'lib/popbill/taxinvoice.rb', line 437
def sendSMS(corpNum, mgtKeyType, mgtKey, senderNum, receiverNum, contents, userID = '')
if corpNum.length != 10
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
end
if mgtKey.to_s == ''
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
end
if senderNum.to_s == ''
raise PopbillException.new('-99999999', '발신번호가 입력되지 않았습니다.')
end
if receiverNum.to_s == ''
raise PopbillException.new('-99999999', '수신번호가 입력되지 않았습니다.')
end
if contents.to_s == ''
raise PopbillException.new('-99999999', '문자 메시지 내용이 입력되지 않았습니다.')
end
postData = {}
postData["sender"] = senderNum
postData["receiver"] = receiverNum
postData["contents"] = contents
postData = postData.to_json
httppost("/Taxinvoice/#{mgtKeyType}/#{mgtKey}", corpNum, postData, "SMS", userID)
end
|