Skip to content

Commit

Permalink
Improve expand and client setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel HUEZ authored and Manuel HUEZ committed Nov 18, 2016
1 parent fd23914 commit c5a4d5d
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 121 deletions.
8 changes: 4 additions & 4 deletions processout/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Activity:
class Activity(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -47,12 +47,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
20 changes: 10 additions & 10 deletions processout/authorizationrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class AuthorizationRequest:
class AuthorizationRequest(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -54,12 +54,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand All @@ -72,12 +72,12 @@ def customer(self, val):
"""Set customer
Keyword argument:
val -- New customer value"""
if isinstance(val, Customer):
self._customer = val
else:
if isinstance(val, dict):
obj = processout.Customer(self._client)
obj.fillWithData(val)
self._customer = obj
else:
self._customer = val
return self

@property
Expand All @@ -90,12 +90,12 @@ def token(self, val):
"""Set token
Keyword argument:
val -- New token value"""
if isinstance(val, Token):
self._token = val
else:
if isinstance(val, dict):
obj = processout.Token(self._client)
obj.fillWithData(val)
self._token = obj
else:
self._token = val
return self

@property
Expand Down
8 changes: 4 additions & 4 deletions processout/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Card:
class Card(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -54,12 +54,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
8 changes: 4 additions & 4 deletions processout/coupon.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Coupon:
class Coupon(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -54,12 +54,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
8 changes: 4 additions & 4 deletions processout/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Customer:
class Customer(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -58,12 +58,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
2 changes: 1 addition & 1 deletion processout/customeraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class CustomerAction:
class CustomerAction(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down
20 changes: 10 additions & 10 deletions processout/discount.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Discount:
class Discount(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -50,12 +50,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand All @@ -68,12 +68,12 @@ def subscription(self, val):
"""Set subscription
Keyword argument:
val -- New subscription value"""
if isinstance(val, Subscription):
self._subscription = val
else:
if isinstance(val, dict):
obj = processout.Subscription(self._client)
obj.fillWithData(val)
self._subscription = obj
else:
self._subscription = val
return self

@property
Expand All @@ -86,12 +86,12 @@ def coupon(self, val):
"""Set coupon
Keyword argument:
val -- New coupon value"""
if isinstance(val, Coupon):
self._coupon = val
else:
if isinstance(val, dict):
obj = processout.Coupon(self._client)
obj.fillWithData(val)
self._coupon = obj
else:
self._coupon = val
return self

@property
Expand Down
8 changes: 4 additions & 4 deletions processout/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Event:
class Event(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -47,12 +47,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
2 changes: 1 addition & 1 deletion processout/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Gateway:
class Gateway(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down
14 changes: 7 additions & 7 deletions processout/gatewayconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class GatewayConfiguration:
class GatewayConfiguration(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -46,12 +46,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand All @@ -64,12 +64,12 @@ def gateway(self, val):
"""Set gateway
Keyword argument:
val -- New gateway value"""
if isinstance(val, Gateway):
self._gateway = val
else:
if isinstance(val, dict):
obj = processout.Gateway(self._client)
obj.fillWithData(val)
self._gateway = obj
else:
self._gateway = val
return self

@property
Expand Down
26 changes: 13 additions & 13 deletions processout/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Invoice:
class Invoice(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -57,12 +57,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand All @@ -75,12 +75,12 @@ def transaction(self, val):
"""Set transaction
Keyword argument:
val -- New transaction value"""
if isinstance(val, Transaction):
self._transaction = val
else:
if isinstance(val, dict):
obj = processout.Transaction(self._client)
obj.fillWithData(val)
self._transaction = obj
else:
self._transaction = val
return self

@property
Expand All @@ -93,12 +93,12 @@ def customer(self, val):
"""Set customer
Keyword argument:
val -- New customer value"""
if isinstance(val, Customer):
self._customer = val
else:
if isinstance(val, dict):
obj = processout.Customer(self._client)
obj.fillWithData(val)
self._customer = obj
else:
self._customer = val
return self

@property
Expand All @@ -111,12 +111,12 @@ def subscription(self, val):
"""Set subscription
Keyword argument:
val -- New subscription value"""
if isinstance(val, Subscription):
self._subscription = val
else:
if isinstance(val, dict):
obj = processout.Subscription(self._client)
obj.fillWithData(val)
self._subscription = obj
else:
self._subscription = val
return self

@property
Expand Down
8 changes: 4 additions & 4 deletions processout/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# The content of this file was automatically generated

class Plan:
class Plan(object):
def __init__(self, client, prefill = None):
self._client = client

Expand Down Expand Up @@ -53,12 +53,12 @@ def project(self, val):
"""Set project
Keyword argument:
val -- New project value"""
if isinstance(val, Project):
self._project = val
else:
if isinstance(val, dict):
obj = processout.Project(self._client)
obj.fillWithData(val)
self._project = obj
else:
self._project = val
return self

@property
Expand Down
Loading

0 comments on commit c5a4d5d

Please sign in to comment.