Method: TaxinvoiceService#refuse

Defined in:
lib/popbill/taxinvoice.rb

#refuse(corpNum, mgtKeyType, mgtKey, memo = '', userID = '') ⇒ Object



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/popbill/taxinvoice.rb', line 367

def refuse(corpNum, mgtKeyType, mgtKey, memo = '', userID = '')
  if corpNum.length != 10
    raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
  end
  if mgtKey.to_s == ''
    raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
  end

  postData = {}

  if memo.to_s != ''
    postData["memo"] = memo
  end

  postData = postData.to_json

  httppost("/Taxinvoice/#{mgtKeyType}/#{mgtKey}", corpNum, postData, "REFUSE", userID)
end