From 0d23ce5e6847fd8126de1c01f39d9d453df2b961 Mon Sep 17 00:00:00 2001 From: roshan-gorasia-cko <66958854+roshan-gorasia-cko@users.noreply.github.com> Date: Thu, 25 Jan 2024 13:54:51 +0000 Subject: [PATCH] feat: Add skip_gateway_rules and eci (#13) Co-authored-by: ProcessOut Fountain --- .gitignore | 1 + processout/invoicerisk.py | 17 +++++++++++++++++ processout/transaction.py | 17 +++++++++++++++++ setup.py | 4 ++-- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cc2ad42..2faaf5e 100644 --- a/.gitignore +++ b/.gitignore @@ -98,4 +98,5 @@ target/ .env deploy.sh +publish.sh *.pyc \ No newline at end of file diff --git a/processout/invoicerisk.py b/processout/invoicerisk.py index bb73638..df1daad 100755 --- a/processout/invoicerisk.py +++ b/processout/invoicerisk.py @@ -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) @@ -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: @@ -55,6 +69,8 @@ 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 @@ -62,4 +78,5 @@ def to_json(self): return { "score": self.score, "is_legit": self.is_legit, + "skip_gateway_rules": self.skip_gateway_rules, } diff --git a/processout/transaction.py b/processout/transaction.py index a1a693a..b187001 100755 --- a/processout/transaction.py +++ b/processout/transaction.py @@ -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: @@ -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""" @@ -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(): @@ -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, } diff --git a/setup.py b/setup.py index 18a82b1..6f56146 100644 --- a/setup.py +++ b/setup.py @@ -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 = 'hi@processout.com', 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 = [], )