popbill 1.9.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 029a27d12152f37d0c6377bb255ea7212b76bc5b
4
- data.tar.gz: 1b98cfa40662c495886104010341da1ba54f89e2
3
+ metadata.gz: 2ca148d13fb2d281b900bd9a8d748b66afeca3e1
4
+ data.tar.gz: 05ca163e456d7fca828cc171e367aff397fbb973
5
5
  SHA512:
6
- metadata.gz: 6a3c0527e0ff498791a4c11ad7a15d803ea1cba27e48ae3cb4ffaa17806ab3e68d0e98a8fb02565f328e11b75a99299304fd14fbed988013340bd3a99798891a
7
- data.tar.gz: 981f67649ffae5178fbb3cae9b82f2609e6d28bae6360d6635fc57823824c7bd0e8c848e8ef81f16f66d23eb6259415d7d2f2dc213e22769a10c00eab468d74e
6
+ metadata.gz: 7d3dbae399376a84ae4734b592580d3fdd1a5cb884234891332453d8f85404e1e03f875a3f9ebdb8f7698b9609ce71fb0e0bcd8825e1ed45973dcb1eb5c4215f
7
+ data.tar.gz: ecb2fc1c3d55abb7d44d2500fbe6f629958fa4539c670a6a6c455f5ff6520fbca59609c52eefe4d562804334dd57dc612b60a864f1c92c4e6553a90f04fd3975
@@ -14,7 +14,7 @@ class BaseService
14
14
  POPBILL_APIVersion = "1.0"
15
15
  BOUNDARY = "==POPBILL_RUBY_SDK=="
16
16
 
17
- attr_accessor :token_table, :scopes, :isTest, :linkhub
17
+ attr_accessor :token_table, :scopes, :isTest, :linkhub, :ipRestrictOnOff
18
18
 
19
19
  # Generate Linkhub Class Singleton Instance
20
20
  class << self
@@ -23,6 +23,8 @@ class BaseService
23
23
  @instance.token_table = {}
24
24
  @instance.linkhub = Linkhub.instance(linkID, secretKey)
25
25
  @instance.scopes = ["member"]
26
+ @instance.ipRestrictOnOff = true
27
+
26
28
  return @instance
27
29
  end
28
30
 
@@ -39,6 +41,10 @@ class BaseService
39
41
  @isTest = testValue
40
42
  end
41
43
 
44
+ def setIpRestrictOnOff(value)
45
+ @ipRestrictOnOff = value
46
+ end
47
+
42
48
  def getServiceURL()
43
49
  return @isTest ? BaseService::ServiceURL_TEST : BaseService::ServiceURL_REAL
44
50
  end
@@ -70,7 +76,8 @@ class BaseService
70
76
  begin
71
77
  # getSessionToken from Linkhub
72
78
  targetToken = @linkhub.getSessionToken(
73
- @isTest ? ServiceID_TEST : ServiceID_REAL, corpNum, @scopes)
79
+ @isTest ? ServiceID_TEST : ServiceID_REAL, corpNum, @scopes, @ipRestrictOnOff ? "" : "*")
80
+
74
81
  rescue LinkhubException => le
75
82
  raise PopbillException.new(le.code, le.message)
76
83
  end
@@ -54,13 +54,23 @@ class CashbillService < BaseService
54
54
  end
55
55
 
56
56
 
57
- def registIssue(corpNum, cashbill, memo = '', userID = '')
57
+ def registIssue(corpNum, cashbill, memo = '', userID = '', emailSubject = '')
58
58
  if corpNum.length != 10
59
59
  raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
60
60
  end
61
61
 
62
+ if memo.to_s != ''
63
+ cashbill["memo"] = memo
64
+ end
65
+
66
+ if emailSubject.to_s != ''
67
+ cashbill["emailSubject"] = emailSubject
68
+ end
69
+
62
70
  postData = cashbill.to_json
63
71
 
72
+ puts postData
73
+
64
74
  httppost("/Cashbill", corpNum, postData, "ISSUE", userID)
65
75
  end
66
76
 
@@ -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
@@ -59,7 +59,7 @@ class HTTaxinvoiceService < BaseService
59
59
  end
60
60
 
