Class: BizInfoCheckService
- Inherits:
-
BaseService
- Object
- BaseService
- BizInfoCheckService
- Defined in:
- lib/popbill/bizinfocheck.rb
Overview
팝빌 기업정보조회 API Service Implementation
Constant Summary
Constants inherited from BaseService
BaseService::BOUNDARY, BaseService::POPBILL_APIVersion, BaseService::ServiceID_REAL, BaseService::ServiceID_TEST, BaseService::ServiceURL_GA_REAL, BaseService::ServiceURL_GA_TEST, BaseService::ServiceURL_REAL, BaseService::ServiceURL_Static_REAL, BaseService::ServiceURL_Static_TEST, BaseService::ServiceURL_TEST
Instance Attribute Summary
Attributes inherited from BaseService
#ipRestrictOnOff, #isTest, #linkhub, #scopes, #token_table, #useGAIP, #useLocalTimeYN, #useStaticIP
Class Method Summary collapse
Instance Method Summary collapse
- #checkBizInfo(corpNum, checkCorpNum, userID = '') ⇒ Object
- #getChargeInfo(corpNum, userID = '') ⇒ Object
- #getUnitCost(corpNum, userID = '') ⇒ Object
Methods inherited from BaseService
#addScope, #checkID, #checkIsMember, #getAccessURL, #getBalance, #getChargeURL, #getContactInfo, #getCorpInfo, #getPartnerBalance, #getPartnerURL, #getPaymentURL, #getPopbillURL, #getServiceID, #getServiceURL, #getSession_Token, #getUseHistoryURL, #gzip_parse, #httpget, #httppost, #httppostbulk, #httppostfile, #httppostfiles, #joinMember, #listContact, #registContact, #setIpRestrictOnOff, #setIsTest, #setUseGAIP, #setUseLocalTimeYN, #setUseStaticIP, #updateContact, #updateCorpInfo
Class Method Details
.instance(linkID, secretKey) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/popbill/bizinfocheck.rb', line 7 def instance(linkID, secretKey) super(linkID, secretKey) @instance ||= new @instance.addScope("171") return @instance end |
Instance Method Details
#checkBizInfo(corpNum, checkCorpNum, userID = '') ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/popbill/bizinfocheck.rb', line 30 def checkBizInfo(corpNum, checkCorpNum, userID = '') if corpNum.length != 10 raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") end if checkCorpNum.to_s == '' raise PopbillException.new(-99999999, "조회할 사업자등록번호가 입력되지 않았습니다.") end httpget("/BizInfo/Check?CN=#{checkCorpNum}", corpNum, userID) end |
#getChargeInfo(corpNum, userID = '') ⇒ Object
16 17 18 19 20 21 |
# File 'lib/popbill/bizinfocheck.rb', line 16 def getChargeInfo(corpNum, userID = '') if corpNum.length != 10 raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") end httpget("/BizInfo/ChargeInfo", corpNum, userID) end |
#getUnitCost(corpNum, userID = '') ⇒ Object
23 24 25 26 27 28 |
# File 'lib/popbill/bizinfocheck.rb', line 23 def getUnitCost(corpNum, userID = '') if corpNum.length != 10 raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") end httpget("/BizInfo/UnitCost", corpNum, userID)['unitCost'] end |