twilio-ruby 5.72.1 → 5.73.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pr-lint.yml +8 -2
- data/.github/workflows/test-and-deploy.yml +3 -3
- data/CHANGES.md +89 -0
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +160 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +251 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +59 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +22 -16
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +2 -2
- data/lib/twilio-ruby/rest/client.rb +14 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +195 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +346 -0
- data/lib/twilio-ruby/rest/content/v1.rb +45 -0
- data/lib/twilio-ruby/rest/content.rb +47 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema/version.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/schema.rb +1 -1
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +156 -0
- data/lib/twilio-ruby/rest/flex_api/v1/good_data.rb +190 -0
- data/lib/twilio-ruby/rest/flex_api/v1/user_roles.rb +166 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +21 -0
- data/lib/twilio-ruby/rest/flex_api.rb +18 -0
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/room.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +81 -6
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +2 -2
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/domain_cert.rb +257 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +267 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +71 -1
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1.rb +34 -0
- data/lib/twilio-ruby/rest/messaging.rb +18 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +7 -0
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/oauth/v1/oauth.rb +162 -0
- data/lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb +242 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +157 -0
- data/lib/twilio-ruby/rest/oauth/v1/user_info.rb +193 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +56 -0
- data/lib/twilio-ruby/rest/oauth.rb +62 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +0 -33
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -14
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +5 -46
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +240 -0
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +6 -0
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +18 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +12 -12
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +5 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +10 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +6 -6
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +9 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +13 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +3 -3
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +1 -9
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +1 -7
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +0 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/template.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition.rb +3 -3
- data/lib/twilio-ruby/rest/video/v1/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +2 -2
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -4
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +2 -2
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +3 -3
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +2 -2
- data/lib/twilio-ruby/twiml/voice_response.rb +10 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +20 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +0 -165
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb +0 -225
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +0 -195
- data/lib/twilio-ruby/rest/preview/trusted_comms/cps.rb +0 -186
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +0 -277
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -65
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# \ / _ _ _| _ _
|
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
|
5
|
+
# / /
|
|
6
|
+
#
|
|
7
|
+
# frozen_string_literal: true
|
|
8
|
+
|
|
9
|
+
module Twilio
|
|
10
|
+
module REST
|
|
11
|
+
class Api < Domain
|
|
12
|
+
class V2010 < Version
|
|
13
|
+
class AccountContext < InstanceContext
|
|
14
|
+
class CallContext < InstanceContext
|
|
15
|
+
class UserDefinedMessageSubscriptionList < ListResource
|
|
16
|
+
##
|
|
17
|
+
# Initialize the UserDefinedMessageSubscriptionList
|
|
18
|
+
# @param [Version] version Version that contains the resource
|
|
19
|
+
# @param [String] account_sid The SID of the
|
|
20
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
21
|
+
# User Defined Messages.
|
|
22
|
+
# @param [String] call_sid The SID of the
|
|
23
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
24
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
25
|
+
# producing the User Defined Messages.
|
|
26
|
+
# @return [UserDefinedMessageSubscriptionList] UserDefinedMessageSubscriptionList
|
|
27
|
+
def initialize(version, account_sid: nil, call_sid: nil)
|
|
28
|
+
super(version)
|
|
29
|
+
|
|
30
|
+
# Path Solution
|
|
31
|
+
@solution = {account_sid: account_sid, call_sid: call_sid}
|
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions.json"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
##
|
|
36
|
+
# Create the UserDefinedMessageSubscriptionInstance
|
|
37
|
+
# @param [String] callback The URL we should call using the `method` to send user
|
|
38
|
+
# defined events to your application. URLs must contain a valid hostname
|
|
39
|
+
# (underscores are not permitted).
|
|
40
|
+
# @param [String] method The HTTP method Twilio will use when requesting the above
|
|
41
|
+
# `Url`. Either `GET` or `POST`.
|
|
42
|
+
# @param [String] idempotency_key A unique string value to identify API call. This
|
|
43
|
+
# should be a unique string value per API call and can be a randomly generated.
|
|
44
|
+
# @return [UserDefinedMessageSubscriptionInstance] Created UserDefinedMessageSubscriptionInstance
|
|
45
|
+
def create(callback: nil, method: nil, idempotency_key: :unset)
|
|
46
|
+
data = Twilio::Values.of({
|
|
47
|
+
'Callback' => callback,
|
|
48
|
+
'Method' => method,
|
|
49
|
+
'IdempotencyKey' => idempotency_key,
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
payload = @version.create('POST', @uri, data: data)
|
|
53
|
+
|
|
54
|
+
UserDefinedMessageSubscriptionInstance.new(
|
|
55
|
+
@version,
|
|
56
|
+
payload,
|
|
57
|
+
account_sid: @solution[:account_sid],
|
|
58
|
+
call_sid: @solution[:call_sid],
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
##
|
|
63
|
+
# Provide a user friendly representation
|
|
64
|
+
def to_s
|
|
65
|
+
'#<Twilio.Api.V2010.UserDefinedMessageSubscriptionList>'
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class UserDefinedMessageSubscriptionPage < Page
|
|
70
|
+
##
|
|
71
|
+
# Initialize the UserDefinedMessageSubscriptionPage
|
|
72
|
+
# @param [Version] version Version that contains the resource
|
|
73
|
+
# @param [Response] response Response from the API
|
|
74
|
+
# @param [Hash] solution Path solution for the resource
|
|
75
|
+
# @return [UserDefinedMessageSubscriptionPage] UserDefinedMessageSubscriptionPage
|
|
76
|
+
def initialize(version, response, solution)
|
|
77
|
+
super(version, response)
|
|
78
|
+
|
|
79
|
+
# Path Solution
|
|
80
|
+
@solution = solution
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
##
|
|
84
|
+
# Build an instance of UserDefinedMessageSubscriptionInstance
|
|
85
|
+
# @param [Hash] payload Payload response from the API
|
|
86
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
|
87
|
+
def get_instance(payload)
|
|
88
|
+
UserDefinedMessageSubscriptionInstance.new(
|
|
89
|
+
@version,
|
|
90
|
+
payload,
|
|
91
|
+
account_sid: @solution[:account_sid],
|
|
92
|
+
call_sid: @solution[:call_sid],
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
##
|
|
97
|
+
# Provide a user friendly representation
|
|
98
|
+
def to_s
|
|
99
|
+
'<Twilio.Api.V2010.UserDefinedMessageSubscriptionPage>'
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class UserDefinedMessageSubscriptionContext < InstanceContext
|
|
104
|
+
##
|
|
105
|
+
# Initialize the UserDefinedMessageSubscriptionContext
|
|
106
|
+
# @param [Version] version Version that contains the resource
|
|
107
|
+
# @param [String] account_sid The SID of the
|
|
108
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
109
|
+
# User Defined Messages.
|
|
110
|
+
# @param [String] call_sid The SID of the
|
|
111
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
112
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
113
|
+
# producing the User Defined Messages.
|
|
114
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
|
115
|
+
# Subscription.
|
|
116
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext
|
|
117
|
+
def initialize(version, account_sid, call_sid, sid)
|
|
118
|
+
super(version)
|
|
119
|
+
|
|
120
|
+
# Path Solution
|
|
121
|
+
@solution = {account_sid: account_sid, call_sid: call_sid, sid: sid, }
|
|
122
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/UserDefinedMessageSubscriptions/#{@solution[:sid]}.json"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
##
|
|
126
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
|
127
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
128
|
+
def delete
|
|
129
|
+
@version.delete('DELETE', @uri)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
##
|
|
133
|
+
# Provide a user friendly representation
|
|
134
|
+
def to_s
|
|
135
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
136
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
##
|
|
140
|
+
# Provide a detailed, user friendly representation
|
|
141
|
+
def inspect
|
|
142
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
|
143
|
+
"#<Twilio.Api.V2010.UserDefinedMessageSubscriptionContext #{context}>"
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
class UserDefinedMessageSubscriptionInstance < InstanceResource
|
|
148
|
+
##
|
|
149
|
+
# Initialize the UserDefinedMessageSubscriptionInstance
|
|
150
|
+
# @param [Version] version Version that contains the resource
|
|
151
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
152
|
+
# @param [String] account_sid The SID of the
|
|
153
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that subscribed to the
|
|
154
|
+
# User Defined Messages.
|
|
155
|
+
# @param [String] call_sid The SID of the
|
|
156
|
+
# {Call}[https://www.twilio.com/docs/voice/api/call-resource] the User Defined
|
|
157
|
+
# Message Subscription is associated with. This refers to the Call SID that is
|
|
158
|
+
# producing the User Defined Messages.
|
|
159
|
+
# @param [String] sid The SID that uniquely identifies this User Defined Message
|
|
160
|
+
# Subscription.
|
|
161
|
+
# @return [UserDefinedMessageSubscriptionInstance] UserDefinedMessageSubscriptionInstance
|
|
162
|
+
def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil)
|
|
163
|
+
super(version)
|
|
164
|
+
|
|
165
|
+
# Marshaled Properties
|
|
166
|
+
@properties = {
|
|
167
|
+
'account_sid' => payload['account_sid'],
|
|
168
|
+
'call_sid' => payload['call_sid'],
|
|
169
|
+
'sid' => payload['sid'],
|
|
170
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
171
|
+
'uri' => payload['uri'],
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
# Context
|
|
175
|
+
@instance_context = nil
|
|
176
|
+
@params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'], }
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
##
|
|
180
|
+
# Generate an instance context for the instance, the context is capable of
|
|
181
|
+
# performing various actions. All instance actions are proxied to the context
|
|
182
|
+
# @return [UserDefinedMessageSubscriptionContext] UserDefinedMessageSubscriptionContext for this UserDefinedMessageSubscriptionInstance
|
|
183
|
+
def context
|
|
184
|
+
unless @instance_context
|
|
185
|
+
@instance_context = UserDefinedMessageSubscriptionContext.new(
|
|
186
|
+
@version,
|
|
187
|
+
@params['account_sid'],
|
|
188
|
+
@params['call_sid'],
|
|
189
|
+
@params['sid'],
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
@instance_context
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
##
|
|
196
|
+
# @return [String] Account SID.
|
|
197
|
+
def account_sid
|
|
198
|
+
@properties['account_sid']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
##
|
|
202
|
+
# @return [String] Call SID.
|
|
203
|
+
def call_sid
|
|
204
|
+
@properties['call_sid']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
##
|
|
208
|
+
# @return [String] User Defined Message Subscription SID.
|
|
209
|
+
def sid
|
|
210
|
+
@properties['sid']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
##
|
|
214
|
+
# @return [Time] The date this User Defined Message Subscription was created.
|
|
215
|
+
def date_created
|
|
216
|
+
@properties['date_created']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
##
|
|
220
|
+
# @return [String] The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`.
|
|
221
|
+
def uri
|
|
222
|
+
@properties['uri']
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
##
|
|
226
|
+
# Delete the UserDefinedMessageSubscriptionInstance
|
|
227
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
|
228
|
+
def delete
|
|
229
|
+
context.delete
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
##
|
|
233
|
+
# Provide a user friendly representation
|
|
234
|
+
def to_s
|
|
235
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
236
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
##
|
|
240
|
+
# Provide a detailed, user friendly representation
|
|
241
|
+
def inspect
|
|
242
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
243
|
+
"<Twilio.Api.V2010.UserDefinedMessageSubscriptionInstance #{values}>"
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -444,6 +444,8 @@ module Twilio
|
|
|
444
444
|
@payments = nil
|
|
445
445
|
@siprec = nil
|
|
446
446
|
@streams = nil
|
|
447
|
+
@user_defined_message_subscriptions = nil
|
|
448
|
+
@user_defined_messages = nil
|
|
447
449
|
end
|
|
448
450
|
|
|
449
451
|
##
|
|
@@ -636,6 +638,49 @@ module Twilio
|
|
|
636
638
|
@streams
|
|
637
639
|
end
|
|
638
640
|
|
|
641
|
+
##
|
|
642
|
+
# Access the user_defined_message_subscriptions
|
|
643
|
+
# @return [UserDefinedMessageSubscriptionList]
|
|
644
|
+
# @return [UserDefinedMessageSubscriptionContext] if sid was passed.
|
|
645
|
+
def user_defined_message_subscriptions(sid=:unset)
|
|
646
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
|
647
|
+
|
|
648
|
+
if sid != :unset
|
|
649
|
+
return UserDefinedMessageSubscriptionContext.new(
|
|
650
|
+
@version,
|
|
651
|
+
@solution[:account_sid],
|
|
652
|
+
@solution[:sid],
|
|
653
|
+
sid,
|
|
654
|
+
)
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
unless @user_defined_message_subscriptions
|
|
658
|
+
@user_defined_message_subscriptions = UserDefinedMessageSubscriptionList.new(
|
|
659
|
+
@version,
|
|
660
|
+
account_sid: @solution[:account_sid],
|
|
661
|
+
call_sid: @solution[:sid],
|
|
662
|
+
)
|
|
663
|
+
end
|
|
664
|
+
|
|
665
|
+
@user_defined_message_subscriptions
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
##
|
|
669
|
+
# Access the user_defined_messages
|
|
670
|
+
# @return [UserDefinedMessageList]
|
|
671
|
+
# @return [UserDefinedMessageContext]
|
|
672
|
+
def user_defined_messages
|
|
673
|
+
unless @user_defined_messages
|
|
674
|
+
@user_defined_messages = UserDefinedMessageList.new(
|
|
675
|
+
@version,
|
|
676
|
+
account_sid: @solution[:account_sid],
|
|
677
|
+
call_sid: @solution[:sid],
|
|
678
|
+
)
|
|
679
|
+
end
|
|
680
|
+
|
|
681
|
+
@user_defined_messages
|
|
682
|
+
end
|
|
683
|
+
|
|
639
684
|
##
|
|
640
685
|
# Provide a user friendly representation
|
|
641
686
|
def to_s
|
|
@@ -977,6 +1022,20 @@ module Twilio
|
|
|
977
1022
|
context.streams
|
|
978
1023
|
end
|
|
979
1024
|
|
|
1025
|
+
##
|
|
1026
|
+
# Access the user_defined_message_subscriptions
|
|
1027
|
+
# @return [user_defined_message_subscriptions] user_defined_message_subscriptions
|
|
1028
|
+
def user_defined_message_subscriptions
|
|
1029
|
+
context.user_defined_message_subscriptions
|
|
1030
|
+
end
|
|
1031
|
+
|
|
1032
|
+
##
|
|
1033
|
+
# Access the user_defined_messages
|
|
1034
|
+
# @return [user_defined_messages] user_defined_messages
|
|
1035
|
+
def user_defined_messages
|
|
1036
|
+
context.user_defined_messages
|
|
1037
|
+
end
|
|
1038
|
+
|
|
980
1039
|
##
|
|
981
1040
|
# Provide a user friendly representation
|
|
982
1041
|
def to_s
|
|
@@ -449,20 +449,23 @@ module Twilio
|
|
|
449
449
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
|
450
450
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
|
451
451
|
# the conference.
|
|
452
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
|
452
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
|
453
453
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
|
454
|
-
# file, or a TwiML document that contains
|
|
455
|
-
#
|
|
454
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
|
455
|
+
# `<Redirect>` verbs.
|
|
456
456
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
|
457
457
|
# Can be: `GET` or `POST` and the default is `GET`.
|
|
458
458
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
|
459
|
-
# announcement to the participant. The URL
|
|
460
|
-
# a TwiML document that contains `<Play
|
|
459
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
|
460
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
|
461
|
+
# verbs.
|
|
461
462
|
# @param [String] announce_method The HTTP method we should use to call
|
|
462
463
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
|
463
|
-
# @param [String] wait_url The URL we
|
|
464
|
-
#
|
|
465
|
-
#
|
|
464
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
|
465
|
+
# to play while participants are waiting for the conference to start. The URL may
|
|
466
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
|
467
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
|
468
|
+
# standard hold music. {Learn more about hold
|
|
466
469
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
|
467
470
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
|
468
471
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
|
@@ -686,20 +689,23 @@ module Twilio
|
|
|
686
689
|
# @param [Boolean] hold Whether the participant should be on hold. Can be: `true`
|
|
687
690
|
# or `false`. `true` puts the participant on hold, and `false` lets them rejoin
|
|
688
691
|
# the conference.
|
|
689
|
-
# @param [String] hold_url The URL we call using the `hold_method` for
|
|
692
|
+
# @param [String] hold_url The URL we call using the `hold_method` for music that
|
|
690
693
|
# plays when the participant is on hold. The URL may return an MP3 file, a WAV
|
|
691
|
-
# file, or a TwiML document that contains
|
|
692
|
-
#
|
|
694
|
+
# file, or a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or
|
|
695
|
+
# `<Redirect>` verbs.
|
|
693
696
|
# @param [String] hold_method The HTTP method we should use to call `hold_url`.
|
|
694
697
|
# Can be: `GET` or `POST` and the default is `GET`.
|
|
695
698
|
# @param [String] announce_url The URL we call using the `announce_method` for an
|
|
696
|
-
# announcement to the participant. The URL
|
|
697
|
-
# a TwiML document that contains `<Play
|
|
699
|
+
# announcement to the participant. The URL may return an MP3 file, a WAV file, or
|
|
700
|
+
# a TwiML document that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>`
|
|
701
|
+
# verbs.
|
|
698
702
|
# @param [String] announce_method The HTTP method we should use to call
|
|
699
703
|
# `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
|
700
|
-
# @param [String] wait_url The URL we
|
|
701
|
-
#
|
|
702
|
-
#
|
|
704
|
+
# @param [String] wait_url The URL we call using the `wait_method` for the music
|
|
705
|
+
# to play while participants are waiting for the conference to start. The URL may
|
|
706
|
+
# return an MP3 file, a WAV file, or a TwiML document that contains `<Play>`,
|
|
707
|
+
# `<Say>`, `<Pause>`, or `<Redirect>` verbs. The default value is the URL of our
|
|
708
|
+
# standard hold music. {Learn more about hold
|
|
703
709
|
# music}[https://www.twilio.com/labs/twimlets/holdmusic].
|
|
704
710
|
# @param [String] wait_method The HTTP method we should use to call `wait_url`.
|
|
705
711
|
# Can be `GET` or `POST` and the default is `POST`. When using a static audio
|
|
@@ -285,7 +285,7 @@ module Twilio
|
|
|
285
285
|
'price' => payload['price'],
|
|
286
286
|
'price_unit' => payload['price_unit'],
|
|
287
287
|
'status' => payload['status'],
|
|
288
|
-
'channels' => payload['channels'].to_i,
|
|
288
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
|
289
289
|
'source' => payload['source'],
|
|
290
290
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
291
291
|
'encryption_details' => payload['encryption_details'],
|
|
@@ -244,8 +244,8 @@ module Twilio
|
|
|
244
244
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
|
245
245
|
# the conference and hang up all participants
|
|
246
246
|
# @param [String] announce_url The URL we should call to announce something into
|
|
247
|
-
# the conference. The URL
|
|
248
|
-
# `<Play
|
|
247
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
|
248
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
|
249
249
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
|
250
250
|
# be: `GET` or `POST` and the default is `POST`
|
|
251
251
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
@@ -456,8 +456,8 @@ module Twilio
|
|
|
456
456
|
# Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end
|
|
457
457
|
# the conference and hang up all participants
|
|
458
458
|
# @param [String] announce_url The URL we should call to announce something into
|
|
459
|
-
# the conference. The URL
|
|
460
|
-
# `<Play
|
|
459
|
+
# the conference. The URL may return an MP3 file, a WAV file, or a TwiML document
|
|
460
|
+
# that contains `<Play>`, `<Say>`, `<Pause>`, or `<Redirect>` verbs.
|
|
461
461
|
# @param [String] announce_method The HTTP method used to call `announce_url`. Can
|
|
462
462
|
# be: `GET` or `POST` and the default is `POST`
|
|
463
463
|
# @return [ConferenceInstance] Updated ConferenceInstance
|
|
@@ -78,12 +78,25 @@ module Twilio
|
|
|
78
78
|
# @param [Boolean] smart_encoded Whether to detect Unicode characters that have a
|
|
79
79
|
# similar GSM-7 character and replace them. Can be: `true` or `false`.
|
|
80
80
|
# @param [Array[String]] persistent_action Rich actions for Channels Messages.
|
|
81
|
+
# @param [Boolean] shorten_urls Determines the usage of Click Tracking. Setting it
|
|
82
|
+
# to `true` will instruct Twilio to replace all links in the Message with a
|
|
83
|
+
# shortened version based on the associated Domain Sid and track clicks on them.
|
|
84
|
+
# If this parameter is not set on an API call, we will use the value set on the
|
|
85
|
+
# Messaging Service. If this parameter is not set and the value is not configured
|
|
86
|
+
# on the Messaging Service used this will default to `false`.
|
|
81
87
|
# @param [message.ScheduleType] schedule_type Indicates your intent to schedule a
|
|
82
88
|
# message. Pass the value `fixed` to schedule a message at a fixed time.
|
|
83
89
|
# @param [Time] send_at The time that Twilio will send the message. Must be in ISO
|
|
84
90
|
# 8601 format.
|
|
85
91
|
# @param [Boolean] send_as_mms If set to True, Twilio will deliver the message as
|
|
86
92
|
# a single MMS message, regardless of the presence of media.
|
|
93
|
+
# @param [String] content_sid The SID of the Content object returned at Content
|
|
94
|
+
# API content create time
|
|
95
|
+
# (https://www.twilio.com/docs/content-api/create-and-send-your-first-content-api-template#create-a-template).
|
|
96
|
+
# If this parameter is not specified, then the Content API will not be utilized.
|
|
97
|
+
# @param [String] content_variables Key-value pairs of variable names to
|
|
98
|
+
# substitution values, used alongside a content_sid. If not specified, Content API
|
|
99
|
+
# will default to the default variables defined at create time.
|
|
87
100
|
# @param [String] from A Twilio phone number in
|
|
88
101
|
# {E.164}[https://www.twilio.com/docs/glossary/what-e164] format, an {alphanumeric
|
|
89
102
|
# sender
|
|
@@ -114,7 +127,7 @@ module Twilio
|
|
|
114
127
|
# parameters in the POST request. You can include up to 10 `media_url` parameters
|
|
115
128
|
# per message. You can send images in an SMS message in only the US and Canada.
|
|
116
129
|
# @return [MessageInstance] Created MessageInstance
|
|
117
|
-
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
130
|
+
def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, attempt: :unset, validity_period: :unset, force_delivery: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, persistent_action: :unset, shorten_urls: :unset, schedule_type: :unset, send_at: :unset, send_as_mms: :unset, content_sid: :unset, content_variables: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
|
|
118
131
|
data = Twilio::Values.of({
|
|
119
132
|
'To' => to,
|
|
120
133
|
'From' => from,
|
|
@@ -132,9 +145,12 @@ module Twilio
|
|
|
132
145
|
'AddressRetention' => address_retention,
|
|
133
146
|
'SmartEncoded' => smart_encoded,
|
|
134
147
|
'PersistentAction' => Twilio.serialize_list(persistent_action) { |e| e },
|
|
148
|
+
'ShortenUrls' => shorten_urls,
|
|
135
149
|
'ScheduleType' => schedule_type,
|
|
136
150
|
'SendAt' => Twilio.serialize_iso8601_datetime(send_at),
|
|
137
151
|
'SendAsMms' => send_as_mms,
|
|
152
|
+
'ContentSid' => content_sid,
|
|
153
|
+
'ContentVariables' => content_variables,
|
|
138
154
|
})
|
|
139
155
|
|
|
140
156
|
payload = @version.create('POST', @uri, data: data)
|
|
@@ -242,9 +242,9 @@ module Twilio
|
|
|
242
242
|
@properties = {
|
|
243
243
|
'call_sid' => payload['call_sid'],
|
|
244
244
|
'date_enqueued' => Twilio.deserialize_rfc2822(payload['date_enqueued']),
|
|
245
|
-
'position' => payload['position'].to_i,
|
|
245
|
+
'position' => payload['position'] == nil ? payload['position'] : payload['position'].to_i,
|
|
246
246
|
'uri' => payload['uri'],
|
|
247
|
-
'wait_time' => payload['wait_time'].to_i,
|
|
247
|
+
'wait_time' => payload['wait_time'] == nil ? payload['wait_time'] : payload['wait_time'].to_i,
|
|
248
248
|
'queue_sid' => payload['queue_sid'],
|
|
249
249
|
}
|
|
250
250
|
|
|
@@ -264,14 +264,14 @@ module Twilio
|
|
|
264
264
|
# Marshaled Properties
|
|
265
265
|
@properties = {
|
|
266
266
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
267
|
-
'current_size' => payload['current_size'].to_i,
|
|
267
|
+
'current_size' => payload['current_size'] == nil ? payload['current_size'] : payload['current_size'].to_i,
|
|
268
268
|
'friendly_name' => payload['friendly_name'],
|
|
269
269
|
'uri' => payload['uri'],
|
|
270
270
|
'account_sid' => payload['account_sid'],
|
|
271
|
-
'average_wait_time' => payload['average_wait_time'].to_i,
|
|
271
|
+
'average_wait_time' => payload['average_wait_time'] == nil ? payload['average_wait_time'] : payload['average_wait_time'].to_i,
|
|
272
272
|
'sid' => payload['sid'],
|
|
273
273
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
274
|
-
'max_size' => payload['max_size'].to_i,
|
|
274
|
+
'max_size' => payload['max_size'] == nil ? payload['max_size'] : payload['max_size'].to_i,
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
# Context
|
|
@@ -234,7 +234,7 @@ module Twilio
|
|
|
234
234
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
235
235
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
236
236
|
'duration' => payload['duration'],
|
|
237
|
-
'price' => payload['price'].to_f,
|
|
237
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
238
238
|
'price_unit' => payload['price_unit'],
|
|
239
239
|
'recording_sid' => payload['recording_sid'],
|
|
240
240
|
'sid' => payload['sid'],
|
|
@@ -329,7 +329,7 @@ module Twilio
|
|
|
329
329
|
'price' => payload['price'],
|
|
330
330
|
'price_unit' => payload['price_unit'],
|
|
331
331
|
'status' => payload['status'],
|
|
332
|
-
'channels' => payload['channels'].to_i,
|
|
332
|
+
'channels' => payload['channels'] == nil ? payload['channels'] : payload['channels'].to_i,
|
|
333
333
|
'source' => payload['source'],
|
|
334
334
|
'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
|
|
335
335
|
'uri' => payload['uri'],
|
|
@@ -290,7 +290,7 @@ module Twilio
|
|
|
290
290
|
'account_sid' => payload['account_sid'],
|
|
291
291
|
'friendly_name' => payload['friendly_name'],
|
|
292
292
|
'ip_address' => payload['ip_address'],
|
|
293
|
-
'cidr_prefix_length' => payload['cidr_prefix_length'].to_i,
|
|
293
|
+
'cidr_prefix_length' => payload['cidr_prefix_length'] == nil ? payload['cidr_prefix_length'] : payload['cidr_prefix_length'].to_i,
|
|
294
294
|
'ip_access_control_list_sid' => payload['ip_access_control_list_sid'],
|
|
295
295
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
296
296
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
@@ -218,7 +218,7 @@ module Twilio
|
|
|
218
218
|
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
|
219
219
|
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
|
220
220
|
'duration' => payload['duration'],
|
|
221
|
-
'price' => payload['price'].to_f,
|
|
221
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
222
222
|
'price_unit' => payload['price_unit'],
|
|
223
223
|
'recording_sid' => payload['recording_sid'],
|
|
224
224
|
'sid' => payload['sid'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|
|
@@ -230,7 +230,7 @@ module Twilio
|
|
|
230
230
|
'count_unit' => payload['count_unit'],
|
|
231
231
|
'description' => payload['description'],
|
|
232
232
|
'end_date' => Twilio.deserialize_iso8601_date(payload['end_date']),
|
|
233
|
-
'price' => payload['price'].to_f,
|
|
233
|
+
'price' => payload['price'] == nil ? payload['price'] : payload['price'].to_f,
|
|
234
234
|
'price_unit' => payload['price_unit'],
|
|
235
235
|
'start_date' => Twilio.deserialize_iso8601_date(payload['start_date']),
|
|
236
236
|
'subresource_uris' => payload['subresource_uris'],
|