Skip to content

chore: regenerate library after generator refactor #515

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

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
  •  
  •  
  •  
43 changes: 13 additions & 30 deletions lib/twilio-ruby/rest/accounts/v1/credential/aws.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ def page(page_token: :unset, page_number: :unset, page_size: :unset)
'Page' => page_number,
'PageSize' => page_size,
})
response = @version.page(
'GET',
@uri,
params
)

response = @version.page('GET', @uri, params)

AwsPage.new(@version, response, @solution)
end

Expand All @@ -107,8 +105,7 @@ def get_page(target_url)
end

##
# Retrieve a single page of AwsInstance records from the API.
# Request is executed immediately.
# Create the AwsInstance
# @param [String] credentials A string that contains the AWS access credentials in
# the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example,
# `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`
Expand All @@ -117,19 +114,15 @@ def get_page(target_url)
# @param [String] account_sid The SID of the Subaccount that this Credential
# should be associated with. Must be a valid Subaccount of the account issuing the
# request.
# @return [AwsInstance] Newly created AwsInstance
# @return [AwsInstance] Created AwsInstance
def create(credentials: nil, friendly_name: :unset, account_sid: :unset)
data = Twilio::Values.of({
'Credentials' => credentials,
'FriendlyName' => friendly_name,
'AccountSid' => account_sid,
})

payload = @version.create(
'POST',
@uri,
data: data
)
payload = @version.create('POST', @uri, data: data)

AwsInstance.new(@version, payload, )
end
Expand Down Expand Up @@ -186,16 +179,10 @@ def initialize(version, sid)
end

##
# Fetch a AwsInstance
# Fetch the AwsInstance
# @return [AwsInstance] Fetched AwsInstance
def fetch
params = Twilio::Values.of({})

payload = @version.fetch(
'GET',
@uri,
params,
)
payload = @version.fetch('GET', @uri)

AwsInstance.new(@version, payload, sid: @solution[:sid], )
end
Expand All @@ -208,20 +195,16 @@ def fetch
def update(friendly_name: :unset)
data = Twilio::Values.of({'FriendlyName' => friendly_name, })

payload = @version.update(
'POST',
@uri,
data: data,
)
payload = @version.update('POST', @uri, data: data)

AwsInstance.new(@version, payload, sid: @solution[:sid], )
end

##
# Deletes the AwsInstance
# Delete the AwsInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
@version.delete('delete', @uri)
@version.delete('DELETE', @uri)
end

##
Expand Down Expand Up @@ -313,7 +296,7 @@ def url
end

##
# Fetch a AwsInstance
# Fetch the AwsInstance
# @return [AwsInstance] Fetched AwsInstance
def fetch
context.fetch
Expand All @@ -329,7 +312,7 @@ def update(friendly_name: :unset)
end

##
# Deletes the AwsInstance
# Delete the AwsInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
context.delete
Expand Down
43 changes: 13 additions & 30 deletions lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ def page(page_token: :unset, page_number: :unset, page_size: :unset)
'Page' => page_number,
'PageSize' => page_size,
})
response = @version.page(
'GET',
@uri,
params
)

response = @version.page('GET', @uri, params)

PublicKeyPage.new(@version, response, @solution)
end

Expand All @@ -107,8 +105,7 @@ def get_page(target_url)
end

##
# Retrieve a single page of PublicKeyInstance records from the API.
# Request is executed immediately.
# Create the PublicKeyInstance
# @param [String] public_key A URL encoded representation of the public key. For
# example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC
# KEY-----`
Expand All @@ -117,19 +114,15 @@ def get_page(target_url)
# @param [String] account_sid The SID of the Subaccount that this Credential
# should be associated with. Must be a valid Subaccount of the account issuing the
# request
# @return [PublicKeyInstance] Newly created PublicKeyInstance
# @return [PublicKeyInstance] Created PublicKeyInstance
def create(public_key: nil, friendly_name: :unset, account_sid: :unset)
data = Twilio::Values.of({
'PublicKey' => public_key,
'FriendlyName' => friendly_name,
'AccountSid' => account_sid,
})

payload = @version.create(
'POST',
@uri,
data: data
)
payload = @version.create('POST', @uri, data: data)

PublicKeyInstance.new(@version, payload, )
end
Expand Down Expand Up @@ -186,16 +179,10 @@ def initialize(version, sid)
end

##
# Fetch a PublicKeyInstance
# Fetch the PublicKeyInstance
# @return [PublicKeyInstance] Fetched PublicKeyInstance
def fetch
params = Twilio::Values.of({})

payload = @version.fetch(
'GET',
@uri,
params,
)
payload = @version.fetch('GET', @uri)

PublicKeyInstance.new(@version, payload, sid: @solution[:sid], )
end
Expand All @@ -208,20 +195,16 @@ def fetch
def update(friendly_name: :unset)
data = Twilio::Values.of({'FriendlyName' => friendly_name, })

payload = @version.update(
'POST',
@uri,
data: data,
)
payload = @version.update('POST', @uri, data: data)

PublicKeyInstance.new(@version, payload, sid: @solution[:sid], )
end

##
# Deletes the PublicKeyInstance
# Delete the PublicKeyInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
@version.delete('delete', @uri)
@version.delete('DELETE', @uri)
end

