popbill 1.16.0 → 1.17.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/cashbill.rb +24 -11
- data/lib/popbill/statement.rb +31 -20
- data/lib/popbill/taxinvoice.rb +54 -30
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22480042655ba50c0689e39cf346023aee42d1de
|
4
|
+
data.tar.gz: a6245d69c619d5f5c8e6bbfa57a0eac100a375a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66ddf09cbde0ca012e8147bbe535e4c48337bee55834b51b4a4f6f310fb8a4f80dda07a894666897d28f738fb79c86e99bbea3663f7bf8134eaf5eb40a8396da
|
7
|
+
data.tar.gz: ef019f24d2b885584c4dcc2828f2e8ff6c95bdc5caa053d0678ae4d69aec62c163a2b90338ab978cafcfcfac3c93f67c972bd9989312ec39c42447f467d2a591
|
data/lib/popbill/cashbill.rb
CHANGED
@@ -39,7 +39,7 @@ class CashbillService < BaseService
|
|
39
39
|
raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
|
40
40
|
end
|
41
41
|
if mgtKey.to_s == ''
|
42
|
-
raise PopbillException.new(-99999999, "현금영수증
|
42
|
+
raise PopbillException.new(-99999999, "현금영수증 문서번호가 입력되지 않았습니다.")
|
43
43
|
end
|
44
44
|
|
45
45
|
begin
|
@@ -232,7 +232,7 @@ class CashbillService < BaseService
|
|
232
232
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
233
233
|
end
|
234
234
|
unless mgtKeyList.any?
|
235
|
-
raise PopbillException.new('-99999999', '
|
235
|
+
raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
|
236
236
|
end
|
237
237
|
|
238
238
|
postData = mgtKeyList.to_json
|
@@ -257,7 +257,7 @@ class CashbillService < BaseService
|
|
257
257
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
258
258
|
end
|
259
259
|
if mgtKey.to_s == ''
|
260
|
-
raise PopbillException.new('-99999999', '
|
260
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
261
261
|
end
|
262
262
|
|
263
263
|
postData = {}
|
@@ -277,7 +277,7 @@ class CashbillService < BaseService
|
|
277
277
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
278
278
|
end
|
279
279
|
if mgtKey.to_s == ''
|
280
|
-
raise PopbillException.new('-99999999', '
|
280
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
281
281
|
end
|
282
282
|
|
283
283
|
if senderNum.to_s == ''
|
@@ -308,7 +308,7 @@ class CashbillService < BaseService
|
|
308
308
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
309
309
|
end
|
310
310
|
if mgtKey.to_s == ''
|
311
|
-
raise PopbillException.new('-99999999', '
|
311
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
312
312
|
end
|
313
313
|
|
314
314
|
if senderNum.to_s == ''
|
@@ -335,7 +335,7 @@ class CashbillService < BaseService
|
|
335
335
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
336
336
|
end
|
337
337
|
if mgtKey.to_s == ''
|
338
|
-
raise PopbillException.new('-99999999', '
|
338
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
339
339
|
end
|
340
340
|
httpget("/Cashbill/#{mgtKey}/Logs", corpNum, userID)
|
341
341
|
end
|
@@ -346,7 +346,7 @@ class CashbillService < BaseService
|
|
346
346
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
347
347
|
end
|
348
348
|
if mgtKey.to_s == ''
|
349
|
-
raise PopbillException.new('-99999999', '
|
349
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
350
350
|
end
|
351
351
|
|
352
352
|
httpget("/Cashbill/#{mgtKey}?TG=POPUP", corpNum, userID)['url']
|
@@ -357,7 +357,7 @@ class CashbillService < 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
|
httpget("/Cashbill/#{mgtKey}?TG=PRINT", corpNum, userID)['url']
|
@@ -368,7 +368,7 @@ class CashbillService < BaseService
|
|
368
368
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
369
369
|
end
|
370
370
|
if mgtKey.to_s == ''
|
371
|
-
raise PopbillException.new('-99999999', '
|
371
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
372
372
|
end
|
373
373
|
|
374
374
|
httpget("/Cashbill/#{mgtKey}?TG=MAIL", corpNum, userID)['url']
|
@@ -380,7 +380,7 @@ class CashbillService < BaseService
|
|
380
380
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
381
381
|
end
|
382
382
|
if mgtKey.to_s == ''
|
383
|
-
raise PopbillException.new('-99999999', '
|
383
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
384
384
|
end
|
385
385
|
|
386
386
|
httpget("/Cashbill/#{mgtKey}?TG=EPRINT", corpNum, userID)['url']
|
@@ -392,7 +392,7 @@ class CashbillService < BaseService
|
|
392
392
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
393
393
|
end
|
394
394
|
unless mgtKeyList.any?
|
395
|
-
raise PopbillException.new('-99999999', '
|
395
|
+
raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
|
396
396
|
end
|
397
397
|
|
398
398
|
postData = mgtKeyList.to_json
|
@@ -425,4 +425,17 @@ class CashbillService < BaseService
|
|
425
425
|
httppost("/Cashbill/EmailSendConfig?EmailType=#{emailType}&SendYN=#{sendYN}", corpNum, userID)
|
426
426
|
end
|
427
427
|
|
428
|
+
def assignMgtKey(corpNum, itemKey, mgtKey, userID = '')
|
429
|
+
if corpNum.length != 10
|
430
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
431
|
+
end
|
432
|
+
if itemKey.to_s == ''
|
433
|
+
raise PopbillException.new('-99999999', '아이템키가 입력되지 않았습니다.')
|
434
|
+
end
|
435
|
+
|
436
|
+
String postDate = "MgtKey=" + mgtKey
|
437
|
+
|
438
|
+
httppost("/Cashbill/#{itemKey}", corpNum, postDate, "", userID, "application/x-www-form-urlencoded; charset=utf-8")
|
439
|
+
end
|
440
|
+
|
428
441
|
end # end of CashbillService
|
data/lib/popbill/statement.rb
CHANGED
@@ -44,7 +44,7 @@ class StatementService < BaseService
|
|
44
44
|
raise PopbillException.new(-99999999, "사업자등록번호가 올바르지 않습니다.")
|
45
45
|
end
|
46
46
|
if mgtKey.to_s == ''
|
47
|
-
raise PopbillException.new(-99999999, "현금영수증
|
47
|
+
raise PopbillException.new(-99999999, "현금영수증 문서번호가 입력되지 않았습니다.")
|
48
48
|
end
|
49
49
|
|
50
50
|
begin
|
@@ -184,7 +184,7 @@ class StatementService < BaseService
|
|
184
184
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
185
185
|
end
|
186
186
|
if mgtKey.to_s == ''
|
187
|
-
raise PopbillException.new('-99999999', '
|
187
|
+
raise PopbillException.new('-99999999', '문서번호 입력되지 않았습니다.')
|
188
188
|
end
|
189
189
|
|
190
190
|
httpget("/Statement/#{itemCode}/#{mgtKey}", corpNum, userID)
|
@@ -196,7 +196,7 @@ class StatementService < BaseService
|
|
196
196
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
197
197
|
end
|
198
198
|
unless mgtKeyList.any?
|
199
|
-
raise PopbillException.new('-99999999', '
|
199
|
+
raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
|
200
200
|
end
|
201
201
|
|
202
202
|
postData = mgtKeyList.to_json
|
@@ -210,7 +210,7 @@ class StatementService < BaseService
|
|
210
210
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
211
211
|
end
|
212
212
|
if mgtKey.to_s == ''
|
213
|
-
raise PopbillException.new('-99999999', '
|
213
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
214
214
|
end
|
215
215
|
|
216
216
|
httpget("/Statement/#{itemCode}/#{mgtKey}?Detail", corpNum, userID)
|
@@ -221,7 +221,7 @@ class StatementService < BaseService
|
|
221
221
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
222
222
|
end
|
223
223
|
if mgtKey.to_s == ''
|
224
|
-
raise PopbillException.new('-99999999', '
|
224
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
225
225
|
end
|
226
226
|
if receiverMail.to_s == ''
|
227
227
|
raise PopbillException.new('-99999999', '수신자 메일주소가 올바르지 않습니다.')
|
@@ -240,7 +240,7 @@ class StatementService < BaseService
|
|
240
240
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
241
241
|
end
|
242
242
|
if mgtKey.to_s == ''
|
243
|
-
raise PopbillException.new('-99999999', '
|
243
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
244
244
|
end
|
245
245
|
|
246
246
|
if senderNum.to_s == ''
|
@@ -271,7 +271,7 @@ class StatementService < BaseService
|
|
271
271
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
272
272
|
end
|
273
273
|
if mgtKey.to_s == ''
|
274
|
-
raise PopbillException.new('-99999999', '
|
274
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
275
275
|
end
|
276
276
|
|
277
277
|
if senderNum.to_s == ''
|
@@ -295,7 +295,7 @@ class StatementService < BaseService
|
|
295
295
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
296
296
|
end
|
297
297
|
if mgtKey.to_s == ''
|
298
|
-
raise PopbillException.new('-99999999', '
|
298
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
299
299
|
end
|
300
300
|
|
301
301
|
httpget("/Statement/#{itemCode}/#{mgtKey}/Logs", corpNum, userID)
|
@@ -306,7 +306,7 @@ class StatementService < BaseService
|
|
306
306
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
307
307
|
end
|
308
308
|
if mgtKey.to_s == ''
|
309
|
-
raise PopbillException.new('-99999999', '
|
309
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
310
310
|
end
|
311
311
|
|
312
312
|
httppostfiles("/Statement/#{itemCode}/#{mgtKey}/Files", corpNum, '', [filePath], userID)
|
@@ -317,7 +317,7 @@ class StatementService < BaseService
|
|
317
317
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
318
318
|
end
|
319
319
|
if mgtKey.to_s == ''
|
320
|
-
raise PopbillException.new('-99999999', '
|
320
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
321
321
|
end
|
322
322
|
|
323
323
|
httpget("/Statement/#{itemCode}/#{mgtKey}/Files", corpNum)
|
@@ -329,7 +329,7 @@ class StatementService < BaseService
|
|
329
329
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
330
330
|
end
|
331
331
|
if mgtKey.to_s == ''
|
332
|
-
raise PopbillException.new('-99999999', '
|
332
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
333
333
|
end
|
334
334
|
if fileID.to_s == ''
|
335
335
|
raise PopbillException.new('-99999999', '파일아이디가 입력되지 않았습니다.')
|
@@ -343,7 +343,7 @@ class StatementService < BaseService
|
|
343
343
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
344
344
|
end
|
345
345
|
if mgtKey.to_s == ''
|
346
|
-
raise PopbillException.new('-99999999', '
|
346
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
347
347
|
end
|
348
348
|
|
349
349
|
httpget("/Statement/#{itemCode}/#{mgtKey}?TG=POPUP", corpNum, userID)['url']
|
@@ -355,18 +355,29 @@ class StatementService < BaseService
|
|
355
355
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
356
356
|
end
|
357
357
|
if mgtKey.to_s == ''
|
358
|
-
raise PopbillException.new('-99999999', '
|
358
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
359
359
|
end
|
360
360
|
|
361
361
|
httpget("/Statement/#{itemCode}/#{mgtKey}?TG=PRINT", corpNum, userID)['url']
|
362
362
|
end
|
363
363
|
|
364
|
+
def getPDFURL(corpNum, itemCode, mgtKey, userID = '')
|
365
|
+
if corpNum.length != 10
|
366
|
+
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
367
|
+
end
|
368
|
+
if mgtKey.to_s == ''
|
369
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
370
|
+
end
|
371
|
+
|
372
|
+
httpget("/Statement/#{itemCode}/#{mgtKey}?TG=PDF", corpNum, userID)['url']
|
373
|
+
end
|
374
|
+
|
364
375
|
def getEPrintURL(corpNum, itemCode, mgtKey, userID = '')
|
365
376
|
if corpNum.length != 10
|
366
377
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
367
378
|
end
|
368
379
|
if mgtKey.to_s == ''
|
369
|
-
raise PopbillException.new('-99999999', '
|
380
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
370
381
|
end
|
371
382
|
|
372
383
|
httpget("/Statement/#{itemCode}/#{mgtKey}?TG=EPRINT", corpNum, userID)['url']
|
@@ -377,7 +388,7 @@ class StatementService < BaseService
|
|
377
388
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
378
389
|
end
|
379
390
|
if mgtKey.to_s == ''
|
380
|
-
raise PopbillException.new('-99999999', '
|
391
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
381
392
|
end
|
382
393
|
|
383
394
|
httpget("/Statement/#{itemCode}/#{mgtKey}?TG=MAIL", corpNum, userID)['url']
|
@@ -389,7 +400,7 @@ class StatementService < BaseService
|
|
389
400
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
390
401
|
end
|
391
402
|
unless mgtKeyList.any?
|
392
|
-
raise PopbillException.new('-99999999', '
|
403
|
+
raise PopbillException.new('-99999999', '문서번호 배열이 올바르지 않습니다.')
|
393
404
|
end
|
394
405
|
|
395
406
|
postData = mgtKeyList.to_json
|
@@ -402,7 +413,7 @@ class StatementService < BaseService
|
|
402
413
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
403
414
|
end
|
404
415
|
if mgtKey.to_s == ''
|
405
|
-
raise PopbillException.new('-99999999', '
|
416
|
+
raise PopbillException.new('-99999999', '문서번호가 입력되지 않았습니다.')
|
406
417
|
end
|
407
418
|
if itemCode.to_s == ''
|
408
419
|
raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
|
@@ -411,7 +422,7 @@ class StatementService < BaseService
|
|
411
422
|
raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
|
412
423
|
end
|
413
424
|
if subMgtKey.to_s == ''
|
414
|
-
raise PopbillException.new('-99999999', '전자명세서
|
425
|
+
raise PopbillException.new('-99999999', '전자명세서 문서번호가 입력되지 않았습니다.')
|
415
426
|
end
|
416
427
|
|
417
428
|
postData = {}
|
@@ -427,7 +438,7 @@ class StatementService < BaseService
|
|
427
438
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
428
439
|
end
|
429
440
|
if mgtKey.to_s == ''
|
430
|
-
raise PopbillException.new('-99999999', '
|
441
|
+
raise PopbillException.new('-99999999', '문서번호가 입력되지 않았습니다.')
|
431
442
|
end
|
432
443
|
if itemCode.to_s == ''
|
433
444
|
raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
|
@@ -436,7 +447,7 @@ class StatementService < BaseService
|
|
436
447
|
raise PopbillException.new('-99999999', '전자명세서 종류코드가 입력되지 않았습니다.')
|
437
448
|
end
|
438
449
|
if subMgtKey.to_s == ''
|
439
|
-
raise PopbillException.new('-99999999', '전자명세서
|
450
|
+
raise PopbillException.new('-99999999', '전자명세서 문서번호가 입력되지 않았습니다.')
|
440
451
|
end
|
441
452
|
|
442
453
|
postData = {}
|
data/lib/popbill/taxinvoice.rb
CHANGED
@@ -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)
|
@@ -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)
|
@@ -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 getPDFURL(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=PDF", corpNum, userID)['url']
|
544
|
+
end
|
545
|
+
|
535
546
|
def getViewURL(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=VIEW", 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=EPRINT", corpNum, userID)['url']
|
@@ -559,7 +570,7 @@ class TaxinvoiceService < BaseService
|
|
559
570
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
560
571
|
end
|
561
572
|
if mgtKey.to_s == ''
|
562
|
-
raise PopbillException.new('-99999999', '
|
573
|
+
raise PopbillException.new('-99999999', '문서번호가 올바르지 않습니다.')
|
563
574
|
end
|
564
575
|
|
565
576
|
httpget("/Taxinvoice/#{mgtKeyType}/#{mgtKey}?TG=MAIL", corpNum, userID)['url']
|
@@ -579,7 +590,8 @@ class TaxinvoiceService < BaseService
|
|
579
590
|
|
580
591
|
|
581
592
|
def search(corpNum, mgtKeyType, dType, sDate, eDate, state, type, taxType, lateOnly,
|
582
|
-
taxRegIDYN, taxRegIDType, taxRegID, page, perPage, order, queryString, userID = '', interOPYN = '', issueType = []
|
593
|
+
taxRegIDYN, taxRegIDType, taxRegID, page, perPage, order, queryString, userID = '', interOPYN = '', issueType = [],
|
594
|
+
regType = [], closeDownState = [], mgtKey = '')
|
583
595
|
if corpNum.length != 10
|
584
596
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
585
597
|
end
|
@@ -588,11 +600,11 @@ class TaxinvoiceService < BaseService
|
|
588
600
|
end
|
589
601
|
|
590
602
|
if sDate.to_s == ''
|
591
|
-
raise PopbillException.new('-99999999', '시작일자가 입력되지 않았습니다.')
|
603
|
+
raise PopbillException.new('-99999999', '검색기간 시작일자가 입력되지 않았습니다.')
|
592
604
|
end
|
593
605
|
|
594
606
|
if eDate.to_s == ''
|
595
|
-
raise PopbillException.new('-99999999', '종료일자가 입력되지 않았습니다.')
|
607
|
+
raise PopbillException.new('-99999999', '검색기간 종료일자가 입력되지 않았습니다.')
|
596
608
|
end
|
597
609
|
|
598
610
|
uri = "/Taxinvoice/#{mgtKeyType}?DType=#{dType}&SDate=#{sDate}&EDate=#{eDate}"
|
@@ -610,6 +622,14 @@ class TaxinvoiceService < BaseService
|
|
610
622
|
uri += "&IssueType=" + issueType.join(',')
|
611
623
|
end
|
612
624
|
|
625
|
+
if regType.length > 0
|
626
|
+
uri += "&RegType=" + regType.join(',')
|
627
|
+
end
|
628
|
+
|
629
|
+
if closeDownState.length > 0
|
630
|
+
uri += "&CloseDownState=" + closeDownState.join(',')
|
631
|
+
end
|
632
|
+
|
613
633
|
if lateOnly.to_s != ''
|
614
634
|
uri += "&LateOnly=" + lateOnly
|
615
635
|
end
|
@@ -622,6 +642,10 @@ class TaxinvoiceService < BaseService
|
|
622
642
|
uri += "&QString=" + queryString
|
623
643
|
end
|
624
644
|
|
645
|
+
if mgtKey.to_s != ''
|
646
|
+
uri += "&MgtKey=" + mgtKey
|
647
|
+
end
|
648
|
+
|
625
649
|
httpget(URI.escape(uri), corpNum, userID)
|
626
650
|
|
627
651
|
end
|
@@ -676,7 +700,7 @@ class TaxinvoiceService < BaseService
|
|
676
700
|
raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
|
677
701
|
end
|
678
702
|
if itemKey.to_s == ''
|
679
|
-
raise PopbillException.new('-99999999', '
|
703
|
+
raise PopbillException.new('-99999999', '아이템키가 입력되지 않았습니다.')
|
680
704
|
end
|
681
705
|
|
682
706
|
String postDate = "MgtKey=" + mgtKey
|
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.17.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: 2020-07-
|
11
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: linkhub
|