lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-6.9.1 vs lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb in twilio-ruby-6.11.0
- old
+ new
@@ -19,10 +19,11 @@
class V2010 < Version
class AccountContext < InstanceContext
class SipList < ListResource
class DomainList < ListResource
+
##
# Initialize the DomainList
# @param [Version] version Version that contains the resource
# @return [DomainList] DomainList
def initialize(version, account_sid: nil)
@@ -78,10 +79,11 @@
'Secure' => secure,
'ByocTrunkSid' => byoc_trunk_sid,
'EmergencyCallerSid' => emergency_caller_sid,
})
+
payload = @version.create('POST', @uri, data: data)
DomainInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
@@ -204,18 +206,20 @@
##
# Delete the DomainInstance
# @return [Boolean] True if delete succeeds, false otherwise
def delete
+
@version.delete('DELETE', @uri)
end
##
# Fetch the DomainInstance
# @return [DomainInstance] Fetched DomainInstance
def fetch
+
payload = @version.fetch('GET', @uri)
DomainInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
@@ -269,9 +273,10 @@
'Secure' => secure,
'ByocTrunkSid' => byoc_trunk_sid,
'EmergencyCallerSid' => emergency_caller_sid,
})
+
payload = @version.update('POST', @uri, data: data)
DomainInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],