Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: regenerate python lib with yoyodyne refactor #502

Merged
merged 2 commits into from
Dec 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
46 changes: 14 additions & 32 deletions twilio/rest/accounts/v1/credential/aws.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,9 @@ def page(self, page_token=values.unset, page_number=values.unset,
:returns: Page of AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsPage
"""
params = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })
data = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })

response = self._version.page(
'GET',
self._uri,
params=params,
)
response = self._version.page(method='GET', uri=self._uri, params=data, )

return AwsPage(self._version, response, self._solution)

Expand All @@ -116,13 +112,13 @@ def get_page(self, target_url):
def create(self, credentials, friendly_name=values.unset,
account_sid=values.unset):
"""
Create a new AwsInstance
Create the AwsInstance

:param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
:param unicode friendly_name: A string to describe the resource
:param unicode account_sid: The Subaccount this Credential should be associated with.

:returns: Newly created AwsInstance
:returns: The created AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
data = values.of({
Expand All @@ -131,11 +127,7 @@ def create(self, credentials, friendly_name=values.unset,
'AccountSid': account_sid,
})

payload = self._version.create(
'POST',
self._uri,
data=data,
)
payload = self._version.create(method='POST', uri=self._uri, data=data, )

return AwsInstance(self._version, payload, )

Expand Down Expand Up @@ -231,18 +223,12 @@ def __init__(self, version, sid):

def fetch(self):
"""
Fetch a AwsInstance
Fetch the AwsInstance

:returns: Fetched AwsInstance
:returns: The fetched AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
params = values.of({})

payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
payload = self._version.fetch(method='GET', uri=self._uri, )

return AwsInstance(self._version, payload, sid=self._solution['sid'], )

Expand All @@ -252,16 +238,12 @@ def update(self, friendly_name=values.unset):

:param unicode friendly_name: A string to describe the resource

:returns: Updated AwsInstance
:returns: The updated AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
data = values.of({'FriendlyName': friendly_name, })

payload = self._version.update(
'POST',
self._uri,
data=data,
)
payload = self._version.update(method='POST', uri=self._uri, data=data, )

return AwsInstance(self._version, payload, sid=self._solution['sid'], )

Expand All @@ -272,7 +254,7 @@ def delete(self):
:returns: True if delete succeeds, False otherwise
:rtype: bool
"""
return self._version.delete('delete', self._uri)
return self._version.delete(method='DELETE', uri=self._uri, )

def __repr__(self):
"""
Expand Down Expand Up @@ -374,9 +356,9 @@ def url(self):

def fetch(self):
"""
Fetch a AwsInstance
Fetch the AwsInstance

:returns: Fetched AwsInstance
:returns: The fetched AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
return self._proxy.fetch()
Expand All @@ -387,7 +369,7 @@ def update(self, friendly_name=values.unset):

:param unicode friendly_name: A string to describe the resource

:returns: Updated AwsInstance
:returns: The updated AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
return self._proxy.update(friendly_name=friendly_name, )
Expand Down
46 changes: 14 additions & 32 deletions twilio/rest/accounts/v1/credential/public_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,9 @@ def page(self, page_token=values.unset, page_number=values.unset,
:returns: Page of PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyPage
"""
params = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })
data = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })

response = self._version.page(
'GET',
self._uri,
params=params,
)
response = self._version.page(method='GET', uri=self._uri, params=data, )

return PublicKeyPage(self._version, response, self._solution)

Expand All @@ -116,13 +112,13 @@ def get_page(self, target_url):
def create(self, public_key, friendly_name=values.unset,
account_sid=values.unset):
"""
Create a new PublicKeyInstance
Create the PublicKeyInstance

:param unicode public_key: A URL encoded representation of the public key
:param unicode friendly_name: A string to describe the resource
:param unicode account_sid: The Subaccount this Credential should be associated with.

:returns: Newly created PublicKeyInstance
:returns: The created PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
"""
data = values.of({
Expand All @@ -131,11 +127,7 @@ def create(self, public_key, friendly_name=values.unset,
'AccountSid': account_sid,
})

payload = self._version.create(
'POST',
self._uri,
data=data,
)
payload = self._version.create(method='POST', uri=self._uri, data=data, )

return PublicKeyInstance(self._version, payload, )

Expand Down Expand Up @@ -231,18 +223,12 @@ def __init__(self, version, sid):

def fetch(self):
"""
Fetch a PublicKeyInstance
Fetch the PublicKeyInstance

:returns: Fetched PublicKeyInstance
:returns: The fetched PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
"""
params = values.of({})

payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
payload = self._version.fetch(method='GET', uri=self._uri, )

return PublicKeyInstance(self._version, payload, sid=self._solution['sid'], )

Expand All @@ -252,16 +238,12 @@ def update(self, friendly_name=values.unset):

:param unicode friendly_name: A string to describe the resource

:returns: Updated PublicKeyInstance
:returns: The updated PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
"""
data = values.of({'FriendlyName': friendly_name, })

payload = self._version.update(
'POST',
self._uri,
data=data,
)
payload = self._version.update(method='POST', uri=self._uri, data=data, )

return PublicKeyInstance(self._version, payload, sid=self._solution['sid'], )

Expand All @@ -272,7 +254,7 @@ def delete(self):
:returns: True if delete succeeds, False otherwise
:rtype: bool
"""
return self._version.delete('delete', self._uri)
return self._version.delete(method='DELETE', uri=self._uri, )

def __repr__(self):
"""
Expand Down Expand Up @@ -374,9 +356,9 @@ def url(self):

def fetch(self):
"""
Fetch a PublicKeyInstance
Fetch the PublicKeyInstance

:returns: Fetched PublicKeyInstance
:returns: The fetched PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
"""
return self._proxy.fetch()
Expand All @@ -387,7 +369,7 @@ def update(self, friendly_name=values.unset):

:param unicode friendly_name: A string to describe the resource

:returns: Updated PublicKeyInstance
:returns: The updated PublicKeyInstance
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyInstance
"""
return self._proxy.update(friendly_name=friendly_name, )
Expand Down
44 changes: 13 additions & 31 deletions twilio/rest/api/v2010/account/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,16 @@ def __init__(self, version):

def create(self, friendly_name=values.unset):
"""
Create a new AccountInstance
Create the AccountInstance

:param unicode friendly_name: A human readable description of the account

:returns: Newly created AccountInstance
:returns: The created AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
data = values.of({'FriendlyName': friendly_name, })

payload = self._version.create(
'POST',
self._uri,
data=data,
)
payload = self._version.create(method='POST', uri=self._uri, data=data, )

return AccountInstance(self._version, payload, )

Expand Down Expand Up @@ -143,19 +139,15 @@ def page(self, friendly_name=values.unset, status=values.unset,
:returns: Page of AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountPage
"""
params = values.of({
data = values.of({
'FriendlyName': friendly_name,
'Status': status,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})

response = self._version.page(
'GET',
self._uri,
params=params,
)
response = self._version.page(method='GET', uri=self._uri, params=data, )

return AccountPage(self._version, response, self._solution)

Expand Down Expand Up @@ -294,18 +286,12 @@ def __init__(self, version, sid):

def fetch(self):
"""
Fetch a AccountInstance
Fetch the AccountInstance

:returns: Fetched AccountInstance
:returns: The fetched AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
params = values.of({})

payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
payload = self._version.fetch(method='GET', uri=self._uri, )

return AccountInstance(self._version, payload, sid=self._solution['sid'], )

Expand All @@ -316,16 +302,12 @@ def update(self, friendly_name=values.unset, status=values.unset):
:param unicode friendly_name: FriendlyName to update
:param AccountInstance.Status status: Status to update the Account with

:returns: Updated AccountInstance
:returns: The updated AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
data = values.of({'FriendlyName': friendly_name, 'Status': status, })

payload = self._version.update(
'POST',
self._uri,
data=data,
)
payload = self._version.update(method='POST', uri=self._uri, data=data, )

return AccountInstance(self._version, payload, sid=self._solution['sid'], )

Expand Down Expand Up @@ -771,9 +753,9 @@ def uri(self):

def fetch(self):
"""
Fetch a AccountInstance
Fetch the AccountInstance

:returns: Fetched AccountInstance
:returns: The fetched AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
return self._proxy.fetch()
Expand All @@ -785,7 +767,7 @@ def update(self, friendly_name=values.unset, status=values.unset):
:param unicode friendly_name: FriendlyName to update
:param AccountInstance.Status status: Status to update the Account with

:returns: Updated AccountInstance
:returns: The updated AccountInstance
:rtype: twilio.rest.api.v2010.account.AccountInstance
"""
return self._proxy.update(friendly_name=friendly_name, status=status, )
Expand Down
Loading