Skip to content

Commit bc7c4d5

Browse files
Merge pull request #17 from processout/feat/add-auto-capture-at-control-via-backend
feat: add auto_capture_at field within the invoice object
2 parents 2462860 + 4d4b454 commit bc7c4d5

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

processout/invoice.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(self, client, prefill=None):
6363
self._billing = None
6464
self._unsupported_feature_bypass = None
6565
self._verification = None
66+
self._auto_capture_at = None
6667
if prefill is not None:
6768
self.fill_with_data(prefill)
6869

@@ -806,6 +807,19 @@ def verification(self, val):
806807
self._verification = val
807808
return self
808809

810+
@property
811+
def auto_capture_at(self):
812+
"""Get auto_capture_at"""
813+
return self._auto_capture_at
814+
815+
@auto_capture_at.setter
816+
def auto_capture_at(self, val):
817+
"""Set auto_capture_at
818+
Keyword argument:
819+
val -- New auto_capture_at value"""
820+
self._auto_capture_at = val
821+
return self
822+
809823
def fill_with_data(self, data):
810824
"""Fill the current object with the new values pulled from data
811825
Keyword argument:
@@ -904,6 +918,8 @@ def fill_with_data(self, data):
904918
self.unsupported_feature_bypass = data["unsupported_feature_bypass"]
905919
if "verification" in data.keys():
906920
self.verification = data["verification"]
921+
if "auto_capture_at" in data.keys():
922+
self.auto_capture_at = data["auto_capture_at"]
907923

908924
return self
909925

@@ -956,6 +972,7 @@ def to_json(self):
956972
"billing": self.billing,
957973
"unsupported_feature_bypass": self.unsupported_feature_bypass,
958974
"verification": self.verification,
975+
"auto_capture_at": self.auto_capture_at,
959976
}
960977

961978
def increment_authorization(self, amount, options={}):
@@ -1312,7 +1329,8 @@ def create(self, options={}):
13121329
'payment_type': self.payment_type,
13131330
'billing': self.billing,
13141331
'unsupported_feature_bypass': self.unsupported_feature_bypass,
1315-
'verification': self.verification
1332+
'verification': self.verification,
1333+
'auto_capture_at': self.auto_capture_at
13161334
}
13171335

13181336
response = Response(request.post(path, data, options))

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
setup(
44
name = 'processout',
55
packages = ['processout', 'processout.errors', 'processout.networking'],
6-
version = '6.34.0',
6+
version = '6.35.0',
77
description = 'ProcessOut API bindings.',
88
author = 'ProcessOut',
99
author_email = 'hi@processout.com',
1010
url = 'https://github.com/processout/processout-python',
11-
download_url = 'https://github.com/processout/processout-python/tarball/6.34.0',
11+
download_url = 'https://github.com/processout/processout-python/tarball/6.35.0',
1212
keywords = ['ProcessOut', 'api', 'bindings'],
1313
classifiers = [],
1414
)

0 commit comments

Comments
 (0)