61
61
  def search(corpNum, jobID, type, taxType, purposeType, taxRegIDType, taxRegIDYN,
62
- taxRegID, page, perPage, order, userID = '')
62
+ taxRegID, page, perPage, order, userID = '', searchString = '')
63
63
  if corpNum.length != 10
64
64
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
65
65
  end
@@ -81,11 +81,15 @@ class HTTaxinvoiceService < BaseService
81
81
  uri += "&TaxRegIDYN=" + taxRegIDYN
82
82
  end
83
83
 
84
+ if searchString.to_s != ''
85
+ uri += "&SearchString=" + searchString
86
+ end
87
+
84
88
  httpget(URI.escape(uri), corpNum, userID)
85
89
  end
86
90
 
87
91
  def summary(corpNum, jobID, type, taxType, purposeType, taxRegIDType, taxRegIDYN,
88
- taxRegID, userID = '')
92
+ taxRegID, userID = '', searchString = '')
89
93
  if corpNum.length != 10
90
94
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
91
95
  end
@@ -104,6 +108,10 @@ class HTTaxinvoiceService < BaseService
104
108
  uri += "&TaxRegIDYN=" + taxRegIDYN
105
109
  end
106
110
 
111
+ if searchString.to_s != ''
112
+ uri += "&SearchString=" + searchString
113
+ end
114
+
107
115
  httpget(URI.escape(uri), corpNum, userID)
108
116
  end
109
117
 
@@ -173,6 +181,18 @@ class HTTaxinvoiceService < BaseService
173
181
  httpget("/HomeTax/Taxinvoice/#{ntsConfirmNum}/PopUp", corpNum, userID)['url']
174
182
  end
175
183
 
184
+ def getPrintURL(corpNum, ntsConfirmNum, userID ="")
185
+ if corpNum.length != 10
186
+ raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
187
+ end
188
+
189
+ if ntsConfirmNum.length != 24
190
+ raise PopbillException.new('-99999999', '전자세금계산서 국세청승인번호가 올바르지 않습니다.')
191
+ end
192
+
193
+ httpget("/HomeTax/Taxinvoice/#{ntsConfirmNum}/Print", corpNum, userID)['url']
194
+ end
195
+
176
196
 
177
197
  def checkCertValidation(corpNum, userID = "")
178
198
  if corpNum.length != 10
@@ -82,7 +82,7 @@ class KakaoService < BaseService
82
82
  httpget("/KakaoTalk/ListATSTemplate", corpNum, userID)
83
83
  end
84
84
 
85
- def sendATS_one(corpNum, templateCode, snd, content, altContent, altSendType, sndDT, receiver, receiverName, requestNum = '', userID = '')
85
+ def sendATS_one(corpNum, templateCode, snd, content, altContent, altSendType, sndDT, receiver, receiverName, requestNum = '', userID = '', btns = '')
86
86
  msg = [
87
87
  {
88
88
  "rcv" => receiver,
@@ -91,14 +91,14 @@ class KakaoService < BaseService
91
91
  "altmsg" => altContent,
92
92
  }
93
93
  ]
94
- sendATS_same(corpNum, templateCode, snd, "", "", altSendType, sndDT, msg, requestNum, userID)
94
+ sendATS_same(corpNum, templateCode, snd, "", "", altSendType, sndDT, msg, requestNum, userID, btns)
95
95
  end
96
96
 
97
- def sendATS_multi(corpNum, templateCode, snd, altSendType, sndDT, msgs, requestNum = '', userID = '')
98
- sendATS_same(corpNum, templateCode, snd, "", "", altSendType, sndDT, msgs, requestNum, userID)
97
+ def sendATS_multi(corpNum, templateCode, snd, altSendType, sndDT, msgs, requestNum = '', userID = '', btns = '')
98
+ sendATS_same(corpNum, templateCode, snd, "", "", altSendType, sndDT, msgs, requestNum, userID, btns)
99
99
  end
100
100
 
101
- def sendATS_same(corpNum, templateCode, snd, content, altContent, altSendType, sndDT, msgs, requestNum = '', userID = '')
101
+ def sendATS_same(corpNum, templateCode, snd, content, altContent, altSendType, sndDT, msgs, requestNum = '', userID = '', btns = '')
102
102
  raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.") if corpNum.length != 10
