Skip to content

Commit c5a4d5d

Browse files
Manuel HUEZManuel HUEZ
authored andcommitted
Improve expand and client setter
1 parent fd23914 commit c5a4d5d

21 files changed

Lines changed: 127 additions & 121 deletions

processout/activity.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Activity:
13+
class Activity(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -47,12 +47,12 @@ def project(self, val):
4747
"""Set project
4848
Keyword argument:
4949
val -- New project value"""
50-
if isinstance(val, Project):
51-
self._project = val
52-
else:
50+
if isinstance(val, dict):
5351
obj = processout.Project(self._client)
5452
obj.fillWithData(val)
5553
self._project = obj
54+
else:
55+
self._project = val
5656
return self
5757

5858
@property

processout/authorizationrequest.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class AuthorizationRequest:
13+
class AuthorizationRequest(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -54,12 +54,12 @@ def project(self, val):
5454
"""Set project
5555
Keyword argument:
5656
val -- New project value"""
57-
if isinstance(val, Project):
58-
self._project = val
59-
else:
57+
if isinstance(val, dict):
6058
obj = processout.Project(self._client)
6159
obj.fillWithData(val)
6260
self._project = obj
61+
else:
62+
self._project = val
6363
return self
6464

6565
@property
@@ -72,12 +72,12 @@ def customer(self, val):
7272
"""Set customer
7373
Keyword argument:
7474
val -- New customer value"""
75-
if isinstance(val, Customer):
76-
self._customer = val
77-
else:
75+
if isinstance(val, dict):
7876
obj = processout.Customer(self._client)
7977
obj.fillWithData(val)
8078
self._customer = obj
79+
else:
80+
self._customer = val
8181
return self
8282

8383
@property
@@ -90,12 +90,12 @@ def token(self, val):
9090
"""Set token
9191
Keyword argument:
9292
val -- New token value"""
93-
if isinstance(val, Token):
94-
self._token = val
95-
else:
93+
if isinstance(val, dict):
9694
obj = processout.Token(self._client)
9795
obj.fillWithData(val)
9896
self._token = obj
97+
else:
98+
self._token = val
9999
return self
100100

101101
@property

processout/card.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Card:
13+
class Card(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -54,12 +54,12 @@ def project(self, val):
5454
"""Set project
5555
Keyword argument:
5656
val -- New project value"""
57-
if isinstance(val, Project):
58-
self._project = val
59-
else:
57+
if isinstance(val, dict):
6058
obj = processout.Project(self._client)
6159
obj.fillWithData(val)
6260
self._project = obj
61+
else:
62+
self._project = val
6363
return self
6464

6565
@property

processout/coupon.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Coupon:
13+
class Coupon(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -54,12 +54,12 @@ def project(self, val):
5454
"""Set project
5555
Keyword argument:
5656
val -- New project value"""
57-
if isinstance(val, Project):
58-
self._project = val
59-
else:
57+
if isinstance(val, dict):
6058
obj = processout.Project(self._client)
6159
obj.fillWithData(val)
6260
self._project = obj
61+
else:
62+
self._project = val
6363
return self
6464

6565
@property

processout/customer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Customer:
13+
class Customer(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -58,12 +58,12 @@ def project(self, val):
5858
"""Set project
5959
Keyword argument:
6060
val -- New project value"""
61-
if isinstance(val, Project):
62-
self._project = val
63-
else:
61+
if isinstance(val, dict):
6462
obj = processout.Project(self._client)
6563
obj.fillWithData(val)
6664
self._project = obj
65+
else:
66+
self._project = val
6767
return self
6868

6969
@property

processout/customeraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class CustomerAction:
13+
class CustomerAction(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

processout/discount.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Discount:
13+
class Discount(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -50,12 +50,12 @@ def project(self, val):
5050
"""Set project
5151
Keyword argument:
5252
val -- New project value"""
53-
if isinstance(val, Project):
54-
self._project = val
55-
else:
53+
if isinstance(val, dict):
5654
obj = processout.Project(self._client)
5755
obj.fillWithData(val)
5856
self._project = obj
57+
else:
58+
self._project = val
5959
return self
6060

6161
@property
@@ -68,12 +68,12 @@ def subscription(self, val):
6868
"""Set subscription
6969
Keyword argument:
7070
val -- New subscription value"""
71-
if isinstance(val, Subscription):
72-
self._subscription = val
73-
else:
71+
if isinstance(val, dict):
7472
obj = processout.Subscription(self._client)
7573
obj.fillWithData(val)
7674
self._subscription = obj
75+
else:
76+
self._subscription = val
7777
return self
7878

7979
@property
@@ -86,12 +86,12 @@ def coupon(self, val):
8686
"""Set coupon
8787
Keyword argument:
8888
val -- New coupon value"""
89-
if isinstance(val, Coupon):
90-
self._coupon = val
91-
else:
89+
if isinstance(val, dict):
9290
obj = processout.Coupon(self._client)
9391
obj.fillWithData(val)
9492
self._coupon = obj
93+
else:
94+
self._coupon = val
9595
return self
9696

9797
@property

processout/event.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Event:
13+
class Event(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -47,12 +47,12 @@ def project(self, val):
4747
"""Set project
4848
Keyword argument:
4949
val -- New project value"""
50-
if isinstance(val, Project):
51-
self._project = val
52-
else:
50+
if isinstance(val, dict):
5351
obj = processout.Project(self._client)
5452
obj.fillWithData(val)
5553
self._project = obj
54+
else:
55+
self._project = val
5656
return self
5757

5858
@property

processout/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class Gateway:
13+
class Gateway(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

processout/gatewayconfiguration.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# The content of this file was automatically generated
1212

13-
class GatewayConfiguration:
13+
class GatewayConfiguration(object):
1414
def __init__(self, client, prefill = None):
1515
self._client = client
1616

@@ -46,12 +46,12 @@ def project(self, val):
4646
"""Set project
4747
Keyword argument:
4848
val -- New project value"""
49-
if isinstance(val, Project):
50-
self._project = val
51-
else:
49+
if isinstance(val, dict):
5250
obj = processout.Project(self._client)
5351
obj.fillWithData(val)
5452
self._project = obj
53+
else:
54+
self._project = val
5555
return self
5656

5757
@property
@@ -64,12 +64,12 @@ def gateway(self, val):
6464
"""Set gateway
6565
Keyword argument:
6666
val -- New gateway value"""
67-
if isinstance(val, Gateway):
68-
self._gateway = val
69-
else:
67+
if isinstance(val, dict):
7068
obj = processout.Gateway(self._client)
7169
obj.fillWithData(val)
7270
self._gateway = obj
71+
else:
72+
self._gateway = val
7373
return self
7474

7575
@property

0 commit comments

Comments
 (0)