popbill 1.13.0 → 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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/popbill/easyFinBank.rb +119 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 960deefd8b6db2fe8995ec99c613d6aa1d93960f
4
- data.tar.gz: b28c255fb2af6a8256e8fc5398afbe704976030e
3
+ metadata.gz: 2ca148d13fb2d281b900bd9a8d748b66afeca3e1
4
+ data.tar.gz: 05ca163e456d7fca828cc171e367aff397fbb973
5
5
  SHA512:
6
- metadata.gz: a1e0251826603f221e180c6b863509b24b1860662e7ba62231aef3ef49e6d381ab324312c45b35da216a4316e2290281c6dd289a119f46a4a29ee4166130d933
7
- data.tar.gz: 9387c524da20fca93e16a741701c02e7171ab94bf2f3589b848c1e6068330a6a23696276dfecb50b830c4ce7a072ba5e842c30c98e3126addae842cedcd73a62
6
+ metadata.gz: 7d3dbae399376a84ae4734b592580d3fdd1a5cb884234891332453d8f85404e1e03f875a3f9ebdb8f7698b9609ce71fb0e0bcd8825e1ed45973dcb1eb5c4215f
7
+ data.tar.gz: ecb2fc1c3d55abb7d44d2500fbe6f629958fa4539c670a6a6c455f5ff6520fbca59609c52eefe4d562804334dd57dc612b60a864f1c92c4e6553a90f04fd3975
@@ -13,6 +13,125 @@ class EasyFinBankService < BaseService
13
13
  private :new
14
14
  end
15
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
+
16
135
  def getChargeInfo(corpNum, userID = "")
17
136
  if corpNum.length != 10
18
137
  raise PopbillException.new('-99999999', '사업자등록번호가 올바르지 않습니다.')
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.13.0
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: 2020-01-07 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