Skip to content

Commit

Permalink
feat: Add skip_gateway_rules and eci (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: ProcessOut Fountain <[email protected]>
  • Loading branch information
roshan-gorasia-cko and processout-machine authored Jan 25, 2024
1 parent 76ffafb commit 0d23ce5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,5 @@ target/
.env

deploy.sh
publish.sh
*.pyc
17 changes: 17 additions & 0 deletions processout/invoicerisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def __init__(self, client, prefill=None):

self._score = None
self._is_legit = None
self._skip_gateway_rules = None
if prefill is not None:
self.fill_with_data(prefill)

Expand Down Expand Up @@ -47,6 +48,19 @@ def is_legit(self, val):
self._is_legit = val
return self

@property
def skip_gateway_rules(self):
"""Get skip_gateway_rules"""
return self._skip_gateway_rules

@skip_gateway_rules.setter
def skip_gateway_rules(self, val):
"""Set skip_gateway_rules
Keyword argument:
val -- New skip_gateway_rules value"""
self._skip_gateway_rules = val
return self

def fill_with_data(self, data):
"""Fill the current object with the new values pulled from data
Keyword argument:
Expand All @@ -55,11 +69,14 @@ def fill_with_data(self, data):
self.score = data["score"]
if "is_legit" in data.keys():
self.is_legit = data["is_legit"]
if "skip_gateway_rules" in data.keys():
self.skip_gateway_rules = data["skip_gateway_rules"]

return self

def to_json(self):
return {
"score": self.score,
"is_legit": self.is_legit,
"skip_gateway_rules": self.skip_gateway_rules,
}
17 changes: 17 additions & 0 deletions processout/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(self, client, prefill=None):
self._initial_scheme_transaction_id = None
self._scheme_id = None
self._payment_type = None
self._eci = None
self._native_apm = None
self._external_details = None
if prefill is not None:
Expand Down Expand Up @@ -981,6 +982,19 @@ def payment_type(self, val):
self._payment_type = val
return self

@property
def eci(self):
"""Get eci"""
return self._eci

@eci.setter
def eci(self, val):
"""Set eci
Keyword argument:
val -- New eci value"""
self._eci = val
return self

@property
def native_apm(self):
"""Get native_apm"""
Expand Down Expand Up @@ -1143,6 +1157,8 @@ def fill_with_data(self, data):
self.scheme_id = data["scheme_id"]
if "payment_type" in data.keys():
self.payment_type = data["payment_type"]
if "eci" in data.keys():
self.eci = data["eci"]
if "native_apm" in data.keys():
self.native_apm = data["native_apm"]
if "external_details" in data.keys():
Expand Down Expand Up @@ -1213,6 +1229,7 @@ def to_json(self):
"initial_scheme_transaction_id": self.initial_scheme_transaction_id,
"scheme_id": self.scheme_id,
"payment_type": self.payment_type,
"eci": self.eci,
"native_apm": self.native_apm,
"external_details": self.external_details,
}
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
setup(
name = 'processout',
packages = ['processout', 'processout.errors', 'processout.networking'],
version = '6.30.0',
version = '6.31.0',
description = 'ProcessOut API bindings.',
author = 'ProcessOut',
author_email = '[email protected]',
url = 'https://github.com/processout/processout-python',
download_url = 'https://github.com/processout/processout-python/tarball/6.30.0',
download_url = 'https://github.com/processout/processout-python/tarball/6.31.0',
keywords = ['ProcessOut', 'api', 'bindings'],
classifiers = [],
)

0 comments on commit 0d23ce5

Please sign in to comment.