Skip to content

Commit 947e011

Browse files
feat: add transaction intent to invoice
1 parent 01774bb commit 947e011

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

processout/invoice.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def __init__(self, client, prefill=None):
5656
self._incremental = None
5757
self._tax = None
5858
self._payment_type = None
59+
self._initiation_type = None
60+
self._payment_intent = None
5961
if prefill is not None:
6062
self.fill_with_data(prefill)
6163

@@ -681,6 +683,32 @@ def payment_type(self, val):
681683
self._payment_type = val
682684
return self
683685

686+
@property
687+
def initiation_type(self):
688+
"""Get initiation_type"""
689+
return self._initiation_type
690+
691+
@initiation_type.setter
692+
def initiation_type(self, val):
693+
"""Set initiation_type
694+
Keyword argument:
695+
val -- New initiation_type value"""
696+
self._initiation_type = val
697+
return self
698+
699+
@property
700+
def payment_intent(self):
701+
"""Get payment_intent"""
702+
return self._payment_intent
703+
704+
@payment_intent.setter
705+
def payment_intent(self, val):
706+
"""Set payment_intent
707+
Keyword argument:
708+
val -- New payment_intent value"""
709+
self._payment_intent = val
710+
return self
711+
684712
def fill_with_data(self, data):
685713
"""Fill the current object with the new values pulled from data
686714
Keyword argument:
@@ -765,6 +793,10 @@ def fill_with_data(self, data):
765793
self.tax = data["tax"]
766794
if "payment_type" in data.keys():
767795
self.payment_type = data["payment_type"]
796+
if "initiation_type" in data.keys():
797+
self.initiation_type = data["initiation_type"]
798+
if "payment_intent" in data.keys():
799+
self.payment_intent = data["payment_intent"]
768800

769801
return self
770802

@@ -810,6 +842,8 @@ def to_json(self):
810842
"incremental": self.incremental,
811843
"tax": self.tax,
812844
"payment_type": self.payment_type,
845+
"initiation_type": self.initiation_type,
846+
"payment_intent": self.payment_intent,
813847
}
814848

815849
def increment_authorization(self, amount, options={}):
@@ -1061,6 +1095,8 @@ def create(self, options={}):
10611095
'challenge_indicator': self.challenge_indicator,
10621096
'gateway_data': self.gateway_data,
10631097
'merchant_initiator_type': self.merchant_initiator_type,
1098+
'initiation_type': self.initiation_type,
1099+
'payment_intent': self.payment_intent,
10641100
'statement_descriptor': self.statement_descriptor,
10651101
'statement_descriptor_phone': self.statement_descriptor_phone,
10661102
'statement_descriptor_city': self.statement_descriptor_city,

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.24.0',
6+
version = '6.25.0',
77
description = 'ProcessOut API bindings.',
88
author = 'ProcessOut',
99
author_email = '[email protected]',
1010
url = 'https://github.com/processout/processout-python',
11-
download_url = 'https://github.com/processout/processout-python/tarball/6.24.0',
11+
download_url = 'https://github.com/processout/processout-python/tarball/6.25.0',
1212
keywords = ['ProcessOut', 'api', 'bindings'],
1313
classifiers = [],
1414
)

0 commit comments

Comments
 (0)