Class: AccountCheckService
- Inherits:
-
BaseService
- Object
- BaseService
- AccountCheckService
- Defined in:
- lib/popbill/accountCheck.rb
Overview
팝빌 예금주조회 API Service Implementation
Constant Summary
Constants inherited from BaseService
BaseService::BOUNDARY, BaseService::POPBILL_APIVersion, BaseService::ServiceID_REAL, BaseService::ServiceID_TEST, BaseService::ServiceURL_REAL, BaseService::ServiceURL_TEST
Instance Attribute Summary
Attributes inherited from BaseService
#ipRestrictOnOff, #isTest, #linkhub, #scopes, #token_table
Class Method Summary collapse
Instance Method Summary collapse
- #checkAccountInfo(corpNum, bankCode, accountNumber, userID = '') ⇒ Object
- #getChargeInfo(corpNum, userID = '') ⇒ Object
- #getUnitCost(corpNum, userID = '') ⇒ Object
Methods inherited from BaseService
#addScope, #checkID, #checkIsMember, #getAccessURL, #getBalance, #getChargeURL, #getCorpInfo, #getPartnerBalance, #getPartnerURL, #getPopbillURL, #getServiceID, #getServiceURL, #getSession_Token, #gzip_parse, #httpget, #httppost, #httppostfile, #httppostfiles, #joinMember, #listContact, #registContact, #setIpRestrictOnOff, #setIsTest, #updateContact, #updateCorpInfo
Class Method Details
.instance(linkID, secretKey) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/popbill/accountCheck.rb', line 7 def instance(linkID, secretKey) super(linkID, secretKey) @instance ||= new @instance.addScope("182") return @instance end |
Instance Method Details
#checkAccountInfo(corpNum, bankCode, accountNumber, userID = '') ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/popbill/accountCheck.rb', line 30 def checkAccountInfo(corpNum, bankCode, accountNumber, 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 uri = "/EasyFin/AccountCheck?c=#{bankCode}&n=#{accountNumber}" httppost(uri, corpNum, "", "", userID) end |
#getChargeInfo(corpNum, userID = '') ⇒ Object
16 17 18 19 20 21 |
# File 'lib/popbill/accountCheck.rb', line 16 def getChargeInfo(corpNum, userID = '') if corpNum.length != 10 raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") end httpget("/EasyFin/AccountCheck/ChargeInfo", corpNum, userID) end |
#getUnitCost(corpNum, userID = '') ⇒ Object
23 24 25 26 27 28 |
# File 'lib/popbill/accountCheck.rb', line 23 def getUnitCost(corpNum, userID = '') if corpNum.length != 10 raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") end httpget("/EasyFin/AccountCheck/UnitCost", corpNum, userID)['unitCost'] end |