popbill 1.11.0 → 1.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/popbill/accountCheck.rb +48 -0
- data/lib/popbill/easyFinBank.rb +277 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3721bbada1b825c393aed91955ced6ddf2c6d790
|
4
|
+
data.tar.gz: d5e75a9e71d514782a17548e83c08851ba9d144a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -0,0 +1,277 @@
|
|
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 registBankAccount(corpNum, bankAccountInfo, userID = "")
|
17
|
+
if corpNum.length != 10
|
18
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
19
|
+
end
|
20
|
+
|
21
|
+
if bankAccountInfo["BankCode"].to_s == ''
|
22
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
23
|
+
end
|
24
|
+
|
25
|
+
if bankAccountInfo["BankCode"].length != 4
|
26
|
+
raise PopbillException.new('-99999999', '은행코드가 올바르지 않습니다.')
|
27
|
+
end
|
28
|
+
|
29
|
+
if bankAccountInfo["AccountNumber"].to_s == ''
|
30
|
+
raise PopbillException.new('-99999999', '은행 계좌번호가 입력되지 않았습니다.')
|
31
|
+
end
|
32
|
+
|
33
|
+
uri = "/EasyFin/Bank/BankAccount/Regist"
|
34
|
+
|
35
|
+
if bankAccountInfo["UsePeriod"].to_s != ''
|
36
|
+
uri += "?UsePeriod=" + bankAccountInfo["UsePeriod"]
|
37
|
+
end
|
38
|
+
|
39
|
+
httppost(uri, corpNum, bankAccountInfo.to_json, "", userID)
|
40
|
+
end
|
41
|
+
|
42
|
+
def updateBankAccount(corpNum, bankAccountInfo, userID = "")
|
43
|
+
if corpNum.length != 10
|
44
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
45
|
+
end
|
46
|
+
|
47
|
+
if bankAccountInfo["BankCode"].to_s == ''
|
48
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
49
|
+
end
|
50
|
+
|
51
|
+
if bankAccountInfo["BankCode"].length != 4
|
52
|
+
raise PopbillException.new('-99999999', '은행코드가 올바르지 않습니다.')
|
53
|
+
end
|
54
|
+
|
55
|
+
if bankAccountInfo["AccountNumber"].to_s == ''
|
56
|
+
raise PopbillException.new('-99999999', '은행 계좌번호가 입력되지 않았습니다.')
|
57
|
+
end
|
58
|
+
|
59
|
+
uri = "/EasyFin/Bank/BankAccount/#{bankAccountInfo["BankCode"]}/#{bankAccountInfo["AccountNumber"]}/Update"
|
60
|
+
|
61
|
+
httppost(uri, corpNum, bankAccountInfo.to_json, "", userID)
|
62
|
+
end
|
63
|
+
|
64
|
+
def closeBankAccount(corpNum, bankCode, accountNumber, closeType, userID = "")
|
65
|
+
if corpNum.length != 10
|
66
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
67
|
+
end
|
68
|
+
|
69
|
+
if bankCode.to_s == ''
|
70
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
71
|
+
end
|
72
|
+
|
73
|
+
if bankCode.length != 4
|
74
|
+
raise PopbillException.new('-99999999', '은행코드가 올바르지 않습니다.')
|
75
|
+
end
|
76
|
+
|
77
|
+
if accountNumber.to_s == ''
|
78
|
+
raise PopbillException.new('-99999999', '은행 계좌번호가 입력되지 않았습니다.')
|
79
|
+
end
|
80
|
+
|
81
|
+
if closeType.to_s == ''
|
82
|
+
raise PopbillException.new('-99999999', '정액제 해지유형이 입력되지 않았습니다.')
|
83
|
+
end
|
84
|
+
|
85
|
+
uri = "/EasyFin/Bank/BankAccount/Close/?BankCode=#{bankCode}&AccountNumber=#{accountNumber}&CloseType=#{closeType}"
|
86
|
+
|
87
|
+
httppost(URI.escape(uri), corpNum, "", "", userID)
|
88
|
+
end
|
89
|
+
|
90
|
+
def revokeCloseBankAccount(corpNum, bankCode, accountNumber, userID = "")
|
91
|
+
if corpNum.length != 10
|
92
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
93
|
+
end
|
94
|
+
|
95
|
+
if bankCode.to_s == ''
|
96
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
97
|
+
end
|
98
|
+
|
99
|
+
if bankCode.length != 4
|
100
|
+
raise PopbillException.new('-99999999', '은행코드가 올바르지 않습니다.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if accountNumber.to_s == ''
|
104
|
+
raise PopbillException.new('-99999999', '은행 계좌번호가 입력되지 않았습니다.')
|
105
|
+
end
|
106
|
+
|
107
|
+
uri = "/EasyFin/Bank/BankAccount/RevokeClose/?BankCode=#{bankCode}&AccountNumber=#{accountNumber}"
|
108
|
+
|
109
|
+
httppost(uri, corpNum, "", "", userID)
|
110
|
+
end
|
111
|
+
|
112
|
+
def getBankAccountInfo(corpNum, bankCode, accountNumber, userID = "")
|
113
|
+
if corpNum.length != 10
|
114
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
115
|
+
end
|
116
|
+
|
117
|
+
if bankCode.to_s == ''
|
118
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if bankCode.length != 4
|
122
|
+
raise PopbillException.new('-99999999', '은행코드가 올바르지 않습니다.')
|
123
|
+
end
|
124
|
+
|
125
|
+
if accountNumber.to_s == ''
|
126
|
+
raise PopbillException.new('-99999999', '은행 계좌번호가 입력되지 않았습니다.')
|
127
|
+
end
|
128
|
+
|
129
|
+
uri = "/EasyFin/Bank/BankAccount/#{bankCode}/#{accountNumber}"
|
130
|
+
|
131
|
+
httpget(uri, corpNum, userID)
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
def getChargeInfo(corpNum, userID = "")
|
136
|
+
if corpNum.length != 10
|
137
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
138
|
+
end
|
139
|
+
httpget("/EasyFin/Bank/ChargeInfo", corpNum, userID)
|
140
|
+
end
|
141
|
+
|
142
|
+
def getBankAccountMgtURL(corpNum, userID = "")
|
143
|
+
if corpNum.length != 10
|
144
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
145
|
+
end
|
146
|
+
|
147
|
+
httpget("/EasyFin/Bank?TG=BankAccount", corpNum, userID)['url']
|
148
|
+
end
|
149
|
+
|
150
|
+
def listBankAccount(corpNum, userID = "")
|
151
|
+
if corpNum.length != 10
|
152
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
153
|
+
end
|
154
|
+
|
155
|
+
httpget("/EasyFin/Bank/ListBankAccount", corpNum, userID)
|
156
|
+
end
|
157
|
+
|
158
|
+
def requestJob(corpNum, bankCode, accountNumber, sDate, eDate, userID = "")
|
159
|
+
if corpNum.length != 10
|
160
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
161
|
+
end
|
162
|
+
if bankCode.to_s == ''
|
163
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
164
|
+
end
|
165
|
+
if accountNumber.to_s == ''
|
166
|
+
raise PopbillException.new('-99999999', '계좌번호가 입력되지 않았습니다.')
|
167
|
+
end
|
168
|
+
if sDate.to_s == ''
|
169
|
+
raise PopbillException.new('-99999999', '시작일자가 입력되지 않았습니다.')
|
170
|
+
end
|
171
|
+
if eDate.to_s == ''
|
172
|
+
raise PopbillException.new('-99999999', '종료일자가 입력되지 않았습니다.')
|
173
|
+
end
|
174
|
+
|
175
|
+
uri = "/EasyFin/Bank/BankAccount?BankCode=#{bankCode}&AccountNumber=#{accountNumber}&SDate=#{sDate}&EDate=#{eDate}"
|
176
|
+
|
177
|
+
httppost(uri, corpNum, "", "", userID)['jobID']
|
178
|
+
end
|
179
|
+
|
180
|
+
def getJobState(corpNum, jobID, userID = "")
|
181
|
+
if corpNum.length != 10
|
182
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
183
|
+
end
|
184
|
+
if jobID.to_s == ''
|
185
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 입력되지 않았습니다.')
|
186
|
+
end
|
187
|
+
|
188
|
+
httpget("/EasyFin/Bank/#{jobID}/State", corpNum, userID)
|
189
|
+
end
|
190
|
+
|
191
|
+
def listActiveJob(corpNum, userID = "")
|
192
|
+
if corpNum.length != 10
|
193
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
194
|
+
end
|
195
|
+
|
196
|
+
httpget("/EasyFin/Bank/JobList", corpNum, userID)
|
197
|
+
end
|
198
|
+
|
199
|
+
def search(corpNum, jobID, tradeType, searchString, page, perPage, order, userID = '')
|
200
|
+
if corpNum.length != 10
|
201
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
202
|
+
end
|
203
|
+
if jobID.length != 18
|
204
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 올바르지 않습니다.')
|
205
|
+
end
|
206
|
+
|
207
|
+
uri = "/EasyFin/Bank/#{jobID}"
|
208
|
+
uri += "?TradeType=" + tradeType.join(',')
|
209
|
+
uri += "&Page=" + page.to_s
|
210
|
+
uri += "&PerPage=" + perPage.to_s
|
211
|
+
uri += "&Order=" + order
|
212
|
+
|
213
|
+
if searchString.to_s != ''
|
214
|
+
uri += "&SearchString=" + searchString
|
215
|
+
end
|
216
|
+
|
217
|
+
httpget(URI.escape(uri), corpNum, userID)
|
218
|
+
end
|
219
|
+
|
220
|
+
def summary(corpNum, jobID, tradeType, searchString, userID = '')
|
221
|
+
if corpNum.length != 10
|
222
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
223
|
+
end
|
224
|
+
if jobID.length != 18
|
225
|
+
raise PopbillException.new('-99999999', '작업아이디(jobID)가 올바르지 않습니다.')
|
226
|
+
end
|
227
|
+
|
228
|
+
uri = "/EasyFin/Bank/#{jobID}/Summary"
|
229
|
+
uri += "?TradeType=" + tradeType.join(',')
|
230
|
+
|
231
|
+
if searchString.to_s != ''
|
232
|
+
uri += "&SearchString=" + searchString
|
233
|
+
end
|
234
|
+
|
235
|
+
httpget(URI.escape(uri), corpNum, userID)
|
236
|
+
end
|
237
|
+
|
238
|
+
def saveMemo(corpNum, tid, memo, userID = "")
|
239
|
+
if corpNum.length != 10
|
240
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
241
|
+
end
|
242
|
+
if tid.to_s == ''
|
243
|
+
raise PopbillException.new('-99999999', '거래내역 아이디가 입력되지 않았습니다.')
|
244
|
+
end
|
245
|
+
|
246
|
+
|
247
|
+
uri = "/EasyFin/Bank/SaveMemo?TID=#{tid}&Memo=#{memo}"
|
248
|
+
|
249
|
+
httppost(uri, corpNum, "", "", userID)
|
250
|
+
end
|
251
|
+
|
252
|
+
def getFlatRatePopUpURL(corpNum, userID = "")
|
253
|
+
if corpNum.length != 10
|
254
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
255
|
+
end
|
256
|
+
|
257
|
+
httpget("/EasyFin/Bank?TG=CHRG", corpNum, userID)['url']
|
258
|
+
end
|
259
|
+
|
260
|
+
def getFlatRateState(corpNum, bankCode, accountNumber, userID = "")
|
261
|
+
if corpNum.length != 10
|
262
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
263
|
+
end
|
264
|
+
|
265
|
+
if bankCode.to_s == ''
|
266
|
+
raise PopbillException.new('-99999999', '은행코드가 입력되지 않았습니다.')
|
267
|
+
end
|
268
|
+
if accountNumber.to_s == ''
|
269
|
+
raise PopbillException.new('-99999999', '계좌번호가 입력되지 않았습니다.')
|
270
|
+
end
|
271
|
+
|
272
|
+
httpget("/EasyFin/Bank/Contract/#{bankCode}/#{accountNumber}", corpNum, userID)
|
273
|
+
end
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: popbill
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Linkhub Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: linkhub
|
@@ -31,8 +31,10 @@ 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
|
37
|
+
- lib/popbill/easyFinBank.rb
|
36
38
|
- lib/popbill/fax.rb
|
37
39
|
- lib/popbill/htCashbill.rb
|
38
40
|
- lib/popbill/htTaxinvoice.rb
|