103
103
  raise PopbillException.new(-99999999, "알림톡 템플릿코드가 입력되지 않았습니다.") if templateCode.to_s == ''
104
104
  raise PopbillException.new(-99999999, "발신번호가 입력되지 않았습니다.") if snd.to_s == ''
@@ -112,6 +112,7 @@ class KakaoService < BaseService
112
112
  req["sndDT"] = sndDT if sndDT.to_s != ''
113
113
  req["requestNum"] = requestNum if requestNum.to_s != ''
114
114
  req["msgs"] = msgs if msgs.to_s != ''
115
+ req["btns"] = btns if btns.to_s != ''
115
116
 
116
117
  postData = req.to_json
117
118
  httppost("/ATS", corpNum, postData, "", userID)
@@ -78,13 +78,19 @@ class StatementService < BaseService
78
78
  end
79
79
 
80
80
 
81
- def registIssue(corpNum, statement, memo = '', userID ='')
81
+ def registIssue(corpNum, statement, memo = '', userID ='', emailSubject = '')
82
82
  if corpNum.length != 10
83
83
  raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
84
84
  end
85
85
 
86
86
  statement["memo"] = memo
87
+
88
+ if emailSubject.to_s != ''
89
+ statement["emailSubject"] = emailSubject
90
+ end
91
+
87
92
  postData = statement.to_json
93
+
88
94
  httppost("/Statement", corpNum, postData, "ISSUE", userID)
89
95
  end
90
96
 
@@ -54,7 +54,7 @@ class TaxinvoiceService < BaseService
54
54
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
55
55
  end
56
56
  if mgtKey.to_s == ''
57
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
57
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
58
58
  end
59
59
 
60
60
  begin
@@ -116,7 +116,7 @@ class TaxinvoiceService < BaseService
116
116
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
117
117
  end
118
118
  if mgtKey.to_s == ''
119
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
119
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
120
120
  end
121
121
  postData = taxinvoice.to_json
122
122
 
@@ -129,7 +129,7 @@ class TaxinvoiceService < BaseService
129
129
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
130
130
  end
131
131
  if mgtKey.to_s == ''
132
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
132
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
133
133
  end
134
134
 
135
135
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}", corpNum, userID)
@@ -140,7 +140,7 @@ class TaxinvoiceService < BaseService
140
140
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
141
141
  end
142
142
  unless mgtKeyList.any?
143
- raise PopbillException.new('-99999999', '문서관리번호 배열이 올바르지 않습니다.')
143
+ raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
144
144
  end
145
145
 
146
146
  postData = mgtKeyList.to_json
@@ -154,7 +154,7 @@ class TaxinvoiceService < BaseService
154
154
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
155
155
  end
156
156
  if mgtKey.to_s == ''
157
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
157
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
158
158
  end
159
159
 
160
160
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?Detail", corpNum, userID)
@@ -166,7 +166,7 @@ class TaxinvoiceService < BaseService
166
166
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
167
167
  end
168
168
  if mgtKey.to_s == ''
169
- raise PopbillException.new('-99999999', '문서관리번호 입력되지 않았습니다.')
169
+ raise PopbillException.new('-99999999', '문서번호 입력되지 않았습니다.')
170
170
  end
171
171
 
172
172
  httppost("/Taxinvoice/#{mgtKeyType}/#{mgtKey}", corpNum, '', 'DELETE', userID)
@@ -178,7 +178,7 @@ class TaxinvoiceService < BaseService
178
178
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
179
179
  end
180
180
  if mgtKey.to_s == ''
181
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
181
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
182
182
  end
183
183
 
184
184
  postData = {}
@@ -201,7 +201,7 @@ class TaxinvoiceService < BaseService
201
201
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
202
202
  end
203
203
  if mgtKey.to_s == ''
204
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
204
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
205
205
  end
206
206
 
207
207
  postData = {}
@@ -220,7 +220,7 @@ class TaxinvoiceService < BaseService
220
220
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
221
221
  end
222
222
  if mgtKey.to_s == ''
223
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
223
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
224
224
  end
225
225
 
226
226
  postData = {}
@@ -239,7 +239,7 @@ class TaxinvoiceService < BaseService
239
239
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
240
240
  end
