popbill 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/popbill/easyFinBank.rb +158 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 960deefd8b6db2fe8995ec99c613d6aa1d93960f
|
4
|
+
data.tar.gz: b28c255fb2af6a8256e8fc5398afbe704976030e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e0251826603f221e180c6b863509b24b1860662e7ba62231aef3ef49e6d381ab324312c45b35da216a4316e2290281c6dd289a119f46a4a29ee4166130d933
|
7
|
+
data.tar.gz: 9387c524da20fca93e16a741701c02e7171ab94bf2f3589b848c1e6068330a6a23696276dfecb50b830c4ce7a072ba5e842c30c98e3126addae842cedcd73a62
|
@@ -0,0 +1,158 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require_relative '../popbill.rb'
|
3
|
+
|
4
|
+
# 팝빌 계좌조회 API Service Implementation
|
5
|
+
class EasyFinBankService < BaseService
|
6
|
+
class << self
|
7
|
+
def instance(linkID, secretKey)
|
8
|
+
super(linkID, secretKey)
|
9
|
+
@instance ||= new
|
10
|
+
@instance.addScope("180")
|
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/Bank/ChargeInfo", corpNum, userID)
|
21
|
+
end
|
22
|
+
|
23
|
+
def getBankAccountMgtURL(corpNum, userID = "")
|
24
|
+
if corpNum.length != 10
|
25
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
26
|
+
end
|
27
|
+
|
28
|
+
httpget("/EasyFin/Bank?TG=BankAccount", corpNum, userID)['url']
|
29
|
+
end
|
30
|
+
|
31
|
+
def listBankAccount(corpNum, userID = "")
|
32
|
+
if corpNum.length != 10
|
33
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
34
|
+
end
|
35
|
+
|
36
|
+
httpget("/EasyFin/Bank/ListBankAccount", corpNum, userID)
|
37
|
+
end
|
38
|
+
|
39
|
+
def requestJob(corpNum, bankCode, accountNumber, sDate, eDate, userID = "")
|
40
|
+
if corpNum.length != 10
|
41
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
42
|
+
end
|
43
|
+
if bankCode.to_s == ''
|
44
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
45
|
+
end
|
46
|
+
if accountNumber.to_s == ''
|
47
|
+
raise PopbillException.new('-99999999', '계좌번호가 입력되지 않았습니다.')
|
48
|
+
end
|
49
|
+
if sDate.to_s == ''
|
50
|
+
raise PopbillException.new('-99999999', '시작일자가 입력되지 않았습니다.')
|
51
|
+
end
|
52
|
+
if eDate.to_s == ''
|
53
|
+
raise PopbillException.new('-99999999', '종료일자가 입력되지 않았습니다.')
|
54
|
+
end
|
55
|
+
|
56
|
+
uri = "/EasyFin/Bank/BankAccount?BankCode=#{bankCode}&AccountNumber=#{accountNumber}&SDate=#{sDate}&EDate=#{eDate}"
|
57
|
+
|
58
|
+
httppost(uri, corpNum, "", "", userID)['jobID']
|
59
|
+
end
|
60
|
+
|
61
|
+
def getJobState(corpNum, jobID, userID = "")
|
62
|
+
if corpNum.length != 10
|
63
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
64
|
+
end
|
65
|
+
if jobID.to_s == ''
|
66
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 입력되지 않았습니다.')
|
67
|
+
end
|
68
|
+
|
69
|
+
httpget("/EasyFin/Bank/#{jobID}/State", corpNum, userID)
|
70
|
+
end
|
71
|
+
|
72
|
+
def listActiveJob(corpNum, userID = "")
|
73
|
+
if corpNum.length != 10
|
74
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
75
|
+
end
|
76
|
+
|
77
|
+
httpget("/EasyFin/Bank/JobList", corpNum, userID)
|
78
|
+
end
|
79
|
+
|
80
|
+
def search(corpNum, jobID, tradeType, searchString, page, perPage, order, userID = '')
|
81
|
+
if corpNum.length != 10
|
82
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
83
|
+
end
|
84
|
+
if jobID.length != 18
|
85
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 올바르지 않습니다.')
|
86
|
+
end
|
87
|
+
|
88
|
+
uri = "/EasyFin/Bank/#{jobID}"
|
89
|
+
uri += "?TradeType=" + tradeType.join(',')
|
90
|
+
uri += "&Page=" + page.to_s
|
91
|
+
uri += "&PerPage=" + perPage.to_s
|
92
|
+
uri += "&Order=" + order
|
93
|
+
|
94
|
+
if searchString.to_s != ''
|
95
|
+
uri += "&SearchString=" + searchString
|
96
|
+
end
|
97
|
+
|
98
|
+
httpget(URI.escape(uri), corpNum, userID)
|
99
|
+
end
|
100
|
+
|
101
|
+
def summary(corpNum, jobID, tradeType, searchString, userID = '')
|
102
|
+
if corpNum.length != 10
|
103
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
104
|
+
end
|
105
|
+
if jobID.length != 18
|
106
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 올바르지 않습니다.')
|
107
|
+
end
|
108
|
+
|
109
|
+
uri = "/EasyFin/Bank/#{jobID}/Summary"
|
110
|
+
uri += "?TradeType=" + tradeType.join(',')
|
111
|
+
|
112
|
+
if searchString.to_s != ''
|
113
|
+
uri += "&SearchString=" + searchString
|
114
|
+
end
|
115
|
+
|
116
|
+
httpget(URI.escape(uri), corpNum, userID)
|
117
|
+
end
|
118
|
+
|
119
|
+
def saveMemo(corpNum, tid, memo, userID = "")
|
120
|
+
if corpNum.length != 10
|
121
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
122
|
+
end
|
123
|
+
if tid.to_s == ''
|
124
|
+
raise PopbillException.new('-99999999', '거래내역 아이디가 입력되지 않았습니다.')
|
125
|
+
end
|
126
|
+
|
127
|
+
|
128
|
+
uri = "/EasyFin/Bank/SaveMemo?TID=#{tid}&Memo=#{memo}"
|
129
|
+
|
130
|
+
httppost(uri, corpNum, "", "", userID)
|
131
|
+
end
|
132
|
+
|
133
|
+
def getFlatRatePopUpURL(corpNum, userID = "")
|
134
|
+
if corpNum.length != 10
|
135
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
136
|
+
end
|
137
|
+
|
138
|
+
httpget("/EasyFin/Bank?TG=CHRG", corpNum, userID)['url']
|
139
|
+
end
|
140
|
+
|
141
|
+
def getFlatRateState(corpNum, bankCode, accountNumber, userID = "")
|
142
|
+
if corpNum.length != 10
|
143
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if bankCode.to_s == ''
|
147
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
148
|
+
end
|
149
|
+
if accountNumber.to_s == ''
|
150
|
+
raise PopbillException.new('-99999999', '계좌번호가 입력되지 않았습니다.')
|
151
|
+
end
|
152
|
+
|
153
|
+
httpget("/EasyFin/Bank/Contract/#{bankCode}/#{accountNumber}", corpNum, userID)
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
end
|
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.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linkhub Dev
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- lib/popbill.rb
|
34
34
|
- lib/popbill/cashbill.rb
|
35
35
|
- lib/popbill/closedown.rb
|
36
|
+
- lib/popbill/easyFinBank.rb
|
36
37
|
- lib/popbill/fax.rb
|
37
38
|
- lib/popbill/htCashbill.rb
|
38
39
|
- lib/popbill/htTaxinvoice.rb
|