popbill 1.15.0 → 1.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/popbill/accountCheck.rb +48 -0
  3. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b347042464876afbc516fd2b8571c1395269c887
4
- data.tar.gz: 5b7bc7f16d76d8c91a6fbd920a89ede08ec265a2
3
+ metadata.gz: 3721bbada1b825c393aed91955ced6ddf2c6d790
4
+ data.tar.gz: d5e75a9e71d514782a17548e83c08851ba9d144a
5
5
  SHA512:
6
- metadata.gz: 8fd5891af23fef5febe151b269a0f8df2e1f09536c82221e5af5c8fb80ae85eebf4b9829763bf329203d6b7d3a0d846f4a1e907c72c0a5db19a47eca34da21be
7
- data.tar.gz: 1b10fed0c0ef0270ddb2bbf16105d61167a34790ff6d65f34e492137fba2cf599788875b4d44268362ece13b64d5090b7ce4097a15ae8c874d4e5735e07fe411
6
+ metadata.gz: b18427bdb5b2a323e3bdaaee46fad49841ae4ef4ca9b139f92dd36f0b54c34a7c2a305a893bb6bda566cce35fba8ab8848f0fa81363b4d4742c9af5701b670e9
7
+ data.tar.gz: 99f3f2427741cff841e3ae705dd33e83ab936a78bcb96d75506a73438d17b4601783718e31c9b108fad450c4a38dbd0bd159194d1c6f4895c0394df64076657d
@@ -0,0 +1,48 @@
1
+ # -*- coding: utf-8 -*-
2
+ require_relative '../popbill.rb'
3
+
4
+ # 팝빌 예금주조회 API Service Implementation
5
+ class AccountCheckService < BaseService
6
+ class << self
7
+ def instance(linkID, secretKey)
8
+ super(linkID, secretKey)
9
+ @instance ||= new
10
+ @instance.addScope("182")
11
+ return @instance
12
+ end
13
+ private :new
14
+ end
15
+
16
+ def getChargeInfo(corpNum, userID = '')
17
+ if corpNum.length != 10
18
+ raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
19
+ end
20
+ httpget("/EasyFin/AccountCheck/ChargeInfo", corpNum, userID)
21
+ end
22
+
23
+ def getUnitCost(corpNum, userID = '')
24
+ if corpNum.length != 10
25
+ raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
26
+ end
27
+ httpget("/EasyFin/AccountCheck/UnitCost", corpNum, userID)['unitCost']
28
+ end
29
+
30
+ def checkAccountInfo(corpNum, bankCode, accountNumber, userID = '')
31
+ if corpNum.length != 10
32
+ raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
33
+ end
34
+ if bankCode.to_s == ''
35
+ raise PopbillException.new(-99999999, '기관코드가 입력되지 않았습니다.')
36
+ end
37
+
38
+ if accountNumber.to_s == ''
39
+ raise PopbillException.new(-99999999, '계좌번호가 입력되지 않았습니다.')
40
+ end
41
+
42
+ uri = "/EasyFin/AccountCheck?c=#{bankCode}&n=#{accountNumber}"
43
+
44
+ httppost(uri, corpNum, "", "", userID)
45
+ end
46
+
47
+
48
+ end # end of FaxService
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: popbill
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linkhub Dev
@@ -31,6 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/popbill.rb
34
+ - lib/popbill/accountCheck.rb
34
35
  - lib/popbill/cashbill.rb
35
36
  - lib/popbill/closedown.rb
36
37
  - lib/popbill/easyFinBank.rb