Method: TaxinvoiceService#attachFile

Defined in:
lib/popbill/taxinvoice.rb

#attachFile(corpNum, mgtKeyType, mgtKey, filePath, userID = '') ⇒ Object



506
507
508
509
510
511
512
513
514
515
# File 'lib/popbill/taxinvoice.rb', line 506

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

  httppostfiles("/Taxinvoice/#{mgtKeyType}/#{mgtKey}/Files", corpNum, '', [filePath], userID)
end