Skip to content

Commit 76c0536

Browse files
authored
Merge pull request #1 from vladislavvasyukov/new_payment_types
new payment types
2 parents b078f83 + ab960d7 commit 76c0536

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

capitalist/models.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,75 @@ def get_codename(self):
190190
def get_payment_args(self):
191191
args = [self.number, self.amount, self.currency, self.internal_id, self.destination]
192192
return [arg for arg in args if arg is not None]
193+
194+
195+
class MegaFonPayment(BasePayment):
196+
__slots__ = ['number', 'amount', 'currency', 'internal_id', 'destination']
197+
198+
def __init__(self, number, amount, currency, internal_id, destination):
199+
self.number = number
200+
self.amount = amount
201+
self.currency = currency
202+
self.internal_id = internal_id
203+
self.destination = destination
204+
205+
def get_codename(self):
206+
return 'MEGAFON'
207+
208+
def get_payment_args(self):
209+
args = [self.number, self.amount, self.currency, self.internal_id, self.destination]
210+
return [arg for arg in args if arg is not None]
211+
212+
213+
class BeelinePayment(BasePayment):
214+
__slots__ = ['number', 'amount', 'currency', 'internal_id', 'destination']
215+
216+
def __init__(self, number, amount, currency, internal_id, destination):
217+
self.number = number
218+
self.amount = amount
219+
self.currency = currency
220+
self.internal_id = internal_id
221+
self.destination = destination
222+
223+
def get_codename(self):
224+
return 'BEELINE'
225+
226+
def get_payment_args(self):
227+
args = [self.number, self.amount, self.currency, self.internal_id, self.destination]
228+
return [arg for arg in args if arg is not None]
229+
230+
231+
class MtsPayment(BasePayment):
232+
__slots__ = ['number', 'amount', 'currency', 'internal_id', 'destination']
233+
234+
def __init__(self, number, amount, currency, internal_id, destination):
235+
self.number = number
236+
self.amount = amount
237+
self.currency = currency
238+
self.internal_id = internal_id
239+
self.destination = destination
240+
241+
def get_codename(self):
242+
return 'MTS'
243+
244+
def get_payment_args(self):
245+
args = [self.number, self.amount, self.currency, self.internal_id, self.destination]
246+
return [arg for arg in args if arg is not None]
247+
248+
249+
class Tele2Payment(BasePayment):
250+
__slots__ = ['number', 'amount', 'currency', 'internal_id', 'destination']
251+
252+
def __init__(self, number, amount, currency, internal_id, destination):
253+
self.number = number
254+
self.amount = amount
255+
self.currency = currency
256+
self.internal_id = internal_id
257+
self.destination = destination
258+
259+
def get_codename(self):
260+
return 'TELE2'
261+
262+
def get_payment_args(self):
263+
args = [self.number, self.amount, self.currency, self.internal_id, self.destination]
264+
return [arg for arg in args if arg is not None]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# For a discussion on single-sourcing the version across setup.py and the
4444
# project code, see
4545
# https://packaging.python.org/en/latest/single_source_version.html
46-
version='1.2.1', # Required
46+
version='1.2.2', # Required
4747

4848
# This is a one-line description or tagline of what your project does. This
4949
# corresponds to the "Summary" metadata field:

0 commit comments

Comments
 (0)