django-barobill 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {django_barobill-0.1.1/django_barobill.egg-info → django_barobill-0.1.2}/PKG-INFO +1 -1
- django_barobill-0.1.2/django_barobill/migrations/__init__.py +0 -0
- django_barobill-0.1.2/django_barobill/migrations/__pycache__/0001_initial.cpython-312.pyc +0 -0
- django_barobill-0.1.2/django_barobill/migrations/__pycache__/__init__.cpython-312.pyc +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/models.py +37 -4
- {django_barobill-0.1.1 → django_barobill-0.1.2/django_barobill.egg-info}/PKG-INFO +1 -1
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill.egg-info/SOURCES.txt +2 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/setup.py +1 -1
- django_barobill-0.1.1/django_barobill/__init__.py +0 -2
- {django_barobill-0.1.1 → django_barobill-0.1.2}/LICENSE +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/MANIFEST.in +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/README.md +0 -0
- {django_barobill-0.1.1/django_barobill/migrations → django_barobill-0.1.2/django_barobill}/__init__.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/admin.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/apps.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/choices.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/errors.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/migrations/0001_initial.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/parsers.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/tests.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/utils.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill/views.py +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill.egg-info/dependency_links.txt +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill.egg-info/requires.txt +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill.egg-info/top_level.txt +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/setup.cfg +0 -0
- {django_barobill-0.1.1 → django_barobill-0.1.2}/tests/test_app.py +0 -0
File without changes
|
Binary file
|
Binary file
|
@@ -53,8 +53,21 @@ class BankHelper:
|
|
53
53
|
web_pwd: Optional[str] = None,
|
54
54
|
identity_num: Optional[str] = None
|
55
55
|
):
|
56
|
-
|
57
|
-
|
56
|
+
"""
|
57
|
+
신규 계좌를 등록한다.
|
58
|
+
:param alias: 별칭
|
59
|
+
:param collect_cycle: 수거주기
|
60
|
+
:param bank: 은행
|
61
|
+
:param account_type: 법인/개인계좌 여부
|
62
|
+
:param account_no: 계좌번호
|
63
|
+
:param password: 계좌 비밀번호
|
64
|
+
:param usage: (선택)적요
|
65
|
+
:param web_id: (선택)간편조회 아이디
|
66
|
+
:param web_pwd: (선택)간편조회 비밀번호
|
67
|
+
:param identity_num: (선택)간편조회 사업자등록번호 혹은 생년월일
|
68
|
+
:return: 생성된 BankAccount 인스턴스
|
69
|
+
"""
|
70
|
+
result = self.client.service.RegistBankAccount(
|
58
71
|
CERTKEY=self.partner.api_key,
|
59
72
|
CorpNum=self.partner.brn,
|
60
73
|
CollectCycle=collect_cycle,
|
@@ -72,7 +85,7 @@ class BankHelper:
|
|
72
85
|
raise BarobillAPIError(result)
|
73
86
|
account, created = BankAccount.objects.update_or_create(
|
74
87
|
partner=self.partner, account_no=account_no, defaults=dict(
|
75
|
-
collect_cycle=collect_cycle, bank=bank, account_type=account_type, alias=alias, usage=usage,
|
88
|
+
collect_cycle=collect_cycle, bank=bank, account_type=account_type, alias=alias, usage=usage, is_stop=False
|
76
89
|
)
|
77
90
|
)
|
78
91
|
return account
|
@@ -88,11 +101,32 @@ class BankHelper:
|
|
88
101
|
).update(is_stop=True, stop_date=timezone.localdate())
|
89
102
|
|
90
103
|
|
104
|
+
class PartnerManager(models.Manager):
|
105
|
+
def register_partner(self, name, brn, api_key, userid, dev=False):
|
106
|
+
"""
|
107
|
+
신규 파트너를 등록한다.
|
108
|
+
:param name: 파트너사명
|
109
|
+
:param brn: 바로빌에 등록한 파트너 사업자등록번호
|
110
|
+
:param api_key: 바로빌에서 발급한 파트너 api_key
|
111
|
+
:param userid: 바로빌에서 발급한 파트너 Id
|
112
|
+
:param dev: 개발모드 여부
|
113
|
+
:return: Partner
|
114
|
+
"""
|
115
|
+
partner, created = self.get_or_create(
|
116
|
+
brn=brn, userid=userid, defaults=dict(name=name, api_key=api_key, dev=dev)
|
117
|
+
)
|
118
|
+
return partner
|
119
|
+
|
120
|
+
|
91
121
|
class Partner(models.Model):
|
92
122
|
class Meta:
|
93
123
|
verbose_name = '파트너'
|
94
124
|
verbose_name_plural = verbose_name
|
125
|
+
constraints = [
|
126
|
+
models.UniqueConstraint(fields=['brn', 'userid', 'dev'], name='unique_partner_brn_userid'),
|
127
|
+
]
|
95
128
|
|
129
|
+
objects = PartnerManager()
|
96
130
|
name = models.CharField(max_length=255, unique=True, verbose_name='파트너사명')
|
97
131
|
brn = models.CharField(max_length=10, unique=True, verbose_name='사업자등록번호')
|
98
132
|
api_key = models.CharField(max_length=36, verbose_name='인증키')
|
@@ -329,7 +363,6 @@ class BankAccount(models.Model):
|
|
329
363
|
raise BarobillAPIError(result.CurrentPage)
|
330
364
|
return result
|
331
365
|
|
332
|
-
|
333
366
|
def get_monthly_log(
|
334
367
|
self,
|
335
368
|
base_month: str,
|
@@ -20,4 +20,6 @@ django_barobill.egg-info/requires.txt
|
|
20
20
|
django_barobill.egg-info/top_level.txt
|
21
21
|
django_barobill/migrations/0001_initial.py
|
22
22
|
django_barobill/migrations/__init__.py
|
23
|
+
django_barobill/migrations/__pycache__/0001_initial.cpython-312.pyc
|
24
|
+
django_barobill/migrations/__pycache__/__init__.cpython-312.pyc
|
23
25
|
tests/test_app.py
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
long_description=open("README.md").read()
|
3
3
|
setup(
|
4
4
|
name="django-barobill", # 패키지 이름 (PyPI에 등록될 이름)
|
5
|
-
version="0.1.
|
5
|
+
version="0.1.2", # 초기 버전
|
6
6
|
packages=find_packages(exclude=["tests*", "docs*"]), # 'django_barobill' 폴더 포함
|
7
7
|
include_package_data=True, # MANIFEST.in 파일에 포함된 파일도 추가
|
8
8
|
license="MIT License", # 라이선스
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django_barobill-0.1.1 → django_barobill-0.1.2}/django_barobill.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|