241
241
  if mgtKey.to_s == ''
242
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
242
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
243
243
  end
244
244
 
245
245
  postData = {}
@@ -258,7 +258,7 @@ class TaxinvoiceService < BaseService
258
258
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
259
259
  end
260
260
  if mgtKey.to_s == ''
261
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
261
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
262
262
  end
263
263
 
264
264
  postData = {}
@@ -286,7 +286,7 @@ class TaxinvoiceService < BaseService
286
286
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
287
287
  end
288
288
  if mgtKey.to_s == ''
289
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
289
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
290
290
  end
291
291
 
292
292
  postData = {}
@@ -319,7 +319,7 @@ class TaxinvoiceService < BaseService
319
319
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
320
320
  end
321
321
  if mgtKey.to_s == ''
322
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
322
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
323
323
  end
324
324
 
325
325
  postData = {}
@@ -338,7 +338,7 @@ class TaxinvoiceService < BaseService
338
338
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
339
339
  end
340
340
  if mgtKey.to_s == ''
341
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
341
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
342
342
  end
343
343
 
344
344
  postData = {}
@@ -357,7 +357,7 @@ class TaxinvoiceService < BaseService
357
357
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
358
358
  end
359
359
  if mgtKey.to_s == ''
360
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
360
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
361
361
  end
362
362
 
363
363
  postData = {}
@@ -377,7 +377,7 @@ class TaxinvoiceService < BaseService
377
377
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
378
378
  end
379
379
  if mgtKey.to_s == ''
380
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
380
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
381
381
  end
382
382
 
383
383
  httppost("/Taxinvoice/#{mgtKeyType}/#{mgtKey}", corpNum, '', "NTS", userID)
@@ -389,7 +389,7 @@ class TaxinvoiceService < BaseService
389
389
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
390
390
  end
391
391
  if mgtKey.to_s == ''
392
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
392
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
393
393
  end
394
394
 
395
395
  postData = {}
@@ -408,7 +408,7 @@ class TaxinvoiceService < BaseService
408
408
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
409
409
  end
410
410
  if mgtKey.to_s == ''
411
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
411
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
412
412
  end
413
413
 
414
414
  if senderNum.to_s == ''
@@ -439,7 +439,7 @@ class TaxinvoiceService < BaseService
439
439
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
440
440
  end
441
441
  if mgtKey.to_s == ''
442
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
442
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
443
443
  end
444
444
 
445
445
  if senderNum.to_s == ''
@@ -465,7 +465,7 @@ class TaxinvoiceService < BaseService
465
465
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
466
466
  end
467
467
  if mgtKey.to_s == ''
468
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
468
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
469
469
  end
470
470
 
471
471
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}/Logs", corpNum, userID)
@@ -477,7 +477,7 @@ class TaxinvoiceService < BaseService
477
477
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
478
478
  end
479
479
  if mgtKey.to_s == ''
480
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
480
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
481
481
  end
482
482
 
483
483
  httppostfiles("/Taxinvoice/#{mgtKeyType}/#{mgtKey}/Files", corpNum, '', [filePath], userID)
@@ -489,7 +489,7 @@ class TaxinvoiceService < BaseService
489
489
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
490
490
  end
491
491
  if mgtKey.to_s == ''
492
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
492
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
493
493
  end
494
494
 
495
495
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}/Files", corpNum)
@@ -501,7 +501,7 @@ class TaxinvoiceService < BaseService
501
501
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
502
502
  end
503
503
  if mgtKey.to_s == ''
504
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
504
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
505
505
  end
506
506
  if fileID.to_s == ''
507
507
  raise PopbillException.new('-99999999', '파일아이디가 입력되지 않았습니다.')
@@ -515,7 +515,7 @@ class TaxinvoiceService < BaseService
515
515
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
516
516
  end
517
517
  if mgtKey.to_s == ''
518
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
518
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
519
519
  end
520
520
 
521
521
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=POPUP", corpNum, userID)['url']
@@ -526,18 +526,29 @@ class TaxinvoiceService < BaseService
526
526
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
527
527
  end
528
528
  if mgtKey.to_s == ''
529
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
529
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
530
530
  end
531
531
 
532
532
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=PRINT", corpNum, userID)['url']
533
533
  end
