lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-5.40.2 vs lib/twilio-ruby/rest/trunking/v1/trunk.rb in twilio-ruby-5.40.3
- old
+ new
@@ -38,18 +38,10 @@
# instructions like any other normal TwiML call. See [Disaster
# Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more
# information.
# @param [String] disaster_recovery_method The HTTP method we should use to call
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
- # @param [trunk.RecordingSetting] recording The recording settings for the trunk.
- # Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
- # `record-from-ringing` or `record-from-answer`, all calls going through the trunk
- # will be recorded. The only way to change recording parameters is on a
- # sub-resource of a Trunk after it has been created.
- # e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See
- # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
- # information.
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
# information.
# @param [Boolean] secure Whether Secure Trunking is enabled for the trunk. If
@@ -61,17 +53,16 @@
# be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from
# the United States and Canada automatically perform a CNAM Lookup and display
# Caller ID data on your phone. See [CNAM
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
# @return [TrunkInstance] Created TrunkInstance
- def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
+ def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'DomainName' => domain_name,
'DisasterRecoveryUrl' => disaster_recovery_url,
'DisasterRecoveryMethod' => disaster_recovery_method,
- 'Recording' => recording,
'TransferMode' => transfer_mode,
'Secure' => secure,
'CnamLookupEnabled' => cnam_lookup_enabled,
})
@@ -213,10 +204,11 @@
# Dependents
@origination_urls = nil
@credentials_lists = nil
@ip_access_control_lists = nil
@phone_numbers = nil
+ @recordings = nil
end
##
# Fetch the TrunkInstance
# @return [TrunkInstance] Fetched TrunkInstance
@@ -248,16 +240,10 @@
# instructions like any other normal TwiML call. See [Disaster
# Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more
# information.
# @param [String] disaster_recovery_method The HTTP method we should use to call
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
- # @param [trunk.RecordingSetting] recording The recording settings for the trunk.
- # Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
- # `record-from-ringing` or `record-from-answer`, all calls going through the trunk
- # will be recorded. See
- # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
- # information.
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
# information.
# @param [Boolean] secure Whether Secure Trunking is enabled for the trunk. If
@@ -269,17 +255,16 @@
# be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from
# the United States and Canada automatically perform a CNAM Lookup and display
# Caller ID data on your phone. See [CNAM
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
# @return [TrunkInstance] Updated TrunkInstance
- def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
+ def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
data = Twilio::Values.of({
'FriendlyName' => friendly_name,
'DomainName' => domain_name,
'DisasterRecoveryUrl' => disaster_recovery_url,
'DisasterRecoveryMethod' => disaster_recovery_method,
- 'Recording' => recording,
'TransferMode' => transfer_mode,
'Secure' => secure,
'CnamLookupEnabled' => cnam_lookup_enabled,
})
@@ -359,10 +344,18 @@
@phone_numbers
end
##
+ # Access the recordings
+ # @return [RecordingList]
+ # @return [RecordingContext]
+ def recordings
+ RecordingContext.new(@version, @solution[:sid], )
+ end
+
+ ##
# Provide a user friendly representation
def to_s
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
"#<Twilio.Trunking.V1.TrunkContext #{context}>"
end
@@ -547,16 +540,10 @@
# instructions like any other normal TwiML call. See [Disaster
# Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more
# information.
# @param [String] disaster_recovery_method The HTTP method we should use to call
# the `disaster_recovery_url`. Can be: `GET` or `POST`.
- # @param [trunk.RecordingSetting] recording The recording settings for the trunk.
- # Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to
- # `record-from-ringing` or `record-from-answer`, all calls going through the trunk
- # will be recorded. See
- # [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more
- # information.
# @param [trunk.TransferSetting] transfer_mode The call transfer settings for the
# trunk. Can be: `enable-all`, `sip-only` and `disable-all`. See
# [Transfer](https://www.twilio.com/docs/sip-trunking/call-transfer) for more
# information.
# @param [Boolean] secure Whether Secure Trunking is enabled for the trunk. If
@@ -568,17 +555,16 @@
# be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from
# the United States and Canada automatically perform a CNAM Lookup and display
# Caller ID data on your phone. See [CNAM
# Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
# @return [TrunkInstance] Updated TrunkInstance
- def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, recording: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
+ def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :unset, disaster_recovery_method: :unset, transfer_mode: :unset, secure: :unset, cnam_lookup_enabled: :unset)
context.update(
friendly_name: friendly_name,
domain_name: domain_name,
disaster_recovery_url: disaster_recovery_url,
disaster_recovery_method: disaster_recovery_method,
- recording: recording,
transfer_mode: transfer_mode,
secure: secure,
cnam_lookup_enabled: cnam_lookup_enabled,
)
end
@@ -607,9 +593,16 @@
##
# Access the phone_numbers
# @return [phone_numbers] phone_numbers
def phone_numbers
context.phone_numbers
+ end
+
+ ##
+ # Access the recordings
+ # @return [recordings] recordings
+ def recordings
+ context.recordings
end
##
# Provide a user friendly representation
def to_s
\ No newline at end of file