Method: EasyFinBankService#requestJob

Defined in:
lib/popbill/easyFinBank.rb

#requestJob(corpNum, bankCode, accountNumber, sDate, eDate, userID = "") ⇒ Object



184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/popbill/easyFinBank.rb', line 184

def requestJob(corpNum, bankCode, accountNumber, sDate, eDate, userID = "")
  if corpNum.length != 10
    raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
  end
  if bankCode.to_s == ''
    raise PopbillException.new('-99999999', '기관코드가 입력되지 않았습니다.')
  end
  if accountNumber.to_s == ''
    raise PopbillException.new('-99999999', '계좌번호가 입력되지 않았습니다.')
  end
  if sDate.to_s == ''
    raise PopbillException.new('-99999999', '시작일자가 입력되지 않았습니다.')
  end
  if eDate.to_s == ''
    raise PopbillException.new('-99999999', '종료일자가 입력되지 않았습니다.')
  end

  uri = "/EasyFin/Bank/BankAccount?BankCode=#{bankCode}&AccountNumber=#{accountNumber}&SDate=#{sDate}&EDate=#{eDate}"

  httppost(uri, corpNum, "", "", userID)['jobID']
end