twilio-ruby 7.11.1 → 7.11.2
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/CHANGES.md +221 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/lib/rack/twilio_webhook_authentication.rb +45 -2
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +525 -0
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2.rb +10 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +0 -59
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v2/inbound.rb +2 -261
- data/lib/twilio-ruby/rest/insights/v2/inbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/outbound.rb +18 -299
- data/lib/twilio-ruby/rest/insights/v2/outbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/report.rb +27 -184
- data/lib/twilio-ruby/rest/insights/v2.rb +14 -4
- data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query_job.rb +654 -0
- data/lib/twilio-ruby/rest/insights/v3/result.rb +195 -0
- data/lib/twilio-ruby/rest/insights/v3.rb +17 -1
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +0 -80
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2.rb +0 -16
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +2 -61
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +0 -59
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +3 -62
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -61
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/type.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -4
- data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
- data/lib/twilio-ruby/rest/numbers/v2/caller_id.rb +0 -515
|
@@ -160,65 +160,6 @@ module Twilio
|
|
|
160
160
|
end
|
|
161
161
|
end
|
|
162
162
|
|
|
163
|
-
class AuthorizePageMetadata < PageMetadata
|
|
164
|
-
attr_reader :authorize_page
|
|
165
|
-
|
|
166
|
-
def initialize(version, response, solution, limit)
|
|
167
|
-
super(version, response)
|
|
168
|
-
@authorize_page = []
|
|
169
|
-
@limit = limit
|
|
170
|
-
key = get_key(response.body)
|
|
171
|
-
records = 0
|
|
172
|
-
while( limit != :unset && records < limit )
|
|
173
|
-
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
174
|
-
@payload = self.next_page
|
|
175
|
-
break unless @payload
|
|
176
|
-
records += (@payload.body[key] || []).size
|
|
177
|
-
end
|
|
178
|
-
# Path Solution
|
|
179
|
-
@solution = solution
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
def each
|
|
183
|
-
@authorize_page.each do |record|
|
|
184
|
-
yield record
|
|
185
|
-
end
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
def to_s
|
|
189
|
-
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
190
|
-
end
|
|
191
|
-
end
|
|
192
|
-
class AuthorizeListResponse < InstanceListResource
|
|
193
|
-
|
|
194
|
-
# @param [Array<AuthorizeInstance>] instance
|
|
195
|
-
# @param [Hash{String => Object}] headers
|
|
196
|
-
# @param [Integer] status_code
|
|
197
|
-
def initialize(version, payload, key, limit = :unset)
|
|
198
|
-
data_list = payload.body[key] || []
|
|
199
|
-
if limit != :unset
|
|
200
|
-
data_list = data_list[0, limit]
|
|
201
|
-
end
|
|
202
|
-
@authorize = data_list.map do |data|
|
|
203
|
-
AuthorizeInstance.new(version, data)
|
|
204
|
-
end
|
|
205
|
-
@headers = payload.headers
|
|
206
|
-
@status_code = payload.status_code
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
def authorize
|
|
210
|
-
@authorize
|
|
211
|
-
end
|
|
212
|
-
|
|
213
|
-
def headers
|
|
214
|
-
@headers
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
def status_code
|
|
218
|
-
@status_code
|
|
219
|
-
end
|
|
220
|
-
end
|
|
221
|
-
|
|
222
163
|
class AuthorizeInstance < InstanceResource
|
|
223
164
|
##
|
|
224
165
|
# Initialize the AuthorizeInstance
|
|
@@ -112,65 +112,6 @@ module Twilio
|
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
class OauthAuthorizationServerPageMetadata < PageMetadata
|
|
116
|
-
attr_reader :oauth_authorization_server_page
|
|
117
|
-
|
|
118
|
-
def initialize(version, response, solution, limit)
|
|
119
|
-
super(version, response)
|
|
120
|
-
@oauth_authorization_server_page = []
|
|
121
|
-
@limit = limit
|
|
122
|
-
key = get_key(response.body)
|
|
123
|
-
records = 0
|
|
124
|
-
while( limit != :unset && records < limit )
|
|
125
|
-
@oauth_authorization_server_page << OauthAuthorizationServerListResponse.new(version, @payload, key, limit - records)
|
|
126
|
-
@payload = self.next_page
|
|
127
|
-
break unless @payload
|
|
128
|
-
records += (@payload.body[key] || []).size
|
|
129
|
-
end
|
|
130
|
-
# Path Solution
|
|
131
|
-
@solution = solution
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
def each
|
|
135
|
-
@oauth_authorization_server_page.each do |record|
|
|
136
|
-
yield record
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
def to_s
|
|
141
|
-
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
142
|
-
end
|
|
143
|
-
end
|
|
144
|
-
class OauthAuthorizationServerListResponse < InstanceListResource
|
|
145
|
-
|
|
146
|
-
# @param [Array<OauthAuthorizationServerInstance>] instance
|
|
147
|
-
# @param [Hash{String => Object}] headers
|
|
148
|
-
# @param [Integer] status_code
|
|
149
|
-
def initialize(version, payload, key, limit = :unset)
|
|
150
|
-
data_list = payload.body[key] || []
|
|
151
|
-
if limit != :unset
|
|
152
|
-
data_list = data_list[0, limit]
|
|
153
|
-
end
|
|
154
|
-
@oauth_authorization_server = data_list.map do |data|
|
|
155
|
-
OauthAuthorizationServerInstance.new(version, data)
|
|
156
|
-
end
|
|
157
|
-
@headers = payload.headers
|
|
158
|
-
@status_code = payload.status_code
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
def oauth_authorization_server
|
|
162
|
-
@oauth_authorization_server
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
def headers
|
|
166
|
-
@headers
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
def status_code
|
|
170
|
-
@status_code
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
|
-
|
|
174
115
|
class OauthAuthorizationServerInstance < InstanceResource
|
|
175
116
|
##
|
|
176
117
|
# Initialize the OauthAuthorizationServerInstance
|
|
@@ -46,7 +46,7 @@ module Twilio
|
|
|
46
46
|
# @return [TokenInstance] Created TokenInstance
|
|
47
47
|
def create(
|
|
48
48
|
account_sid: :unset,
|
|
49
|
-
grant_type:
|
|
49
|
+
grant_type: nil,
|
|
50
50
|
client_id: :unset,
|
|
51
51
|
client_secret: :unset,
|
|
52
52
|
code: :unset,
|
|
@@ -100,7 +100,7 @@ module Twilio
|
|
|
100
100
|
# @return [TokenInstance] Created TokenInstance
|
|
101
101
|
def create_with_metadata(
|
|
102
102
|
account_sid: :unset,
|
|
103
|
-
grant_type:
|
|
103
|
+
grant_type: nil,
|
|
104
104
|
client_id: :unset,
|
|
105
105
|
client_secret: :unset,
|
|
106
106
|
code: :unset,
|
|
@@ -184,65 +184,6 @@ module Twilio
|
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
-
class TokenPageMetadata < PageMetadata
|
|
188
|
-
attr_reader :token_page
|
|
189
|
-
|
|
190
|
-
def initialize(version, response, solution, limit)
|
|
191
|
-
super(version, response)
|
|
192
|
-
@token_page = []
|
|
193
|
-
@limit = limit
|
|
194
|
-
key = get_key(response.body)
|
|
195
|
-
records = 0
|
|
196
|
-
while( limit != :unset && records < limit )
|
|
197
|
-
@token_page << TokenListResponse.new(version, @payload, key, limit - records)
|
|
198
|
-
@payload = self.next_page
|
|
199
|
-
break unless @payload
|
|
200
|
-
records += (@payload.body[key] || []).size
|
|
201
|
-
end
|
|
202
|
-
# Path Solution
|
|
203
|
-
@solution = solution
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
def each
|
|
207
|
-
@token_page.each do |record|
|
|
208
|
-
yield record
|
|
209
|
-
end
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
def to_s
|
|
213
|
-
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
class TokenListResponse < InstanceListResource
|
|
217
|
-
|
|
218
|
-
# @param [Array<TokenInstance>] instance
|
|
219
|
-
# @param [Hash{String => Object}] headers
|
|
220
|
-
# @param [Integer] status_code
|
|
221
|
-
def initialize(version, payload, key, limit = :unset)
|
|
222
|
-
data_list = payload.body[key] || []
|
|
223
|
-
if limit != :unset
|
|
224
|
-
data_list = data_list[0, limit]
|
|
225
|
-
end
|
|
226
|
-
@token = data_list.map do |data|
|
|
227
|
-
TokenInstance.new(version, data)
|
|
228
|
-
end
|
|
229
|
-
@headers = payload.headers
|
|
230
|
-
@status_code = payload.status_code
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
def token
|
|
234
|
-
@token
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
def headers
|
|
238
|
-
@headers
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
def status_code
|
|
242
|
-
@status_code
|
|
243
|
-
end
|
|
244
|
-
end
|
|
245
|
-
|
|
246
187
|
class TokenInstance < InstanceResource
|
|
247
188
|
##
|
|
248
189
|
# Initialize the TokenInstance
|
|
@@ -214,65 +214,6 @@ module Twilio
|
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
-
class UsagePageMetadata < PageMetadata
|
|
218
|
-
attr_reader :usage_page
|
|
219
|
-
|
|
220
|
-
def initialize(version, response, solution, limit)
|
|
221
|
-
super(version, response)
|
|
222
|
-
@usage_page = []
|
|
223
|
-
@limit = limit
|
|
224
|
-
key = get_key(response.body)
|
|
225
|
-
records = 0
|
|
226
|
-
while( limit != :unset && records < limit )
|
|
227
|
-
@usage_page << UsageListResponse.new(version, @payload, key, limit - records)
|
|
228
|
-
@payload = self.next_page
|
|
229
|
-
break unless @payload
|
|
230
|
-
records += (@payload.body[key] || []).size
|
|
231
|
-
end
|
|
232
|
-
# Path Solution
|
|
233
|
-
@solution = solution
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
def each
|
|
237
|
-
@usage_page.each do |record|
|
|
238
|
-
yield record
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
def to_s
|
|
243
|
-
'<Twilio::REST::Preview::WirelessPageMetadata>';
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
class UsageListResponse < InstanceListResource
|
|
247
|
-
|
|
248
|
-
# @param [Array<UsageInstance>] instance
|
|
249
|
-
# @param [Hash{String => Object}] headers
|
|
250
|
-
# @param [Integer] status_code
|
|
251
|
-
def initialize(version, payload, key, limit = :unset)
|
|
252
|
-
data_list = payload.body[key] || []
|
|
253
|
-
if limit != :unset
|
|
254
|
-
data_list = data_list[0, limit]
|
|
255
|
-
end
|
|
256
|
-
@usage = data_list.map do |data|
|
|
257
|
-
UsageInstance.new(version, data)
|
|
258
|
-
end
|
|
259
|
-
@headers = payload.headers
|
|
260
|
-
@status_code = payload.status_code
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
def usage
|
|
264
|
-
@usage
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
def headers
|
|
268
|
-
@headers
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
def status_code
|
|
272
|
-
@status_code
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
217
|
class UsageInstance < InstanceResource
|
|
277
218
|
##
|
|
278
219
|
# Initialize the UsageInstance
|
|
@@ -148,65 +148,6 @@ module Twilio
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
-
class AuthorizePageMetadata < PageMetadata
|
|
152
|
-
attr_reader :authorize_page
|
|
153
|
-
|
|
154
|
-
def initialize(version, response, solution, limit)
|
|
155
|
-
super(version, response)
|
|
156
|
-
@authorize_page = []
|
|
157
|
-
@limit = limit
|
|
158
|
-
key = get_key(response.body)
|
|
159
|
-
records = 0
|
|
160
|
-
while( limit != :unset && records < limit )
|
|
161
|
-
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
162
|
-
@payload = self.next_page
|
|
163
|
-
break unless @payload
|
|
164
|
-
records += (@payload.body[key] || []).size
|
|
165
|
-
end
|
|
166
|
-
# Path Solution
|
|
167
|
-
@solution = solution
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
def each
|
|
171
|
-
@authorize_page.each do |record|
|
|
172
|
-
yield record
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
def to_s
|
|
177
|
-
'<Twilio::REST::PreviewIam::V1PageMetadata>';
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
class AuthorizeListResponse < InstanceListResource
|
|
181
|
-
|
|
182
|
-
# @param [Array<AuthorizeInstance>] instance
|
|
183
|
-
# @param [Hash{String => Object}] headers
|
|
184
|
-
# @param [Integer] status_code
|
|
185
|
-
def initialize(version, payload, key, limit = :unset)
|
|
186
|
-
data_list = payload.body[key] || []
|
|
187
|
-
if limit != :unset
|
|
188
|
-
data_list = data_list[0, limit]
|
|
189
|
-
end
|
|
190
|
-
@authorize = data_list.map do |data|
|
|
191
|
-
AuthorizeInstance.new(version, data)
|
|
192
|
-
end
|
|
193
|
-
@headers = payload.headers
|
|
194
|
-
@status_code = payload.status_code
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def authorize
|
|
198
|
-
@authorize
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
def headers
|
|
202
|
-
@headers
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
def status_code
|
|
206
|
-
@status_code
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
151
|
class AuthorizeInstance < InstanceResource
|
|
211
152
|
##
|
|
212
153
|
# Initialize the AuthorizeInstance
|
|
@@ -168,65 +168,6 @@ module Twilio
|
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
class TokenPageMetadata < PageMetadata
|
|
172
|
-
attr_reader :token_page
|
|
173
|
-
|
|
174
|
-
def initialize(version, response, solution, limit)
|
|
175
|
-
super(version, response)
|
|
176
|
-
@token_page = []
|
|
177
|
-
@limit = limit
|
|
178
|
-
key = get_key(response.body)
|
|
179
|
-
records = 0
|
|
180
|
-
while( limit != :unset && records < limit )
|
|
181
|
-
@token_page << TokenListResponse.new(version, @payload, key, limit - records)
|
|
182
|
-
@payload = self.next_page
|
|
183
|
-
break unless @payload
|
|
184
|
-
records += (@payload.body[key] || []).size
|
|
185
|
-
end
|
|
186
|
-
# Path Solution
|
|
187
|
-
@solution = solution
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
def each
|
|
191
|
-
@token_page.each do |record|
|
|
192
|
-
yield record
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
def to_s
|
|
197
|
-
'<Twilio::REST::PreviewIam::V1PageMetadata>';
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
|
-
class TokenListResponse < InstanceListResource
|
|
201
|
-
|
|
202
|
-
# @param [Array<TokenInstance>] instance
|
|
203
|
-
# @param [Hash{String => Object}] headers
|
|
204
|
-
# @param [Integer] status_code
|
|
205
|
-
def initialize(version, payload, key, limit = :unset)
|
|
206
|
-
data_list = payload.body[key] || []
|
|
207
|
-
if limit != :unset
|
|
208
|
-
data_list = data_list[0, limit]
|
|
209
|
-
end
|
|
210
|
-
@token = data_list.map do |data|
|
|
211
|
-
TokenInstance.new(version, data)
|
|
212
|
-
end
|
|
213
|
-
@headers = payload.headers
|
|
214
|
-
@status_code = payload.status_code
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
def token
|
|
218
|
-
@token
|
|
219
|
-
end
|
|
220
|
-
|
|
221
|
-
def headers
|
|
222
|
-
@headers
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
def status_code
|
|
226
|
-
@status_code
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
|
|
230
171
|
class TokenInstance < InstanceResource
|
|
231
172
|
##
|
|
232
173
|
# Initialize the TokenInstance
|
|
@@ -254,65 +254,6 @@ module Twilio
|
|
|
254
254
|
end
|
|
255
255
|
end
|
|
256
256
|
|
|
257
|
-
class OrganizationPageMetadata < PageMetadata
|
|
258
|
-
attr_reader :organization_page
|
|
259
|
-
|
|
260
|
-
def initialize(version, response, solution, limit)
|
|
261
|
-
super(version, response)
|
|
262
|
-
@organization_page = []
|
|
263
|
-
@limit = limit
|
|
264
|
-
key = get_key(response.body)
|
|
265
|
-
records = 0
|
|
266
|
-
while( limit != :unset && records < limit )
|
|
267
|
-
@organization_page << OrganizationListResponse.new(version, @payload, key, limit - records)
|
|
268
|
-
@payload = self.next_page
|
|
269
|
-
break unless @payload
|
|
270
|
-
records += (@payload.body[key] || []).size
|
|
271
|
-
end
|
|
272
|
-
# Path Solution
|
|
273
|
-
@solution = solution
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
def each
|
|
277
|
-
@organization_page.each do |record|
|
|
278
|
-
yield record
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
def to_s
|
|
283
|
-
'<Twilio::REST::PreviewIam::VersionlessPageMetadata>';
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
class OrganizationListResponse < InstanceListResource
|
|
287
|
-
|
|
288
|
-
# @param [Array<OrganizationInstance>] instance
|
|
289
|
-
# @param [Hash{String => Object}] headers
|
|
290
|
-
# @param [Integer] status_code
|
|
291
|
-
def initialize(version, payload, key, limit = :unset)
|
|
292
|
-
data_list = payload.body[key] || []
|
|
293
|
-
if limit != :unset
|
|
294
|
-
data_list = data_list[0, limit]
|
|
295
|
-
end
|
|
296
|
-
@organization = data_list.map do |data|
|
|
297
|
-
OrganizationInstance.new(version, data)
|
|
298
|
-
end
|
|
299
|
-
@headers = payload.headers
|
|
300
|
-
@status_code = payload.status_code
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
def organization
|
|
304
|
-
@organization
|
|
305
|
-
end
|
|
306
|
-
|
|
307
|
-
def headers
|
|
308
|
-
@headers
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
def status_code
|
|
312
|
-
@status_code
|
|
313
|
-
end
|
|
314
|
-
end
|
|
315
|
-
|
|
316
257
|
class OrganizationInstance < InstanceResource
|
|
317
258
|
##
|
|
318
259
|
# Initialize the OrganizationInstance
|
|
@@ -84,65 +84,6 @@ module Twilio
|
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
class MessagingPageMetadata < PageMetadata
|
|
88
|
-
attr_reader :messaging_page
|
|
89
|
-
|
|
90
|
-
def initialize(version, response, solution, limit)
|
|
91
|
-
super(version, response)
|
|
92
|
-
@messaging_page = []
|
|
93
|
-
@limit = limit
|
|
94
|
-
key = get_key(response.body)
|
|
95
|
-
records = 0
|
|
96
|
-
while( limit != :unset && records < limit )
|
|
97
|
-
@messaging_page << MessagingListResponse.new(version, @payload, key, limit - records)
|
|
98
|
-
@payload = self.next_page
|
|
99
|
-
break unless @payload
|
|
100
|
-
records += (@payload.body[key] || []).size
|
|
101
|
-
end
|
|
102
|
-
# Path Solution
|
|
103
|
-
@solution = solution
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
def each
|
|
107
|
-
@messaging_page.each do |record|
|
|
108
|
-
yield record
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
def to_s
|
|
113
|
-
'<Twilio::REST::Pricing::V1PageMetadata>';
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
class MessagingListResponse < InstanceListResource
|
|
117
|
-
|
|
118
|
-
# @param [Array<MessagingInstance>] instance
|
|
119
|
-
# @param [Hash{String => Object}] headers
|
|
120
|
-
# @param [Integer] status_code
|
|
121
|
-
def initialize(version, payload, key, limit = :unset)
|
|
122
|
-
data_list = payload.body[key] || []
|
|
123
|
-
if limit != :unset
|
|
124
|
-
data_list = data_list[0, limit]
|
|
125
|
-
end
|
|
126
|
-
@messaging = data_list.map do |data|
|
|
127
|
-
MessagingInstance.new(version, data)
|
|
128
|
-
end
|
|
129
|
-
@headers = payload.headers
|
|
130
|
-
@status_code = payload.status_code
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
def messaging
|
|
134
|
-
@messaging
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
def headers
|
|
138
|
-
@headers
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def status_code
|
|
142
|
-
@status_code
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
87
|
class MessagingInstance < InstanceResource
|
|
147
88
|
##
|
|
148
89
|
# Initialize the MessagingInstance
|
|
@@ -84,65 +84,6 @@ module Twilio
|
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
-
class PhoneNumberPageMetadata < PageMetadata
|
|
88
|
-
attr_reader :phone_number_page
|
|
89
|
-
|
|
90
|
-
def initialize(version, response, solution, limit)
|
|
91
|
-
super(version, response)
|
|
92
|
-
@phone_number_page = []
|
|
93
|
-
@limit = limit
|
|
94
|
-
key = get_key(response.body)
|
|
95
|
-
records = 0
|
|
96
|
-
while( limit != :unset && records < limit )
|
|
97
|
-
@phone_number_page << PhoneNumberListResponse.new(version, @payload, key, limit - records)
|
|
98
|
-
@payload = self.next_page
|
|
99
|
-
break unless @payload
|
|
100
|
-
records += (@payload.body[key] || []).size
|
|
101
|
-
end
|
|
102
|
-
# Path Solution
|
|
103
|
-
@solution = solution
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
def each
|
|
107
|
-
@phone_number_page.each do |record|
|
|
108
|
-
yield record
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
def to_s
|
|
113
|
-
'<Twilio::REST::Pricing::V1PageMetadata>';
|
|
114
|
-
end
|
|
115
|
-
end
|
|
116
|
-
class PhoneNumberListResponse < InstanceListResource
|
|
117
|
-
|
|
118
|
-
# @param [Array<PhoneNumberInstance>] instance
|
|
119
|
-
# @param [Hash{String => Object}] headers
|
|
120
|
-
# @param [Integer] status_code
|
|
121
|
-
def initialize(version, payload, key, limit = :unset)
|
|
122
|
-
data_list = payload.body[key] || []
|
|
123
|
-
if limit != :unset
|
|
124
|
-
data_list = data_list[0, limit]
|
|
125
|
-
end
|
|
126
|
-
@phone_number = data_list.map do |data|
|
|
127
|
-
PhoneNumberInstance.new(version, data)
|
|
128
|
-
end
|
|
129
|
-
@headers = payload.headers
|
|
130
|
-
@status_code = payload.status_code
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
def phone_number
|
|
134
|
-
@phone_number
|
|
135
|
-
end
|
|
136
|
-
|
|
137
|
-
def headers
|
|
138
|
-
@headers
|
|
139
|
-
end
|
|
140
|
-
|
|
141
|
-
def status_code
|
|
142
|
-
@status_code
|
|
143
|
-
end
|
|
144
|
-
end
|
|
145
|
-
|
|
146
87
|
class PhoneNumberInstance < InstanceResource
|
|
147
88
|
##
|
|
148
89
|
# Initialize the PhoneNumberInstance
|
|
@@ -196,65 +196,6 @@ module Twilio
|
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
class NumberPageMetadata < PageMetadata
|
|
200
|
-
attr_reader :number_page
|
|
201
|
-
|
|
202
|
-
def initialize(version, response, solution, limit)
|
|
203
|
-
super(version, response)
|
|
204
|
-
@number_page = []
|
|
205
|
-
@limit = limit
|
|
206
|
-
key = get_key(response.body)
|
|
207
|
-
records = 0
|
|
208
|
-
while( limit != :unset && records < limit )
|
|
209
|
-
@number_page << NumberListResponse.new(version, @payload, key, limit - records)
|
|
210
|
-
@payload = self.next_page
|
|
211
|
-
break unless @payload
|
|
212
|
-
records += (@payload.body[key] || []).size
|
|
213
|
-
end
|
|
214
|
-
# Path Solution
|
|
215
|
-
@solution = solution
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
def each
|
|
219
|
-
@number_page.each do |record|
|
|
220
|
-
yield record
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
def to_s
|
|
225
|
-
'<Twilio::REST::Pricing::V1PageMetadata>';
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
class NumberListResponse < InstanceListResource
|
|
229
|
-
|
|
230
|
-
# @param [Array<NumberInstance>] instance
|
|
231
|
-
# @param [Hash{String => Object}] headers
|
|
232
|
-
# @param [Integer] status_code
|
|
233
|
-
def initialize(version, payload, key, limit = :unset)
|
|
234
|
-
data_list = payload.body[key] || []
|
|
235
|
-
if limit != :unset
|
|
236
|
-
data_list = data_list[0, limit]
|
|
237
|
-
end
|
|
238
|
-
@number = data_list.map do |data|
|
|
239
|
-
NumberInstance.new(version, data)
|
|
240
|
-
end
|
|
241
|
-
@headers = payload.headers
|
|
242
|
-
@status_code = payload.status_code
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
def number
|
|
246
|
-
@number
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
def headers
|
|
250
|
-
@headers
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
def status_code
|
|
254
|
-
@status_code
|
|
255
|
-
end
|
|
256
|
-
end
|
|
257
|
-
|
|
258
199
|
class NumberInstance < InstanceResource
|
|
259
200
|
##
|
|
260
201
|
# Initialize the NumberInstance
|