Skip to content

Commit 6bc6053

Browse files
author
Randy Shults
committed
add support for update PropertyDefinition action
1 parent 8601135 commit 6bc6053

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

FuelSDK/objects.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ def __init__(self):
2828
class ET_ProfileAttribute():
2929
def __init__(self):
3030
self.obj_type = 'PropertyDefinition'
31+
self.update = False
3132

3233
def post(self):
33-
obj = ET_Configure(self.auth_stub, self.obj_type, self.props)
34+
obj = ET_Configure(self.auth_stub, self.obj_type, self.props, self.update)
3435
if obj is not None:
3536
self.last_request_id = obj.request_id
3637
return obj

FuelSDK/rest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def __init__(self, auth_stub, obj_type):
119119
##
120120
########
121121
class ET_Configure(ET_Constructor):
122-
def __init__(self, auth_stub, obj_type, props = None):
122+
def __init__(self, auth_stub, obj_type, props = None, update = False):
123123
auth_stub.refresh_token()
124124

125125
ws_configureRequest = auth_stub.soap_client.factory.create('ConfigureRequestMsg')
126-
ws_configureRequest.Action = 'create'
126+
ws_configureRequest.Action = 'create' if update is False else 'update'
127127
ws_configureRequest.Configurations = {'Configuration': self.parse_props_into_ws_object(auth_stub, obj_type, props)}
128128

129129
response = auth_stub.soap_client.service.Configure(None, ws_configureRequest)

0 commit comments

Comments
 (0)