lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb in twilio-ruby-6.11.0
- old
+ new
@@ -19,10 +19,11 @@
class V2010 < Version
class AccountContext < InstanceContext
class UsageList < ListResource
class TriggerList < ListResource
+
##
# Initialize the TriggerList
# @param [Version] version Version that contains the resource
# @return [TriggerList] TriggerList
def initialize(version, account_sid: nil)
@@ -60,10 +61,11 @@
'FriendlyName' => friendly_name,
'Recurring' => recurring,
'TriggerBy' => trigger_by,
})
+
payload = @version.create('POST', @uri, data: data)
TriggerInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
@@ -201,18 +203,20 @@
##
# Delete the TriggerInstance
# @return [Boolean] True if delete succeeds, false otherwise
def delete
+
@version.delete('DELETE', @uri)
end
##
# Fetch the TriggerInstance
# @return [TriggerInstance] Fetched TriggerInstance
def fetch
+
payload = @version.fetch('GET', @uri)
TriggerInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
@@ -236,9 +240,10 @@
'CallbackMethod' => callback_method,
'CallbackUrl' => callback_url,
'FriendlyName' => friendly_name,
})
+
payload = @version.update('POST', @uri, data: data)
TriggerInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],