Skip to content

Commit

Permalink
feat: add python account setter (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
childish-sambino authored Feb 16, 2023
1 parent 9c59e1e commit 3cfea85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/python/twilio/rest/api/v2010/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ def account(self) -> AccountContext:
self._account = AccountContext(self, self.domain.twilio.account_sid)
return self._account

@account.setter
def account(self, value: AccountContext):
self._account = value

def __repr__(self) -> str:
"""
Provide a friendly representation
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/twilio-python/version.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ class {{apiVersionClass}}(Version):
if self._{{mountName}} is None:
self._{{mountName}} = {{listName}}(self{{#param}}, self.domain.twilio.{{param}}{{/param}})
return self._{{mountName}}

{{#param}}
@{{mountName}}.setter
def {{mountName}}(self, value: {{listName}}):
self._{{mountName}} = value
{{/param}}
{{/versionResources}}def __repr__(self) -> str:
"""
Provide a friendly representation
Expand Down

0 comments on commit 3cfea85

Please sign in to comment.