534
534
 
535
+ def getViewURL(corpNum, mgtKeyType, mgtKey, userID = '')
536
+ if corpNum.length != 10
537
+ raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
538
+ end
539
+ if mgtKey.to_s == ''
540
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
541
+ end
542
+
543
+ httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=VIEW", corpNum, userID)['url']
544
+ end
545
+
535
546
  def getEPrintURL(corpNum, mgtKeyType, mgtKey, userID = '')
536
547
  if corpNum.length != 10
537
548
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
538
549
  end
539
550
  if mgtKey.to_s == ''
540
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
551
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
541
552
  end
542
553
 
543
554
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=EPRINT", corpNum, userID)['url']
@@ -548,7 +559,7 @@ class TaxinvoiceService < BaseService
548
559
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
549
560
  end
550
561
  if mgtKey.to_s == ''
551
- raise PopbillException.new('-99999999', '문서관리번호 올바르지 않습니다.')
562
+ raise PopbillException.new('-99999999', '문서번호 올바르지 않습니다.')
552
563
  end
553
564
 
554
565
  httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=MAIL", corpNum, userID)['url']
@@ -559,7 +570,7 @@ class TaxinvoiceService < BaseService
559
570
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
560
571
  end
561
572
  unless mgtKeyList.any?
562
- raise PopbillException.new('-99999999', '문서관리번호 배열이 올바르지 않습니다.')
573
+ raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
563
574
  end
564
575
 
565
576
  postData = mgtKeyList.to_json
@@ -621,13 +632,13 @@ class TaxinvoiceService < BaseService
621
632
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
622
633
  end
623
634
  if mgtKey.to_s == ''
624
- raise PopbillException.new('-99999999', '문서관리번호가 입력되지 않았습니다.')
635
+ raise PopbillException.new('-99999999', '문서번호가 입력되지 않았습니다.')
625
636
  end
626
637
  if itemCode.to_s == ''
627
638
  raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
628
639
  end
629
640
  if stmtMgtKey.to_s == ''
630
- raise PopbillException.new('-99999999', '전자명세서 문서관리번호가 입력되지 않았습니다.')
641
+ raise PopbillException.new('-99999999', '전자명세서 문서번호가 입력되지 않았습니다.')
631
642
  end
632
643
 
633
644
  postData = {}
@@ -643,13 +654,13 @@ class TaxinvoiceService < BaseService
643
654
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
644
655
  end
645
656
  if mgtKey.to_s == ''
646
- raise PopbillException.new('-99999999', '문서관리번호가 입력되지 않았습니다.')
657
+ raise PopbillException.new('-99999999', '문서번호가 입력되지 않았습니다.')
647
658
  end
648
659
  if itemCode.to_s == ''
649
660
  raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
650
661
  end
651
662
  if stmtMgtKey.to_s == ''
652
- raise PopbillException.new('-99999999', '전자명세서 문서관리번호가 입력되지 않았습니다.')
663
+ raise PopbillException.new('-99999999', '전자명세서 문서번호가 입력되지 않았습니다.')
653
664
  end
654
665
 
655
666
  postData = {}
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.9.1
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linkhub Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-27 00:00:00.000000000 Z
11
+ date: 2020-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: linkhub
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.1.1
19
+ version: 1.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.1.1
26
+ version: 1.2.0
27
27
  description: Popbill API SDK
28
28
  email: code@linkhub.co.kr
29
29
  executables: []
@@ -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
@@ -50,17 +51,17 @@ require_paths:
50
51
  - lib
51
52
  required_ruby_version: !ruby/object:Gem::Requirement
52
53
  requirements:
53
- - - '>='
54
+ - - ">="
54
55
  - !ruby/object:Gem::Version
55
56
  version: 2.0.0
56
57
  required_rubygems_version: !ruby/object:Gem::Requirement
57
58
  requirements:
58
- - - '>='
59
+ - - ">="
59
60
  - !ruby/object:Gem::Version
60
61
  version: '0'
61
62
  requirements: []
62
63
  rubyforge_project:
63
- rubygems_version: 2.4.8
64
+ rubygems_version: 2.5.1
64
65
  signing_key:
65
66
  specification_version: 4
66
67
  summary: Popbill API SDK