Skip to content

Commit d65cc14

Browse files
committed
Address pr comments
1 parent 148d9a2 commit d65cc14

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

method/resources/Entities/Connect.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ class ConnectExpandOpts(TypedDict):
5252
class ConnectResourceListOpts(ResourceListOpts, ConnectExpandOpts):
5353
pass
5454

55+
class ConnectCreateOpts(TypedDict):
56+
products: Optional[List[AccountProductsEligibleForAutomaticExecutionLiteral]],
57+
subscriptions: Optional[List[AccountSubscriptionsEligibleForAutomaticExecutionLiteral]]
58+
59+
60+
61+
5562
class EntityConnectResource(Resource):
5663
def __init__(self, config: Configuration):
5764
super(EntityConnectResource, self).__init__(config.add_path("connect"))
@@ -63,17 +70,11 @@ def list(
6370
self, opts: Optional[ConnectResourceListOpts] = None
6471
) -> MethodResponse[List[EntityConnect]]:
6572
return super(EntityConnectResource, self)._list(opts)
66-
73+
6774
def create(
6875
self,
69-
products: Optional[List[AccountProductsEligibleForAutomaticExecutionLiteral]] = None,
70-
subscriptions: Optional[List[AccountSubscriptionsEligibleForAutomaticExecutionLiteral]] = None,
71-
opts: Optional[ConnectExpandOpts] = None
76+
opts: ConnectCreateOpts = {},
77+
params: Optional[ConnectExpandOpts] = None
7278
) -> MethodResponse[EntityConnect]:
73-
data = {}
74-
if products:
75-
data["products"] = products
76-
if subscriptions:
77-
data["subscriptions"] = subscriptions
78-
return super(EntityConnectResource, self)._create(data=data, params=opts)
79+
return super(EntityConnectResource, self)._create(data=opts, params=params)
7980

0 commit comments

Comments
 (0)