Method: StatementService#deleteFile

Defined in:
lib/popbill/statement.rb

#deleteFile(corpNum, itemCode, mgtKey, fileID, userID = '') ⇒ Object



335
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/popbill/statement.rb', line 335

def deleteFile(corpNum, itemCode, mgtKey, fileID, userID = '')
  if corpNum.length != 10
    raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
  end
  if mgtKey.to_s == ''
    raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
  end
  if fileID.to_s == ''
    raise PopbillException.new('-99999999', '파일아이디가 입력되지 않았습니다.')
  end

  httppost("/Statement/#{itemCode}/#{mgtKey}/Files/#{fileID}", corpNum, '', "DELETE", userID)
end