##
Expand Down Expand Up @@ -313,7 +296,7 @@ def url
end

##
# Fetch a PublicKeyInstance
# Fetch the PublicKeyInstance
# @return [PublicKeyInstance] Fetched PublicKeyInstance
def fetch
context.fetch
Expand All @@ -329,7 +312,7 @@ def update(friendly_name: :unset)
end

##
# Deletes the PublicKeyInstance
# Delete the PublicKeyInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
context.delete
Expand Down
37 changes: 10 additions & 27 deletions lib/twilio-ruby/rest/api/v2010/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,14 @@ def initialize(version)
end

##
# Retrieve a single page of AccountInstance records from the API.
# Request is executed immediately.
# Create the AccountInstance
# @param [String] friendly_name A human readable description of the account to
# create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}`
# @return [AccountInstance] Newly created AccountInstance
# @return [AccountInstance] Created AccountInstance
def create(friendly_name: :unset)
data = Twilio::Values.of({'FriendlyName' => friendly_name, })

payload = @version.create(
'POST',
@uri,
data: data
)
payload = @version.create('POST', @uri, data: data)

AccountInstance.new(@version, payload, )
end
Expand Down Expand Up @@ -121,11 +116,9 @@ def page(friendly_name: :unset, status: :unset, page_token: :unset, page_number:
'Page' => page_number,
'PageSize' => page_size,
})
response = @version.page(
'GET',
@uri,
params
)

response = @version.page('GET', @uri, params)

AccountPage.new(@version, response, @solution)
end

Expand Down Expand Up @@ -220,16 +213,10 @@ def initialize(version, sid)
end

##
# Fetch a AccountInstance
# Fetch the AccountInstance
# @return [AccountInstance] Fetched AccountInstance
def fetch
params = Twilio::Values.of({})

payload = @version.fetch(
'GET',
@uri,
params,
)
payload = @version.fetch('GET', @uri)

AccountInstance.new(@version, payload, sid: @solution[:sid], )
end
Expand All @@ -245,11 +232,7 @@ def fetch
def update(friendly_name: :unset, status: :unset)
data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Status' => status, })

payload = @version.update(
'POST',
@uri,
data: data,
)
payload = @version.update('POST', @uri, data: data)

AccountInstance.new(@version, payload, sid: @solution[:sid], )
end
Expand Down Expand Up @@ -764,7 +747,7 @@ def uri
end

##
# Fetch a AccountInstance
# Fetch the AccountInstance
# @return [AccountInstance] Fetched AccountInstance
def fetch
context.fetch
Expand Down
43 changes: 13 additions & 30 deletions lib/twilio-ruby/rest/api/v2010/account/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def initialize(version, account_sid: nil)
end

##
# Retrieve a single page of AddressInstance records from the API.
# Request is executed immediately.
# Create the AddressInstance
# @param [String] customer_name The name to associate with the new address.
# @param [String] street The number and street address of the new address.
# @param [String] city The city of the new address.
Expand All @@ -44,7 +43,7 @@ def initialize(version, account_sid: nil)
# the address. Can be: `true` or `false` and the default is `true`. If empty or
# `true`, we will correct the address you provide if necessary. If `false`, we
# won't alter the address you provide.
# @return [AddressInstance] Newly created AddressInstance
# @return [AddressInstance] Created AddressInstance
def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: nil, iso_country: nil, friendly_name: :unset, emergency_enabled: :unset, auto_correct_address: :unset)
data = Twilio::Values.of({
'CustomerName' => customer_name,
Expand All @@ -58,11 +57,7 @@ def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code:
'AutoCorrectAddress' => auto_correct_address,
})

payload = @version.create(
'POST',
@uri,
data: data
)
payload = @version.create('POST', @uri, data: data)

AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], )
end
Expand Down Expand Up @@ -160,11 +155,9 @@ def page(customer_name: :unset, friendly_name: :unset, iso_country: :unset, page
'Page' => page_number,
'PageSize' => page_size,
})
response = @version.page(
'GET',
@uri,
params
)

response = @version.page('GET', @uri, params)

AddressPage.new(@version, response, @solution)
end

Expand Down Expand Up @@ -239,23 +232,17 @@ def initialize(version, account_sid, sid)
end

##
# Deletes the AddressInstance
# Delete the AddressInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
@version.delete('delete', @uri)
@version.delete('DELETE', @uri)
end

##
# Fetch a AddressInstance
# Fetch the AddressInstance
# @return [AddressInstance] Fetched AddressInstance
def fetch
params = Twilio::Values.of({})

payload = @version.fetch(
'GET',
@uri,
params,
)
payload = @version.fetch('GET', @uri)

AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
end
Expand Down Expand Up @@ -288,11 +275,7 @@ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: :
'AutoCorrectAddress' => auto_correct_address,
})

payload = @version.update(
'POST',
@uri,
data: data,
)
payload = @version.update('POST', @uri, data: data)

AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid], )
end
Expand Down Expand Up @@ -468,14 +451,14 @@ def verified
end

##
# Deletes the AddressInstance
# Delete the AddressInstance
# @return [Boolean] true if delete succeeds, false otherwise
def delete
context.delete
end

##
# Fetch a AddressInstance
# Fetch the AddressInstance
# @return [AddressInstance] Fetched AddressInstance
def fetch
context.fetch
Expand Down
Loading