From 2da6c6e2193e86da41385e4263888d3b8ee3f0cc Mon Sep 17 00:00:00 2001 From: Jeremy McEntire Date: Fri, 10 Nov 2017 16:50:19 -0800 Subject: [PATCH] [Librarian] Regenerated @ 9a8a940052b0cd64cc253c2a38cb6ae555a4d07b --- CHANGES.md | 12 + lib/twilio-ruby/rest/accounts/v1.rb | 12 +- .../rest/accounts/v1/credential.rb | 22 +- .../rest/accounts/v1/credential/aws.rb | 338 +++++++++++++++ .../rest/accounts/v1/credential/public_key.rb | 22 +- lib/twilio-ruby/rest/api/v2010.rb | 2 +- lib/twilio-ruby/rest/api/v2010/account.rb | 102 ++--- .../rest/api/v2010/account/address.rb | 16 +- .../account/address/dependent_phone_number.rb | 4 +- .../rest/api/v2010/account/application.rb | 18 +- .../v2010/account/authorized_connect_app.rb | 8 +- .../v2010/account/available_phone_number.rb | 8 +- .../account/available_phone_number/local.rb | 2 +- .../account/available_phone_number/mobile.rb | 2 +- .../available_phone_number/toll_free.rb | 2 +- .../rest/api/v2010/account/call.rb | 26 +- .../rest/api/v2010/account/call/feedback.rb | 10 +- .../v2010/account/call/feedback_summary.rb | 10 +- .../api/v2010/account/call/notification.rb | 6 +- .../rest/api/v2010/account/call/recording.rb | 6 +- .../rest/api/v2010/account/conference.rb | 20 +- .../v2010/account/conference/participant.rb | 6 +- .../rest/api/v2010/account/connect_app.rb | 16 +- .../v2010/account/incoming_phone_number.rb | 20 +- .../incoming_phone_number/assigned_add_on.rb | 8 +- .../assigned_add_on_extension.rb | 4 +- .../account/incoming_phone_number/local.rb | 6 +- .../account/incoming_phone_number/mobile.rb | 6 +- .../incoming_phone_number/toll_free.rb | 6 +- lib/twilio-ruby/rest/api/v2010/account/key.rb | 20 +- .../rest/api/v2010/account/message.rb | 24 +- .../api/v2010/account/message/feedback.rb | 2 +- .../rest/api/v2010/account/message/media.rb | 4 +- .../rest/api/v2010/account/new_key.rb | 6 +- .../rest/api/v2010/account/new_signing_key.rb | 6 +- .../rest/api/v2010/account/notification.rb | 12 +- .../api/v2010/account/outgoing_caller_id.rb | 14 +- .../rest/api/v2010/account/queue.rb | 28 +- .../rest/api/v2010/account/queue/member.rb | 10 +- .../rest/api/v2010/account/recording.rb | 16 +- .../v2010/account/recording/add_on_result.rb | 6 +- .../recording/add_on_result/payload.rb | 4 +- .../v2010/account/recording/transcription.rb | 6 +- .../rest/api/v2010/account/short_code.rb | 16 +- .../rest/api/v2010/account/signing_key.rb | 20 +- lib/twilio-ruby/rest/api/v2010/account/sip.rb | 14 +- .../api/v2010/account/sip/credential_list.rb | 22 +- .../account/sip/credential_list/credential.rb | 12 +- .../rest/api/v2010/account/sip/domain.rb | 22 +- .../sip/domain/credential_list_mapping.rb | 8 +- .../domain/ip_access_control_list_mapping.rb | 8 +- .../account/sip/ip_access_control_list.rb | 22 +- .../sip/ip_access_control_list/ip_address.rb | 10 +- .../rest/api/v2010/account/token.rb | 6 +- .../rest/api/v2010/account/transcription.rb | 12 +- .../rest/api/v2010/account/usage.rb | 8 +- .../rest/api/v2010/account/usage/record.rb | 20 +- .../v2010/account/usage/record/all_time.rb | 4 +- .../api/v2010/account/usage/record/daily.rb | 4 +- .../v2010/account/usage/record/last_month.rb | 4 +- .../api/v2010/account/usage/record/monthly.rb | 4 +- .../v2010/account/usage/record/this_month.rb | 4 +- .../api/v2010/account/usage/record/today.rb | 4 +- .../api/v2010/account/usage/record/yearly.rb | 4 +- .../v2010/account/usage/record/yesterday.rb | 4 +- .../rest/api/v2010/account/usage/trigger.rb | 16 +- .../api/v2010/account/validation_request.rb | 4 +- lib/twilio-ruby/rest/chat/v1.rb | 4 +- lib/twilio-ruby/rest/chat/v1/credential.rb | 18 +- lib/twilio-ruby/rest/chat/v1/service.rb | 32 +- .../rest/chat/v1/service/channel.rb | 26 +- .../rest/chat/v1/service/channel/invite.rb | 8 +- .../rest/chat/v1/service/channel/member.rb | 10 +- .../rest/chat/v1/service/channel/message.rb | 12 +- lib/twilio-ruby/rest/chat/v1/service/role.rb | 22 +- lib/twilio-ruby/rest/chat/v1/service/user.rb | 20 +- .../rest/chat/v1/service/user/user_channel.rb | 4 +- lib/twilio-ruby/rest/chat/v2.rb | 4 +- lib/twilio-ruby/rest/chat/v2/credential.rb | 18 +- lib/twilio-ruby/rest/chat/v2/service.rb | 36 +- .../rest/chat/v2/service/binding.rb | 14 +- .../rest/chat/v2/service/channel.rb | 24 +- .../rest/chat/v2/service/channel/invite.rb | 8 +- .../rest/chat/v2/service/channel/member.rb | 6 +- .../rest/chat/v2/service/channel/message.rb | 6 +- lib/twilio-ruby/rest/chat/v2/service/role.rb | 22 +- lib/twilio-ruby/rest/chat/v2/service/user.rb | 22 +- .../rest/chat/v2/service/user/user_binding.rb | 8 +- .../rest/chat/v2/service/user/user_channel.rb | 4 +- lib/twilio-ruby/rest/fax/v1.rb | 2 +- lib/twilio-ruby/rest/fax/v1/fax.rb | 24 +- lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb | 14 +- lib/twilio-ruby/rest/ip_messaging/v1.rb | 4 +- .../rest/ip_messaging/v1/credential.rb | 18 +- .../rest/ip_messaging/v1/service.rb | 32 +- .../rest/ip_messaging/v1/service/channel.rb | 26 +- .../ip_messaging/v1/service/channel/invite.rb | 8 +- .../ip_messaging/v1/service/channel/member.rb | 10 +- .../v1/service/channel/message.rb | 12 +- .../rest/ip_messaging/v1/service/role.rb | 22 +- .../rest/ip_messaging/v1/service/user.rb | 20 +- .../v1/service/user/user_channel.rb | 4 +- lib/twilio-ruby/rest/ip_messaging/v2.rb | 4 +- .../rest/ip_messaging/v2/credential.rb | 18 +- .../rest/ip_messaging/v2/service.rb | 36 +- .../rest/ip_messaging/v2/service/binding.rb | 14 +- .../rest/ip_messaging/v2/service/channel.rb | 24 +- .../ip_messaging/v2/service/channel/invite.rb | 8 +- .../ip_messaging/v2/service/channel/member.rb | 6 +- .../v2/service/channel/message.rb | 6 +- .../rest/ip_messaging/v2/service/role.rb | 22 +- .../rest/ip_messaging/v2/service/user.rb | 22 +- .../v2/service/user/user_binding.rb | 8 +- .../v2/service/user/user_channel.rb | 4 +- lib/twilio-ruby/rest/lookups/v1.rb | 2 +- .../rest/lookups/v1/phone_number.rb | 12 +- lib/twilio-ruby/rest/messaging/v1.rb | 2 +- lib/twilio-ruby/rest/messaging/v1/service.rb | 30 +- .../rest/messaging/v1/service/alpha_sender.rb | 18 +- .../rest/messaging/v1/service/phone_number.rb | 18 +- .../rest/messaging/v1/service/short_code.rb | 18 +- lib/twilio-ruby/rest/monitor/v1.rb | 4 +- lib/twilio-ruby/rest/monitor/v1/alert.rb | 12 +- lib/twilio-ruby/rest/monitor/v1/event.rb | 12 +- lib/twilio-ruby/rest/notify/v1.rb | 4 +- lib/twilio-ruby/rest/notify/v1/credential.rb | 18 +- lib/twilio-ruby/rest/notify/v1/service.rb | 30 +- .../rest/notify/v1/service/binding.rb | 14 +- .../rest/notify/v1/service/notification.rb | 4 +- .../rest/notify/v1/service/segment.rb | 6 +- .../rest/notify/v1/service/user.rb | 18 +- .../v1/service/user/segment_memberships.rb | 4 +- .../notify/v1/service/user/user_binding.rb | 8 +- lib/twilio-ruby/rest/preview.rb | 15 + lib/twilio-ruby/rest/preview/acc_security.rb | 2 +- .../rest/preview/acc_security/service.rb | 28 +- .../acc_security/service/verification.rb | 6 +- .../service/verification_check.rb | 6 +- lib/twilio-ruby/rest/preview/bulk_exports.rb | 4 +- .../rest/preview/bulk_exports/export.rb | 12 +- .../rest/preview/bulk_exports/export/day.rb | 6 +- .../bulk_exports/export_configuration.rb | 14 +- .../rest/preview/deployed_devices.rb | 2 +- .../rest/preview/deployed_devices/fleet.rb | 38 +- .../deployed_devices/fleet/certificate.rb | 22 +- .../deployed_devices/fleet/deployment.rb | 24 +- .../preview/deployed_devices/fleet/device.rb | 18 +- .../preview/deployed_devices/fleet/key.rb | 24 +- .../rest/preview/hosted_numbers.rb | 4 +- .../hosted_numbers/authorization_document.rb | 18 +- .../hosted_numbers/hosted_number_order.rb | 20 +- lib/twilio-ruby/rest/preview/marketplace.rb | 4 +- .../preview/marketplace/available_add_on.rb | 18 +- .../available_add_on_extension.rb | 8 +- .../preview/marketplace/installed_add_on.rb | 24 +- .../installed_add_on_extension.rb | 12 +- lib/twilio-ruby/rest/preview/proxy.rb | 2 +- lib/twilio-ruby/rest/preview/proxy/service.rb | 32 +- .../preview/proxy/service/phone_number.rb | 18 +- .../rest/preview/proxy/service/session.rb | 24 +- .../proxy/service/session/interaction.rb | 4 +- .../proxy/service/session/participant.rb | 4 +- .../participant/message_interaction.rb | 6 +- .../rest/preview/proxy/service/short_code.rb | 18 +- lib/twilio-ruby/rest/preview/studio.rb | 41 ++ lib/twilio-ruby/rest/preview/studio/flow.rb | 353 ++++++++++++++++ .../rest/preview/studio/flow/engagement.rb | 384 ++++++++++++++++++ .../preview/studio/flow/engagement/step.rb | 348 ++++++++++++++++ lib/twilio-ruby/rest/preview/sync.rb | 2 +- lib/twilio-ruby/rest/preview/sync/service.rb | 30 +- .../rest/preview/sync/service/document.rb | 26 +- .../service/document/document_permission.rb | 10 +- .../rest/preview/sync/service/sync_list.rb | 22 +- .../sync/service/sync_list/sync_list_item.rb | 12 +- .../service/sync_list/sync_list_permission.rb | 10 +- .../rest/preview/sync/service/sync_map.rb | 22 +- .../sync/service/sync_map/sync_map_item.rb | 14 +- .../service/sync_map/sync_map_permission.rb | 10 +- lib/twilio-ruby/rest/preview/understand.rb | 2 +- .../rest/preview/understand/service.rb | 34 +- .../preview/understand/service/field_type.rb | 26 +- .../service/field_type/field_value.rb | 8 +- .../rest/preview/understand/service/intent.rb | 32 +- .../understand/service/intent/field.rb | 8 +- .../understand/service/intent/sample.rb | 12 +- .../preview/understand/service/model_build.rb | 24 +- .../rest/preview/understand/service/query.rb | 20 +- lib/twilio-ruby/rest/preview/wireless.rb | 6 +- .../rest/preview/wireless/command.rb | 14 +- .../rest/preview/wireless/rate_plan.rb | 22 +- lib/twilio-ruby/rest/preview/wireless/sim.rb | 16 +- .../rest/preview/wireless/sim/usage.rb | 14 +- lib/twilio-ruby/rest/pricing/v1.rb | 36 +- lib/twilio-ruby/rest/pricing/v1/messaging.rb | 8 +- .../rest/pricing/v1/messaging/country.rb | 14 +- .../rest/pricing/v1/phone_number.rb | 8 +- .../rest/pricing/v1/phone_number/country.rb | 14 +- lib/twilio-ruby/rest/pricing/v1/voice.rb | 12 +- .../rest/pricing/v1/voice/country.rb | 14 +- .../rest/pricing/v1/voice/number.rb | 10 +- lib/twilio-ruby/rest/proxy/v1.rb | 2 +- lib/twilio-ruby/rest/proxy/v1/service.rb | 106 ++++- .../rest/proxy/v1/service/phone_number.rb | 21 +- .../rest/proxy/v1/service/session.rb | 54 ++- .../proxy/v1/service/session/interaction.rb | 4 +- .../proxy/v1/service/session/participant.rb | 51 +-- .../participant/message_interaction.rb | 6 +- .../rest/proxy/v1/service/short_code.rb | 20 +- lib/twilio-ruby/rest/sync/v1.rb | 2 +- lib/twilio-ruby/rest/sync/v1/service.rb | 34 +- .../rest/sync/v1/service/document.rb | 26 +- .../service/document/document_permission.rb | 10 +- .../rest/sync/v1/service/sync_list.rb | 22 +- .../v1/service/sync_list/sync_list_item.rb | 12 +- .../service/sync_list/sync_list_permission.rb | 10 +- .../rest/sync/v1/service/sync_map.rb | 22 +- .../sync/v1/service/sync_map/sync_map_item.rb | 14 +- .../service/sync_map/sync_map_permission.rb | 10 +- .../rest/sync/v1/service/sync_stream.rb | 18 +- .../v1/service/sync_stream/stream_message.rb | 4 +- lib/twilio-ruby/rest/taskrouter/v1.rb | 2 +- .../rest/taskrouter/v1/workspace.rb | 52 +-- .../rest/taskrouter/v1/workspace/activity.rb | 24 +- .../rest/taskrouter/v1/workspace/event.rb | 12 +- .../rest/taskrouter/v1/workspace/task.rb | 18 +- .../v1/workspace/task/reservation.rb | 6 +- .../taskrouter/v1/workspace/task_channel.rb | 12 +- .../taskrouter/v1/workspace/task_queue.rb | 20 +- .../task_queue_cumulative_statistics.rb | 4 +- .../task_queue_real_time_statistics.rb | 8 +- .../task_queue/task_queue_statistics.rb | 4 +- .../task_queue/task_queues_statistics.rb | 4 +- .../rest/taskrouter/v1/workspace/worker.rb | 32 +- .../v1/workspace/worker/reservation.rb | 6 +- .../v1/workspace/worker/worker_channel.rb | 10 +- .../v1/workspace/worker/worker_statistics.rb | 6 +- .../worker/workers_cumulative_statistics.rb | 12 +- .../worker/workers_real_time_statistics.rb | 14 +- .../v1/workspace/worker/workers_statistics.rb | 10 +- .../rest/taskrouter/v1/workspace/workflow.rb | 24 +- .../workflow_cumulative_statistics.rb | 4 +- .../workflow/workflow_real_time_statistics.rb | 8 +- .../workspace/workflow/workflow_statistics.rb | 4 +- .../workspace_cumulative_statistics.rb | 10 +- .../workspace_real_time_statistics.rb | 14 +- .../v1/workspace/workspace_statistics.rb | 10 +- lib/twilio-ruby/rest/trunking/v1.rb | 2 +- lib/twilio-ruby/rest/trunking/v1/trunk.rb | 34 +- .../rest/trunking/v1/trunk/credential_list.rb | 18 +- .../v1/trunk/ip_access_control_list.rb | 16 +- .../rest/trunking/v1/trunk/origination_url.rb | 18 +- .../rest/trunking/v1/trunk/phone_number.rb | 18 +- lib/twilio-ruby/rest/video/v1.rb | 4 +- lib/twilio-ruby/rest/video/v1/recording.rb | 12 +- lib/twilio-ruby/rest/video/v1/room.rb | 28 +- .../rest/video/v1/room/recording.rb | 12 +- .../rest/video/v1/room/room_participant.rb | 20 +- .../room_participant_published_track.rb | 6 +- lib/twilio-ruby/rest/wireless/v1.rb | 6 +- lib/twilio-ruby/rest/wireless/v1/command.rb | 16 +- lib/twilio-ruby/rest/wireless/v1/rate_plan.rb | 22 +- lib/twilio-ruby/rest/wireless/v1/sim.rb | 18 +- .../rest/wireless/v1/sim/data_session.rb | 6 +- .../rest/wireless/v1/sim/usage_record.rb | 6 +- .../accounts/v1/credential/aws_spec.rb | 224 ++++++++++ .../accounts/v1/credential/public_key_spec.rb | 2 +- .../api/v2010/account/application_spec.rb | 2 +- .../api/v2010/account/call/feedback_spec.rb | 4 +- .../api/v2010/account/call_spec.rb | 2 +- .../account/conference/participant_spec.rb | 2 +- .../assigned_add_on_spec.rb | 2 +- .../incoming_phone_number/local_spec.rb | 2 +- .../incoming_phone_number/mobile_spec.rb | 2 +- .../incoming_phone_number/toll_free_spec.rb | 2 +- .../api/v2010/account/message_spec.rb | 4 +- .../api/v2010/account/queue/member_spec.rb | 2 +- .../api/v2010/account/queue_spec.rb | 2 +- .../sip/credential_list/credential_spec.rb | 2 +- .../v2010/account/sip/credential_list_spec.rb | 4 +- .../domain/credential_list_mapping_spec.rb | 2 +- .../ip_access_control_list_mapping_spec.rb | 2 +- .../api/v2010/account/sip/domain_spec.rb | 2 +- .../ip_access_control_list/ip_address_spec.rb | 2 +- .../sip/ip_access_control_list_spec.rb | 4 +- .../v2010/account/validation_request_spec.rb | 2 +- spec/integration/chat/v1/credential_spec.rb | 2 +- .../chat/v1/service/channel/invite_spec.rb | 2 +- .../chat/v1/service/channel/member_spec.rb | 2 +- .../chat/v1/service/channel/message_spec.rb | 2 +- spec/integration/chat/v1/service/role_spec.rb | 2 +- spec/integration/chat/v1/service/user_spec.rb | 2 +- spec/integration/chat/v1/service_spec.rb | 2 +- spec/integration/chat/v2/credential_spec.rb | 2 +- .../chat/v2/service/channel/invite_spec.rb | 2 +- .../chat/v2/service/channel/member_spec.rb | 2 +- spec/integration/chat/v2/service/role_spec.rb | 2 +- spec/integration/chat/v2/service/user_spec.rb | 2 +- spec/integration/chat/v2/service_spec.rb | 2 +- spec/integration/fax/v1/fax_spec.rb | 2 +- .../ip_messaging/v1/credential_spec.rb | 2 +- .../v1/service/channel/invite_spec.rb | 2 +- .../v1/service/channel/member_spec.rb | 2 +- .../v1/service/channel/message_spec.rb | 2 +- .../ip_messaging/v1/service/role_spec.rb | 2 +- .../ip_messaging/v1/service/user_spec.rb | 2 +- .../ip_messaging/v1/service_spec.rb | 2 +- .../ip_messaging/v2/credential_spec.rb | 2 +- .../v2/service/channel/invite_spec.rb | 2 +- .../v2/service/channel/member_spec.rb | 2 +- .../ip_messaging/v2/service/role_spec.rb | 2 +- .../ip_messaging/v2/service/user_spec.rb | 2 +- .../ip_messaging/v2/service_spec.rb | 2 +- .../messaging/v1/service/alpha_sender_spec.rb | 2 +- .../messaging/v1/service/phone_number_spec.rb | 2 +- .../messaging/v1/service/short_code_spec.rb | 2 +- spec/integration/messaging/v1/service_spec.rb | 2 +- spec/integration/notify/v1/credential_spec.rb | 2 +- .../notify/v1/service/binding_spec.rb | 2 +- .../service/user/segment_memberships_spec.rb | 2 +- .../v1/service/user/user_binding_spec.rb | 2 +- .../notify/v1/service/user_spec.rb | 2 +- .../service/verification_check_spec.rb | 2 +- .../acc_security/service/verification_spec.rb | 2 +- .../preview/acc_security/service_spec.rb | 2 +- .../fleet/certificate_spec.rb | 2 +- .../hosted_number_order_spec.rb | 8 +- .../installed_add_on_extension_spec.rb | 2 +- .../proxy/service/phone_number_spec.rb | 2 +- .../proxy/service/session/participant_spec.rb | 2 +- .../preview/proxy/service/short_code_spec.rb | 2 +- .../studio/flow/engagement/step_spec.rb | 96 +++++ .../preview/studio/flow/engagement_spec.rb | 171 ++++++++ spec/integration/preview/studio/flow_spec.rb | 115 ++++++ .../document/document_permission_spec.rb | 2 +- .../preview/sync/service/document_spec.rb | 2 +- .../service/sync_list/sync_list_item_spec.rb | 4 +- .../sync_list/sync_list_permission_spec.rb | 2 +- .../service/sync_map/sync_map_item_spec.rb | 4 +- .../sync_map/sync_map_permission_spec.rb | 2 +- .../service/field_type/field_value_spec.rb | 2 +- .../understand/service/field_type_spec.rb | 2 +- .../understand/service/intent/field_spec.rb | 2 +- .../understand/service/intent/sample_spec.rb | 2 +- .../preview/understand/service/intent_spec.rb | 2 +- .../preview/understand/service/query_spec.rb | 2 +- .../preview/wireless/command_spec.rb | 2 +- .../proxy/v1/service/phone_number_spec.rb | 22 +- .../v1/service/session/participant_spec.rb | 5 +- .../proxy/v1/service/session_spec.rb | 3 + .../proxy/v1/service/short_code_spec.rb | 17 +- spec/integration/proxy/v1/service_spec.rb | 12 + .../document/document_permission_spec.rb | 2 +- .../sync/v1/service/document_spec.rb | 2 +- .../service/sync_list/sync_list_item_spec.rb | 4 +- .../sync_list/sync_list_permission_spec.rb | 2 +- .../v1/service/sync_map/sync_map_item_spec.rb | 4 +- .../sync_map/sync_map_permission_spec.rb | 2 +- .../sync_stream/stream_message_spec.rb | 2 +- .../taskrouter/v1/workspace/activity_spec.rb | 2 +- .../taskrouter/v1/workspace/worker_spec.rb | 2 +- .../taskrouter/v1/workspace/workflow_spec.rb | 2 +- .../taskrouter/v1/workspace_spec.rb | 2 +- .../trunking/v1/trunk/credential_list_spec.rb | 2 +- .../v1/trunk/ip_access_control_list_spec.rb | 2 +- .../trunking/v1/trunk/phone_number_spec.rb | 2 +- spec/integration/video/v1/room_spec.rb | 2 +- spec/integration/wireless/v1/command_spec.rb | 2 +- 367 files changed, 4111 insertions(+), 1939 deletions(-) create mode 100644 lib/twilio-ruby/rest/accounts/v1/credential/aws.rb create mode 100644 lib/twilio-ruby/rest/preview/studio.rb create mode 100644 lib/twilio-ruby/rest/preview/studio/flow.rb create mode 100644 lib/twilio-ruby/rest/preview/studio/flow/engagement.rb create mode 100644 lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb create mode 100644 spec/integration/accounts/v1/credential/aws_spec.rb create mode 100644 spec/integration/preview/studio/flow/engagement/step_spec.rb create mode 100644 spec/integration/preview/studio/flow/engagement_spec.rb create mode 100644 spec/integration/preview/studio/flow_spec.rb diff --git a/CHANGES.md b/CHANGES.md index 9ccf11156..4a83b74c2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,18 @@ twilio-ruby changelog ===================== +[2017-11-10] Version 5.4.5 +--------------------------- +**Accounts** +- Add AWS credential type + +**Preview** +- Removed `iso_country` as required field for creating a HostedNumberOrder. + +**Proxy** +- Added new fields to Service: geo_match_level, number_selection_behavior, intercept_callback_url, out_of_session_callback_url + + [2017-11-03] Version 5.4.4 --------------------------- **Library** diff --git a/lib/twilio-ruby/rest/accounts/v1.rb b/lib/twilio-ruby/rest/accounts/v1.rb index 193f03c2d..75a79f634 100644 --- a/lib/twilio-ruby/rest/accounts/v1.rb +++ b/lib/twilio-ruby/rest/accounts/v1.rb @@ -17,15 +17,9 @@ def initialize(domain) end ## - # @return [Twilio::REST::Accounts::V1::CredentialInstance] - def credentials(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @credentials ||= CredentialList.new self - else - CredentialContext.new(self, sid) - end + # @return [Twilio::REST::Accounts::V1::CredentialContext] + def credentials + @credentials ||= CredentialList.new self end ## diff --git a/lib/twilio-ruby/rest/accounts/v1/credential.rb b/lib/twilio-ruby/rest/accounts/v1/credential.rb index 32c5a882d..4dc110b0d 100644 --- a/lib/twilio-ruby/rest/accounts/v1/credential.rb +++ b/lib/twilio-ruby/rest/accounts/v1/credential.rb @@ -21,6 +21,7 @@ def initialize(version) # Components @public_key = nil + @aws = nil end ## @@ -33,10 +34,25 @@ def public_key(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PublicKeyContext.new(@version, sid,) + return PublicKeyContext.new(@version, sid) end - @public_key ||= PublicKeyList.new(@version,) + @public_key ||= PublicKeyList.new(@version) + end + + ## + # Access the aws + # @param [String] sid The sid + # @return [AwsList] + # @return [AwsContext] if sid was passed. + def aws(sid=:unset) + raise ArgumentError, 'sid cannot be nil' if sid.nil? + + if sid != :unset + return AwsContext.new(@version, sid) + end + + @aws ||= AwsList.new(@version) end ## @@ -65,7 +81,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## diff --git a/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb b/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb new file mode 100644 index 000000000..23d1714ac --- /dev/null +++ b/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb @@ -0,0 +1,338 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +module Twilio + module REST + class Accounts < Domain + class V1 < Version + class CredentialList < ListResource + class AwsList < ListResource + ## + # Initialize the AwsList + # @param [Version] version Version that contains the resource + # @return [AwsList] AwsList + def initialize(version) + super(version) + + # Path Solution + @solution = {} + @uri = "/Credentials/AWS" + end + + ## + # Lists AwsInstance records from the API as a list. + # Unlike stream(), this operation is eager and will load `limit` records into + # memory before returning. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Array] Array of up to limit results + def list(limit: nil, page_size: nil) + self.stream(limit: limit, page_size: page_size).entries + end + + ## + # Streams AwsInstance records from the API as an Enumerable. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit. + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Enumerable] Enumerable that will yield up to limit results + def stream(limit: nil, page_size: nil) + limits = @version.read_limits(limit, page_size) + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) + end + + ## + # When passed a block, yields AwsInstance records from the API. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + def each + limits = @version.read_limits + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, + limit: limits[:limit], + page_limit: limits[:page_limit]).each {|x| yield x} + end + + ## + # Retrieve a single page of AwsInstance records from the API. + # Request is executed immediately. + # @param [String] page_token PageToken provided by the API + # @param [Integer] page_number Page Number, this value is simply for client state + # @param [Integer] page_size Number of records to return, defaults to 50 + # @return [Page] Page of AwsInstance + def page(page_token: :unset, page_number: :unset, page_size: :unset) + params = Twilio::Values.of({ + 'PageToken' => page_token, + 'Page' => page_number, + 'PageSize' => page_size, + }) + response = @version.page( + 'GET', + @uri, + params + ) + AwsPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of AwsInstance records from the API. + # Request is executed immediately. + # @param [String] target_url API-generated URL for the requested results page + # @return [Page] Page of AwsInstance + def get_page(target_url) + response = @version.domain.request( + 'GET', + target_url + ) + AwsPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of AwsInstance records from the API. + # Request is executed immediately. + # @param [String] credentials The credentials + # @param [String] friendly_name The friendly_name + # @param [String] account_sid The account_sid + # @return [AwsInstance] Newly created AwsInstance + def create(credentials: nil, friendly_name: :unset, account_sid: :unset) + data = Twilio::Values.of({ + 'Credentials' => credentials, + 'FriendlyName' => friendly_name, + 'AccountSid' => account_sid, + }) + + payload = @version.create( + 'POST', + @uri, + data: data + ) + + AwsInstance.new(@version, payload) + end + + ## + # Provide a user friendly representation + def to_s + '#' + end + end + + class AwsPage < Page + ## + # Initialize the AwsPage + # @param [Version] version Version that contains the resource + # @param [Response] response Response from the API + # @param [Hash] solution Path solution for the resource + # @return [AwsPage] AwsPage + def initialize(version, response, solution) + super(version, response) + + # Path Solution + @solution = solution + end + + ## + # Build an instance of AwsInstance + # @param [Hash] payload Payload response from the API + # @return [AwsInstance] AwsInstance + def get_instance(payload) + AwsInstance.new(@version, payload) + end + + ## + # Provide a user friendly representation + def to_s + '' + end + end + + class AwsContext < InstanceContext + ## + # Initialize the AwsContext + # @param [Version] version Version that contains the resource + # @param [String] sid The sid + # @return [AwsContext] AwsContext + def initialize(version, sid) + super(version) + + # Path Solution + @solution = {sid: sid} + @uri = "/Credentials/AWS/#{@solution[:sid]}" + end + + ## + # Fetch a AwsInstance + # @return [AwsInstance] Fetched AwsInstance + def fetch + params = Twilio::Values.of({}) + + payload = @version.fetch( + 'GET', + @uri, + params, + ) + + AwsInstance.new(@version, payload, sid: @solution[:sid]) + end + + ## + # Update the AwsInstance + # @param [String] friendly_name The friendly_name + # @return [AwsInstance] Updated AwsInstance + def update(friendly_name: :unset) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) + + payload = @version.update( + 'POST', + @uri, + data: data, + ) + + AwsInstance.new(@version, payload, sid: @solution[:sid]) + end + + ## + # Deletes the AwsInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + @version.delete('delete', @uri) + end + + ## + # Provide a user friendly representation + def to_s + context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') + "#" + end + end + + class AwsInstance < InstanceResource + ## + # Initialize the AwsInstance + # @param [Version] version Version that contains the resource + # @param [Hash] payload payload that contains response from Twilio + # @param [String] sid The sid + # @return [AwsInstance] AwsInstance + def initialize(version, payload, sid: nil) + super(version) + + # Marshaled Properties + @properties = { + 'sid' => payload['sid'], + 'account_sid' => payload['account_sid'], + 'friendly_name' => payload['friendly_name'], + 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), + 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), + 'url' => payload['url'], + } + + # Context + @instance_context = nil + @params = {'sid' => sid || @properties['sid']} + end + + ## + # Generate an instance context for the instance, the context is capable of + # performing various actions. All instance actions are proxied to the context + # @return [AwsContext] AwsContext for this AwsInstance + def context + unless @instance_context + @instance_context = AwsContext.new(@version, @params['sid']) + end + @instance_context + end + + ## + # @return [String] The sid + def sid + @properties['sid'] + end + + ## + # @return [String] The account_sid + def account_sid + @properties['account_sid'] + end + + ## + # @return [String] The friendly_name + def friendly_name + @properties['friendly_name'] + end + + ## + # @return [Time] The date_created + def date_created + @properties['date_created'] + end + + ## + # @return [Time] The date_updated + def date_updated + @properties['date_updated'] + end + + ## + # @return [String] The url + def url + @properties['url'] + end + + ## + # Fetch a AwsInstance + # @return [AwsInstance] Fetched AwsInstance + def fetch + context.fetch + end + + ## + # Update the AwsInstance + # @param [String] friendly_name The friendly_name + # @return [AwsInstance] Updated AwsInstance + def update(friendly_name: :unset) + context.update(friendly_name: friendly_name) + end + + ## + # Deletes the AwsInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + context.delete + end + + ## + # Provide a user friendly representation + def to_s + values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + + ## + # Provide a detailed, user friendly representation + def inspect + values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb b/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb index a6bb81270..49dbca6a9 100644 --- a/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +++ b/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb @@ -51,7 +51,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -63,7 +63,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -127,7 +127,7 @@ def create(public_key: nil, friendly_name: :unset, account_sid: :unset) data: data ) - PublicKeyInstance.new(@version, payload,) + PublicKeyInstance.new(@version, payload) end ## @@ -156,7 +156,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PublicKeyInstance] PublicKeyInstance def get_instance(payload) - PublicKeyInstance.new(@version, payload,) + PublicKeyInstance.new(@version, payload) end ## @@ -177,7 +177,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/PublicKeys/#{@solution[:sid]}" end @@ -193,7 +193,7 @@ def fetch params, ) - PublicKeyInstance.new(@version, payload, sid: @solution[:sid],) + PublicKeyInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -202,7 +202,7 @@ def fetch # to 64 characters. # @return [PublicKeyInstance] Updated PublicKeyInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -210,7 +210,7 @@ def update(friendly_name: :unset) data: data, ) - PublicKeyInstance.new(@version, payload, sid: @solution[:sid],) + PublicKeyInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, sid: nil) # @return [PublicKeyContext] PublicKeyContext for this PublicKeyInstance def context unless @instance_context - @instance_context = PublicKeyContext.new(@version, @params['sid'],) + @instance_context = PublicKeyContext.new(@version, @params['sid']) end @instance_context end @@ -314,7 +314,7 @@ def fetch # to 64 characters. # @return [PublicKeyInstance] Updated PublicKeyInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010.rb b/lib/twilio-ruby/rest/api/v2010.rb index 8e47e6691..af4ad0fe4 100644 --- a/lib/twilio-ruby/rest/api/v2010.rb +++ b/lib/twilio-ruby/rest/api/v2010.rb @@ -20,7 +20,7 @@ def initialize(domain) ## # @param [String] sid The Account Sid that uniquely identifies the account to # fetch - # @return [Twilio::REST::Api::V2010::AccountInstance] if sid was passed. + # @return [Twilio::REST::Api::V2010::AccountContext] if sid was passed. # @return [Twilio::REST::Api::V2010::AccountList] def accounts(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/api/v2010/account.rb b/lib/twilio-ruby/rest/api/v2010/account.rb index 0b47f4eb2..9df0f50f4 100644 --- a/lib/twilio-ruby/rest/api/v2010/account.rb +++ b/lib/twilio-ruby/rest/api/v2010/account.rb @@ -28,7 +28,7 @@ def initialize(version) # create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}` # @return [AccountInstance] Newly created AccountInstance def create(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -36,7 +36,7 @@ def create(friendly_name: :unset) data: data ) - AccountInstance.new(@version, payload,) + AccountInstance.new(@version, payload) end ## @@ -74,7 +74,7 @@ def list(friendly_name: :unset, status: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, status: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, status: status, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, status: status, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -86,7 +86,7 @@ def stream(friendly_name: :unset, status: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AccountInstance] AccountInstance def get_instance(payload) - AccountInstance.new(@version, payload,) + AccountInstance.new(@version, payload) end ## @@ -179,7 +179,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Accounts/#{@solution[:sid]}.json" # Dependents @@ -220,7 +220,7 @@ def fetch params, ) - AccountInstance.new(@version, payload, sid: @solution[:sid],) + AccountInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -231,7 +231,7 @@ def fetch # Status # @return [AccountInstance] Updated AccountInstance def update(friendly_name: :unset, status: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Status' => status,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Status' => status}) payload = @version.update( 'POST', @@ -239,7 +239,7 @@ def update(friendly_name: :unset, status: :unset) data: data, ) - AccountInstance.new(@version, payload, sid: @solution[:sid],) + AccountInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -250,11 +250,11 @@ def addresses(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return AddressContext.new(@version, @solution[:sid], sid,) + return AddressContext.new(@version, @solution[:sid], sid) end unless @addresses - @addresses = AddressList.new(@version, account_sid: @solution[:sid],) + @addresses = AddressList.new(@version, account_sid: @solution[:sid]) end @addresses @@ -268,11 +268,11 @@ def applications(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ApplicationContext.new(@version, @solution[:sid], sid,) + return ApplicationContext.new(@version, @solution[:sid], sid) end unless @applications - @applications = ApplicationList.new(@version, account_sid: @solution[:sid],) + @applications = ApplicationList.new(@version, account_sid: @solution[:sid]) end @applications @@ -286,11 +286,11 @@ def authorized_connect_apps(connect_app_sid=:unset) raise ArgumentError, 'connect_app_sid cannot be nil' if connect_app_sid.nil? if connect_app_sid != :unset - return AuthorizedConnectAppContext.new(@version, @solution[:sid], connect_app_sid,) + return AuthorizedConnectAppContext.new(@version, @solution[:sid], connect_app_sid) end unless @authorized_connect_apps - @authorized_connect_apps = AuthorizedConnectAppList.new(@version, account_sid: @solution[:sid],) + @authorized_connect_apps = AuthorizedConnectAppList.new(@version, account_sid: @solution[:sid]) end @authorized_connect_apps @@ -304,7 +304,7 @@ def available_phone_numbers(country_code=:unset) raise ArgumentError, 'country_code cannot be nil' if country_code.nil? if country_code != :unset - return AvailablePhoneNumberCountryContext.new(@version, @solution[:sid], country_code,) + return AvailablePhoneNumberCountryContext.new(@version, @solution[:sid], country_code) end unless @available_phone_numbers @@ -325,11 +325,11 @@ def calls(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CallContext.new(@version, @solution[:sid], sid,) + return CallContext.new(@version, @solution[:sid], sid) end unless @calls - @calls = CallList.new(@version, account_sid: @solution[:sid],) + @calls = CallList.new(@version, account_sid: @solution[:sid]) end @calls @@ -343,11 +343,11 @@ def conferences(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ConferenceContext.new(@version, @solution[:sid], sid,) + return ConferenceContext.new(@version, @solution[:sid], sid) end unless @conferences - @conferences = ConferenceList.new(@version, account_sid: @solution[:sid],) + @conferences = ConferenceList.new(@version, account_sid: @solution[:sid]) end @conferences @@ -361,11 +361,11 @@ def connect_apps(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ConnectAppContext.new(@version, @solution[:sid], sid,) + return ConnectAppContext.new(@version, @solution[:sid], sid) end unless @connect_apps - @connect_apps = ConnectAppList.new(@version, account_sid: @solution[:sid],) + @connect_apps = ConnectAppList.new(@version, account_sid: @solution[:sid]) end @connect_apps @@ -379,11 +379,11 @@ def incoming_phone_numbers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IncomingPhoneNumberContext.new(@version, @solution[:sid], sid,) + return IncomingPhoneNumberContext.new(@version, @solution[:sid], sid) end unless @incoming_phone_numbers - @incoming_phone_numbers = IncomingPhoneNumberList.new(@version, account_sid: @solution[:sid],) + @incoming_phone_numbers = IncomingPhoneNumberList.new(@version, account_sid: @solution[:sid]) end @incoming_phone_numbers @@ -397,11 +397,11 @@ def keys(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return KeyContext.new(@version, @solution[:sid], sid,) + return KeyContext.new(@version, @solution[:sid], sid) end unless @keys - @keys = KeyList.new(@version, account_sid: @solution[:sid],) + @keys = KeyList.new(@version, account_sid: @solution[:sid]) end @keys @@ -415,11 +415,11 @@ def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:sid], sid,) + return MessageContext.new(@version, @solution[:sid], sid) end unless @messages - @messages = MessageList.new(@version, account_sid: @solution[:sid],) + @messages = MessageList.new(@version, account_sid: @solution[:sid]) end @messages @@ -431,7 +431,7 @@ def messages(sid=:unset) # @return [NewKeyContext] def new_keys unless @new_keys - @new_keys = NewKeyList.new(@version, account_sid: @solution[:sid],) + @new_keys = NewKeyList.new(@version, account_sid: @solution[:sid]) end @new_keys @@ -443,7 +443,7 @@ def new_keys # @return [NewSigningKeyContext] def new_signing_keys unless @new_signing_keys - @new_signing_keys = NewSigningKeyList.new(@version, account_sid: @solution[:sid],) + @new_signing_keys = NewSigningKeyList.new(@version, account_sid: @solution[:sid]) end @new_signing_keys @@ -457,11 +457,11 @@ def notifications(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return NotificationContext.new(@version, @solution[:sid], sid,) + return NotificationContext.new(@version, @solution[:sid], sid) end unless @notifications - @notifications = NotificationList.new(@version, account_sid: @solution[:sid],) + @notifications = NotificationList.new(@version, account_sid: @solution[:sid]) end @notifications @@ -475,11 +475,11 @@ def outgoing_caller_ids(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return OutgoingCallerIdContext.new(@version, @solution[:sid], sid,) + return OutgoingCallerIdContext.new(@version, @solution[:sid], sid) end unless @outgoing_caller_ids - @outgoing_caller_ids = OutgoingCallerIdList.new(@version, account_sid: @solution[:sid],) + @outgoing_caller_ids = OutgoingCallerIdList.new(@version, account_sid: @solution[:sid]) end @outgoing_caller_ids @@ -493,11 +493,11 @@ def queues(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return QueueContext.new(@version, @solution[:sid], sid,) + return QueueContext.new(@version, @solution[:sid], sid) end unless @queues - @queues = QueueList.new(@version, account_sid: @solution[:sid],) + @queues = QueueList.new(@version, account_sid: @solution[:sid]) end @queues @@ -511,11 +511,11 @@ def recordings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RecordingContext.new(@version, @solution[:sid], sid,) + return RecordingContext.new(@version, @solution[:sid], sid) end unless @recordings - @recordings = RecordingList.new(@version, account_sid: @solution[:sid],) + @recordings = RecordingList.new(@version, account_sid: @solution[:sid]) end @recordings @@ -529,11 +529,11 @@ def signing_keys(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SigningKeyContext.new(@version, @solution[:sid], sid,) + return SigningKeyContext.new(@version, @solution[:sid], sid) end unless @signing_keys - @signing_keys = SigningKeyList.new(@version, account_sid: @solution[:sid],) + @signing_keys = SigningKeyList.new(@version, account_sid: @solution[:sid]) end @signing_keys @@ -545,7 +545,7 @@ def signing_keys(sid=:unset) # @return [SipContext] def sip unless @sip - @sip = SipList.new(@version, account_sid: @solution[:sid],) + @sip = SipList.new(@version, account_sid: @solution[:sid]) end @sip @@ -559,11 +559,11 @@ def short_codes(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ShortCodeContext.new(@version, @solution[:sid], sid,) + return ShortCodeContext.new(@version, @solution[:sid], sid) end unless @short_codes - @short_codes = ShortCodeList.new(@version, account_sid: @solution[:sid],) + @short_codes = ShortCodeList.new(@version, account_sid: @solution[:sid]) end @short_codes @@ -575,7 +575,7 @@ def short_codes(sid=:unset) # @return [TokenContext] def tokens unless @tokens - @tokens = TokenList.new(@version, account_sid: @solution[:sid],) + @tokens = TokenList.new(@version, account_sid: @solution[:sid]) end @tokens @@ -589,11 +589,11 @@ def transcriptions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TranscriptionContext.new(@version, @solution[:sid], sid,) + return TranscriptionContext.new(@version, @solution[:sid], sid) end unless @transcriptions - @transcriptions = TranscriptionList.new(@version, account_sid: @solution[:sid],) + @transcriptions = TranscriptionList.new(@version, account_sid: @solution[:sid]) end @transcriptions @@ -605,7 +605,7 @@ def transcriptions(sid=:unset) # @return [UsageContext] def usage unless @usage - @usage = UsageList.new(@version, account_sid: @solution[:sid],) + @usage = UsageList.new(@version, account_sid: @solution[:sid]) end @usage @@ -617,7 +617,7 @@ def usage # @return [ValidationRequestContext] def validation_requests unless @validation_requests - @validation_requests = ValidationRequestList.new(@version, account_sid: @solution[:sid],) + @validation_requests = ValidationRequestList.new(@version, account_sid: @solution[:sid]) end @validation_requests @@ -658,7 +658,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -667,7 +667,7 @@ def initialize(version, payload, sid: nil) # @return [AccountContext] AccountContext for this AccountInstance def context unless @instance_context - @instance_context = AccountContext.new(@version, @params['sid'],) + @instance_context = AccountContext.new(@version, @params['sid']) end @instance_context end @@ -747,7 +747,7 @@ def fetch # Status # @return [AccountInstance] Updated AccountInstance def update(friendly_name: :unset, status: :unset) - context.update(friendly_name: friendly_name, status: status,) + context.update(friendly_name: friendly_name, status: status) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/address.rb b/lib/twilio-ruby/rest/api/v2010/account/address.rb index 7792bfcba..e05e96dbb 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/address.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/address.rb @@ -55,7 +55,7 @@ def create(customer_name: nil, street: nil, city: nil, region: nil, postal_code: data: data ) - AddressInstance.new(@version, payload, account_sid: @solution[:account_sid],) + AddressInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -116,7 +116,7 @@ def stream(customer_name: :unset, friendly_name: :unset, iso_country: :unset, li def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -189,7 +189,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AddressInstance] AddressInstance def get_instance(payload) - AddressInstance.new(@version, payload, account_sid: @solution[:account_sid],) + AddressInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -210,7 +210,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Addresses/#{@solution[:sid]}.json" # Dependents @@ -236,7 +236,7 @@ def fetch params, ) - AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -268,7 +268,7 @@ def update(friendly_name: :unset, customer_name: :unset, street: :unset, city: : data: data, ) - AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + AddressInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -326,7 +326,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -335,7 +335,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [AddressContext] AddressContext for this AddressInstance def context unless @instance_context - @instance_context = AddressContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = AddressContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb b/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb index 04a58f3e1..374d8a4e3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/application.rb b/lib/twilio-ruby/rest/api/v2010/account/application.rb index c8d51df40..0391b7df4 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/application.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/application.rb @@ -86,7 +86,7 @@ def create(friendly_name: nil, api_version: :unset, voice_url: :unset, voice_met data: data ) - ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -122,7 +122,7 @@ def list(friendly_name: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -134,7 +134,7 @@ def stream(friendly_name: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -204,7 +204,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ApplicationInstance] ApplicationInstance def get_instance(payload) - ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -226,7 +226,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Applications/#{@solution[:sid]}.json" end @@ -249,7 +249,7 @@ def fetch params, ) - ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -313,7 +313,7 @@ def update(friendly_name: :unset, api_version: :unset, voice_url: :unset, voice_ data: data, ) - ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ApplicationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -363,7 +363,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -372,7 +372,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [ApplicationContext] ApplicationContext for this ApplicationInstance def context unless @instance_context - @instance_context = ApplicationContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = ApplicationContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb b/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb index e52a2c9ab..dbf8d2f11 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AuthorizedConnectAppInstance] AuthorizedConnectAppInstance def get_instance(payload) - AuthorizedConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid],) + AuthorizedConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, connect_app_sid) super(version) # Path Solution - @solution = {account_sid: account_sid, connect_app_sid: connect_app_sid,} + @solution = {account_sid: account_sid, connect_app_sid: connect_app_sid} @uri = "/Accounts/#{@solution[:account_sid]}/AuthorizedConnectApps/#{@solution[:connect_app_sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb index e0d8dc440..b860facde 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AvailablePhoneNumberCountryInstance] AvailablePhoneNumberCountryInstance def get_instance(payload) - AvailablePhoneNumberCountryInstance.new(@version, payload, account_sid: @solution[:account_sid],) + AvailablePhoneNumberCountryInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, country_code) super(version) # Path Solution - @solution = {account_sid: account_sid, country_code: country_code,} + @solution = {account_sid: account_sid, country_code: country_code} @uri = "/Accounts/#{@solution[:account_sid]}/AvailablePhoneNumbers/#{@solution[:country_code]}.json" # Dependents diff --git a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb index b2012fb49..ddfd48e7b 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb @@ -148,7 +148,7 @@ def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb index adf4a1e3a..349f2a9e3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb @@ -148,7 +148,7 @@ def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb index dc42e4e14..2c21cdb09 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb @@ -148,7 +148,7 @@ def stream(area_code: :unset, contains: :unset, sms_enabled: :unset, mms_enabled def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/call.rb b/lib/twilio-ruby/rest/api/v2010/account/call.rb index f3c950618..34276a07c 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/call.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/call.rb @@ -114,7 +114,7 @@ def create(to: nil, from: nil, method: :unset, fallback_url: :unset, fallback_me data: data ) - CallInstance.new(@version, payload, account_sid: @solution[:account_sid],) + CallInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -205,7 +205,7 @@ def stream(to: :unset, from: :unset, parent_call_sid: :unset, status: :unset, st def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -276,10 +276,10 @@ def feedback_summaries(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FeedbackSummaryContext.new(@version, @solution[:account_sid], sid,) + return FeedbackSummaryContext.new(@version, @solution[:account_sid], sid) end - @feedback_summaries ||= FeedbackSummaryList.new(@version, account_sid: @solution[:account_sid],) + @feedback_summaries ||= FeedbackSummaryList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -308,7 +308,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CallInstance] CallInstance def get_instance(payload) - CallInstance.new(@version, payload, account_sid: @solution[:account_sid],) + CallInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -329,7 +329,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:sid]}.json" # Dependents @@ -357,7 +357,7 @@ def fetch params, ) - CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -396,7 +396,7 @@ def update(url: :unset, method: :unset, status: :unset, fallback_url: :unset, fa data: data, ) - CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + CallInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -407,7 +407,7 @@ def recordings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RecordingContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return RecordingContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @recordings @@ -429,7 +429,7 @@ def notifications(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return NotificationContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return NotificationContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @notifications @@ -448,7 +448,7 @@ def notifications(sid=:unset) # @return [FeedbackList] # @return [FeedbackContext] def feedback - FeedbackContext.new(@version, @solution[:account_sid], @solution[:sid],) + FeedbackContext.new(@version, @solution[:account_sid], @solution[:sid]) end ## @@ -502,7 +502,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -511,7 +511,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [CallContext] CallContext for this CallInstance def context unless @instance_context - @instance_context = CallContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = CallContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb b/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb index b10c406e2..f7aeb5327 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb @@ -77,7 +77,7 @@ def initialize(version, account_sid, call_sid) super(version) # Path Solution - @solution = {account_sid: account_sid, call_sid: call_sid,} + @solution = {account_sid: account_sid, call_sid: call_sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Feedback.json" end @@ -185,7 +185,7 @@ def initialize(version, payload, account_sid: nil, call_sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'call_sid' => call_sid,} + @params = {'account_sid' => account_sid, 'call_sid' => call_sid} end ## @@ -194,7 +194,7 @@ def initialize(version, payload, account_sid: nil, call_sid: nil) # @return [FeedbackContext] FeedbackContext for this FeedbackInstance def context unless @instance_context - @instance_context = FeedbackContext.new(@version, @params['account_sid'], @params['call_sid'],) + @instance_context = FeedbackContext.new(@version, @params['account_sid'], @params['call_sid']) end @instance_context end @@ -242,7 +242,7 @@ def sid # @param [feedback.Issues] issue The issue # @return [FeedbackInstance] Newly created FeedbackInstance def create(quality_score: nil, issue: :unset) - context.create(quality_score: quality_score, issue: issue,) + context.create(quality_score: quality_score, issue: issue) end ## @@ -259,7 +259,7 @@ def fetch # call # @return [FeedbackInstance] Updated FeedbackInstance def update(quality_score: nil, issue: :unset) - context.update(quality_score: quality_score, issue: issue,) + context.update(quality_score: quality_score, issue: issue) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb b/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb index de739c6d1..8143a0a24 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb @@ -49,7 +49,7 @@ def create(start_date: nil, end_date: nil, include_subaccounts: :unset, status_c data: data ) - FeedbackSummaryInstance.new(@version, payload, account_sid: @solution[:account_sid],) + FeedbackSummaryInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -78,7 +78,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [FeedbackSummaryInstance] FeedbackSummaryInstance def get_instance(payload) - FeedbackSummaryInstance.new(@version, payload, account_sid: @solution[:account_sid],) + FeedbackSummaryInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -99,7 +99,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/FeedbackSummary/#{@solution[:sid]}.json" end @@ -170,7 +170,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -179,7 +179,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [FeedbackSummaryContext] FeedbackSummaryContext for this FeedbackSummaryInstance def context unless @instance_context - @instance_context = FeedbackSummaryContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = FeedbackSummaryContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb b/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb index f0362b475..d38565981 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb @@ -87,7 +87,7 @@ def stream(log: :unset, message_date_before: :unset, message_date: :unset, messa def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -189,7 +189,7 @@ def initialize(version, account_sid, call_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, call_sid: call_sid, sid: sid,} + @solution = {account_sid: account_sid, call_sid: call_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Notifications/#{@solution[:sid]}.json" end @@ -264,7 +264,7 @@ def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb b/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb index d874cfbb2..b28e4a7e8 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb @@ -83,7 +83,7 @@ def stream(date_created_before: :unset, date_created: :unset, date_created_after def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -183,7 +183,7 @@ def initialize(version, account_sid, call_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, call_sid: call_sid, sid: sid,} + @solution = {account_sid: account_sid, call_sid: call_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Recordings/#{@solution[:sid]}.json" end @@ -252,7 +252,7 @@ def initialize(version, payload, account_sid: nil, call_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'call_sid' => call_sid, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/conference.rb b/lib/twilio-ruby/rest/api/v2010/account/conference.rb index daac4c55b..6bd0ccc23 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/conference.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/conference.rb @@ -106,7 +106,7 @@ def stream(date_created_before: :unset, date_created: :unset, date_created_after def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -191,7 +191,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ConferenceInstance] ConferenceInstance def get_instance(payload) - ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -212,7 +212,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:sid]}.json" # Dependents @@ -231,7 +231,7 @@ def fetch params, ) - ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -239,7 +239,7 @@ def fetch # @param [conference.UpdateStatus] status The status # @return [ConferenceInstance] Updated ConferenceInstance def update(status: :unset) - data = Twilio::Values.of({'Status' => status,}) + data = Twilio::Values.of({'Status' => status}) payload = @version.update( 'POST', @@ -247,7 +247,7 @@ def update(status: :unset) data: data, ) - ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ConferenceInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -258,7 +258,7 @@ def participants(call_sid=:unset) raise ArgumentError, 'call_sid cannot be nil' if call_sid.nil? if call_sid != :unset - return ParticipantContext.new(@version, @solution[:account_sid], @solution[:sid], call_sid,) + return ParticipantContext.new(@version, @solution[:account_sid], @solution[:sid], call_sid) end unless @participants @@ -308,7 +308,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -317,7 +317,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [ConferenceContext] ConferenceContext for this ConferenceInstance def context unless @instance_context - @instance_context = ConferenceContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = ConferenceContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -394,7 +394,7 @@ def fetch # @param [conference.UpdateStatus] status The status # @return [ConferenceInstance] Updated ConferenceInstance def update(status: :unset) - context.update(status: status,) + context.update(status: status) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb b/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb index 0b0eddf95..93255f210 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb @@ -143,7 +143,7 @@ def list(muted: :unset, hold: :unset, limit: nil, page_size: nil) def stream(muted: :unset, hold: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(muted: muted, hold: hold, page_size: limits[:page_size],) + page = self.page(muted: muted, hold: hold, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -155,7 +155,7 @@ def stream(muted: :unset, hold: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -254,7 +254,7 @@ def initialize(version, account_sid, conference_sid, call_sid) super(version) # Path Solution - @solution = {account_sid: account_sid, conference_sid: conference_sid, call_sid: call_sid,} + @solution = {account_sid: account_sid, conference_sid: conference_sid, call_sid: call_sid} @uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:conference_sid]}/Participants/#{@solution[:call_sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb b/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb index 8baeb9612..3a7e3390e 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ConnectAppInstance] ConnectAppInstance def get_instance(payload) - ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/ConnectApps/#{@solution[:sid]}.json" end @@ -169,7 +169,7 @@ def fetch params, ) - ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -208,7 +208,7 @@ def update(authorize_redirect_url: :unset, company_name: :unset, deauthorize_cal data: data, ) - ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ConnectAppInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -248,7 +248,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -257,7 +257,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [ConnectAppContext] ConnectAppContext for this ConnectAppInstance def context unless @instance_context - @instance_context = ConnectAppContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = ConnectAppContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb index d198e0044..007e0a96b 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb @@ -95,7 +95,7 @@ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :u def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -237,7 +237,7 @@ def create(api_version: :unset, friendly_name: :unset, sms_application_sid: :uns data: data ) - IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid],) + IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -245,7 +245,7 @@ def create(api_version: :unset, friendly_name: :unset, sms_application_sid: :uns # @return [LocalList] # @return [LocalContext] def local - @local ||= LocalList.new(@version, account_sid: @solution[:account_sid],) + @local ||= LocalList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -253,7 +253,7 @@ def local # @return [MobileList] # @return [MobileContext] def mobile - @mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid],) + @mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -261,7 +261,7 @@ def mobile # @return [TollFreeList] # @return [TollFreeContext] def toll_free - @toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid],) + @toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -290,7 +290,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance def get_instance(payload) - IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid],) + IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -312,7 +312,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json" # Dependents @@ -452,7 +452,7 @@ def assigned_add_ons(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @assigned_add_ons @@ -523,7 +523,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -532,7 +532,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext for this IncomingPhoneNumberInstance def context unless @instance_context - @instance_context = IncomingPhoneNumberContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = IncomingPhoneNumberContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb index 5965707f7..3f338607a 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -118,7 +118,7 @@ def get_page(target_url) # identifies the Add-on installation. # @return [AssignedAddOnInstance] Newly created AssignedAddOnInstance def create(installed_add_on_sid: nil) - data = Twilio::Values.of({'InstalledAddOnSid' => installed_add_on_sid,}) + data = Twilio::Values.of({'InstalledAddOnSid' => installed_add_on_sid}) payload = @version.create( 'POST', @@ -192,7 +192,7 @@ def initialize(version, account_sid, resource_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, resource_sid: resource_sid, sid: sid,} + @solution = {account_sid: account_sid, resource_sid: resource_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:resource_sid]}/AssignedAddOns/#{@solution[:sid]}.json" # Dependents diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb index e6d67f222..924b2a1d1 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb @@ -65,7 +65,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -77,7 +77,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb index d92ed521d..ed70521b0 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb @@ -87,7 +87,7 @@ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :u def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -186,7 +186,7 @@ def create(phone_number: nil, api_version: :unset, friendly_name: :unset, sms_ap data: data ) - LocalInstance.new(@version, payload, account_sid: @solution[:account_sid],) + LocalInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -215,7 +215,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [LocalInstance] LocalInstance def get_instance(payload) - LocalInstance.new(@version, payload, account_sid: @solution[:account_sid],) + LocalInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb index 622476a45..be0a64052 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb @@ -87,7 +87,7 @@ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :u def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -186,7 +186,7 @@ def create(phone_number: nil, api_version: :unset, friendly_name: :unset, sms_ap data: data ) - MobileInstance.new(@version, payload, account_sid: @solution[:account_sid],) + MobileInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -215,7 +215,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [MobileInstance] MobileInstance def get_instance(payload) - MobileInstance.new(@version, payload, account_sid: @solution[:account_sid],) + MobileInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb index 087e430cb..ee6a5dac3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb @@ -87,7 +87,7 @@ def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :u def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -186,7 +186,7 @@ def create(phone_number: nil, api_version: :unset, friendly_name: :unset, sms_ap data: data ) - TollFreeInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TollFreeInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -215,7 +215,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TollFreeInstance] TollFreeInstance def get_instance(payload) - TollFreeInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TollFreeInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/key.rb b/lib/twilio-ruby/rest/api/v2010/account/key.rb index ce79deff0..562a44be8 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/key.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/key.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [KeyInstance] KeyInstance def get_instance(payload) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Keys/#{@solution[:sid]}.json" end @@ -169,7 +169,7 @@ def fetch params, ) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -177,7 +177,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -185,7 +185,7 @@ def update(friendly_name: :unset) data: data, ) - KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -225,7 +225,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -234,7 +234,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [KeyContext] KeyContext for this KeyInstance def context unless @instance_context - @instance_context = KeyContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = KeyContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -275,7 +275,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/message.rb b/lib/twilio-ruby/rest/api/v2010/account/message.rb index 5c7cd4799..310f70641 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/message.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/message.rb @@ -74,7 +74,7 @@ def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: data: data ) - MessageInstance.new(@version, payload, account_sid: @solution[:account_sid],) + MessageInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -143,7 +143,7 @@ def stream(to: :unset, from: :unset, date_sent_before: :unset, date_sent: :unset def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -220,7 +220,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [MessageInstance] MessageInstance def get_instance(payload) - MessageInstance.new(@version, payload, account_sid: @solution[:account_sid],) + MessageInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -241,7 +241,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Messages/#{@solution[:sid]}.json" # Dependents @@ -268,7 +268,7 @@ def fetch params, ) - MessageInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + MessageInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -276,7 +276,7 @@ def fetch # @param [String] body The body # @return [MessageInstance] Updated MessageInstance def update(body: nil) - data = Twilio::Values.of({'Body' => body,}) + data = Twilio::Values.of({'Body' => body}) payload = @version.update( 'POST', @@ -284,7 +284,7 @@ def update(body: nil) data: data, ) - MessageInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + MessageInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -295,11 +295,11 @@ def media(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MediaContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return MediaContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @media - @media = MediaList.new(@version, account_sid: @solution[:account_sid], message_sid: @solution[:sid],) + @media = MediaList.new(@version, account_sid: @solution[:account_sid], message_sid: @solution[:sid]) end @media @@ -366,7 +366,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -375,7 +375,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [MessageContext] MessageContext for this MessageInstance def context unless @instance_context - @instance_context = MessageContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = MessageContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -519,7 +519,7 @@ def fetch # @param [String] body The body # @return [MessageInstance] Updated MessageInstance def update(body: nil) - context.update(body: body,) + context.update(body: body) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb b/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb index 2d380285d..48cbe4351 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb @@ -31,7 +31,7 @@ def initialize(version, account_sid: nil, message_sid: nil) # @param [feedback.Outcome] outcome The outcome # @return [FeedbackInstance] Newly created FeedbackInstance def create(outcome: :unset) - data = Twilio::Values.of({'Outcome' => outcome,}) + data = Twilio::Values.of({'Outcome' => outcome}) payload = @version.create( 'POST', diff --git a/lib/twilio-ruby/rest/api/v2010/account/message/media.rb b/lib/twilio-ruby/rest/api/v2010/account/message/media.rb index 3b2f1871c..f48ef12be 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/message/media.rb @@ -85,7 +85,7 @@ def stream(date_created_before: :unset, date_created: :unset, date_created_after def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -185,7 +185,7 @@ def initialize(version, account_sid, message_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, message_sid: message_sid, sid: sid,} + @solution = {account_sid: account_sid, message_sid: message_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Messages/#{@solution[:message_sid]}/Media/#{@solution[:sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/new_key.rb b/lib/twilio-ruby/rest/api/v2010/account/new_key.rb index be8aa5b12..7f175fcb3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/new_key.rb @@ -30,7 +30,7 @@ def initialize(version, account_sid: nil) # @param [String] friendly_name The friendly_name # @return [NewKeyInstance] Newly created NewKeyInstance def create(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -38,7 +38,7 @@ def create(friendly_name: :unset) data: data ) - NewKeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + NewKeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -67,7 +67,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [NewKeyInstance] NewKeyInstance def get_instance(payload) - NewKeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + NewKeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb b/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb index 83c9996f7..07f04fd49 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb @@ -30,7 +30,7 @@ def initialize(version, account_sid: nil) # @param [String] friendly_name The friendly_name # @return [NewSigningKeyInstance] Newly created NewSigningKeyInstance def create(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -38,7 +38,7 @@ def create(friendly_name: :unset) data: data ) - NewSigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + NewSigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -67,7 +67,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [NewSigningKeyInstance] NewSigningKeyInstance def get_instance(payload) - NewSigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + NewSigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/notification.rb b/lib/twilio-ruby/rest/api/v2010/account/notification.rb index 2d674e550..5922387dd 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/notification.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/notification.rb @@ -86,7 +86,7 @@ def stream(log: :unset, message_date_before: :unset, message_date: :unset, messa def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -161,7 +161,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [NotificationInstance] NotificationInstance def get_instance(payload) - NotificationInstance.new(@version, payload, account_sid: @solution[:account_sid],) + NotificationInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -182,7 +182,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Notifications/#{@solution[:sid]}.json" end @@ -198,7 +198,7 @@ def fetch params, ) - NotificationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + NotificationInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [NotificationContext] NotificationContext for this NotificationInstance def context unless @instance_context - @instance_context = NotificationContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = NotificationContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb b/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb index acbde717b..b1b8b3ae0 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb @@ -82,7 +82,7 @@ def stream(phone_number: :unset, friendly_name: :unset, limit: nil, page_size: n def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -155,7 +155,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [OutgoingCallerIdInstance] OutgoingCallerIdInstance def get_instance(payload) - OutgoingCallerIdInstance.new(@version, payload, account_sid: @solution[:account_sid],) + OutgoingCallerIdInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/OutgoingCallerIds/#{@solution[:sid]}.json" end @@ -206,7 +206,7 @@ def fetch # @param [String] friendly_name A human readable description of the caller ID # @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -263,7 +263,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -272,7 +272,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [OutgoingCallerIdContext] OutgoingCallerIdContext for this OutgoingCallerIdInstance def context unless @instance_context - @instance_context = OutgoingCallerIdContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = OutgoingCallerIdContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -331,7 +331,7 @@ def fetch # @param [String] friendly_name A human readable description of the caller ID # @return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/queue.rb b/lib/twilio-ruby/rest/api/v2010/account/queue.rb index cd3552f66..bffdd026a 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/queue.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/queue.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -113,7 +113,7 @@ def get_page(target_url) # The default is 100. The maximum is 1000. # @return [QueueInstance] Newly created QueueInstance def create(friendly_name: nil, max_size: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size}) payload = @version.create( 'POST', @@ -121,7 +121,7 @@ def create(friendly_name: nil, max_size: :unset) data: data ) - QueueInstance.new(@version, payload, account_sid: @solution[:account_sid],) + QueueInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -150,7 +150,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [QueueInstance] QueueInstance def get_instance(payload) - QueueInstance.new(@version, payload, account_sid: @solution[:account_sid],) + QueueInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -171,7 +171,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Queues/#{@solution[:sid]}.json" # Dependents @@ -190,7 +190,7 @@ def fetch params, ) - QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -200,7 +200,7 @@ def fetch # at a time # @return [QueueInstance] Updated QueueInstance def update(friendly_name: :unset, max_size: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'MaxSize' => max_size}) payload = @version.update( 'POST', @@ -208,7 +208,7 @@ def update(friendly_name: :unset, max_size: :unset) data: data, ) - QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + QueueInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -226,11 +226,11 @@ def members(call_sid=:unset) raise ArgumentError, 'call_sid cannot be nil' if call_sid.nil? if call_sid != :unset - return MemberContext.new(@version, @solution[:account_sid], @solution[:sid], call_sid,) + return MemberContext.new(@version, @solution[:account_sid], @solution[:sid], call_sid) end unless @members - @members = MemberList.new(@version, account_sid: @solution[:account_sid], queue_sid: @solution[:sid],) + @members = MemberList.new(@version, account_sid: @solution[:account_sid], queue_sid: @solution[:sid]) end @members @@ -270,7 +270,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -279,7 +279,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [QueueContext] QueueContext for this QueueInstance def context unless @instance_context - @instance_context = QueueContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = QueueContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -352,7 +352,7 @@ def fetch # at a time # @return [QueueInstance] Updated QueueInstance def update(friendly_name: :unset, max_size: :unset) - context.update(friendly_name: friendly_name, max_size: max_size,) + context.update(friendly_name: friendly_name, max_size: max_size) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb b/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb index 1592b3311..7d78ace23 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb @@ -55,7 +55,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -67,7 +67,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -161,7 +161,7 @@ def initialize(version, account_sid, queue_sid, call_sid) super(version) # Path Solution - @solution = {account_sid: account_sid, queue_sid: queue_sid, call_sid: call_sid,} + @solution = {account_sid: account_sid, queue_sid: queue_sid, call_sid: call_sid} @uri = "/Accounts/#{@solution[:account_sid]}/Queues/#{@solution[:queue_sid]}/Members/#{@solution[:call_sid]}.json" end @@ -192,7 +192,7 @@ def fetch # @param [String] method The method # @return [MemberInstance] Updated MemberInstance def update(url: nil, method: nil) - data = Twilio::Values.of({'Url' => url, 'Method' => method,}) + data = Twilio::Values.of({'Url' => url, 'Method' => method}) payload = @version.update( 'POST', @@ -307,7 +307,7 @@ def fetch # @param [String] method The method # @return [MemberInstance] Updated MemberInstance def update(url: nil, method: nil) - context.update(url: url, method: method,) + context.update(url: url, method: method) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/recording.rb b/lib/twilio-ruby/rest/api/v2010/account/recording.rb index d52a49724..f2bdb8347 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/recording.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/recording.rb @@ -88,7 +88,7 @@ def stream(date_created_before: :unset, date_created: :unset, date_created_after def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RecordingInstance] RecordingInstance def get_instance(payload) - RecordingInstance.new(@version, payload, account_sid: @solution[:account_sid],) + RecordingInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -185,7 +185,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:sid]}.json" # Dependents @@ -205,7 +205,7 @@ def fetch params, ) - RecordingInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + RecordingInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -223,7 +223,7 @@ def transcriptions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TranscriptionContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return TranscriptionContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @transcriptions @@ -245,7 +245,7 @@ def add_on_results(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return AddOnResultContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return AddOnResultContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @add_on_results @@ -300,7 +300,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -309,7 +309,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [RecordingContext] RecordingContext for this RecordingInstance def context unless @instance_context - @instance_context = RecordingContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = RecordingContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb b/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb index ac24c10c4..bc54650db 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb @@ -56,7 +56,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -162,7 +162,7 @@ def initialize(version, account_sid, reference_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, reference_sid: reference_sid, sid: sid,} + @solution = {account_sid: account_sid, reference_sid: reference_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:reference_sid]}/AddOnResults/#{@solution[:sid]}.json" # Dependents diff --git a/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb b/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb index 130dca4dc..c0e9e281b 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb @@ -63,7 +63,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -75,7 +75,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb b/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb index 0ae84c641..0c741e521 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, account_sid, recording_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, recording_sid: recording_sid, sid: sid,} + @solution = {account_sid: account_sid, recording_sid: recording_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Recordings/#{@solution[:recording_sid]}/Transcriptions/#{@solution[:sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/short_code.rb b/lib/twilio-ruby/rest/api/v2010/account/short_code.rb index 582cf281a..2fd633c58 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/short_code.rb @@ -66,7 +66,7 @@ def list(friendly_name: :unset, short_code: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, short_code: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, short_code: short_code, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, short_code: short_code, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -78,7 +78,7 @@ def stream(friendly_name: :unset, short_code: :unset, limit: nil, page_size: nil def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -151,7 +151,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ShortCodeInstance] ShortCodeInstance def get_instance(payload) - ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -172,7 +172,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SMS/ShortCodes/#{@solution[:sid]}.json" end @@ -188,7 +188,7 @@ def fetch params, ) - ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -223,7 +223,7 @@ def update(friendly_name: :unset, api_version: :unset, sms_url: :unset, sms_meth data: data, ) - ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -264,7 +264,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -273,7 +273,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [ShortCodeContext] ShortCodeContext for this ShortCodeInstance def context unless @instance_context - @instance_context = ShortCodeContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = ShortCodeContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb b/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb index 93ecf10c9..16bce12f9 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SigningKeyInstance] SigningKeyInstance def get_instance(payload) - SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SigningKeys/#{@solution[:sid]}.json" end @@ -169,7 +169,7 @@ def fetch params, ) - SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -177,7 +177,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [SigningKeyInstance] Updated SigningKeyInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -185,7 +185,7 @@ def update(friendly_name: :unset) data: data, ) - SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + SigningKeyInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -225,7 +225,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -234,7 +234,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [SigningKeyContext] SigningKeyContext for this SigningKeyInstance def context unless @instance_context - @instance_context = SigningKeyContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = SigningKeyContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -275,7 +275,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [SigningKeyInstance] Updated SigningKeyInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip.rb b/lib/twilio-ruby/rest/api/v2010/account/sip.rb index 69747d40c..38ba58535 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip.rb @@ -38,10 +38,10 @@ def domains(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return DomainContext.new(@version, @solution[:account_sid], sid,) + return DomainContext.new(@version, @solution[:account_sid], sid) end - @domains ||= DomainList.new(@version, account_sid: @solution[:account_sid],) + @domains ||= DomainList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -49,7 +49,7 @@ def domains(sid=:unset) # @return [RegionList] # @return [RegionContext] def regions - @regions ||= RegionList.new(@version, account_sid: @solution[:account_sid],) + @regions ||= RegionList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -62,7 +62,7 @@ def ip_access_control_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IpAccessControlListContext.new(@version, @solution[:account_sid], sid,) + return IpAccessControlListContext.new(@version, @solution[:account_sid], sid) end @ip_access_control_lists ||= IpAccessControlListList.new( @@ -80,10 +80,10 @@ def credential_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CredentialListContext.new(@version, @solution[:account_sid], sid,) + return CredentialListContext.new(@version, @solution[:account_sid], sid) end - @credential_lists ||= CredentialListList.new(@version, account_sid: @solution[:account_sid],) + @credential_lists ||= CredentialListList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -112,7 +112,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SipInstance] SipInstance def get_instance(payload) - SipInstance.new(@version, payload, account_sid: @solution[:account_sid],) + SipInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb index c44027e2d..efadcd1cf 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -113,7 +113,7 @@ def get_page(target_url) # @param [String] friendly_name The friendly_name # @return [CredentialListInstance] Newly created CredentialListInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -121,7 +121,7 @@ def create(friendly_name: nil) data: data ) - CredentialListInstance.new(@version, payload, account_sid: @solution[:account_sid],) + CredentialListInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -150,7 +150,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialListInstance] CredentialListInstance def get_instance(payload) - CredentialListInstance.new(@version, payload, account_sid: @solution[:account_sid],) + CredentialListInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -171,7 +171,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/CredentialLists/#{@solution[:sid]}.json" # Dependents @@ -203,7 +203,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [CredentialListInstance] Updated CredentialListInstance def update(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -234,7 +234,7 @@ def credentials(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CredentialContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return CredentialContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @credentials @@ -281,7 +281,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -290,7 +290,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [CredentialListContext] CredentialListContext for this CredentialListInstance def context unless @instance_context - @instance_context = CredentialListContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = CredentialListContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -349,7 +349,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [CredentialListInstance] Updated CredentialListInstance def update(friendly_name: nil) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb index 35a208a9f..818f01f6a 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb @@ -55,7 +55,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -67,7 +67,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -115,7 +115,7 @@ def get_page(target_url) # @param [String] password The password # @return [CredentialInstance] Newly created CredentialInstance def create(username: nil, password: nil) - data = Twilio::Values.of({'Username' => username, 'Password' => password,}) + data = Twilio::Values.of({'Username' => username, 'Password' => password}) payload = @version.create( 'POST', @@ -184,7 +184,7 @@ def initialize(version, account_sid, credential_list_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, credential_list_sid: credential_list_sid, sid: sid,} + @solution = {account_sid: account_sid, credential_list_sid: credential_list_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/CredentialLists/#{@solution[:credential_list_sid]}/Credentials/#{@solution[:sid]}.json" end @@ -214,7 +214,7 @@ def fetch # @param [String] password The password # @return [CredentialInstance] Updated CredentialInstance def update(password: :unset) - data = Twilio::Values.of({'Password' => password,}) + data = Twilio::Values.of({'Password' => password}) payload = @version.update( 'POST', @@ -348,7 +348,7 @@ def fetch # @param [String] password The password # @return [CredentialInstance] Updated CredentialInstance def update(password: :unset) - context.update(password: password,) + context.update(password: password) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb index ea9523150..85ad00e8a 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -148,7 +148,7 @@ def create(domain_name: nil, friendly_name: :unset, auth_type: :unset, voice_url data: data ) - DomainInstance.new(@version, payload, account_sid: @solution[:account_sid],) + DomainInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DomainInstance] DomainInstance def get_instance(payload) - DomainInstance.new(@version, payload, account_sid: @solution[:account_sid],) + DomainInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -198,7 +198,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:sid]}.json" # Dependents @@ -218,7 +218,7 @@ def fetch params, ) - DomainInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + DomainInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -253,7 +253,7 @@ def update(auth_type: :unset, friendly_name: :unset, voice_fallback_method: :uns data: data, ) - DomainInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + DomainInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -271,7 +271,7 @@ def ip_access_control_list_mappings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IpAccessControlListMappingContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return IpAccessControlListMappingContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @ip_access_control_list_mappings @@ -293,7 +293,7 @@ def credential_list_mappings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CredentialListMappingContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return CredentialListMappingContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @credential_list_mappings @@ -350,7 +350,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -359,7 +359,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [DomainContext] DomainContext for this DomainInstance def context unless @instance_context - @instance_context = DomainContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = DomainContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb index 4808542aa..7e9bef9db 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb @@ -33,7 +33,7 @@ def initialize(version, account_sid: nil, domain_sid: nil) # @param [String] credential_list_sid The credential_list_sid # @return [CredentialListMappingInstance] Newly created CredentialListMappingInstance def create(credential_list_sid: nil) - data = Twilio::Values.of({'CredentialListSid' => credential_list_sid,}) + data = Twilio::Values.of({'CredentialListSid' => credential_list_sid}) payload = @version.create( 'POST', @@ -78,7 +78,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -90,7 +90,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -184,7 +184,7 @@ def initialize(version, account_sid, domain_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, domain_sid: domain_sid, sid: sid,} + @solution = {account_sid: account_sid, domain_sid: domain_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/CredentialListMappings/#{@solution[:sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb index bc9c39fd0..fa69071c9 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb @@ -33,7 +33,7 @@ def initialize(version, account_sid: nil, domain_sid: nil) # @param [String] ip_access_control_list_sid The ip_access_control_list_sid # @return [IpAccessControlListMappingInstance] Newly created IpAccessControlListMappingInstance def create(ip_access_control_list_sid: nil) - data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid,}) + data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid}) payload = @version.create( 'POST', @@ -78,7 +78,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -90,7 +90,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -184,7 +184,7 @@ def initialize(version, account_sid, domain_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, domain_sid: domain_sid, sid: sid,} + @solution = {account_sid: account_sid, domain_sid: domain_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/Domains/#{@solution[:domain_sid]}/IpAccessControlListMappings/#{@solution[:sid]}.json" end diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb index 15ab998e5..ead452a7d 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -114,7 +114,7 @@ def get_page(target_url) # characters long. # @return [IpAccessControlListInstance] Newly created IpAccessControlListInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -122,7 +122,7 @@ def create(friendly_name: nil) data: data ) - IpAccessControlListInstance.new(@version, payload, account_sid: @solution[:account_sid],) + IpAccessControlListInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -151,7 +151,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [IpAccessControlListInstance] IpAccessControlListInstance def get_instance(payload) - IpAccessControlListInstance.new(@version, payload, account_sid: @solution[:account_sid],) + IpAccessControlListInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -173,7 +173,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/SIP/IpAccessControlLists/#{@solution[:sid]}.json" # Dependents @@ -206,7 +206,7 @@ def fetch # characters long. # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance def update(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -237,7 +237,7 @@ def ip_addresses(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IpAddressContext.new(@version, @solution[:account_sid], @solution[:sid], sid,) + return IpAddressContext.new(@version, @solution[:account_sid], @solution[:sid], sid) end unless @ip_addresses @@ -285,7 +285,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -294,7 +294,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [IpAccessControlListContext] IpAccessControlListContext for this IpAccessControlListInstance def context unless @instance_context - @instance_context = IpAccessControlListContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = IpAccessControlListContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end @@ -354,7 +354,7 @@ def fetch # characters long. # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance def update(friendly_name: nil) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb b/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb index 313fb332c..57f5050d3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb @@ -55,7 +55,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -67,7 +67,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -115,7 +115,7 @@ def get_page(target_url) # @param [String] ip_address The ip_address # @return [IpAddressInstance] Newly created IpAddressInstance def create(friendly_name: nil, ip_address: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'IpAddress' => ip_address,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'IpAddress' => ip_address}) payload = @version.create( 'POST', @@ -219,7 +219,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [IpAddressInstance] Updated IpAddressInstance def update(ip_address: :unset, friendly_name: :unset) - data = Twilio::Values.of({'IpAddress' => ip_address, 'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'IpAddress' => ip_address, 'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -361,7 +361,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [IpAddressInstance] Updated IpAddressInstance def update(ip_address: :unset, friendly_name: :unset) - context.update(ip_address: ip_address, friendly_name: friendly_name,) + context.update(ip_address: ip_address, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/token.rb b/lib/twilio-ruby/rest/api/v2010/account/token.rb index 5d8324eff..12836c03d 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/token.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/token.rb @@ -31,7 +31,7 @@ def initialize(version, account_sid: nil) # are valid # @return [TokenInstance] Newly created TokenInstance def create(ttl: :unset) - data = Twilio::Values.of({'Ttl' => ttl,}) + data = Twilio::Values.of({'Ttl' => ttl}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(ttl: :unset) data: data ) - TokenInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TokenInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -68,7 +68,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TokenInstance] TokenInstance def get_instance(payload) - TokenInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TokenInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/transcription.rb b/lib/twilio-ruby/rest/api/v2010/account/transcription.rb index b10273080..8751dd7a5 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/transcription.rb @@ -53,7 +53,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -65,7 +65,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TranscriptionInstance] TranscriptionInstance def get_instance(payload) - TranscriptionInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TranscriptionInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Transcriptions/#{@solution[:sid]}.json" end @@ -223,7 +223,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -232,7 +232,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [TranscriptionContext] TranscriptionContext for this TranscriptionInstance def context unless @instance_context - @instance_context = TranscriptionContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = TranscriptionContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage.rb b/lib/twilio-ruby/rest/api/v2010/account/usage.rb index 139eb8ad3..1cefa7545 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage.rb @@ -32,7 +32,7 @@ def initialize(version, account_sid: nil) # @return [RecordList] # @return [RecordContext] def records - @records ||= RecordList.new(@version, account_sid: @solution[:account_sid],) + @records ||= RecordList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -44,10 +44,10 @@ def triggers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TriggerContext.new(@version, @solution[:account_sid], sid,) + return TriggerContext.new(@version, @solution[:account_sid], sid) end - @triggers ||= TriggerList.new(@version, account_sid: @solution[:account_sid],) + @triggers ||= TriggerList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -76,7 +76,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UsageInstance] UsageInstance def get_instance(payload) - UsageInstance.new(@version, payload, account_sid: @solution[:account_sid],) + UsageInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb index 4445ba2c0..a04f7a542 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb @@ -105,7 +105,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -163,7 +163,7 @@ def get_page(target_url) # @return [AllTimeList] # @return [AllTimeContext] def all_time - @all_time ||= AllTimeList.new(@version, account_sid: @solution[:account_sid],) + @all_time ||= AllTimeList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -171,7 +171,7 @@ def all_time # @return [DailyList] # @return [DailyContext] def daily - @daily ||= DailyList.new(@version, account_sid: @solution[:account_sid],) + @daily ||= DailyList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -179,7 +179,7 @@ def daily # @return [LastMonthList] # @return [LastMonthContext] def last_month - @last_month ||= LastMonthList.new(@version, account_sid: @solution[:account_sid],) + @last_month ||= LastMonthList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -187,7 +187,7 @@ def last_month # @return [MonthlyList] # @return [MonthlyContext] def monthly - @monthly ||= MonthlyList.new(@version, account_sid: @solution[:account_sid],) + @monthly ||= MonthlyList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -195,7 +195,7 @@ def monthly # @return [ThisMonthList] # @return [ThisMonthContext] def this_month - @this_month ||= ThisMonthList.new(@version, account_sid: @solution[:account_sid],) + @this_month ||= ThisMonthList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -203,7 +203,7 @@ def this_month # @return [TodayList] # @return [TodayContext] def today - @today ||= TodayList.new(@version, account_sid: @solution[:account_sid],) + @today ||= TodayList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -211,7 +211,7 @@ def today # @return [YearlyList] # @return [YearlyContext] def yearly - @yearly ||= YearlyList.new(@version, account_sid: @solution[:account_sid],) + @yearly ||= YearlyList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -219,7 +219,7 @@ def yearly # @return [YesterdayList] # @return [YesterdayContext] def yesterday - @yesterday ||= YesterdayList.new(@version, account_sid: @solution[:account_sid],) + @yesterday ||= YesterdayList.new(@version, account_sid: @solution[:account_sid]) end ## @@ -248,7 +248,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RecordInstance] RecordInstance def get_instance(payload) - RecordInstance.new(@version, payload, account_sid: @solution[:account_sid],) + RecordInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb index 92000546d..5039c4f2e 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AllTimeInstance] AllTimeInstance def get_instance(payload) - AllTimeInstance.new(@version, payload, account_sid: @solution[:account_sid],) + AllTimeInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb index 8485f64a4..b9d718aa3 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DailyInstance] DailyInstance def get_instance(payload) - DailyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + DailyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb index 89067d842..4e03e23b0 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [LastMonthInstance] LastMonthInstance def get_instance(payload) - LastMonthInstance.new(@version, payload, account_sid: @solution[:account_sid],) + LastMonthInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb index 65f8817d0..6aab70922 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [MonthlyInstance] MonthlyInstance def get_instance(payload) - MonthlyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + MonthlyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb index bf8415ba9..21027bde6 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ThisMonthInstance] ThisMonthInstance def get_instance(payload) - ThisMonthInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ThisMonthInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb index 46671ee28..2345995fc 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TodayInstance] TodayInstance def get_instance(payload) - TodayInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TodayInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb index acff1fa09..443549032 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [YearlyInstance] YearlyInstance def get_instance(payload) - YearlyInstance.new(@version, payload, account_sid: @solution[:account_sid],) + YearlyInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb index be28a8a22..e62f2ea24 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb @@ -84,7 +84,7 @@ def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, p def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [YesterdayInstance] YesterdayInstance def get_instance(payload) - YesterdayInstance.new(@version, payload, account_sid: @solution[:account_sid],) + YesterdayInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb b/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb index 0976d99ee..91b7723f1 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb @@ -62,7 +62,7 @@ def create(callback_url: nil, trigger_value: nil, usage_category: nil, callback_ data: data ) - TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -129,7 +129,7 @@ def stream(recurring: :unset, trigger_by: :unset, usage_category: :unset, limit: def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -205,7 +205,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TriggerInstance] TriggerInstance def get_instance(payload) - TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid],) + TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -226,7 +226,7 @@ def initialize(version, account_sid, sid) super(version) # Path Solution - @solution = {account_sid: account_sid, sid: sid,} + @solution = {account_sid: account_sid, sid: sid} @uri = "/Accounts/#{@solution[:account_sid]}/Usage/Triggers/#{@solution[:sid]}.json" end @@ -242,7 +242,7 @@ def fetch params, ) - TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -267,7 +267,7 @@ def update(callback_method: :unset, callback_url: :unset, friendly_name: :unset) data: data, ) - TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid],) + TriggerInstance.new(@version, payload, account_sid: @solution[:account_sid], sid: @solution[:sid]) end ## @@ -319,7 +319,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'],} + @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid']} end ## @@ -328,7 +328,7 @@ def initialize(version, payload, account_sid: nil, sid: nil) # @return [TriggerContext] TriggerContext for this TriggerInstance def context unless @instance_context - @instance_context = TriggerContext.new(@version, @params['account_sid'], @params['sid'],) + @instance_context = TriggerContext.new(@version, @params['account_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb b/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb index 1817e6a5f..dbe52bcbc 100644 --- a/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +++ b/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb @@ -49,7 +49,7 @@ def create(phone_number: nil, friendly_name: :unset, call_delay: :unset, extensi data: data ) - ValidationRequestInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ValidationRequestInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## @@ -78,7 +78,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ValidationRequestInstance] ValidationRequestInstance def get_instance(payload) - ValidationRequestInstance.new(@version, payload, account_sid: @solution[:account_sid],) + ValidationRequestInstance.new(@version, payload, account_sid: @solution[:account_sid]) end ## diff --git a/lib/twilio-ruby/rest/chat/v1.rb b/lib/twilio-ruby/rest/chat/v1.rb index 150d710a3..584d2759c 100644 --- a/lib/twilio-ruby/rest/chat/v1.rb +++ b/lib/twilio-ruby/rest/chat/v1.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V1::CredentialInstance] if sid was passed. + # @return [Twilio::REST::Chat::V1::CredentialContext] if sid was passed. # @return [Twilio::REST::Chat::V1::CredentialList] def credentials(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def credentials(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Chat::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Chat::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/chat/v1/credential.rb b/lib/twilio-ruby/rest/chat/v1/credential.rb index 4183605dc..a698d230a 100644 --- a/lib/twilio-ruby/rest/chat/v1/credential.rb +++ b/lib/twilio-ruby/rest/chat/v1/credential.rb @@ -50,7 +50,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -62,7 +62,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -131,7 +131,7 @@ def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: : data: data ) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/#{@solution[:sid]}" end @@ -196,7 +196,7 @@ def fetch params, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -224,7 +224,7 @@ def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sand data: data, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -266,7 +266,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -275,7 +275,7 @@ def initialize(version, payload, sid: nil) # @return [CredentialContext] CredentialContext for this CredentialInstance def context unless @instance_context - @instance_context = CredentialContext.new(@version, @params['sid'],) + @instance_context = CredentialContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v1/service.rb b/lib/twilio-ruby/rest/chat/v1/service.rb index 33748ec9b..582b8c93a 100644 --- a/lib/twilio-ruby/rest/chat/v1/service.rb +++ b/lib/twilio-ruby/rest/chat/v1/service.rb @@ -27,7 +27,7 @@ def initialize(version) # @param [String] friendly_name The friendly_name # @return [ServiceInstance] Newly created ServiceInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -35,7 +35,7 @@ def create(friendly_name: nil) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -67,7 +67,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -79,7 +79,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -146,7 +146,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -166,7 +166,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -187,7 +187,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -398,7 +398,7 @@ def update(friendly_name: :unset, default_service_role_sid: :unset, default_chan data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -409,11 +409,11 @@ def channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ChannelContext.new(@version, @solution[:sid], sid,) + return ChannelContext.new(@version, @solution[:sid], sid) end unless @channels - @channels = ChannelList.new(@version, service_sid: @solution[:sid],) + @channels = ChannelList.new(@version, service_sid: @solution[:sid]) end @channels @@ -427,11 +427,11 @@ def roles(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoleContext.new(@version, @solution[:sid], sid,) + return RoleContext.new(@version, @solution[:sid], sid) end unless @roles - @roles = RoleList.new(@version, service_sid: @solution[:sid],) + @roles = RoleList.new(@version, service_sid: @solution[:sid]) end @roles @@ -445,11 +445,11 @@ def users(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserContext.new(@version, @solution[:sid], sid,) + return UserContext.new(@version, @solution[:sid], sid) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users @@ -500,7 +500,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -509,7 +509,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v1/service/channel.rb b/lib/twilio-ruby/rest/chat/v1/service/channel.rb index 62c908e26..03b3c1688 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/channel.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/channel.rb @@ -45,7 +45,7 @@ def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: data: data ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -79,7 +79,7 @@ def list(type: :unset, limit: nil, page_size: nil) def stream(type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(type: type, page_size: limits[:page_size],) + page = self.page(type: type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:sid]}" # Dependents @@ -202,7 +202,7 @@ def fetch params, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -231,7 +231,7 @@ def update(friendly_name: :unset, unique_name: :unset, attributes: :unset) data: data, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -242,7 +242,7 @@ def members(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @members @@ -264,7 +264,7 @@ def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @messages @@ -286,7 +286,7 @@ def invites(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @invites @@ -339,7 +339,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -348,7 +348,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ChannelContext] ChannelContext for this ChannelInstance def context unless @instance_context - @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -458,7 +458,7 @@ def delete # @param [String] attributes The attributes # @return [ChannelInstance] Updated ChannelInstance def update(friendly_name: :unset, unique_name: :unset, attributes: :unset) - context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes,) + context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes) end ## diff --git a/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb b/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb index 9227e4087..5b0a6d20e 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [InviteInstance] Newly created InviteInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb b/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb index e648268e8..fd7f2aed3 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [MemberInstance] Newly created MemberInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Members/#{@solution[:sid]}" end @@ -391,7 +391,7 @@ def delete # @param [String] last_consumed_message_index The last_consumed_message_index # @return [MemberInstance] Updated MemberInstance def update(role_sid: :unset, last_consumed_message_index: :unset) - context.update(role_sid: role_sid, last_consumed_message_index: last_consumed_message_index,) + context.update(role_sid: role_sid, last_consumed_message_index: last_consumed_message_index) end ## diff --git a/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb b/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb index ed6788c0f..1b163a078 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb @@ -33,7 +33,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] attributes The attributes # @return [MessageInstance] Newly created MessageInstance def create(body: nil, from: :unset, attributes: :unset) - data = Twilio::Values.of({'Body' => body, 'From' => from, 'Attributes' => attributes,}) + data = Twilio::Values.of({'Body' => body, 'From' => from, 'Attributes' => attributes}) payload = @version.create( 'POST', @@ -80,7 +80,7 @@ def list(order: :unset, limit: nil, page_size: nil) def stream(order: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, page_size: limits[:page_size],) + page = self.page(order: order, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -92,7 +92,7 @@ def stream(order: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -188,7 +188,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Messages/#{@solution[:sid]}" end @@ -226,7 +226,7 @@ def delete # @param [String] attributes The attributes # @return [MessageInstance] Updated MessageInstance def update(body: :unset, attributes: :unset) - data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes,}) + data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes}) payload = @version.update( 'POST', @@ -403,7 +403,7 @@ def delete # @param [String] attributes The attributes # @return [MessageInstance] Updated MessageInstance def update(body: :unset, attributes: :unset) - context.update(body: body, attributes: attributes,) + context.update(body: body, attributes: attributes) end ## diff --git a/lib/twilio-ruby/rest/chat/v1/service/role.rb b/lib/twilio-ruby/rest/chat/v1/service/role.rb index e8d0edb6f..9b5c2e8eb 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/role.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/role.rb @@ -43,7 +43,7 @@ def create(friendly_name: nil, type: nil, permission: nil) data: data ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -75,7 +75,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -87,7 +87,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -154,7 +154,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoleInstance] RoleInstance def get_instance(payload) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Roles/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch params, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -206,7 +206,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e },}) + data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }}) payload = @version.update( 'POST', @@ -214,7 +214,7 @@ def update(permission: nil) data: data, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [RoleContext] RoleContext for this RoleInstance def context unless @instance_context - @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -338,7 +338,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - context.update(permission: permission,) + context.update(permission: permission) end ## diff --git a/lib/twilio-ruby/rest/chat/v1/service/user.rb b/lib/twilio-ruby/rest/chat/v1/service/user.rb index d8f27607b..1ff78c4c7 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/user.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/user.rb @@ -45,7 +45,7 @@ def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: : data: data ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -156,7 +156,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UserInstance] UserInstance def get_instance(payload) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:sid]}" # Dependents @@ -196,7 +196,7 @@ def fetch params, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -225,7 +225,7 @@ def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) data: data, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -283,7 +283,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -292,7 +292,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [UserContext] UserContext for this UserInstance def context unless @instance_context - @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -402,7 +402,7 @@ def delete # @param [String] friendly_name The friendly_name # @return [UserInstance] Updated UserInstance def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) - context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name,) + context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb b/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb index 5dd93e099..5bb323e50 100644 --- a/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +++ b/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/chat/v2.rb b/lib/twilio-ruby/rest/chat/v2.rb index 67144e193..02065f02c 100644 --- a/lib/twilio-ruby/rest/chat/v2.rb +++ b/lib/twilio-ruby/rest/chat/v2.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V2::CredentialInstance] if sid was passed. + # @return [Twilio::REST::Chat::V2::CredentialContext] if sid was passed. # @return [Twilio::REST::Chat::V2::CredentialList] def credentials(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def credentials(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V2::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Chat::V2::ServiceContext] if sid was passed. # @return [Twilio::REST::Chat::V2::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/chat/v2/credential.rb b/lib/twilio-ruby/rest/chat/v2/credential.rb index 4d98b5f4d..5321a6f09 100644 --- a/lib/twilio-ruby/rest/chat/v2/credential.rb +++ b/lib/twilio-ruby/rest/chat/v2/credential.rb @@ -50,7 +50,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -62,7 +62,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -131,7 +131,7 @@ def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: : data: data ) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/#{@solution[:sid]}" end @@ -196,7 +196,7 @@ def fetch params, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -224,7 +224,7 @@ def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sand data: data, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -266,7 +266,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -275,7 +275,7 @@ def initialize(version, payload, sid: nil) # @return [CredentialContext] CredentialContext for this CredentialInstance def context unless @instance_context - @instance_context = CredentialContext.new(@version, @params['sid'],) + @instance_context = CredentialContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v2/service.rb b/lib/twilio-ruby/rest/chat/v2/service.rb index 398813cda..c16d3b8c6 100644 --- a/lib/twilio-ruby/rest/chat/v2/service.rb +++ b/lib/twilio-ruby/rest/chat/v2/service.rb @@ -27,7 +27,7 @@ def initialize(version) # @param [String] friendly_name The friendly_name # @return [ServiceInstance] Newly created ServiceInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -35,7 +35,7 @@ def create(friendly_name: nil) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -67,7 +67,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -79,7 +79,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -146,7 +146,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -166,7 +166,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -188,7 +188,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -285,7 +285,7 @@ def update(friendly_name: :unset, default_service_role_sid: :unset, default_chan data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -296,11 +296,11 @@ def channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ChannelContext.new(@version, @solution[:sid], sid,) + return ChannelContext.new(@version, @solution[:sid], sid) end unless @channels - @channels = ChannelList.new(@version, service_sid: @solution[:sid],) + @channels = ChannelList.new(@version, service_sid: @solution[:sid]) end @channels @@ -314,11 +314,11 @@ def roles(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoleContext.new(@version, @solution[:sid], sid,) + return RoleContext.new(@version, @solution[:sid], sid) end unless @roles - @roles = RoleList.new(@version, service_sid: @solution[:sid],) + @roles = RoleList.new(@version, service_sid: @solution[:sid]) end @roles @@ -332,11 +332,11 @@ def users(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserContext.new(@version, @solution[:sid], sid,) + return UserContext.new(@version, @solution[:sid], sid) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users @@ -350,11 +350,11 @@ def bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return BindingContext.new(@version, @solution[:sid], sid,) + return BindingContext.new(@version, @solution[:sid], sid) end unless @bindings - @bindings = BindingList.new(@version, service_sid: @solution[:sid],) + @bindings = BindingList.new(@version, service_sid: @solution[:sid]) end @bindings @@ -407,7 +407,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -416,7 +416,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v2/service/binding.rb b/lib/twilio-ruby/rest/chat/v2/service/binding.rb index 67adcf4ed..065b4204c 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/binding.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/binding.rb @@ -56,7 +56,7 @@ def list(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) def stream(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(binding_type: binding_type, identity: identity, page_size: limits[:page_size],) + page = self.page(binding_type: binding_type, identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -139,7 +139,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [BindingInstance] BindingInstance def get_instance(payload) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -160,7 +160,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}" end @@ -176,7 +176,7 @@ def fetch params, ) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -223,7 +223,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -232,7 +232,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [BindingContext] BindingContext for this BindingInstance def context unless @instance_context - @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v2/service/channel.rb b/lib/twilio-ruby/rest/chat/v2/service/channel.rb index 6e8a16653..dec9f577a 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/channel.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/channel.rb @@ -51,7 +51,7 @@ def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: data: data ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -85,7 +85,7 @@ def list(type: :unset, limit: nil, page_size: nil) def stream(type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(type: type, page_size: limits[:page_size],) + page = self.page(type: type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -97,7 +97,7 @@ def stream(type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -166,7 +166,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -187,7 +187,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:sid]}" # Dependents @@ -208,7 +208,7 @@ def fetch params, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -243,7 +243,7 @@ def update(friendly_name: :unset, unique_name: :unset, attributes: :unset, date_ data: data, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -254,7 +254,7 @@ def members(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @members @@ -276,7 +276,7 @@ def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @messages @@ -298,7 +298,7 @@ def invites(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @invites @@ -351,7 +351,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -360,7 +360,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ChannelContext] ChannelContext for this ChannelInstance def context unless @instance_context - @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb b/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb index e2351a378..3b3da75c2 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [InviteInstance] Newly created InviteInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb b/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb index 1a733407a..92c5d1a04 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb @@ -90,7 +90,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -102,7 +102,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -198,7 +198,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Members/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb b/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb index 009ffc1dc..071916330 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb @@ -92,7 +92,7 @@ def list(order: :unset, limit: nil, page_size: nil) def stream(order: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, page_size: limits[:page_size],) + page = self.page(order: order, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -104,7 +104,7 @@ def stream(order: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -200,7 +200,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Messages/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/chat/v2/service/role.rb b/lib/twilio-ruby/rest/chat/v2/service/role.rb index 1cd99df58..0f34748a2 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/role.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/role.rb @@ -43,7 +43,7 @@ def create(friendly_name: nil, type: nil, permission: nil) data: data ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -75,7 +75,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -87,7 +87,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -154,7 +154,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoleInstance] RoleInstance def get_instance(payload) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Roles/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch params, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -206,7 +206,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e },}) + data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }}) payload = @version.update( 'POST', @@ -214,7 +214,7 @@ def update(permission: nil) data: data, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [RoleContext] RoleContext for this RoleInstance def context unless @instance_context - @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -338,7 +338,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - context.update(permission: permission,) + context.update(permission: permission) end ## diff --git a/lib/twilio-ruby/rest/chat/v2/service/user.rb b/lib/twilio-ruby/rest/chat/v2/service/user.rb index bebf45076..431b01dfe 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/user.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/user.rb @@ -45,7 +45,7 @@ def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: : data: data ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -156,7 +156,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UserInstance] UserInstance def get_instance(payload) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:sid]}" # Dependents @@ -197,7 +197,7 @@ def fetch params, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -226,7 +226,7 @@ def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) data: data, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -253,7 +253,7 @@ def user_bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @user_bindings @@ -306,7 +306,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -315,7 +315,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [UserContext] UserContext for this UserInstance def context unless @instance_context - @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -425,7 +425,7 @@ def delete # @param [String] friendly_name The friendly_name # @return [UserInstance] Updated UserInstance def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) - context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name,) + context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb b/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb index db2f151f4..49f3d46f6 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb @@ -56,7 +56,7 @@ def list(binding_type: :unset, limit: nil, page_size: nil) def stream(binding_type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(binding_type: binding_type, page_size: limits[:page_size],) + page = self.page(binding_type: binding_type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(binding_type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, service_sid, user_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, user_sid: user_sid, sid: sid,} + @solution = {service_sid: service_sid, user_sid: user_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:user_sid]}/Bindings/#{@solution[:sid]}" end @@ -234,7 +234,7 @@ def initialize(version, payload, service_sid: nil, user_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'user_sid' => user_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'user_sid' => user_sid, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb b/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb index 34c9d9ca9..9eb06f6ea 100644 --- a/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +++ b/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/fax/v1.rb b/lib/twilio-ruby/rest/fax/v1.rb index 42392acca..300fe2113 100644 --- a/lib/twilio-ruby/rest/fax/v1.rb +++ b/lib/twilio-ruby/rest/fax/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid A 34 character string that uniquely identifies this fax. - # @return [Twilio::REST::Fax::V1::FaxInstance] if sid was passed. + # @return [Twilio::REST::Fax::V1::FaxContext] if sid was passed. # @return [Twilio::REST::Fax::V1::FaxList] def faxes(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/fax/v1/fax.rb b/lib/twilio-ruby/rest/fax/v1/fax.rb index 129bf7ad6..37d635f38 100644 --- a/lib/twilio-ruby/rest/fax/v1/fax.rb +++ b/lib/twilio-ruby/rest/fax/v1/fax.rb @@ -93,7 +93,7 @@ def stream(from: :unset, to: :unset, date_created_on_or_before: :unset, date_cre def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def create(to: nil, media_url: nil, quality: :unset, status_callback: :unset, fr data: data ) - FaxInstance.new(@version, payload,) + FaxInstance.new(@version, payload) end ## @@ -218,7 +218,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [FaxInstance] FaxInstance def get_instance(payload) - FaxInstance.new(@version, payload,) + FaxInstance.new(@version, payload) end ## @@ -240,7 +240,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Faxes/#{@solution[:sid]}" # Dependents @@ -259,7 +259,7 @@ def fetch params, ) - FaxInstance.new(@version, payload, sid: @solution[:sid],) + FaxInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -269,7 +269,7 @@ def fetch # transmission. # @return [FaxInstance] Updated FaxInstance def update(status: :unset) - data = Twilio::Values.of({'Status' => status,}) + data = Twilio::Values.of({'Status' => status}) payload = @version.update( 'POST', @@ -277,7 +277,7 @@ def update(status: :unset) data: data, ) - FaxInstance.new(@version, payload, sid: @solution[:sid],) + FaxInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -295,11 +295,11 @@ def media(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FaxMediaContext.new(@version, @solution[:sid], sid,) + return FaxMediaContext.new(@version, @solution[:sid], sid) end unless @media - @media = FaxMediaList.new(@version, fax_sid: @solution[:sid],) + @media = FaxMediaList.new(@version, fax_sid: @solution[:sid]) end @media @@ -349,7 +349,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -358,7 +358,7 @@ def initialize(version, payload, sid: nil) # @return [FaxContext] FaxContext for this FaxInstance def context unless @instance_context - @instance_context = FaxContext.new(@version, @params['sid'],) + @instance_context = FaxContext.new(@version, @params['sid']) end @instance_context end @@ -485,7 +485,7 @@ def fetch # transmission. # @return [FaxInstance] Updated FaxInstance def update(status: :unset) - context.update(status: status,) + context.update(status: status) end ## diff --git a/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb b/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb index 616116704..97cd446d6 100644 --- a/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +++ b/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb @@ -55,7 +55,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -67,7 +67,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -136,7 +136,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [FaxMediaInstance] FaxMediaInstance def get_instance(payload) - FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid],) + FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid]) end ## @@ -160,7 +160,7 @@ def initialize(version, fax_sid, sid) super(version) # Path Solution - @solution = {fax_sid: fax_sid, sid: sid,} + @solution = {fax_sid: fax_sid, sid: sid} @uri = "/Faxes/#{@solution[:fax_sid]}/Media/#{@solution[:sid]}" end @@ -176,7 +176,7 @@ def fetch params, ) - FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid],) + FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid]) end ## @@ -222,7 +222,7 @@ def initialize(version, payload, fax_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'fax_sid' => fax_sid, 'sid' => sid || @properties['sid'],} + @params = {'fax_sid' => fax_sid, 'sid' => sid || @properties['sid']} end ## @@ -231,7 +231,7 @@ def initialize(version, payload, fax_sid: nil, sid: nil) # @return [FaxMediaContext] FaxMediaContext for this FaxMediaInstance def context unless @instance_context - @instance_context = FaxMediaContext.new(@version, @params['fax_sid'], @params['sid'],) + @instance_context = FaxMediaContext.new(@version, @params['fax_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v1.rb b/lib/twilio-ruby/rest/ip_messaging/v1.rb index 5b114e76f..70c890709 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V1::CredentialInstance] if sid was passed. + # @return [Twilio::REST::Chat::V1::CredentialContext] if sid was passed. # @return [Twilio::REST::Chat::V1::CredentialList] def credentials(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def credentials(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Chat::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Chat::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb b/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb index f8be82468..5241c4692 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb @@ -50,7 +50,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -62,7 +62,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -131,7 +131,7 @@ def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: : data: data ) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/#{@solution[:sid]}" end @@ -196,7 +196,7 @@ def fetch params, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -224,7 +224,7 @@ def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sand data: data, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -266,7 +266,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -275,7 +275,7 @@ def initialize(version, payload, sid: nil) # @return [CredentialContext] CredentialContext for this CredentialInstance def context unless @instance_context - @instance_context = CredentialContext.new(@version, @params['sid'],) + @instance_context = CredentialContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service.rb index 70966798c..43eeb5cee 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service.rb @@ -27,7 +27,7 @@ def initialize(version) # @param [String] friendly_name The friendly_name # @return [ServiceInstance] Newly created ServiceInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -35,7 +35,7 @@ def create(friendly_name: nil) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -67,7 +67,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -79,7 +79,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -146,7 +146,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -166,7 +166,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -187,7 +187,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -398,7 +398,7 @@ def update(friendly_name: :unset, default_service_role_sid: :unset, default_chan data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -409,11 +409,11 @@ def channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ChannelContext.new(@version, @solution[:sid], sid,) + return ChannelContext.new(@version, @solution[:sid], sid) end unless @channels - @channels = ChannelList.new(@version, service_sid: @solution[:sid],) + @channels = ChannelList.new(@version, service_sid: @solution[:sid]) end @channels @@ -427,11 +427,11 @@ def roles(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoleContext.new(@version, @solution[:sid], sid,) + return RoleContext.new(@version, @solution[:sid], sid) end unless @roles - @roles = RoleList.new(@version, service_sid: @solution[:sid],) + @roles = RoleList.new(@version, service_sid: @solution[:sid]) end @roles @@ -445,11 +445,11 @@ def users(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserContext.new(@version, @solution[:sid], sid,) + return UserContext.new(@version, @solution[:sid], sid) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users @@ -500,7 +500,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -509,7 +509,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb index 78d4ab3f7..ca1ccbac8 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb @@ -45,7 +45,7 @@ def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: data: data ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -79,7 +79,7 @@ def list(type: :unset, limit: nil, page_size: nil) def stream(type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(type: type, page_size: limits[:page_size],) + page = self.page(type: type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:sid]}" # Dependents @@ -202,7 +202,7 @@ def fetch params, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -231,7 +231,7 @@ def update(friendly_name: :unset, unique_name: :unset, attributes: :unset) data: data, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -242,7 +242,7 @@ def members(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @members @@ -264,7 +264,7 @@ def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @messages @@ -286,7 +286,7 @@ def invites(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @invites @@ -339,7 +339,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -348,7 +348,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ChannelContext] ChannelContext for this ChannelInstance def context unless @instance_context - @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -458,7 +458,7 @@ def delete # @param [String] attributes The attributes # @return [ChannelInstance] Updated ChannelInstance def update(friendly_name: :unset, unique_name: :unset, attributes: :unset) - context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes,) + context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb index 163416ade..cab6a15e4 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [InviteInstance] Newly created InviteInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb index 77f512f21..7def0c0c9 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [MemberInstance] Newly created MemberInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Members/#{@solution[:sid]}" end @@ -391,7 +391,7 @@ def delete # @param [String] last_consumed_message_index The last_consumed_message_index # @return [MemberInstance] Updated MemberInstance def update(role_sid: :unset, last_consumed_message_index: :unset) - context.update(role_sid: role_sid, last_consumed_message_index: last_consumed_message_index,) + context.update(role_sid: role_sid, last_consumed_message_index: last_consumed_message_index) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb index 6982d8445..48d07a38b 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb @@ -33,7 +33,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] attributes The attributes # @return [MessageInstance] Newly created MessageInstance def create(body: nil, from: :unset, attributes: :unset) - data = Twilio::Values.of({'Body' => body, 'From' => from, 'Attributes' => attributes,}) + data = Twilio::Values.of({'Body' => body, 'From' => from, 'Attributes' => attributes}) payload = @version.create( 'POST', @@ -80,7 +80,7 @@ def list(order: :unset, limit: nil, page_size: nil) def stream(order: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, page_size: limits[:page_size],) + page = self.page(order: order, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -92,7 +92,7 @@ def stream(order: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -188,7 +188,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Messages/#{@solution[:sid]}" end @@ -226,7 +226,7 @@ def delete # @param [String] attributes The attributes # @return [MessageInstance] Updated MessageInstance def update(body: :unset, attributes: :unset) - data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes,}) + data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes}) payload = @version.update( 'POST', @@ -403,7 +403,7 @@ def delete # @param [String] attributes The attributes # @return [MessageInstance] Updated MessageInstance def update(body: :unset, attributes: :unset) - context.update(body: body, attributes: attributes,) + context.update(body: body, attributes: attributes) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb index 35080b138..5d04c0fbf 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb @@ -43,7 +43,7 @@ def create(friendly_name: nil, type: nil, permission: nil) data: data ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -75,7 +75,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -87,7 +87,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -154,7 +154,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoleInstance] RoleInstance def get_instance(payload) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Roles/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch params, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -206,7 +206,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e },}) + data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }}) payload = @version.update( 'POST', @@ -214,7 +214,7 @@ def update(permission: nil) data: data, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [RoleContext] RoleContext for this RoleInstance def context unless @instance_context - @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -338,7 +338,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - context.update(permission: permission,) + context.update(permission: permission) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb index 8231ec16b..671442bc7 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb @@ -45,7 +45,7 @@ def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: : data: data ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -156,7 +156,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UserInstance] UserInstance def get_instance(payload) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:sid]}" # Dependents @@ -196,7 +196,7 @@ def fetch params, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -225,7 +225,7 @@ def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) data: data, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -283,7 +283,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -292,7 +292,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [UserContext] UserContext for this UserInstance def context unless @instance_context - @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -402,7 +402,7 @@ def delete # @param [String] friendly_name The friendly_name # @return [UserInstance] Updated UserInstance def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) - context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name,) + context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb b/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb index cfe725fbb..2385371e4 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/ip_messaging/v2.rb b/lib/twilio-ruby/rest/ip_messaging/v2.rb index c7701e84b..f76b2d208 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V2::CredentialInstance] if sid was passed. + # @return [Twilio::REST::Chat::V2::CredentialContext] if sid was passed. # @return [Twilio::REST::Chat::V2::CredentialList] def credentials(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def credentials(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Chat::V2::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Chat::V2::ServiceContext] if sid was passed. # @return [Twilio::REST::Chat::V2::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb b/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb index 9b27ea0fa..418a245bc 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb @@ -50,7 +50,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -62,7 +62,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -131,7 +131,7 @@ def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: : data: data ) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/#{@solution[:sid]}" end @@ -196,7 +196,7 @@ def fetch params, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -224,7 +224,7 @@ def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sand data: data, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -266,7 +266,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -275,7 +275,7 @@ def initialize(version, payload, sid: nil) # @return [CredentialContext] CredentialContext for this CredentialInstance def context unless @instance_context - @instance_context = CredentialContext.new(@version, @params['sid'],) + @instance_context = CredentialContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service.rb index 1d33490cb..86178f0bb 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service.rb @@ -27,7 +27,7 @@ def initialize(version) # @param [String] friendly_name The friendly_name # @return [ServiceInstance] Newly created ServiceInstance def create(friendly_name: nil) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -35,7 +35,7 @@ def create(friendly_name: nil) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -67,7 +67,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -79,7 +79,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -146,7 +146,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -166,7 +166,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -188,7 +188,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -285,7 +285,7 @@ def update(friendly_name: :unset, default_service_role_sid: :unset, default_chan data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -296,11 +296,11 @@ def channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ChannelContext.new(@version, @solution[:sid], sid,) + return ChannelContext.new(@version, @solution[:sid], sid) end unless @channels - @channels = ChannelList.new(@version, service_sid: @solution[:sid],) + @channels = ChannelList.new(@version, service_sid: @solution[:sid]) end @channels @@ -314,11 +314,11 @@ def roles(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoleContext.new(@version, @solution[:sid], sid,) + return RoleContext.new(@version, @solution[:sid], sid) end unless @roles - @roles = RoleList.new(@version, service_sid: @solution[:sid],) + @roles = RoleList.new(@version, service_sid: @solution[:sid]) end @roles @@ -332,11 +332,11 @@ def users(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserContext.new(@version, @solution[:sid], sid,) + return UserContext.new(@version, @solution[:sid], sid) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users @@ -350,11 +350,11 @@ def bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return BindingContext.new(@version, @solution[:sid], sid,) + return BindingContext.new(@version, @solution[:sid], sid) end unless @bindings - @bindings = BindingList.new(@version, service_sid: @solution[:sid],) + @bindings = BindingList.new(@version, service_sid: @solution[:sid]) end @bindings @@ -407,7 +407,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -416,7 +416,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb index 5f494ce45..8e71222a5 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb @@ -56,7 +56,7 @@ def list(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) def stream(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(binding_type: binding_type, identity: identity, page_size: limits[:page_size],) + page = self.page(binding_type: binding_type, identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(binding_type: :unset, identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -139,7 +139,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [BindingInstance] BindingInstance def get_instance(payload) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -160,7 +160,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}" end @@ -176,7 +176,7 @@ def fetch params, ) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -223,7 +223,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -232,7 +232,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [BindingContext] BindingContext for this BindingInstance def context unless @instance_context - @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb index 961636597..86c4a34e8 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb @@ -51,7 +51,7 @@ def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: data: data ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -85,7 +85,7 @@ def list(type: :unset, limit: nil, page_size: nil) def stream(type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(type: type, page_size: limits[:page_size],) + page = self.page(type: type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -97,7 +97,7 @@ def stream(type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -166,7 +166,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ChannelInstance] ChannelInstance def get_instance(payload) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -187,7 +187,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:sid]}" # Dependents @@ -208,7 +208,7 @@ def fetch params, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -243,7 +243,7 @@ def update(friendly_name: :unset, unique_name: :unset, attributes: :unset, date_ data: data, ) - ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ChannelInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -254,7 +254,7 @@ def members(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MemberContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @members @@ -276,7 +276,7 @@ def messages(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return MessageContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @messages @@ -298,7 +298,7 @@ def invites(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InviteContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @invites @@ -351,7 +351,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -360,7 +360,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ChannelContext] ChannelContext for this ChannelInstance def context unless @instance_context - @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ChannelContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb index acdbd4464..01eb97fb7 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil, channel_sid: nil) # @param [String] role_sid The role_sid # @return [InviteInstance] Newly created InviteInstance def create(identity: nil, role_sid: :unset) - data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid,}) + data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid}) payload = @version.create( 'POST', @@ -79,7 +79,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -187,7 +187,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Invites/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb index 409a3713b..0f23f53bc 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb @@ -90,7 +90,7 @@ def list(identity: :unset, limit: nil, page_size: nil) def stream(identity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, page_size: limits[:page_size],) + page = self.page(identity: identity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -102,7 +102,7 @@ def stream(identity: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -198,7 +198,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Members/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb index 3e7f9e796..46e659d1d 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb @@ -92,7 +92,7 @@ def list(order: :unset, limit: nil, page_size: nil) def stream(order: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, page_size: limits[:page_size],) + page = self.page(order: order, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -104,7 +104,7 @@ def stream(order: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -200,7 +200,7 @@ def initialize(version, service_sid, channel_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid,} + @solution = {service_sid: service_sid, channel_sid: channel_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Channels/#{@solution[:channel_sid]}/Messages/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb index 0a7419bd9..b06e0b251 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb @@ -43,7 +43,7 @@ def create(friendly_name: nil, type: nil, permission: nil) data: data ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -75,7 +75,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -87,7 +87,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -154,7 +154,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoleInstance] RoleInstance def get_instance(payload) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Roles/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch params, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -206,7 +206,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e },}) + data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }}) payload = @version.update( 'POST', @@ -214,7 +214,7 @@ def update(permission: nil) data: data, ) - RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + RoleInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [RoleContext] RoleContext for this RoleInstance def context unless @instance_context - @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = RoleContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -338,7 +338,7 @@ def delete # @param [String] permission The permission # @return [RoleInstance] Updated RoleInstance def update(permission: nil) - context.update(permission: permission,) + context.update(permission: permission) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb index 56f23a033..cf1b37903 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb @@ -45,7 +45,7 @@ def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: : data: data ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -156,7 +156,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UserInstance] UserInstance def get_instance(payload) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:sid]}" # Dependents @@ -197,7 +197,7 @@ def fetch params, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -226,7 +226,7 @@ def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) data: data, ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -253,7 +253,7 @@ def user_bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return UserBindingContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @user_bindings @@ -306,7 +306,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -315,7 +315,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [UserContext] UserContext for this UserInstance def context unless @instance_context - @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = UserContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -425,7 +425,7 @@ def delete # @param [String] friendly_name The friendly_name # @return [UserInstance] Updated UserInstance def update(role_sid: :unset, attributes: :unset, friendly_name: :unset) - context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name,) + context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb index bde0d1bb7..f664461ab 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb @@ -56,7 +56,7 @@ def list(binding_type: :unset, limit: nil, page_size: nil) def stream(binding_type: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(binding_type: binding_type, page_size: limits[:page_size],) + page = self.page(binding_type: binding_type, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(binding_type: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, service_sid, user_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, user_sid: user_sid, sid: sid,} + @solution = {service_sid: service_sid, user_sid: user_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:user_sid]}/Bindings/#{@solution[:sid]}" end @@ -234,7 +234,7 @@ def initialize(version, payload, service_sid: nil, user_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'user_sid' => user_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'user_sid' => user_sid, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb b/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb index 8394f1dd2..ba9fa8f45 100644 --- a/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +++ b/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/lookups/v1.rb b/lib/twilio-ruby/rest/lookups/v1.rb index 9010f6ec0..d972e3fef 100644 --- a/lib/twilio-ruby/rest/lookups/v1.rb +++ b/lib/twilio-ruby/rest/lookups/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] phone_number The phone_number - # @return [Twilio::REST::Lookups::V1::PhoneNumberInstance] if phone_number was passed. + # @return [Twilio::REST::Lookups::V1::PhoneNumberContext] if phone_number was passed. # @return [Twilio::REST::Lookups::V1::PhoneNumberList] def phone_numbers(phone_number=:unset) if phone_number.nil? diff --git a/lib/twilio-ruby/rest/lookups/v1/phone_number.rb b/lib/twilio-ruby/rest/lookups/v1/phone_number.rb index e5bc894ae..0f557040f 100644 --- a/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +++ b/lib/twilio-ruby/rest/lookups/v1/phone_number.rb @@ -46,7 +46,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload,) + PhoneNumberInstance.new(@version, payload) end ## @@ -66,7 +66,7 @@ def initialize(version, phone_number) super(version) # Path Solution - @solution = {phone_number: phone_number,} + @solution = {phone_number: phone_number} @uri = "/PhoneNumbers/#{@solution[:phone_number]}" end @@ -91,7 +91,7 @@ def fetch(country_code: :unset, type: :unset, add_ons: :unset, add_ons_data: :un params, ) - PhoneNumberInstance.new(@version, payload, phone_number: @solution[:phone_number],) + PhoneNumberInstance.new(@version, payload, phone_number: @solution[:phone_number]) end ## @@ -125,7 +125,7 @@ def initialize(version, payload, phone_number: nil) # Context @instance_context = nil - @params = {'phone_number' => phone_number || @properties['phone_number'],} + @params = {'phone_number' => phone_number || @properties['phone_number']} end ## @@ -134,7 +134,7 @@ def initialize(version, payload, phone_number: nil) # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance def context unless @instance_context - @instance_context = PhoneNumberContext.new(@version, @params['phone_number'],) + @instance_context = PhoneNumberContext.new(@version, @params['phone_number']) end @instance_context end @@ -189,7 +189,7 @@ def url # @param [Hash] add_ons_data The add_ons_data # @return [PhoneNumberInstance] Fetched PhoneNumberInstance def fetch(country_code: :unset, type: :unset, add_ons: :unset, add_ons_data: :unset) - context.fetch(country_code: country_code, type: type, add_ons: add_ons, add_ons_data: add_ons_data,) + context.fetch(country_code: country_code, type: type, add_ons: add_ons, add_ons_data: add_ons_data) end ## diff --git a/lib/twilio-ruby/rest/messaging/v1.rb b/lib/twilio-ruby/rest/messaging/v1.rb index 913e57cc6..62b7b9fec 100644 --- a/lib/twilio-ruby/rest/messaging/v1.rb +++ b/lib/twilio-ruby/rest/messaging/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Messaging::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Messaging::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/messaging/v1/service.rb b/lib/twilio-ruby/rest/messaging/v1/service.rb index bf04f0036..dcc350484 100644 --- a/lib/twilio-ruby/rest/messaging/v1/service.rb +++ b/lib/twilio-ruby/rest/messaging/v1/service.rb @@ -66,7 +66,7 @@ def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :uns data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -98,7 +98,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -110,7 +110,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -179,7 +179,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -201,7 +201,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -252,7 +252,7 @@ def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: : data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -267,7 +267,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -285,11 +285,11 @@ def phone_numbers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PhoneNumberContext.new(@version, @solution[:sid], sid,) + return PhoneNumberContext.new(@version, @solution[:sid], sid) end unless @phone_numbers - @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid],) + @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid]) end @phone_numbers @@ -303,11 +303,11 @@ def short_codes(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ShortCodeContext.new(@version, @solution[:sid], sid,) + return ShortCodeContext.new(@version, @solution[:sid], sid) end unless @short_codes - @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid],) + @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid]) end @short_codes @@ -321,11 +321,11 @@ def alpha_senders(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return AlphaSenderContext.new(@version, @solution[:sid], sid,) + return AlphaSenderContext.new(@version, @solution[:sid], sid) end unless @alpha_senders - @alpha_senders = AlphaSenderList.new(@version, service_sid: @solution[:sid],) + @alpha_senders = AlphaSenderList.new(@version, service_sid: @solution[:sid]) end @alpha_senders @@ -377,7 +377,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -386,7 +386,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb b/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb index 4f1d63a4c..ccf5dc238 100644 --- a/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +++ b/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] alpha_sender The alpha_sender # @return [AlphaSenderInstance] Newly created AlphaSenderInstance def create(alpha_sender: nil) - data = Twilio::Values.of({'AlphaSender' => alpha_sender,}) + data = Twilio::Values.of({'AlphaSender' => alpha_sender}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(alpha_sender: nil) data: data ) - AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid],) + AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AlphaSenderInstance] AlphaSenderInstance def get_instance(payload) - AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid],) + AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/AlphaSenders/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch params, ) - AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + AlphaSenderInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -236,7 +236,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -245,7 +245,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [AlphaSenderContext] AlphaSenderContext for this AlphaSenderInstance def context unless @instance_context - @instance_context = AlphaSenderContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = AlphaSenderContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb b/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb index c8829eb43..ae72c790a 100644 --- a/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +++ b/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] phone_number_sid The phone_number_sid # @return [PhoneNumberInstance] Newly created PhoneNumberInstance def create(phone_number_sid: nil) - data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid,}) + data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(phone_number_sid: nil) data: data ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/PhoneNumbers/#{@solution[:sid]}" end @@ -198,7 +198,7 @@ def fetch params, ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -237,7 +237,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -246,7 +246,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance def context unless @instance_context - @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb b/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb index b86bf3102..d090e80f7 100644 --- a/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +++ b/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] short_code_sid The short_code_sid # @return [ShortCodeInstance] Newly created ShortCodeInstance def create(short_code_sid: nil) - data = Twilio::Values.of({'ShortCodeSid' => short_code_sid,}) + data = Twilio::Values.of({'ShortCodeSid' => short_code_sid}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(short_code_sid: nil) data: data ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ShortCodeInstance] ShortCodeInstance def get_instance(payload) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/ShortCodes/#{@solution[:sid]}" end @@ -198,7 +198,7 @@ def fetch params, ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -237,7 +237,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -246,7 +246,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ShortCodeContext] ShortCodeContext for this ShortCodeInstance def context unless @instance_context - @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/monitor/v1.rb b/lib/twilio-ruby/rest/monitor/v1.rb index e35b2ea62..1642a73c6 100644 --- a/lib/twilio-ruby/rest/monitor/v1.rb +++ b/lib/twilio-ruby/rest/monitor/v1.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Monitor::V1::AlertInstance] if sid was passed. + # @return [Twilio::REST::Monitor::V1::AlertContext] if sid was passed. # @return [Twilio::REST::Monitor::V1::AlertList] def alerts(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def alerts(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Monitor::V1::EventInstance] if sid was passed. + # @return [Twilio::REST::Monitor::V1::EventContext] if sid was passed. # @return [Twilio::REST::Monitor::V1::EventList] def events(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/monitor/v1/alert.rb b/lib/twilio-ruby/rest/monitor/v1/alert.rb index 561041daf..15aa9d1a4 100644 --- a/lib/twilio-ruby/rest/monitor/v1/alert.rb +++ b/lib/twilio-ruby/rest/monitor/v1/alert.rb @@ -79,7 +79,7 @@ def stream(log_level: :unset, start_date: :unset, end_date: :unset, limit: nil, def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AlertInstance] AlertInstance def get_instance(payload) - AlertInstance.new(@version, payload,) + AlertInstance.new(@version, payload) end ## @@ -172,7 +172,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Alerts/#{@solution[:sid]}" end @@ -188,7 +188,7 @@ def fetch params, ) - AlertInstance.new(@version, payload, sid: @solution[:sid],) + AlertInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -239,7 +239,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -248,7 +248,7 @@ def initialize(version, payload, sid: nil) # @return [AlertContext] AlertContext for this AlertInstance def context unless @instance_context - @instance_context = AlertContext.new(@version, @params['sid'],) + @instance_context = AlertContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/monitor/v1/event.rb b/lib/twilio-ruby/rest/monitor/v1/event.rb index 351688f66..561a94fd9 100644 --- a/lib/twilio-ruby/rest/monitor/v1/event.rb +++ b/lib/twilio-ruby/rest/monitor/v1/event.rb @@ -91,7 +91,7 @@ def stream(actor_sid: :unset, event_type: :unset, resource_sid: :unset, source_i def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [EventInstance] EventInstance def get_instance(payload) - EventInstance.new(@version, payload,) + EventInstance.new(@version, payload) end ## @@ -190,7 +190,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Events/#{@solution[:sid]}" end @@ -206,7 +206,7 @@ def fetch params, ) - EventInstance.new(@version, payload, sid: @solution[:sid],) + EventInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -247,7 +247,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -256,7 +256,7 @@ def initialize(version, payload, sid: nil) # @return [EventContext] EventContext for this EventInstance def context unless @instance_context - @instance_context = EventContext.new(@version, @params['sid'],) + @instance_context = EventContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/notify/v1.rb b/lib/twilio-ruby/rest/notify/v1.rb index 61e691f6f..b0c62e632 100644 --- a/lib/twilio-ruby/rest/notify/v1.rb +++ b/lib/twilio-ruby/rest/notify/v1.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Notify::V1::CredentialInstance] if sid was passed. + # @return [Twilio::REST::Notify::V1::CredentialContext] if sid was passed. # @return [Twilio::REST::Notify::V1::CredentialList] def credentials(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def credentials(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Notify::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Notify::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Notify::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/notify/v1/credential.rb b/lib/twilio-ruby/rest/notify/v1/credential.rb index dff942e19..7d4e4b212 100644 --- a/lib/twilio-ruby/rest/notify/v1/credential.rb +++ b/lib/twilio-ruby/rest/notify/v1/credential.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -133,7 +133,7 @@ def create(type: nil, friendly_name: :unset, certificate: :unset, private_key: : data: data ) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -164,7 +164,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialInstance] CredentialInstance def get_instance(payload) - CredentialInstance.new(@version, payload,) + CredentialInstance.new(@version, payload) end ## @@ -186,7 +186,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Credentials/#{@solution[:sid]}" end @@ -202,7 +202,7 @@ def fetch params, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -230,7 +230,7 @@ def update(friendly_name: :unset, certificate: :unset, private_key: :unset, sand data: data, ) - CredentialInstance.new(@version, payload, sid: @solution[:sid],) + CredentialInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -274,7 +274,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -283,7 +283,7 @@ def initialize(version, payload, sid: nil) # @return [CredentialContext] CredentialContext for this CredentialInstance def context unless @instance_context - @instance_context = CredentialContext.new(@version, @params['sid'],) + @instance_context = CredentialContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/notify/v1/service.rb b/lib/twilio-ruby/rest/notify/v1/service.rb index 90edd763d..3a537657a 100644 --- a/lib/twilio-ruby/rest/notify/v1/service.rb +++ b/lib/twilio-ruby/rest/notify/v1/service.rb @@ -65,7 +65,7 @@ def create(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -99,7 +99,7 @@ def list(friendly_name: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -111,7 +111,7 @@ def stream(friendly_name: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -182,7 +182,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -204,7 +204,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -233,7 +233,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -277,7 +277,7 @@ def update(friendly_name: :unset, apn_credential_sid: :unset, gcm_credential_sid data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -288,11 +288,11 @@ def bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return BindingContext.new(@version, @solution[:sid], sid,) + return BindingContext.new(@version, @solution[:sid], sid) end unless @bindings - @bindings = BindingList.new(@version, service_sid: @solution[:sid],) + @bindings = BindingList.new(@version, service_sid: @solution[:sid]) end @bindings @@ -304,7 +304,7 @@ def bindings(sid=:unset) # @return [NotificationContext] def notifications unless @notifications - @notifications = NotificationList.new(@version, service_sid: @solution[:sid],) + @notifications = NotificationList.new(@version, service_sid: @solution[:sid]) end @notifications @@ -318,11 +318,11 @@ def users(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return UserContext.new(@version, @solution[:sid], identity,) + return UserContext.new(@version, @solution[:sid], identity) end unless @users - @users = UserList.new(@version, service_sid: @solution[:sid],) + @users = UserList.new(@version, service_sid: @solution[:sid]) end @users @@ -334,7 +334,7 @@ def users(identity=:unset) # @return [SegmentContext] def segments unless @segments - @segments = SegmentList.new(@version, service_sid: @solution[:sid],) + @segments = SegmentList.new(@version, service_sid: @solution[:sid]) end @segments @@ -384,7 +384,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -393,7 +393,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/notify/v1/service/binding.rb b/lib/twilio-ruby/rest/notify/v1/service/binding.rb index 9c162d2cd..c503212f5 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/binding.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/binding.rb @@ -53,7 +53,7 @@ def create(identity: nil, binding_type: nil, address: nil, tag: :unset, notifica data: data ) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -118,7 +118,7 @@ def stream(start_date: :unset, end_date: :unset, identity: :unset, tag: :unset, def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -195,7 +195,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [BindingInstance] BindingInstance def get_instance(payload) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -218,7 +218,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Bindings/#{@solution[:sid]}" end @@ -234,7 +234,7 @@ def fetch params, ) - BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + BindingInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -285,7 +285,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -294,7 +294,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [BindingContext] BindingContext for this BindingInstance def context unless @instance_context - @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = BindingContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/notify/v1/service/notification.rb b/lib/twilio-ruby/rest/notify/v1/service/notification.rb index 16908ed4f..3116a3250 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/notification.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/notification.rb @@ -73,7 +73,7 @@ def create(body: :unset, priority: :unset, ttl: :unset, title: :unset, sound: :u data: data ) - NotificationInstance.new(@version, payload, service_sid: @solution[:service_sid],) + NotificationInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -104,7 +104,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [NotificationInstance] NotificationInstance def get_instance(payload) - NotificationInstance.new(@version, payload, service_sid: @solution[:service_sid],) + NotificationInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## diff --git a/lib/twilio-ruby/rest/notify/v1/service/segment.rb b/lib/twilio-ruby/rest/notify/v1/service/segment.rb index 5cab0ff88..b0c5b3c36 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/segment.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/segment.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -135,7 +135,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SegmentInstance] SegmentInstance def get_instance(payload) - SegmentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SegmentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## diff --git a/lib/twilio-ruby/rest/notify/v1/service/user.rb b/lib/twilio-ruby/rest/notify/v1/service/user.rb index e8077336b..83c96441b 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/user.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/user.rb @@ -43,7 +43,7 @@ def create(identity: nil, segment: :unset) data: data ) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -79,7 +79,7 @@ def list(identity: :unset, segment: :unset, limit: nil, page_size: nil) def stream(identity: :unset, segment: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(identity: identity, segment: segment, page_size: limits[:page_size],) + page = self.page(identity: identity, segment: segment, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(identity: :unset, segment: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UserInstance] UserInstance def get_instance(payload) - UserInstance.new(@version, payload, service_sid: @solution[:service_sid],) + UserInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -187,7 +187,7 @@ def initialize(version, service_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, identity: identity,} + @solution = {service_sid: service_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:identity]}" # Dependents @@ -230,7 +230,7 @@ def bindings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return UserBindingContext.new(@version, @solution[:service_sid], @solution[:identity], sid,) + return UserBindingContext.new(@version, @solution[:service_sid], @solution[:identity], sid) end unless @bindings @@ -252,7 +252,7 @@ def segment_memberships(segment=:unset) raise ArgumentError, 'segment cannot be nil' if segment.nil? if segment != :unset - return SegmentMembershipContext.new(@version, @solution[:service_sid], @solution[:identity], segment,) + return SegmentMembershipContext.new(@version, @solution[:service_sid], @solution[:identity], segment) end unless @segment_memberships @@ -302,7 +302,7 @@ def initialize(version, payload, service_sid: nil, identity: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'identity' => identity || @properties['identity'],} + @params = {'service_sid' => service_sid, 'identity' => identity || @properties['identity']} end ## @@ -311,7 +311,7 @@ def initialize(version, payload, service_sid: nil, identity: nil) # @return [UserContext] UserContext for this UserInstance def context unless @instance_context - @instance_context = UserContext.new(@version, @params['service_sid'], @params['identity'],) + @instance_context = UserContext.new(@version, @params['service_sid'], @params['identity']) end @instance_context end diff --git a/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb b/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb index ad6805ae1..2bcacad00 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb @@ -33,7 +33,7 @@ def initialize(version, service_sid: nil, identity: nil) # @param [String] segment The segment # @return [SegmentMembershipInstance] Newly created SegmentMembershipInstance def create(segment: nil) - data = Twilio::Values.of({'Segment' => segment,}) + data = Twilio::Values.of({'Segment' => segment}) payload = @version.create( 'POST', @@ -106,7 +106,7 @@ def initialize(version, service_sid, identity, segment) super(version) # Path Solution - @solution = {service_sid: service_sid, identity: identity, segment: segment,} + @solution = {service_sid: service_sid, identity: identity, segment: segment} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:identity]}/SegmentMemberships/#{@solution[:segment]}" end diff --git a/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb b/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb index 12954c001..41eb571cb 100644 --- a/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +++ b/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb @@ -102,7 +102,7 @@ def list(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_siz def stream(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(start_date: start_date, end_date: end_date, tag: tag, page_size: limits[:page_size],) + page = self.page(start_date: start_date, end_date: end_date, tag: tag, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -114,7 +114,7 @@ def stream(start_date: :unset, end_date: :unset, tag: :unset, limit: nil, page_s def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -218,7 +218,7 @@ def initialize(version, service_sid, identity, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, identity: identity, sid: sid,} + @solution = {service_sid: service_sid, identity: identity, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Users/#{@solution[:identity]}/Bindings/#{@solution[:sid]}" end @@ -292,7 +292,7 @@ def initialize(version, payload, service_sid: nil, identity: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'identity' => identity, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'identity' => identity, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/preview.rb b/lib/twilio-ruby/rest/preview.rb index fb8c432a4..b4ee98e8d 100644 --- a/lib/twilio-ruby/rest/preview.rb +++ b/lib/twilio-ruby/rest/preview.rb @@ -22,6 +22,7 @@ def initialize(twilio) @hosted_numbers = nil @marketplace = nil @proxy = nil + @studio = nil @acc_security = nil @sync = nil @understand = nil @@ -58,6 +59,12 @@ def proxy @proxy ||= Proxy.new self end + ## + # Version studio of preview + def studio + @studio ||= Studio.new self + end + ## # Version acc_security of preview def acc_security @@ -150,6 +157,14 @@ def services(sid=:unset) self.understand.services(sid) end + ## + # @param [String] sid A 34 character string that uniquely identifies this Flow. + # @return [Twilio::REST::Preview::Studio::FlowInstance] if sid was passed. + # @return [Twilio::REST::Preview::Studio::FlowList] + def flows(sid=:unset) + self.studio.flows(sid) + end + ## # @param [String] sid The sid # @return [Twilio::REST::Preview::Wireless::CommandInstance] if sid was passed. diff --git a/lib/twilio-ruby/rest/preview/acc_security.rb b/lib/twilio-ruby/rest/preview/acc_security.rb index 86c8fcfe5..a7cd7bc9a 100644 --- a/lib/twilio-ruby/rest/preview/acc_security.rb +++ b/lib/twilio-ruby/rest/preview/acc_security.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The unique SID identifier of Verification Service Instance. - # @return [Twilio::REST::Preview::AccSecurity::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Preview::AccSecurity::ServiceContext] if sid was passed. # @return [Twilio::REST::Preview::AccSecurity::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/acc_security/service.rb b/lib/twilio-ruby/rest/preview/acc_security/service.rb index 4b4b561e8..6f0c6ac35 100644 --- a/lib/twilio-ruby/rest/preview/acc_security/service.rb +++ b/lib/twilio-ruby/rest/preview/acc_security/service.rb @@ -31,7 +31,7 @@ def initialize(version) # Must be an integer value between 4-10 # @return [ServiceInstance] Newly created ServiceInstance def create(name: nil, code_length: :unset) - data = Twilio::Values.of({'Name' => name, 'CodeLength' => code_length,}) + data = Twilio::Values.of({'Name' => name, 'CodeLength' => code_length}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(name: nil, code_length: :unset) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -174,7 +174,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -194,7 +194,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -204,7 +204,7 @@ def fetch # Must be an integer value between 4-10 # @return [ServiceInstance] Updated ServiceInstance def update(name: :unset, code_length: :unset) - data = Twilio::Values.of({'Name' => name, 'CodeLength' => code_length,}) + data = Twilio::Values.of({'Name' => name, 'CodeLength' => code_length}) payload = @version.update( 'POST', @@ -212,7 +212,7 @@ def update(name: :unset, code_length: :unset) data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -221,7 +221,7 @@ def update(name: :unset, code_length: :unset) # @return [VerificationContext] def verifications unless @verifications - @verifications = VerificationList.new(@version, service_sid: @solution[:sid],) + @verifications = VerificationList.new(@version, service_sid: @solution[:sid]) end @verifications @@ -233,7 +233,7 @@ def verifications # @return [VerificationCheckContext] def verification_checks unless @verification_checks - @verification_checks = VerificationCheckList.new(@version, service_sid: @solution[:sid],) + @verification_checks = VerificationCheckList.new(@version, service_sid: @solution[:sid]) end @verification_checks @@ -273,7 +273,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -282,7 +282,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end @@ -349,7 +349,7 @@ def fetch # Must be an integer value between 4-10 # @return [ServiceInstance] Updated ServiceInstance def update(name: :unset, code_length: :unset) - context.update(name: name, code_length: code_length,) + context.update(name: name, code_length: code_length) end ## diff --git a/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb b/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb index fb3a99e1f..2a8414b1e 100644 --- a/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +++ b/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb @@ -35,7 +35,7 @@ def initialize(version, service_sid: nil) # for this verification # @return [VerificationInstance] Newly created VerificationInstance def create(to: nil, channel: nil, custom_message: :unset) - data = Twilio::Values.of({'To' => to, 'Channel' => channel, 'CustomMessage' => custom_message,}) + data = Twilio::Values.of({'To' => to, 'Channel' => channel, 'CustomMessage' => custom_message}) payload = @version.create( 'POST', @@ -43,7 +43,7 @@ def create(to: nil, channel: nil, custom_message: :unset) data: data ) - VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid],) + VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -74,7 +74,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [VerificationInstance] VerificationInstance def get_instance(payload) - VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid],) + VerificationInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## diff --git a/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb b/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb index 9eebdd620..91e3289fd 100644 --- a/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +++ b/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil) # @param [String] to The To phonenumber of the phone being verified # @return [VerificationCheckInstance] Newly created VerificationCheckInstance def create(code: nil, to: :unset) - data = Twilio::Values.of({'Code' => code, 'To' => to,}) + data = Twilio::Values.of({'Code' => code, 'To' => to}) payload = @version.create( 'POST', @@ -40,7 +40,7 @@ def create(code: nil, to: :unset) data: data ) - VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid],) + VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [VerificationCheckInstance] VerificationCheckInstance def get_instance(payload) - VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid],) + VerificationCheckInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## diff --git a/lib/twilio-ruby/rest/preview/bulk_exports.rb b/lib/twilio-ruby/rest/preview/bulk_exports.rb index 70f25e1da..012de5e3f 100644 --- a/lib/twilio-ruby/rest/preview/bulk_exports.rb +++ b/lib/twilio-ruby/rest/preview/bulk_exports.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] resource_type The resource_type - # @return [Twilio::REST::Preview::BulkExports::ExportInstance] if resource_type was passed. + # @return [Twilio::REST::Preview::BulkExports::ExportContext] if resource_type was passed. # @return [Twilio::REST::Preview::BulkExports::ExportList] def exports(resource_type=:unset) if resource_type.nil? @@ -33,7 +33,7 @@ def exports(resource_type=:unset) ## # @param [String] resource_type The resource_type - # @return [Twilio::REST::Preview::BulkExports::ExportConfigurationInstance] if resource_type was passed. + # @return [Twilio::REST::Preview::BulkExports::ExportConfigurationContext] if resource_type was passed. # @return [Twilio::REST::Preview::BulkExports::ExportConfigurationList] def export_configuration(resource_type=:unset) if resource_type.nil? diff --git a/lib/twilio-ruby/rest/preview/bulk_exports/export.rb b/lib/twilio-ruby/rest/preview/bulk_exports/export.rb index ca12d4d35..a4b85ea7b 100644 --- a/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +++ b/lib/twilio-ruby/rest/preview/bulk_exports/export.rb @@ -50,7 +50,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ExportInstance] ExportInstance def get_instance(payload) - ExportInstance.new(@version, payload,) + ExportInstance.new(@version, payload) end ## @@ -72,7 +72,7 @@ def initialize(version, resource_type) super(version) # Path Solution - @solution = {resource_type: resource_type,} + @solution = {resource_type: resource_type} @uri = "/Exports/#{@solution[:resource_type]}" # Dependents @@ -91,7 +91,7 @@ def fetch params, ) - ExportInstance.new(@version, payload, resource_type: @solution[:resource_type],) + ExportInstance.new(@version, payload, resource_type: @solution[:resource_type]) end ## @@ -100,7 +100,7 @@ def fetch # @return [DayContext] def days unless @days - @days = DayList.new(@version, resource_type: @solution[:resource_type],) + @days = DayList.new(@version, resource_type: @solution[:resource_type]) end @days @@ -135,7 +135,7 @@ def initialize(version, payload, resource_type: nil) # Context @instance_context = nil - @params = {'resource_type' => resource_type || @properties['resource_type'],} + @params = {'resource_type' => resource_type || @properties['resource_type']} end ## @@ -144,7 +144,7 @@ def initialize(version, payload, resource_type: nil) # @return [ExportContext] ExportContext for this ExportInstance def context unless @instance_context - @instance_context = ExportContext.new(@version, @params['resource_type'],) + @instance_context = ExportContext.new(@version, @params['resource_type']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb b/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb index d43e9c175..74cff441e 100644 --- a/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +++ b/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -135,7 +135,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DayInstance] DayInstance def get_instance(payload) - DayInstance.new(@version, payload, resource_type: @solution[:resource_type],) + DayInstance.new(@version, payload, resource_type: @solution[:resource_type]) end ## diff --git a/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb b/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb index c7881b196..282679715 100644 --- a/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +++ b/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb @@ -50,7 +50,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ExportConfigurationInstance] ExportConfigurationInstance def get_instance(payload) - ExportConfigurationInstance.new(@version, payload,) + ExportConfigurationInstance.new(@version, payload) end ## @@ -72,7 +72,7 @@ def initialize(version, resource_type) super(version) # Path Solution - @solution = {resource_type: resource_type,} + @solution = {resource_type: resource_type} @uri = "/Exports/#{@solution[:resource_type]}/Configuration" end @@ -88,7 +88,7 @@ def fetch params, ) - ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type],) + ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type]) end ## @@ -110,7 +110,7 @@ def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) data: data, ) - ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type],) + ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type]) end ## @@ -144,7 +144,7 @@ def initialize(version, payload, resource_type: nil) # Context @instance_context = nil - @params = {'resource_type' => resource_type || @properties['resource_type'],} + @params = {'resource_type' => resource_type || @properties['resource_type']} end ## @@ -153,7 +153,7 @@ def initialize(version, payload, resource_type: nil) # @return [ExportConfigurationContext] ExportConfigurationContext for this ExportConfigurationInstance def context unless @instance_context - @instance_context = ExportConfigurationContext.new(@version, @params['resource_type'],) + @instance_context = ExportConfigurationContext.new(@version, @params['resource_type']) end @instance_context end @@ -202,7 +202,7 @@ def fetch # @param [String] webhook_method The webhook_method # @return [ExportConfigurationInstance] Updated ExportConfigurationInstance def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset) - context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method,) + context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method) end ## diff --git a/lib/twilio-ruby/rest/preview/deployed_devices.rb b/lib/twilio-ruby/rest/preview/deployed_devices.rb index f33d7d88d..386e2e8d9 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid Provides a 34 character string that uniquely identifies the # requested Fleet resource. - # @return [Twilio::REST::Preview::DeployedDevices::FleetInstance] if sid was passed. + # @return [Twilio::REST::Preview::DeployedDevices::FleetContext] if sid was passed. # @return [Twilio::REST::Preview::DeployedDevices::FleetList] def fleets(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb b/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb index e364d1c1b..84d3d420e 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb @@ -30,7 +30,7 @@ def initialize(version) # this Fleet, up to 256 characters long. # @return [FleetInstance] Newly created FleetInstance def create(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -38,7 +38,7 @@ def create(friendly_name: :unset) data: data ) - FleetInstance.new(@version, payload,) + FleetInstance.new(@version, payload) end ## @@ -70,7 +70,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -82,7 +82,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -151,7 +151,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [FleetInstance] FleetInstance def get_instance(payload) - FleetInstance.new(@version, payload,) + FleetInstance.new(@version, payload) end ## @@ -174,7 +174,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Fleets/#{@solution[:sid]}" # Dependents @@ -196,7 +196,7 @@ def fetch params, ) - FleetInstance.new(@version, payload, sid: @solution[:sid],) + FleetInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -225,7 +225,7 @@ def update(friendly_name: :unset, default_deployment_sid: :unset) data: data, ) - FleetInstance.new(@version, payload, sid: @solution[:sid],) + FleetInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -236,11 +236,11 @@ def devices(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return DeviceContext.new(@version, @solution[:sid], sid,) + return DeviceContext.new(@version, @solution[:sid], sid) end unless @devices - @devices = DeviceList.new(@version, fleet_sid: @solution[:sid],) + @devices = DeviceList.new(@version, fleet_sid: @solution[:sid]) end @devices @@ -254,11 +254,11 @@ def deployments(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return DeploymentContext.new(@version, @solution[:sid], sid,) + return DeploymentContext.new(@version, @solution[:sid], sid) end unless @deployments - @deployments = DeploymentList.new(@version, fleet_sid: @solution[:sid],) + @deployments = DeploymentList.new(@version, fleet_sid: @solution[:sid]) end @deployments @@ -272,11 +272,11 @@ def certificates(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CertificateContext.new(@version, @solution[:sid], sid,) + return CertificateContext.new(@version, @solution[:sid], sid) end unless @certificates - @certificates = CertificateList.new(@version, fleet_sid: @solution[:sid],) + @certificates = CertificateList.new(@version, fleet_sid: @solution[:sid]) end @certificates @@ -290,11 +290,11 @@ def keys(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return KeyContext.new(@version, @solution[:sid], sid,) + return KeyContext.new(@version, @solution[:sid], sid) end unless @keys - @keys = KeyList.new(@version, fleet_sid: @solution[:sid],) + @keys = KeyList.new(@version, fleet_sid: @solution[:sid]) end @keys @@ -336,7 +336,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -345,7 +345,7 @@ def initialize(version, payload, sid: nil) # @return [FleetContext] FleetContext for this FleetInstance def context unless @instance_context - @instance_context = FleetContext.new(@version, @params['sid'],) + @instance_context = FleetContext.new(@version, @params['sid']) end @instance_context end @@ -426,7 +426,7 @@ def delete # Deployment that is going to be used as a default one for this Fleet. # @return [FleetInstance] Updated FleetInstance def update(friendly_name: :unset, default_deployment_sid: :unset) - context.update(friendly_name: friendly_name, default_deployment_sid: default_deployment_sid,) + context.update(friendly_name: friendly_name, default_deployment_sid: default_deployment_sid) end ## diff --git a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb index 2971fcbd9..8a48cfb5b 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb @@ -49,7 +49,7 @@ def create(certificate_data: nil, friendly_name: :unset, device_sid: :unset) data: data ) - CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -85,7 +85,7 @@ def list(device_sid: :unset, limit: nil, page_size: nil) def stream(device_sid: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(device_sid: device_sid, page_size: limits[:page_size],) + page = self.page(device_sid: device_sid, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -97,7 +97,7 @@ def stream(device_sid: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -169,7 +169,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CertificateInstance] CertificateInstance def get_instance(payload) - CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -193,7 +193,7 @@ def initialize(version, fleet_sid, sid) super(version) # Path Solution - @solution = {fleet_sid: fleet_sid, sid: sid,} + @solution = {fleet_sid: fleet_sid, sid: sid} @uri = "/Fleets/#{@solution[:fleet_sid]}/Certificates/#{@solution[:sid]}" end @@ -209,7 +209,7 @@ def fetch params, ) - CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -227,7 +227,7 @@ def delete # Device to become authenticated with this Certificate credential. # @return [CertificateInstance] Updated CertificateInstance def update(friendly_name: :unset, device_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid}) payload = @version.update( 'POST', @@ -235,7 +235,7 @@ def update(friendly_name: :unset, device_sid: :unset) data: data, ) - CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + CertificateInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -276,7 +276,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'],} + @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid']} end ## @@ -285,7 +285,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # @return [CertificateContext] CertificateContext for this CertificateInstance def context unless @instance_context - @instance_context = CertificateContext.new(@version, @params['fleet_sid'], @params['sid'],) + @instance_context = CertificateContext.new(@version, @params['fleet_sid'], @params['sid']) end @instance_context end @@ -366,7 +366,7 @@ def delete # Device to become authenticated with this Certificate credential. # @return [CertificateInstance] Updated CertificateInstance def update(friendly_name: :unset, device_sid: :unset) - context.update(friendly_name: friendly_name, device_sid: device_sid,) + context.update(friendly_name: friendly_name, device_sid: device_sid) end ## diff --git a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb index 93115eaf6..a129d0e55 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb @@ -36,7 +36,7 @@ def initialize(version, fleet_sid: nil) # Deployment. # @return [DeploymentInstance] Newly created DeploymentInstance def create(friendly_name: :unset, sync_service_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'SyncServiceSid' => sync_service_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'SyncServiceSid' => sync_service_sid}) payload = @version.create( 'POST', @@ -44,7 +44,7 @@ def create(friendly_name: :unset, sync_service_sid: :unset) data: data ) - DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -76,7 +76,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -88,7 +88,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DeploymentInstance] DeploymentInstance def get_instance(payload) - DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, fleet_sid, sid) super(version) # Path Solution - @solution = {fleet_sid: fleet_sid, sid: sid,} + @solution = {fleet_sid: fleet_sid, sid: sid} @uri = "/Fleets/#{@solution[:fleet_sid]}/Deployments/#{@solution[:sid]}" end @@ -197,7 +197,7 @@ def fetch params, ) - DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -216,7 +216,7 @@ def delete # Deployment. # @return [DeploymentInstance] Updated DeploymentInstance def update(friendly_name: :unset, sync_service_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'SyncServiceSid' => sync_service_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'SyncServiceSid' => sync_service_sid}) payload = @version.update( 'POST', @@ -224,7 +224,7 @@ def update(friendly_name: :unset, sync_service_sid: :unset) data: data, ) - DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + DeploymentInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -264,7 +264,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'],} + @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid']} end ## @@ -273,7 +273,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # @return [DeploymentContext] DeploymentContext for this DeploymentInstance def context unless @instance_context - @instance_context = DeploymentContext.new(@version, @params['fleet_sid'], @params['sid'],) + @instance_context = DeploymentContext.new(@version, @params['fleet_sid'], @params['sid']) end @instance_context end @@ -349,7 +349,7 @@ def delete # Deployment. # @return [DeploymentInstance] Updated DeploymentInstance def update(friendly_name: :unset, sync_service_sid: :unset) - context.update(friendly_name: friendly_name, sync_service_sid: sync_service_sid,) + context.update(friendly_name: friendly_name, sync_service_sid: sync_service_sid) end ## diff --git a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb index e9e250f2b..ef30da2c2 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb @@ -55,7 +55,7 @@ def create(unique_name: :unset, friendly_name: :unset, identity: :unset, deploym data: data ) - DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -91,7 +91,7 @@ def list(deployment_sid: :unset, limit: nil, page_size: nil) def stream(deployment_sid: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(deployment_sid: deployment_sid, page_size: limits[:page_size],) + page = self.page(deployment_sid: deployment_sid, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -103,7 +103,7 @@ def stream(deployment_sid: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -175,7 +175,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DeviceInstance] DeviceInstance def get_instance(payload) - DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -199,7 +199,7 @@ def initialize(version, fleet_sid, sid) super(version) # Path Solution - @solution = {fleet_sid: fleet_sid, sid: sid,} + @solution = {fleet_sid: fleet_sid, sid: sid} @uri = "/Fleets/#{@solution[:fleet_sid]}/Devices/#{@solution[:sid]}" end @@ -215,7 +215,7 @@ def fetch params, ) - DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -249,7 +249,7 @@ def update(friendly_name: :unset, identity: :unset, deployment_sid: :unset, enab data: data, ) - DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + DeviceInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -293,7 +293,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'],} + @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid']} end ## @@ -302,7 +302,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # @return [DeviceContext] DeviceContext for this DeviceInstance def context unless @instance_context - @instance_context = DeviceContext.new(@version, @params['fleet_sid'], @params['sid'],) + @instance_context = DeviceContext.new(@version, @params['fleet_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb index fa4e99fe8..564a8d0d1 100644 --- a/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +++ b/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb @@ -35,7 +35,7 @@ def initialize(version, fleet_sid: nil) # Device to become authenticated with this Key credential. # @return [KeyInstance] Newly created KeyInstance def create(friendly_name: :unset, device_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid}) payload = @version.create( 'POST', @@ -43,7 +43,7 @@ def create(friendly_name: :unset, device_sid: :unset) data: data ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -79,7 +79,7 @@ def list(device_sid: :unset, limit: nil, page_size: nil) def stream(device_sid: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(device_sid: device_sid, page_size: limits[:page_size],) + page = self.page(device_sid: device_sid, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(device_sid: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -163,7 +163,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [KeyInstance] KeyInstance def get_instance(payload) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid]) end ## @@ -187,7 +187,7 @@ def initialize(version, fleet_sid, sid) super(version) # Path Solution - @solution = {fleet_sid: fleet_sid, sid: sid,} + @solution = {fleet_sid: fleet_sid, sid: sid} @uri = "/Fleets/#{@solution[:fleet_sid]}/Keys/#{@solution[:sid]}" end @@ -203,7 +203,7 @@ def fetch params, ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -221,7 +221,7 @@ def delete # Device to become authenticated with this Key credential. # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset, device_sid: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'DeviceSid' => device_sid}) payload = @version.update( 'POST', @@ -229,7 +229,7 @@ def update(friendly_name: :unset, device_sid: :unset) data: data, ) - KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid],) + KeyInstance.new(@version, payload, fleet_sid: @solution[:fleet_sid], sid: @solution[:sid]) end ## @@ -270,7 +270,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid'],} + @params = {'fleet_sid' => fleet_sid, 'sid' => sid || @properties['sid']} end ## @@ -279,7 +279,7 @@ def initialize(version, payload, fleet_sid: nil, sid: nil) # @return [KeyContext] KeyContext for this KeyInstance def context unless @instance_context - @instance_context = KeyContext.new(@version, @params['fleet_sid'], @params['sid'],) + @instance_context = KeyContext.new(@version, @params['fleet_sid'], @params['sid']) end @instance_context end @@ -360,7 +360,7 @@ def delete # Device to become authenticated with this Key credential. # @return [KeyInstance] Updated KeyInstance def update(friendly_name: :unset, device_sid: :unset) - context.update(friendly_name: friendly_name, device_sid: device_sid,) + context.update(friendly_name: friendly_name, device_sid: device_sid) end ## diff --git a/lib/twilio-ruby/rest/preview/hosted_numbers.rb b/lib/twilio-ruby/rest/preview/hosted_numbers.rb index 37e8e8267..786fdec87 100644 --- a/lib/twilio-ruby/rest/preview/hosted_numbers.rb +++ b/lib/twilio-ruby/rest/preview/hosted_numbers.rb @@ -20,7 +20,7 @@ def initialize(domain) ## # @param [String] sid A 34 character string that uniquely identifies this # AuthorizationDocument. - # @return [Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentInstance] if sid was passed. + # @return [Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentContext] if sid was passed. # @return [Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentList] def authorization_documents(sid=:unset) if sid.nil? @@ -35,7 +35,7 @@ def authorization_documents(sid=:unset) ## # @param [String] sid A 34 character string that uniquely identifies this # HostedNumberOrder. - # @return [Twilio::REST::Preview::HostedNumbers::HostedNumberOrderInstance] if sid was passed. + # @return [Twilio::REST::Preview::HostedNumbers::HostedNumberOrderContext] if sid was passed. # @return [Twilio::REST::Preview::HostedNumbers::HostedNumberOrderList] def hosted_number_orders(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb b/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb index 2a33ebf37..a8e1622c7 100644 --- a/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +++ b/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -132,7 +132,7 @@ def create(hosted_number_order_sids: nil, address_sid: nil, email: nil, cc_email data: data ) - AuthorizationDocumentInstance.new(@version, payload,) + AuthorizationDocumentInstance.new(@version, payload) end ## @@ -163,7 +163,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AuthorizationDocumentInstance] AuthorizationDocumentInstance def get_instance(payload) - AuthorizationDocumentInstance.new(@version, payload,) + AuthorizationDocumentInstance.new(@version, payload) end ## @@ -186,7 +186,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/AuthorizationDocuments/#{@solution[:sid]}" end @@ -202,7 +202,7 @@ def fetch params, ) - AuthorizationDocumentInstance.new(@version, payload, sid: @solution[:sid],) + AuthorizationDocumentInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -236,7 +236,7 @@ def update(hosted_number_order_sids: :unset, address_sid: :unset, email: :unset, data: data, ) - AuthorizationDocumentInstance.new(@version, payload, sid: @solution[:sid],) + AuthorizationDocumentInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -274,7 +274,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -283,7 +283,7 @@ def initialize(version, payload, sid: nil) # @return [AuthorizationDocumentContext] AuthorizationDocumentContext for this AuthorizationDocumentInstance def context unless @instance_context - @instance_context = AuthorizationDocumentContext.new(@version, @params['sid'],) + @instance_context = AuthorizationDocumentContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb b/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb index eff8a3494..bf316bdbf 100644 --- a/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +++ b/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb @@ -103,7 +103,7 @@ def stream(status: :unset, phone_number: :unset, incoming_phone_number_sid: :uns def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -166,7 +166,6 @@ def get_page(target_url) # Request is executed immediately. # @param [String] phone_number An E164 formatted phone number hosted by this # HostedNumberOrder. - # @param [String] iso_country The ISO country code of the phone_number. # @param [Boolean] sms_capability Used to specify that the SMS capability will be # hosted on Twilio's platform. # @param [String] account_sid Optional. The unique SID identifier of the Account @@ -200,10 +199,9 @@ def get_page(target_url) # @param [String] email Optional. Email of the owner of this phone number that is # being hosted. # @return [HostedNumberOrderInstance] Newly created HostedNumberOrderInstance - def create(phone_number: nil, iso_country: nil, sms_capability: nil, account_sid: :unset, friendly_name: :unset, unique_name: :unset, cc_emails: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, status_callback_url: :unset, status_callback_method: :unset, sms_application_sid: :unset, address_sid: :unset, email: :unset) + def create(phone_number: nil, sms_capability: nil, account_sid: :unset, friendly_name: :unset, unique_name: :unset, cc_emails: :unset, sms_url: :unset, sms_method: :unset, sms_fallback_url: :unset, sms_fallback_method: :unset, status_callback_url: :unset, status_callback_method: :unset, sms_application_sid: :unset, address_sid: :unset, email: :unset) data = Twilio::Values.of({ 'PhoneNumber' => phone_number, - 'IsoCountry' => iso_country, 'SmsCapability' => sms_capability, 'AccountSid' => account_sid, 'FriendlyName' => friendly_name, @@ -226,7 +224,7 @@ def create(phone_number: nil, iso_country: nil, sms_capability: nil, account_sid data: data ) - HostedNumberOrderInstance.new(@version, payload,) + HostedNumberOrderInstance.new(@version, payload) end ## @@ -257,7 +255,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [HostedNumberOrderInstance] HostedNumberOrderInstance def get_instance(payload) - HostedNumberOrderInstance.new(@version, payload,) + HostedNumberOrderInstance.new(@version, payload) end ## @@ -280,7 +278,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/HostedNumberOrders/#{@solution[:sid]}" end @@ -296,7 +294,7 @@ def fetch params, ) - HostedNumberOrderInstance.new(@version, payload, sid: @solution[:sid],) + HostedNumberOrderInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -338,7 +336,7 @@ def update(friendly_name: :unset, unique_name: :unset, email: :unset, cc_emails: data: data, ) - HostedNumberOrderInstance.new(@version, payload, sid: @solution[:sid],) + HostedNumberOrderInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -384,7 +382,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -393,7 +391,7 @@ def initialize(version, payload, sid: nil) # @return [HostedNumberOrderContext] HostedNumberOrderContext for this HostedNumberOrderInstance def context unless @instance_context - @instance_context = HostedNumberOrderContext.new(@version, @params['sid'],) + @instance_context = HostedNumberOrderContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/marketplace.rb b/lib/twilio-ruby/rest/preview/marketplace.rb index 251c855b7..880f58260 100644 --- a/lib/twilio-ruby/rest/preview/marketplace.rb +++ b/lib/twilio-ruby/rest/preview/marketplace.rb @@ -20,7 +20,7 @@ def initialize(domain) ## # @param [String] sid The Available Add-on Sid that uniquely identifies this # resource - # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed. + # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed. # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList] def available_add_ons(sid=:unset) if sid.nil? @@ -35,7 +35,7 @@ def available_add_ons(sid=:unset) ## # @param [String] sid The Installed Add-on Sid that uniquely identifies this # resource - # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnInstance] if sid was passed. + # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed. # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList] def installed_add_ons(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb b/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb index 679888b7b..47dd4b523 100644 --- a/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +++ b/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -133,7 +133,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [AvailableAddOnInstance] AvailableAddOnInstance def get_instance(payload) - AvailableAddOnInstance.new(@version, payload,) + AvailableAddOnInstance.new(@version, payload) end ## @@ -156,7 +156,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/AvailableAddOns/#{@solution[:sid]}" # Dependents @@ -175,7 +175,7 @@ def fetch params, ) - AvailableAddOnInstance.new(@version, payload, sid: @solution[:sid],) + AvailableAddOnInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -186,11 +186,11 @@ def extensions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return AvailableAddOnExtensionContext.new(@version, @solution[:sid], sid,) + return AvailableAddOnExtensionContext.new(@version, @solution[:sid], sid) end unless @extensions - @extensions = AvailableAddOnExtensionList.new(@version, available_add_on_sid: @solution[:sid],) + @extensions = AvailableAddOnExtensionList.new(@version, available_add_on_sid: @solution[:sid]) end @extensions @@ -230,7 +230,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -239,7 +239,7 @@ def initialize(version, payload, sid: nil) # @return [AvailableAddOnContext] AvailableAddOnContext for this AvailableAddOnInstance def context unless @instance_context - @instance_context = AvailableAddOnContext.new(@version, @params['sid'],) + @instance_context = AvailableAddOnContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb b/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb index e6a72c9ca..f5504c622 100644 --- a/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +++ b/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -162,7 +162,7 @@ def initialize(version, available_add_on_sid, sid) super(version) # Path Solution - @solution = {available_add_on_sid: available_add_on_sid, sid: sid,} + @solution = {available_add_on_sid: available_add_on_sid, sid: sid} @uri = "/AvailableAddOns/#{@solution[:available_add_on_sid]}/Extensions/#{@solution[:sid]}" end @@ -219,7 +219,7 @@ def initialize(version, payload, available_add_on_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'available_add_on_sid' => available_add_on_sid, 'sid' => sid || @properties['sid'],} + @params = {'available_add_on_sid' => available_add_on_sid, 'sid' => sid || @properties['sid']} end ## diff --git a/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb b/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb index 16d548c13..23f47ccc1 100644 --- a/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +++ b/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb @@ -49,7 +49,7 @@ def create(available_add_on_sid: nil, accept_terms_of_service: nil, configuratio data: data ) - InstalledAddOnInstance.new(@version, payload,) + InstalledAddOnInstance.new(@version, payload) end ## @@ -81,7 +81,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -93,7 +93,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -162,7 +162,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [InstalledAddOnInstance] InstalledAddOnInstance def get_instance(payload) - InstalledAddOnInstance.new(@version, payload,) + InstalledAddOnInstance.new(@version, payload) end ## @@ -185,7 +185,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/InstalledAddOns/#{@solution[:sid]}" # Dependents @@ -211,7 +211,7 @@ def fetch params, ) - InstalledAddOnInstance.new(@version, payload, sid: @solution[:sid],) + InstalledAddOnInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -233,7 +233,7 @@ def update(configuration: :unset, unique_name: :unset) data: data, ) - InstalledAddOnInstance.new(@version, payload, sid: @solution[:sid],) + InstalledAddOnInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -244,11 +244,11 @@ def extensions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InstalledAddOnExtensionContext.new(@version, @solution[:sid], sid,) + return InstalledAddOnExtensionContext.new(@version, @solution[:sid], sid) end unless @extensions - @extensions = InstalledAddOnExtensionList.new(@version, installed_add_on_sid: @solution[:sid],) + @extensions = InstalledAddOnExtensionList.new(@version, installed_add_on_sid: @solution[:sid]) end @extensions @@ -291,7 +291,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -300,7 +300,7 @@ def initialize(version, payload, sid: nil) # @return [InstalledAddOnContext] InstalledAddOnContext for this InstalledAddOnInstance def context unless @instance_context - @instance_context = InstalledAddOnContext.new(@version, @params['sid'],) + @instance_context = InstalledAddOnContext.new(@version, @params['sid']) end @instance_context end @@ -387,7 +387,7 @@ def fetch # this Add-on installation for an Account. # @return [InstalledAddOnInstance] Updated InstalledAddOnInstance def update(configuration: :unset, unique_name: :unset) - context.update(configuration: configuration, unique_name: unique_name,) + context.update(configuration: configuration, unique_name: unique_name) end ## diff --git a/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb b/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb index 946d1b02d..da807ff91 100644 --- a/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +++ b/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -162,7 +162,7 @@ def initialize(version, installed_add_on_sid, sid) super(version) # Path Solution - @solution = {installed_add_on_sid: installed_add_on_sid, sid: sid,} + @solution = {installed_add_on_sid: installed_add_on_sid, sid: sid} @uri = "/InstalledAddOns/#{@solution[:installed_add_on_sid]}/Extensions/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch # @param [Boolean] enabled A Boolean indicating if the Extension will be invoked. # @return [InstalledAddOnExtensionInstance] Updated InstalledAddOnExtensionInstance def update(enabled: nil) - data = Twilio::Values.of({'Enabled' => enabled,}) + data = Twilio::Values.of({'Enabled' => enabled}) payload = @version.update( 'POST', @@ -241,7 +241,7 @@ def initialize(version, payload, installed_add_on_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'installed_add_on_sid' => installed_add_on_sid, 'sid' => sid || @properties['sid'],} + @params = {'installed_add_on_sid' => installed_add_on_sid, 'sid' => sid || @properties['sid']} end ## @@ -313,7 +313,7 @@ def fetch # @param [Boolean] enabled A Boolean indicating if the Extension will be invoked. # @return [InstalledAddOnExtensionInstance] Updated InstalledAddOnExtensionInstance def update(enabled: nil) - context.update(enabled: enabled,) + context.update(enabled: enabled) end ## diff --git a/lib/twilio-ruby/rest/preview/proxy.rb b/lib/twilio-ruby/rest/preview/proxy.rb index f1ad6a399..0583a9b92 100644 --- a/lib/twilio-ruby/rest/preview/proxy.rb +++ b/lib/twilio-ruby/rest/preview/proxy.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid A 34 character string that uniquely identifies this Service. - # @return [Twilio::REST::Preview::Proxy::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Preview::Proxy::ServiceContext] if sid was passed. # @return [Twilio::REST::Preview::Proxy::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/proxy/service.rb b/lib/twilio-ruby/rest/preview/proxy/service.rb index 7cb7d890c..1e03f991b 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -128,7 +128,7 @@ def create(friendly_name: :unset, auto_create: :unset, callback_url: :unset) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -159,7 +159,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -181,7 +181,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -202,7 +202,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -234,7 +234,7 @@ def update(friendly_name: :unset, auto_create: :unset, callback_url: :unset) data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -245,11 +245,11 @@ def sessions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SessionContext.new(@version, @solution[:sid], sid,) + return SessionContext.new(@version, @solution[:sid], sid) end unless @sessions - @sessions = SessionList.new(@version, service_sid: @solution[:sid],) + @sessions = SessionList.new(@version, service_sid: @solution[:sid]) end @sessions @@ -263,11 +263,11 @@ def phone_numbers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PhoneNumberContext.new(@version, @solution[:sid], sid,) + return PhoneNumberContext.new(@version, @solution[:sid], sid) end unless @phone_numbers - @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid],) + @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid]) end @phone_numbers @@ -281,11 +281,11 @@ def short_codes(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ShortCodeContext.new(@version, @solution[:sid], sid,) + return ShortCodeContext.new(@version, @solution[:sid], sid) end unless @short_codes - @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid],) + @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid]) end @short_codes @@ -326,7 +326,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -335,7 +335,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end @@ -418,7 +418,7 @@ def delete # notifications. # @return [ServiceInstance] Updated ServiceInstance def update(friendly_name: :unset, auto_create: :unset, callback_url: :unset) - context.update(friendly_name: friendly_name, auto_create: auto_create, callback_url: callback_url,) + context.update(friendly_name: friendly_name, auto_create: auto_create, callback_url: callback_url) end ## diff --git a/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb b/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb index 0067a95d8..a5a34f3b0 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] sid The phone-number Sid that uniquely identifies this resource # @return [PhoneNumberInstance] Newly created PhoneNumberInstance def create(sid: nil) - data = Twilio::Values.of({'Sid' => sid,}) + data = Twilio::Values.of({'Sid' => sid}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(sid: nil) data: data ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/PhoneNumbers/#{@solution[:sid]}" end @@ -198,7 +198,7 @@ def fetch params, ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -237,7 +237,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -246,7 +246,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance def context unless @instance_context - @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/proxy/service/session.rb b/lib/twilio-ruby/rest/preview/proxy/service/session.rb index 56d246366..d3d4b00a5 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/session.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/session.rb @@ -64,7 +64,7 @@ def list(unique_name: :unset, status: :unset, limit: nil, page_size: nil) def stream(unique_name: :unset, status: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(unique_name: unique_name, status: status, page_size: limits[:page_size],) + page = self.page(unique_name: unique_name, status: status, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -76,7 +76,7 @@ def stream(unique_name: :unset, status: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -150,7 +150,7 @@ def create(unique_name: :unset, ttl: :unset, status: :unset, participants: :unse data: data ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SessionInstance] SessionInstance def get_instance(payload) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -204,7 +204,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:sid]}" # Dependents @@ -224,7 +224,7 @@ def fetch params, ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -259,7 +259,7 @@ def update(unique_name: :unset, ttl: :unset, status: :unset, participants: :unse data: data, ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -270,7 +270,7 @@ def interactions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InteractionContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InteractionContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @interactions @@ -292,7 +292,7 @@ def participants(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ParticipantContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return ParticipantContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @participants @@ -345,7 +345,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -354,7 +354,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SessionContext] SessionContext for this SessionInstance def context unless @instance_context - @instance_context = SessionContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SessionContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -457,7 +457,7 @@ def delete # @param [String] participants The participants # @return [SessionInstance] Updated SessionInstance def update(unique_name: :unset, ttl: :unset, status: :unset, participants: :unset) - context.update(unique_name: unique_name, ttl: ttl, status: status, participants: participants,) + context.update(unique_name: unique_name, ttl: ttl, status: status, participants: participants) end ## diff --git a/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb b/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb index 6d1bf33b4..af85efc32 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb @@ -89,7 +89,7 @@ def stream(inbound_participant_status: :unset, outbound_participant_status: :uns def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -196,7 +196,7 @@ def initialize(version, service_sid, session_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid,} + @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Interactions/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb b/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb index d363982a6..631770e60 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb @@ -85,7 +85,7 @@ def stream(identifier: :unset, participant_type: :unset, limit: nil, page_size: def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -221,7 +221,7 @@ def initialize(version, service_sid, session_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid,} + @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Participants/#{@solution[:sid]}" # Dependents diff --git a/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb b/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb index ebc45767e..6e17c7a95 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb @@ -38,7 +38,7 @@ def initialize(version, service_sid: nil, session_sid: nil, participant_sid: nil # Participant. # @return [MessageInteractionInstance] Newly created MessageInteractionInstance def create(body: :unset, media_url: :unset) - data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e },}) + data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e }}) payload = @version.create( 'POST', @@ -84,7 +84,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -96,7 +96,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb b/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb index d3fd37c5c..4047a5653 100644 --- a/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +++ b/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] sid The shortcode Sid that uniquely identifies this resource # @return [ShortCodeInstance] Newly created ShortCodeInstance def create(sid: nil) - data = Twilio::Values.of({'Sid' => sid,}) + data = Twilio::Values.of({'Sid' => sid}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(sid: nil) data: data ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ShortCodeInstance] ShortCodeInstance def get_instance(payload) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/ShortCodes/#{@solution[:sid]}" end @@ -198,7 +198,7 @@ def fetch params, ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -237,7 +237,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -246,7 +246,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ShortCodeContext] ShortCodeContext for this ShortCodeInstance def context unless @instance_context - @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/studio.rb b/lib/twilio-ruby/rest/preview/studio.rb new file mode 100644 index 000000000..bac8417d6 --- /dev/null +++ b/lib/twilio-ruby/rest/preview/studio.rb @@ -0,0 +1,41 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +module Twilio + module REST + class Preview + class Studio < Version + ## + # Initialize the Studio version of Preview + def initialize(domain) + super + @version = 'Studio' + @flows = nil + end + + ## + # @param [String] sid The sid + # @return [Twilio::REST::Preview::Studio::FlowContext] if sid was passed. + # @return [Twilio::REST::Preview::Studio::FlowList] + def flows(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset + @flows ||= FlowList.new self + else + FlowContext.new(self, sid) + end + end + + ## + # Provide a user friendly representation + def to_s + '' + end + end + end + end +end \ No newline at end of file diff --git a/lib/twilio-ruby/rest/preview/studio/flow.rb b/lib/twilio-ruby/rest/preview/studio/flow.rb new file mode 100644 index 000000000..c3a9f6d52 --- /dev/null +++ b/lib/twilio-ruby/rest/preview/studio/flow.rb @@ -0,0 +1,353 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +module Twilio + module REST + class Preview < Domain + class Studio < Version + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class FlowList < ListResource + ## + # Initialize the FlowList + # @param [Version] version Version that contains the resource + # @return [FlowList] FlowList + def initialize(version) + super(version) + + # Path Solution + @solution = {} + @uri = "/Flows" + end + + ## + # Lists FlowInstance records from the API as a list. + # Unlike stream(), this operation is eager and will load `limit` records into + # memory before returning. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Array] Array of up to limit results + def list(limit: nil, page_size: nil) + self.stream(limit: limit, page_size: page_size).entries + end + + ## + # Streams FlowInstance records from the API as an Enumerable. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit. + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Enumerable] Enumerable that will yield up to limit results + def stream(limit: nil, page_size: nil) + limits = @version.read_limits(limit, page_size) + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) + end + + ## + # When passed a block, yields FlowInstance records from the API. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + def each + limits = @version.read_limits + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, + limit: limits[:limit], + page_limit: limits[:page_limit]).each {|x| yield x} + end + + ## + # Retrieve a single page of FlowInstance records from the API. + # Request is executed immediately. + # @param [String] page_token PageToken provided by the API + # @param [Integer] page_number Page Number, this value is simply for client state + # @param [Integer] page_size Number of records to return, defaults to 50 + # @return [Page] Page of FlowInstance + def page(page_token: :unset, page_number: :unset, page_size: :unset) + params = Twilio::Values.of({ + 'PageToken' => page_token, + 'Page' => page_number, + 'PageSize' => page_size, + }) + response = @version.page( + 'GET', + @uri, + params + ) + FlowPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of FlowInstance records from the API. + # Request is executed immediately. + # @param [String] target_url API-generated URL for the requested results page + # @return [Page] Page of FlowInstance + def get_page(target_url) + response = @version.domain.request( + 'GET', + target_url + ) + FlowPage.new(@version, response, @solution) + end + + ## + # Provide a user friendly representation + def to_s + '#' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class FlowPage < Page + ## + # Initialize the FlowPage + # @param [Version] version Version that contains the resource + # @param [Response] response Response from the API + # @param [Hash] solution Path solution for the resource + # @return [FlowPage] FlowPage + def initialize(version, response, solution) + super(version, response) + + # Path Solution + @solution = solution + end + + ## + # Build an instance of FlowInstance + # @param [Hash] payload Payload response from the API + # @return [FlowInstance] FlowInstance + def get_instance(payload) + FlowInstance.new(@version, payload) + end + + ## + # Provide a user friendly representation + def to_s + '' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class FlowContext < InstanceContext + ## + # Initialize the FlowContext + # @param [Version] version Version that contains the resource + # @param [String] sid The sid + # @return [FlowContext] FlowContext + def initialize(version, sid) + super(version) + + # Path Solution + @solution = {sid: sid} + @uri = "/Flows/#{@solution[:sid]}" + + # Dependents + @engagements = nil + end + + ## + # Fetch a FlowInstance + # @return [FlowInstance] Fetched FlowInstance + def fetch + params = Twilio::Values.of({}) + + payload = @version.fetch( + 'GET', + @uri, + params, + ) + + FlowInstance.new(@version, payload, sid: @solution[:sid]) + end + + ## + # Deletes the FlowInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + @version.delete('delete', @uri) + end + + ## + # Access the engagements + # @return [EngagementList] + # @return [EngagementContext] if sid was passed. + def engagements(sid=:unset) + raise ArgumentError, 'sid cannot be nil' if sid.nil? + + if sid != :unset + return EngagementContext.new(@version, @solution[:sid], sid) + end + + unless @engagements + @engagements = EngagementList.new(@version, flow_sid: @solution[:sid]) + end + + @engagements + end + + ## + # Provide a user friendly representation + def to_s + context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') + "#" + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class FlowInstance < InstanceResource + ## + # Initialize the FlowInstance + # @param [Version] version Version that contains the resource + # @param [Hash] payload payload that contains response from Twilio + # @param [String] sid The sid + # @return [FlowInstance] FlowInstance + def initialize(version, payload, sid: nil) + super(version) + + # Marshaled Properties + @properties = { + 'sid' => payload['sid'], + 'account_sid' => payload['account_sid'], + 'friendly_name' => payload['friendly_name'], + 'status' => payload['status'], + 'debug' => payload['debug'], + 'version' => payload['version'].to_i, + 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), + 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), + 'url' => payload['url'], + 'links' => payload['links'], + } + + # Context + @instance_context = nil + @params = {'sid' => sid || @properties['sid']} + end + + ## + # Generate an instance context for the instance, the context is capable of + # performing various actions. All instance actions are proxied to the context + # @return [FlowContext] FlowContext for this FlowInstance + def context + unless @instance_context + @instance_context = FlowContext.new(@version, @params['sid']) + end + @instance_context + end + + ## + # @return [String] A string that uniquely identifies this Flow. + def sid + @properties['sid'] + end + + ## + # @return [String] Account Sid. + def account_sid + @properties['account_sid'] + end + + ## + # @return [String] A human readable description of this resource. + def friendly_name + @properties['friendly_name'] + end + + ## + # @return [flow.Status] The Status of this Flow + def status + @properties['status'] + end + + ## + # @return [Boolean] Toggle extra logging. + def debug + @properties['debug'] + end + + ## + # @return [String] The latest version number of this Flow's definition. + def version + @properties['version'] + end + + ## + # @return [Time] The date this Flow was created + def date_created + @properties['date_created'] + end + + ## + # @return [Time] The date this Flow was updated + def date_updated + @properties['date_updated'] + end + + ## + # @return [String] The URL of this resource. + def url + @properties['url'] + end + + ## + # @return [String] Nested resource URLs. + def links + @properties['links'] + end + + ## + # Fetch a FlowInstance + # @return [FlowInstance] Fetched FlowInstance + def fetch + context.fetch + end + + ## + # Deletes the FlowInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + context.delete + end + + ## + # Access the engagements + # @return [engagements] engagements + def engagements + context.engagements + end + + ## + # Provide a user friendly representation + def to_s + values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + + ## + # Provide a detailed, user friendly representation + def inspect + values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb b/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb new file mode 100644 index 000000000..87f267eb0 --- /dev/null +++ b/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb @@ -0,0 +1,384 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +module Twilio + module REST + class Preview < Domain + class Studio < Version + class FlowContext < InstanceContext + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class EngagementList < ListResource + ## + # Initialize the EngagementList + # @param [Version] version Version that contains the resource + # @param [String] flow_sid The unique SID identifier of the Flow. + # @return [EngagementList] EngagementList + def initialize(version, flow_sid: nil) + super(version) + + # Path Solution + @solution = {flow_sid: flow_sid} + @uri = "/Flows/#{@solution[:flow_sid]}/Engagements" + end + + ## + # Lists EngagementInstance records from the API as a list. + # Unlike stream(), this operation is eager and will load `limit` records into + # memory before returning. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Array] Array of up to limit results + def list(limit: nil, page_size: nil) + self.stream(limit: limit, page_size: page_size).entries + end + + ## + # Streams EngagementInstance records from the API as an Enumerable. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit. + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Enumerable] Enumerable that will yield up to limit results + def stream(limit: nil, page_size: nil) + limits = @version.read_limits(limit, page_size) + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) + end + + ## + # When passed a block, yields EngagementInstance records from the API. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + def each + limits = @version.read_limits + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, + limit: limits[:limit], + page_limit: limits[:page_limit]).each {|x| yield x} + end + + ## + # Retrieve a single page of EngagementInstance records from the API. + # Request is executed immediately. + # @param [String] page_token PageToken provided by the API + # @param [Integer] page_number Page Number, this value is simply for client state + # @param [Integer] page_size Number of records to return, defaults to 50 + # @return [Page] Page of EngagementInstance + def page(page_token: :unset, page_number: :unset, page_size: :unset) + params = Twilio::Values.of({ + 'PageToken' => page_token, + 'Page' => page_number, + 'PageSize' => page_size, + }) + response = @version.page( + 'GET', + @uri, + params + ) + EngagementPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of EngagementInstance records from the API. + # Request is executed immediately. + # @param [String] target_url API-generated URL for the requested results page + # @return [Page] Page of EngagementInstance + def get_page(target_url) + response = @version.domain.request( + 'GET', + target_url + ) + EngagementPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of EngagementInstance records from the API. + # Request is executed immediately. + # @param [String] to The to + # @param [String] from The from + # @param [String] parameters The parameters + # @return [EngagementInstance] Newly created EngagementInstance + def create(to: nil, from: nil, parameters: :unset) + data = Twilio::Values.of({'To' => to, 'From' => from, 'Parameters' => parameters}) + + payload = @version.create( + 'POST', + @uri, + data: data + ) + + EngagementInstance.new(@version, payload, flow_sid: @solution[:flow_sid]) + end + + ## + # Provide a user friendly representation + def to_s + '#' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class EngagementPage < Page + ## + # Initialize the EngagementPage + # @param [Version] version Version that contains the resource + # @param [Response] response Response from the API + # @param [Hash] solution Path solution for the resource + # @return [EngagementPage] EngagementPage + def initialize(version, response, solution) + super(version, response) + + # Path Solution + @solution = solution + end + + ## + # Build an instance of EngagementInstance + # @param [Hash] payload Payload response from the API + # @return [EngagementInstance] EngagementInstance + def get_instance(payload) + EngagementInstance.new(@version, payload, flow_sid: @solution[:flow_sid]) + end + + ## + # Provide a user friendly representation + def to_s + '' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class EngagementContext < InstanceContext + ## + # Initialize the EngagementContext + # @param [Version] version Version that contains the resource + # @param [String] flow_sid The flow_sid + # @param [String] sid The sid + # @return [EngagementContext] EngagementContext + def initialize(version, flow_sid, sid) + super(version) + + # Path Solution + @solution = {flow_sid: flow_sid, sid: sid} + @uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:sid]}" + + # Dependents + @steps = nil + end + + ## + # Fetch a EngagementInstance + # @return [EngagementInstance] Fetched EngagementInstance + def fetch + params = Twilio::Values.of({}) + + payload = @version.fetch( + 'GET', + @uri, + params, + ) + + EngagementInstance.new(@version, payload, flow_sid: @solution[:flow_sid], sid: @solution[:sid]) + end + + ## + # Deletes the EngagementInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + @version.delete('delete', @uri) + end + + ## + # Access the steps + # @return [StepList] + # @return [StepContext] if sid was passed. + def steps(sid=:unset) + raise ArgumentError, 'sid cannot be nil' if sid.nil? + + if sid != :unset + return StepContext.new(@version, @solution[:flow_sid], @solution[:sid], sid) + end + + unless @steps + @steps = StepList.new(@version, flow_sid: @solution[:flow_sid], engagement_sid: @solution[:sid]) + end + + @steps + end + + ## + # Provide a user friendly representation + def to_s + context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') + "#" + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class EngagementInstance < InstanceResource + ## + # Initialize the EngagementInstance + # @param [Version] version Version that contains the resource + # @param [Hash] payload payload that contains response from Twilio + # @param [String] flow_sid The unique SID identifier of the Flow. + # @param [String] sid The sid + # @return [EngagementInstance] EngagementInstance + def initialize(version, payload, flow_sid: nil, sid: nil) + super(version) + + # Marshaled Properties + @properties = { + 'sid' => payload['sid'], + 'account_sid' => payload['account_sid'], + 'flow_sid' => payload['flow_sid'], + 'contact_sid' => payload['contact_sid'], + 'contact_channel_address' => payload['contact_channel_address'], + 'status' => payload['status'], + 'context' => payload['context'], + 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), + 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), + 'url' => payload['url'], + 'links' => payload['links'], + } + + # Context + @instance_context = nil + @params = {'flow_sid' => flow_sid, 'sid' => sid || @properties['sid']} + end + + ## + # Generate an instance context for the instance, the context is capable of + # performing various actions. All instance actions are proxied to the context + # @return [EngagementContext] EngagementContext for this EngagementInstance + def context + unless @instance_context + @instance_context = EngagementContext.new(@version, @params['flow_sid'], @params['sid']) + end + @instance_context + end + + ## + # @return [String] A string that uniquely identifies this Engagement. + def sid + @properties['sid'] + end + + ## + # @return [String] Account Sid. + def account_sid + @properties['account_sid'] + end + + ## + # @return [String] Flow Sid. + def flow_sid + @properties['flow_sid'] + end + + ## + # @return [String] Contact Sid. + def contact_sid + @properties['contact_sid'] + end + + ## + # @return [String] The phone number, SIP address or Client identifier that triggered this Engagement. + def contact_channel_address + @properties['contact_channel_address'] + end + + ## + # @return [engagement.Status] The Status of this Engagement + def status + @properties['status'] + end + + ## + # @return [Hash] Nested resource URLs. + def context + @properties['context'] + end + + ## + # @return [Time] The date this Engagement was created + def date_created + @properties['date_created'] + end + + ## + # @return [Time] The date this Engagement was updated + def date_updated + @properties['date_updated'] + end + + ## + # @return [String] The URL of this resource. + def url + @properties['url'] + end + + ## + # @return [String] Nested resource URLs. + def links + @properties['links'] + end + + ## + # Fetch a EngagementInstance + # @return [EngagementInstance] Fetched EngagementInstance + def fetch + context.fetch + end + + ## + # Deletes the EngagementInstance + # @return [Boolean] true if delete succeeds, true otherwise + def delete + context.delete + end + + ## + # Access the steps + # @return [steps] steps + def steps + context.steps + end + + ## + # Provide a user friendly representation + def to_s + values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + + ## + # Provide a detailed, user friendly representation + def inspect + values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb b/lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb new file mode 100644 index 000000000..ba62bcbff --- /dev/null +++ b/lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb @@ -0,0 +1,348 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +module Twilio + module REST + class Preview < Domain + class Studio < Version + class FlowContext < InstanceContext + class EngagementContext < InstanceContext + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class StepList < ListResource + ## + # Initialize the StepList + # @param [Version] version Version that contains the resource + # @param [String] flow_sid The unique SID identifier of the Flow. + # @param [String] engagement_sid The unique SID identifier of the Engagement. + # @return [StepList] StepList + def initialize(version, flow_sid: nil, engagement_sid: nil) + super(version) + + # Path Solution + @solution = {flow_sid: flow_sid, engagement_sid: engagement_sid} + @uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps" + end + + ## + # Lists StepInstance records from the API as a list. + # Unlike stream(), this operation is eager and will load `limit` records into + # memory before returning. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Array] Array of up to limit results + def list(limit: nil, page_size: nil) + self.stream(limit: limit, page_size: page_size).entries + end + + ## + # Streams StepInstance records from the API as an Enumerable. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + # @param [Integer] limit Upper limit for the number of records to return. stream() + # guarantees to never return more than limit. Default is no limit. + # @param [Integer] page_size Number of records to fetch per request, when + # not set will use the default value of 50 records. If no page_size is defined + # but a limit is defined, stream() will attempt to read the limit with the most + # efficient page size, i.e. min(limit, 1000) + # @return [Enumerable] Enumerable that will yield up to limit results + def stream(limit: nil, page_size: nil) + limits = @version.read_limits(limit, page_size) + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) + end + + ## + # When passed a block, yields StepInstance records from the API. + # This operation lazily loads records as efficiently as possible until the limit + # is reached. + def each + limits = @version.read_limits + + page = self.page(page_size: limits[:page_size]) + + @version.stream(page, + limit: limits[:limit], + page_limit: limits[:page_limit]).each {|x| yield x} + end + + ## + # Retrieve a single page of StepInstance records from the API. + # Request is executed immediately. + # @param [String] page_token PageToken provided by the API + # @param [Integer] page_number Page Number, this value is simply for client state + # @param [Integer] page_size Number of records to return, defaults to 50 + # @return [Page] Page of StepInstance + def page(page_token: :unset, page_number: :unset, page_size: :unset) + params = Twilio::Values.of({ + 'PageToken' => page_token, + 'Page' => page_number, + 'PageSize' => page_size, + }) + response = @version.page( + 'GET', + @uri, + params + ) + StepPage.new(@version, response, @solution) + end + + ## + # Retrieve a single page of StepInstance records from the API. + # Request is executed immediately. + # @param [String] target_url API-generated URL for the requested results page + # @return [Page] Page of StepInstance + def get_page(target_url) + response = @version.domain.request( + 'GET', + target_url + ) + StepPage.new(@version, response, @solution) + end + + ## + # Provide a user friendly representation + def to_s + '#' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class StepPage < Page + ## + # Initialize the StepPage + # @param [Version] version Version that contains the resource + # @param [Response] response Response from the API + # @param [Hash] solution Path solution for the resource + # @return [StepPage] StepPage + def initialize(version, response, solution) + super(version, response) + + # Path Solution + @solution = solution + end + + ## + # Build an instance of StepInstance + # @param [Hash] payload Payload response from the API + # @return [StepInstance] StepInstance + def get_instance(payload) + StepInstance.new( + @version, + payload, + flow_sid: @solution[:flow_sid], + engagement_sid: @solution[:engagement_sid], + ) + end + + ## + # Provide a user friendly representation + def to_s + '' + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class StepContext < InstanceContext + ## + # Initialize the StepContext + # @param [Version] version Version that contains the resource + # @param [String] flow_sid The flow_sid + # @param [String] engagement_sid The engagement_sid + # @param [String] sid The sid + # @return [StepContext] StepContext + def initialize(version, flow_sid, engagement_sid, sid) + super(version) + + # Path Solution + @solution = {flow_sid: flow_sid, engagement_sid: engagement_sid, sid: sid} + @uri = "/Flows/#{@solution[:flow_sid]}/Engagements/#{@solution[:engagement_sid]}/Steps/#{@solution[:sid]}" + end + + ## + # Fetch a StepInstance + # @return [StepInstance] Fetched StepInstance + def fetch + params = Twilio::Values.of({}) + + payload = @version.fetch( + 'GET', + @uri, + params, + ) + + StepInstance.new( + @version, + payload, + flow_sid: @solution[:flow_sid], + engagement_sid: @solution[:engagement_sid], + sid: @solution[:sid], + ) + end + + ## + # Provide a user friendly representation + def to_s + context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') + "#" + end + end + + ## + # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. + class StepInstance < InstanceResource + ## + # Initialize the StepInstance + # @param [Version] version Version that contains the resource + # @param [Hash] payload payload that contains response from Twilio + # @param [String] flow_sid The unique SID identifier of the Flow. + # @param [String] engagement_sid The unique SID identifier of the Engagement. + # @param [String] sid The sid + # @return [StepInstance] StepInstance + def initialize(version, payload, flow_sid: nil, engagement_sid: nil, sid: nil) + super(version) + + # Marshaled Properties + @properties = { + 'sid' => payload['sid'], + 'account_sid' => payload['account_sid'], + 'flow_sid' => payload['flow_sid'], + 'engagement_sid' => payload['engagement_sid'], + 'name' => payload['name'], + 'context' => payload['context'], + 'transitioned_from' => payload['transitioned_from'], + 'transitioned_to' => payload['transitioned_to'], + 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), + 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), + 'url' => payload['url'], + } + + # Context + @instance_context = nil + @params = { + 'flow_sid' => flow_sid, + 'engagement_sid' => engagement_sid, + 'sid' => sid || @properties['sid'], + } + end + + ## + # Generate an instance context for the instance, the context is capable of + # performing various actions. All instance actions are proxied to the context + # @return [StepContext] StepContext for this StepInstance + def context + unless @instance_context + @instance_context = StepContext.new( + @version, + @params['flow_sid'], + @params['engagement_sid'], + @params['sid'], + ) + end + @instance_context + end + + ## + # @return [String] A string that uniquely identifies this Step. + def sid + @properties['sid'] + end + + ## + # @return [String] Account Sid. + def account_sid + @properties['account_sid'] + end + + ## + # @return [String] Flow Sid. + def flow_sid + @properties['flow_sid'] + end + + ## + # @return [String] Engagement Sid. + def engagement_sid + @properties['engagement_sid'] + end + + ## + # @return [String] The Widget that implemented this Step. + def name + @properties['name'] + end + + ## + # @return [Hash] Nested resource URLs. + def context + @properties['context'] + end + + ## + # @return [String] The Widget that preceded the Widget for this Step. + def transitioned_from + @properties['transitioned_from'] + end + + ## + # @return [String] The Widget that will follow the Widget for this Step. + def transitioned_to + @properties['transitioned_to'] + end + + ## + # @return [Time] The date this Step was created + def date_created + @properties['date_created'] + end + + ## + # @return [Time] The date this Step was updated + def date_updated + @properties['date_updated'] + end + + ## + # @return [String] The URL of this resource. + def url + @properties['url'] + end + + ## + # Fetch a StepInstance + # @return [StepInstance] Fetched StepInstance + def fetch + context.fetch + end + + ## + # Provide a user friendly representation + def to_s + values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + + ## + # Provide a detailed, user friendly representation + def inspect + values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") + "" + end + end + end + end + end + end + end +end \ No newline at end of file diff --git a/lib/twilio-ruby/rest/preview/sync.rb b/lib/twilio-ruby/rest/preview/sync.rb index d86ea2f66..4483a99a1 100644 --- a/lib/twilio-ruby/rest/preview/sync.rb +++ b/lib/twilio-ruby/rest/preview/sync.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Preview::Sync::ServiceContext] if sid was passed. # @return [Twilio::REST::Preview::Sync::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/sync/service.rb b/lib/twilio-ruby/rest/preview/sync/service.rb index 619dd57ab..61ae4d167 100644 --- a/lib/twilio-ruby/rest/preview/sync/service.rb +++ b/lib/twilio-ruby/rest/preview/sync/service.rb @@ -45,7 +45,7 @@ def create(friendly_name: :unset, webhook_url: :unset, reachability_webhooks_ena data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -201,7 +201,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -232,7 +232,7 @@ def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_ena data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -243,11 +243,11 @@ def documents(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return DocumentContext.new(@version, @solution[:sid], sid,) + return DocumentContext.new(@version, @solution[:sid], sid) end unless @documents - @documents = DocumentList.new(@version, service_sid: @solution[:sid],) + @documents = DocumentList.new(@version, service_sid: @solution[:sid]) end @documents @@ -261,11 +261,11 @@ def sync_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SyncListContext.new(@version, @solution[:sid], sid,) + return SyncListContext.new(@version, @solution[:sid], sid) end unless @sync_lists - @sync_lists = SyncListList.new(@version, service_sid: @solution[:sid],) + @sync_lists = SyncListList.new(@version, service_sid: @solution[:sid]) end @sync_lists @@ -279,11 +279,11 @@ def sync_maps(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SyncMapContext.new(@version, @solution[:sid], sid,) + return SyncMapContext.new(@version, @solution[:sid], sid) end unless @sync_maps - @sync_maps = SyncMapList.new(@version, service_sid: @solution[:sid],) + @sync_maps = SyncMapList.new(@version, service_sid: @solution[:sid]) end @sync_maps @@ -325,7 +325,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -334,7 +334,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/sync/service/document.rb b/lib/twilio-ruby/rest/preview/sync/service/document.rb index f184a8cd9..bea8a5023 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/document.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/document.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil) # @param [Hash] data The data # @return [DocumentInstance] Newly created DocumentInstance def create(unique_name: :unset, data: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -40,7 +40,7 @@ def create(unique_name: :unset, data: :unset) data: data ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -72,7 +72,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -84,7 +84,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DocumentInstance] DocumentInstance def get_instance(payload) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Documents/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -210,7 +210,7 @@ def delete # @param [Hash] data The data # @return [DocumentInstance] Updated DocumentInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -218,7 +218,7 @@ def update(data: nil) data: data, ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -229,7 +229,7 @@ def document_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return DocumentPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return DocumentPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @document_permissions @@ -281,7 +281,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -290,7 +290,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [DocumentContext] DocumentContext for this DocumentInstance def context unless @instance_context - @instance_context = DocumentContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = DocumentContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -380,7 +380,7 @@ def delete # @param [Hash] data The data # @return [DocumentInstance] Updated DocumentInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb b/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb index 6170ad346..d6f9f3dd1 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, document_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, document_sid: document_sid, identity: identity,} + @solution = {service_sid: service_sid, document_sid: document_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Documents/#{@solution[:document_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync Document. # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync Document. # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb index ee92ae6a6..2a614ae0c 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] unique_name The unique_name # @return [SyncListInstance] Newly created SyncListInstance def create(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(unique_name: :unset) data: data ) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SyncListInstance] SyncListInstance def get_instance(payload) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -213,7 +213,7 @@ def sync_list_items(index=:unset) raise ArgumentError, 'index cannot be nil' if index.nil? if index != :unset - return SyncListItemContext.new(@version, @solution[:service_sid], @solution[:sid], index,) + return SyncListItemContext.new(@version, @solution[:service_sid], @solution[:sid], index) end unless @sync_list_items @@ -235,7 +235,7 @@ def sync_list_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return SyncListPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return SyncListPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @sync_list_permissions @@ -286,7 +286,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -295,7 +295,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SyncListContext] SyncListContext for this SyncListInstance def context unless @instance_context - @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb index bab8cbdce..dd4126604 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb @@ -33,7 +33,7 @@ def initialize(version, service_sid: nil, list_sid: nil) # @param [Hash] data The data # @return [SyncListItemInstance] Newly created SyncListItemInstance def create(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -84,7 +84,7 @@ def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size],) + page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -96,7 +96,7 @@ def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: n def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -200,7 +200,7 @@ def initialize(version, service_sid, list_sid, index) super(version) # Path Solution - @solution = {service_sid: service_sid, list_sid: list_sid, index: index,} + @solution = {service_sid: service_sid, list_sid: list_sid, index: index} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Items/#{@solution[:index]}" end @@ -237,7 +237,7 @@ def delete # @param [Hash] data The data # @return [SyncListItemInstance] Updated SyncListItemInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -394,7 +394,7 @@ def delete # @param [Hash] data The data # @return [SyncListItemInstance] Updated SyncListItemInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb index 679f2570e..e3052ecdd 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, list_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, list_sid: list_sid, identity: identity,} + @solution = {service_sid: service_sid, list_sid: list_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync List. # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync List. # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb index 6385a9c91..bab30f9a4 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] unique_name The unique_name # @return [SyncMapInstance] Newly created SyncMapInstance def create(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(unique_name: :unset) data: data ) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SyncMapInstance] SyncMapInstance def get_instance(payload) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -213,7 +213,7 @@ def sync_map_items(key=:unset) raise ArgumentError, 'key cannot be nil' if key.nil? if key != :unset - return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key,) + return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key) end unless @sync_map_items @@ -235,7 +235,7 @@ def sync_map_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @sync_map_permissions @@ -286,7 +286,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -295,7 +295,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SyncMapContext] SyncMapContext for this SyncMapInstance def context unless @instance_context - @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb index 4379c2b1f..e0c89645d 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb @@ -34,7 +34,7 @@ def initialize(version, service_sid: nil, map_sid: nil) # @param [Hash] data The data # @return [SyncMapItemInstance] Newly created SyncMapItemInstance def create(key: nil, data: nil) - data = Twilio::Values.of({'Key' => key, 'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Key' => key, 'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -85,7 +85,7 @@ def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size],) + page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -97,7 +97,7 @@ def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: n def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -201,7 +201,7 @@ def initialize(version, service_sid, map_sid, key) super(version) # Path Solution - @solution = {service_sid: service_sid, map_sid: map_sid, key: key,} + @solution = {service_sid: service_sid, map_sid: map_sid, key: key} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:map_sid]}/Items/#{@solution[:key]}" end @@ -238,7 +238,7 @@ def delete # @param [Hash] data The data # @return [SyncMapItemInstance] Updated SyncMapItemInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -293,7 +293,7 @@ def initialize(version, payload, service_sid: nil, map_sid: nil, key: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'map_sid' => map_sid, 'key' => key || @properties['key'],} + @params = {'service_sid' => service_sid, 'map_sid' => map_sid, 'key' => key || @properties['key']} end ## @@ -391,7 +391,7 @@ def delete # @param [Hash] data The data # @return [SyncMapItemInstance] Updated SyncMapItemInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb b/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb index 92b84642b..cfd86212b 100644 --- a/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +++ b/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, map_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, map_sid: map_sid, identity: identity,} + @solution = {service_sid: service_sid, map_sid: map_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:map_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync Map. # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync Map. # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/preview/understand.rb b/lib/twilio-ruby/rest/preview/understand.rb index bde61f1f3..275030cf5 100644 --- a/lib/twilio-ruby/rest/preview/understand.rb +++ b/lib/twilio-ruby/rest/preview/understand.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Preview::Understand::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Preview::Understand::ServiceContext] if sid was passed. # @return [Twilio::REST::Preview::Understand::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/understand/service.rb b/lib/twilio-ruby/rest/preview/understand/service.rb index 43b45c5c0..768bdb48e 100644 --- a/lib/twilio-ruby/rest/preview/understand/service.rb +++ b/lib/twilio-ruby/rest/preview/understand/service.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -127,7 +127,7 @@ def create(friendly_name: :unset, log_queries: :unset, ttl: :unset, unique_name: data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -202,7 +202,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -226,7 +226,7 @@ def update(friendly_name: :unset, log_queries: :unset, ttl: :unset, unique_name: data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -244,11 +244,11 @@ def field_types(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FieldTypeContext.new(@version, @solution[:sid], sid,) + return FieldTypeContext.new(@version, @solution[:sid], sid) end unless @field_types - @field_types = FieldTypeList.new(@version, service_sid: @solution[:sid],) + @field_types = FieldTypeList.new(@version, service_sid: @solution[:sid]) end @field_types @@ -262,11 +262,11 @@ def intents(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IntentContext.new(@version, @solution[:sid], sid,) + return IntentContext.new(@version, @solution[:sid], sid) end unless @intents - @intents = IntentList.new(@version, service_sid: @solution[:sid],) + @intents = IntentList.new(@version, service_sid: @solution[:sid]) end @intents @@ -280,11 +280,11 @@ def model_builds(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ModelBuildContext.new(@version, @solution[:sid], sid,) + return ModelBuildContext.new(@version, @solution[:sid], sid) end unless @model_builds - @model_builds = ModelBuildList.new(@version, service_sid: @solution[:sid],) + @model_builds = ModelBuildList.new(@version, service_sid: @solution[:sid]) end @model_builds @@ -298,11 +298,11 @@ def queries(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return QueryContext.new(@version, @solution[:sid], sid,) + return QueryContext.new(@version, @solution[:sid], sid) end unless @queries - @queries = QueryList.new(@version, service_sid: @solution[:sid],) + @queries = QueryList.new(@version, service_sid: @solution[:sid]) end @queries @@ -345,7 +345,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -354,7 +354,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/understand/service/field_type.rb b/lib/twilio-ruby/rest/preview/understand/service/field_type.rb index b0cc645bb..73c0f9ee1 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/field_type.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/field_type.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -114,7 +114,7 @@ def get_page(target_url) # @param [String] friendly_name The friendly_name # @return [FieldTypeInstance] Newly created FieldTypeInstance def create(unique_name: nil, friendly_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -122,7 +122,7 @@ def create(unique_name: nil, friendly_name: :unset) data: data ) - FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [FieldTypeInstance] FieldTypeInstance def get_instance(payload) - FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/FieldTypes/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -204,7 +204,7 @@ def fetch # @param [String] unique_name The unique_name # @return [FieldTypeInstance] Updated FieldTypeInstance def update(friendly_name: :unset, unique_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name}) payload = @version.update( 'POST', @@ -212,7 +212,7 @@ def update(friendly_name: :unset, unique_name: :unset) data: data, ) - FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + FieldTypeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -230,7 +230,7 @@ def field_values(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FieldValueContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return FieldValueContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @field_values @@ -280,7 +280,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -289,7 +289,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [FieldTypeContext] FieldTypeContext for this FieldTypeInstance def context unless @instance_context - @instance_context = FieldTypeContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = FieldTypeContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -361,7 +361,7 @@ def fetch # @param [String] unique_name The unique_name # @return [FieldTypeInstance] Updated FieldTypeInstance def update(friendly_name: :unset, unique_name: :unset) - context.update(friendly_name: friendly_name, unique_name: unique_name,) + context.update(friendly_name: friendly_name, unique_name: unique_name) end ## diff --git a/lib/twilio-ruby/rest/preview/understand/service/field_type/field_value.rb b/lib/twilio-ruby/rest/preview/understand/service/field_type/field_value.rb index 024dd2349..5b68e945a 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/field_type/field_value.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/field_type/field_value.rb @@ -58,7 +58,7 @@ def list(language: :unset, limit: nil, page_size: nil) def stream(language: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(language: language, page_size: limits[:page_size],) + page = self.page(language: language, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(language: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -120,7 +120,7 @@ def get_page(target_url) # @param [String] value The value # @return [FieldValueInstance] Newly created FieldValueInstance def create(language: nil, value: nil) - data = Twilio::Values.of({'Language' => language, 'Value' => value,}) + data = Twilio::Values.of({'Language' => language, 'Value' => value}) payload = @version.create( 'POST', @@ -193,7 +193,7 @@ def initialize(version, service_sid, field_type_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, field_type_sid: field_type_sid, sid: sid,} + @solution = {service_sid: service_sid, field_type_sid: field_type_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/preview/understand/service/intent.rb b/lib/twilio-ruby/rest/preview/understand/service/intent.rb index 08b5e3336..3a202bc45 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/intent.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/intent.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -114,7 +114,7 @@ def get_page(target_url) # @param [String] friendly_name The friendly_name # @return [IntentInstance] Newly created IntentInstance def create(unique_name: nil, friendly_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name}) payload = @version.create( 'POST', @@ -122,7 +122,7 @@ def create(unique_name: nil, friendly_name: :unset) data: data ) - IntentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + IntentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [IntentInstance] IntentInstance def get_instance(payload) - IntentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + IntentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Intents/#{@solution[:sid]}" # Dependents @@ -196,7 +196,7 @@ def fetch params, ) - IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -205,7 +205,7 @@ def fetch # @param [String] unique_name The unique_name # @return [IntentInstance] Updated IntentInstance def update(friendly_name: :unset, unique_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'UniqueName' => unique_name}) payload = @version.update( 'POST', @@ -213,7 +213,7 @@ def update(friendly_name: :unset, unique_name: :unset) data: data, ) - IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + IntentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -231,11 +231,11 @@ def fields(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return FieldContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return FieldContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @fields - @fields = FieldList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid],) + @fields = FieldList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid]) end @fields @@ -249,11 +249,11 @@ def samples(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SampleContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return SampleContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @samples - @samples = SampleList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid],) + @samples = SampleList.new(@version, service_sid: @solution[:service_sid], intent_sid: @solution[:sid]) end @samples @@ -295,7 +295,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -304,7 +304,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [IntentContext] IntentContext for this IntentInstance def context unless @instance_context - @instance_context = IntentContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = IntentContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -376,7 +376,7 @@ def fetch # @param [String] unique_name The unique_name # @return [IntentInstance] Updated IntentInstance def update(friendly_name: :unset, unique_name: :unset) - context.update(friendly_name: friendly_name, unique_name: unique_name,) + context.update(friendly_name: friendly_name, unique_name: unique_name) end ## diff --git a/lib/twilio-ruby/rest/preview/understand/service/intent/field.rb b/lib/twilio-ruby/rest/preview/understand/service/intent/field.rb index 11643c276..c60a7aa49 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/intent/field.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/intent/field.rb @@ -56,7 +56,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -116,7 +116,7 @@ def get_page(target_url) # @param [String] unique_name The unique_name # @return [FieldInstance] Newly created FieldInstance def create(field_type: nil, unique_name: nil) - data = Twilio::Values.of({'FieldType' => field_type, 'UniqueName' => unique_name,}) + data = Twilio::Values.of({'FieldType' => field_type, 'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -189,7 +189,7 @@ def initialize(version, service_sid, intent_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, intent_sid: intent_sid, sid: sid,} + @solution = {service_sid: service_sid, intent_sid: intent_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Intents/#{@solution[:intent_sid]}/Fields/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/preview/understand/service/intent/sample.rb b/lib/twilio-ruby/rest/preview/understand/service/intent/sample.rb index 5dbef100c..699bfed92 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/intent/sample.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/intent/sample.rb @@ -58,7 +58,7 @@ def list(language: :unset, limit: nil, page_size: nil) def stream(language: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(language: language, page_size: limits[:page_size],) + page = self.page(language: language, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(language: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -120,7 +120,7 @@ def get_page(target_url) # @param [String] tagged_text The tagged_text # @return [SampleInstance] Newly created SampleInstance def create(language: nil, tagged_text: nil) - data = Twilio::Values.of({'Language' => language, 'TaggedText' => tagged_text,}) + data = Twilio::Values.of({'Language' => language, 'TaggedText' => tagged_text}) payload = @version.create( 'POST', @@ -193,7 +193,7 @@ def initialize(version, service_sid, intent_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, intent_sid: intent_sid, sid: sid,} + @solution = {service_sid: service_sid, intent_sid: intent_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Intents/#{@solution[:intent_sid]}/Samples/#{@solution[:sid]}" end @@ -224,7 +224,7 @@ def fetch # @param [String] tagged_text The tagged_text # @return [SampleInstance] Updated SampleInstance def update(language: :unset, tagged_text: :unset) - data = Twilio::Values.of({'Language' => language, 'TaggedText' => tagged_text,}) + data = Twilio::Values.of({'Language' => language, 'TaggedText' => tagged_text}) payload = @version.update( 'POST', @@ -375,7 +375,7 @@ def fetch # @param [String] tagged_text The tagged_text # @return [SampleInstance] Updated SampleInstance def update(language: :unset, tagged_text: :unset) - context.update(language: language, tagged_text: tagged_text,) + context.update(language: language, tagged_text: tagged_text) end ## diff --git a/lib/twilio-ruby/rest/preview/understand/service/model_build.rb b/lib/twilio-ruby/rest/preview/understand/service/model_build.rb index faa232a56..9cf482b52 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/model_build.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/model_build.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -114,7 +114,7 @@ def get_page(target_url) # @param [String] unique_name The unique_name # @return [ModelBuildInstance] Newly created ModelBuildInstance def create(status_callback: :unset, unique_name: :unset) - data = Twilio::Values.of({'StatusCallback' => status_callback, 'UniqueName' => unique_name,}) + data = Twilio::Values.of({'StatusCallback' => status_callback, 'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -122,7 +122,7 @@ def create(status_callback: :unset, unique_name: :unset) data: data ) - ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ModelBuildInstance] ModelBuildInstance def get_instance(payload) - ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/ModelBuilds/#{@solution[:sid]}" end @@ -192,7 +192,7 @@ def fetch params, ) - ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -200,7 +200,7 @@ def fetch # @param [String] unique_name The unique_name # @return [ModelBuildInstance] Updated ModelBuildInstance def update(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.update( 'POST', @@ -208,7 +208,7 @@ def update(unique_name: :unset) data: data, ) - ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ModelBuildInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -253,7 +253,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -262,7 +262,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ModelBuildContext] ModelBuildContext for this ModelBuildInstance def context unless @instance_context - @instance_context = ModelBuildContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ModelBuildContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -327,7 +327,7 @@ def fetch # @param [String] unique_name The unique_name # @return [ModelBuildInstance] Updated ModelBuildInstance def update(unique_name: :unset) - context.update(unique_name: unique_name,) + context.update(unique_name: unique_name) end ## diff --git a/lib/twilio-ruby/rest/preview/understand/service/query.rb b/lib/twilio-ruby/rest/preview/understand/service/query.rb index b55ecd157..e2646362f 100644 --- a/lib/twilio-ruby/rest/preview/understand/service/query.rb +++ b/lib/twilio-ruby/rest/preview/understand/service/query.rb @@ -83,7 +83,7 @@ def stream(language: :unset, model_build: :unset, status: :unset, limit: nil, pa def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -156,7 +156,7 @@ def create(language: nil, query: nil, intent: :unset, model_build: :unset, field data: data ) - QueryInstance.new(@version, payload, service_sid: @solution[:service_sid],) + QueryInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -187,7 +187,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [QueryInstance] QueryInstance def get_instance(payload) - QueryInstance.new(@version, payload, service_sid: @solution[:service_sid],) + QueryInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -210,7 +210,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Queries/#{@solution[:sid]}" end @@ -226,7 +226,7 @@ def fetch params, ) - QueryInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + QueryInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -235,7 +235,7 @@ def fetch # @param [String] status The status # @return [QueryInstance] Updated QueryInstance def update(sample_sid: :unset, status: :unset) - data = Twilio::Values.of({'SampleSid' => sample_sid, 'Status' => status,}) + data = Twilio::Values.of({'SampleSid' => sample_sid, 'Status' => status}) payload = @version.update( 'POST', @@ -243,7 +243,7 @@ def update(sample_sid: :unset, status: :unset) data: data, ) - QueryInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + QueryInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -292,7 +292,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -301,7 +301,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [QueryContext] QueryContext for this QueryInstance def context unless @instance_context - @instance_context = QueryContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = QueryContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -391,7 +391,7 @@ def fetch # @param [String] status The status # @return [QueryInstance] Updated QueryInstance def update(sample_sid: :unset, status: :unset) - context.update(sample_sid: sample_sid, status: status,) + context.update(sample_sid: sample_sid, status: status) end ## diff --git a/lib/twilio-ruby/rest/preview/wireless.rb b/lib/twilio-ruby/rest/preview/wireless.rb index 8bc2c685e..cc647499d 100644 --- a/lib/twilio-ruby/rest/preview/wireless.rb +++ b/lib/twilio-ruby/rest/preview/wireless.rb @@ -20,7 +20,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Preview::Wireless::CommandInstance] if sid was passed. + # @return [Twilio::REST::Preview::Wireless::CommandContext] if sid was passed. # @return [Twilio::REST::Preview::Wireless::CommandList] def commands(sid=:unset) if sid.nil? @@ -34,7 +34,7 @@ def commands(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Preview::Wireless::RatePlanInstance] if sid was passed. + # @return [Twilio::REST::Preview::Wireless::RatePlanContext] if sid was passed. # @return [Twilio::REST::Preview::Wireless::RatePlanList] def rate_plans(sid=:unset) if sid.nil? @@ -48,7 +48,7 @@ def rate_plans(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Preview::Wireless::SimInstance] if sid was passed. + # @return [Twilio::REST::Preview::Wireless::SimContext] if sid was passed. # @return [Twilio::REST::Preview::Wireless::SimList] def sims(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/preview/wireless/command.rb b/lib/twilio-ruby/rest/preview/wireless/command.rb index 445d93c53..6fc42c629 100644 --- a/lib/twilio-ruby/rest/preview/wireless/command.rb +++ b/lib/twilio-ruby/rest/preview/wireless/command.rb @@ -85,7 +85,7 @@ def stream(device: :unset, sim: :unset, status: :unset, direction: :unset, limit def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -162,7 +162,7 @@ def create(command: nil, device: :unset, sim: :unset, callback_method: :unset, c data: data ) - CommandInstance.new(@version, payload,) + CommandInstance.new(@version, payload) end ## @@ -193,7 +193,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CommandInstance] CommandInstance def get_instance(payload) - CommandInstance.new(@version, payload,) + CommandInstance.new(@version, payload) end ## @@ -215,7 +215,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Commands/#{@solution[:sid]}" end @@ -231,7 +231,7 @@ def fetch params, ) - CommandInstance.new(@version, payload, sid: @solution[:sid],) + CommandInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -271,7 +271,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -280,7 +280,7 @@ def initialize(version, payload, sid: nil) # @return [CommandContext] CommandContext for this CommandInstance def context unless @instance_context - @instance_context = CommandContext.new(@version, @params['sid'],) + @instance_context = CommandContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb b/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb index 3a08ebe43..fd243ded2 100644 --- a/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +++ b/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -139,7 +139,7 @@ def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, dat data: data ) - RatePlanInstance.new(@version, payload,) + RatePlanInstance.new(@version, payload) end ## @@ -170,7 +170,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RatePlanInstance] RatePlanInstance def get_instance(payload) - RatePlanInstance.new(@version, payload,) + RatePlanInstance.new(@version, payload) end ## @@ -192,7 +192,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/RatePlans/#{@solution[:sid]}" end @@ -208,7 +208,7 @@ def fetch params, ) - RatePlanInstance.new(@version, payload, sid: @solution[:sid],) + RatePlanInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -217,7 +217,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [RatePlanInstance] Updated RatePlanInstance def update(unique_name: :unset, friendly_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -225,7 +225,7 @@ def update(unique_name: :unset, friendly_name: :unset) data: data, ) - RatePlanInstance.new(@version, payload, sid: @solution[:sid],) + RatePlanInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -275,7 +275,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -284,7 +284,7 @@ def initialize(version, payload, sid: nil) # @return [RatePlanContext] RatePlanContext for this RatePlanInstance def context unless @instance_context - @instance_context = RatePlanContext.new(@version, @params['sid'],) + @instance_context = RatePlanContext.new(@version, @params['sid']) end @instance_context end @@ -386,7 +386,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [RatePlanInstance] Updated RatePlanInstance def update(unique_name: :unset, friendly_name: :unset) - context.update(unique_name: unique_name, friendly_name: friendly_name,) + context.update(unique_name: unique_name, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/preview/wireless/sim.rb b/lib/twilio-ruby/rest/preview/wireless/sim.rb index c910b46db..c1b68a284 100644 --- a/lib/twilio-ruby/rest/preview/wireless/sim.rb +++ b/lib/twilio-ruby/rest/preview/wireless/sim.rb @@ -89,7 +89,7 @@ def stream(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_r def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -168,7 +168,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SimInstance] SimInstance def get_instance(payload) - SimInstance.new(@version, payload,) + SimInstance.new(@version, payload) end ## @@ -190,7 +190,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Sims/#{@solution[:sid]}" # Dependents @@ -209,7 +209,7 @@ def fetch params, ) - SimInstance.new(@version, payload, sid: @solution[:sid],) + SimInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -257,7 +257,7 @@ def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, f data: data, ) - SimInstance.new(@version, payload, sid: @solution[:sid],) + SimInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -265,7 +265,7 @@ def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, f # @return [UsageList] # @return [UsageContext] def usage - UsageContext.new(@version, @solution[:sid],) + UsageContext.new(@version, @solution[:sid]) end ## @@ -316,7 +316,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -325,7 +325,7 @@ def initialize(version, payload, sid: nil) # @return [SimContext] SimContext for this SimInstance def context unless @instance_context - @instance_context = SimContext.new(@version, @params['sid'],) + @instance_context = SimContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb b/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb index d156f353c..5800f4659 100644 --- a/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +++ b/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb @@ -52,7 +52,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UsageInstance] UsageInstance def get_instance(payload) - UsageInstance.new(@version, payload, sim_sid: @solution[:sim_sid],) + UsageInstance.new(@version, payload, sim_sid: @solution[:sim_sid]) end ## @@ -74,7 +74,7 @@ def initialize(version, sim_sid) super(version) # Path Solution - @solution = {sim_sid: sim_sid,} + @solution = {sim_sid: sim_sid} @uri = "/Sims/#{@solution[:sim_sid]}/Usage" end @@ -84,7 +84,7 @@ def initialize(version, sim_sid) # @param [String] start The start # @return [UsageInstance] Fetched UsageInstance def fetch(end_: :unset, start: :unset) - params = Twilio::Values.of({'End' => end_, 'Start' => start,}) + params = Twilio::Values.of({'End' => end_, 'Start' => start}) payload = @version.fetch( 'GET', @@ -92,7 +92,7 @@ def fetch(end_: :unset, start: :unset) params, ) - UsageInstance.new(@version, payload, sim_sid: @solution[:sim_sid],) + UsageInstance.new(@version, payload, sim_sid: @solution[:sim_sid]) end ## @@ -130,7 +130,7 @@ def initialize(version, payload, sim_sid: nil) # Context @instance_context = nil - @params = {'sim_sid' => sim_sid,} + @params = {'sim_sid' => sim_sid} end ## @@ -139,7 +139,7 @@ def initialize(version, payload, sim_sid: nil) # @return [UsageContext] UsageContext for this UsageInstance def context unless @instance_context - @instance_context = UsageContext.new(@version, @params['sim_sid'],) + @instance_context = UsageContext.new(@version, @params['sim_sid']) end @instance_context end @@ -204,7 +204,7 @@ def url # @param [String] start The start # @return [UsageInstance] Fetched UsageInstance def fetch(end_: :unset, start: :unset) - context.fetch(end_: end_, start: start,) + context.fetch(end_: end_, start: start) end ## diff --git a/lib/twilio-ruby/rest/pricing/v1.rb b/lib/twilio-ruby/rest/pricing/v1.rb index 5bfbccbf9..0ef58c800 100644 --- a/lib/twilio-ruby/rest/pricing/v1.rb +++ b/lib/twilio-ruby/rest/pricing/v1.rb @@ -19,39 +19,21 @@ def initialize(domain) end ## - # @return [Twilio::REST::Pricing::V1::MessagingInstance] - def messaging(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @messaging ||= MessagingList.new self - else - MessagingContext.new(self, sid) - end + # @return [Twilio::REST::Pricing::V1::MessagingContext] + def messaging + @messaging ||= MessagingList.new self end ## - # @return [Twilio::REST::Pricing::V1::PhoneNumberInstance] - def phone_numbers(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @phone_numbers ||= PhoneNumberList.new self - else - PhoneNumberContext.new(self, sid) - end + # @return [Twilio::REST::Pricing::V1::PhoneNumberContext] + def phone_numbers + @phone_numbers ||= PhoneNumberList.new self end ## - # @return [Twilio::REST::Pricing::V1::VoiceInstance] - def voice(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @voice ||= VoiceList.new self - else - VoiceContext.new(self, sid) - end + # @return [Twilio::REST::Pricing::V1::VoiceContext] + def voice + @voice ||= VoiceList.new self end ## diff --git a/lib/twilio-ruby/rest/pricing/v1/messaging.rb b/lib/twilio-ruby/rest/pricing/v1/messaging.rb index ab2e3e3e2..57d8ed571 100644 --- a/lib/twilio-ruby/rest/pricing/v1/messaging.rb +++ b/lib/twilio-ruby/rest/pricing/v1/messaging.rb @@ -32,10 +32,10 @@ def countries(iso_country=:unset) raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil? if iso_country != :unset - return CountryContext.new(@version, iso_country,) + return CountryContext.new(@version, iso_country) end - @countries ||= CountryList.new(@version,) + @countries ||= CountryList.new(@version) end ## @@ -64,7 +64,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [MessagingInstance] MessagingInstance def get_instance(payload) - MessagingInstance.new(@version, payload,) + MessagingInstance.new(@version, payload) end ## @@ -84,7 +84,7 @@ def initialize(version, payload) super(version) # Marshaled Properties - @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links'],} + @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links']} end ## diff --git a/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb b/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb index bd4f3fb32..9bc284b6d 100644 --- a/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +++ b/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb @@ -51,7 +51,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -63,7 +63,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -130,7 +130,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CountryInstance] CountryInstance def get_instance(payload) - CountryInstance.new(@version, payload,) + CountryInstance.new(@version, payload) end ## @@ -150,7 +150,7 @@ def initialize(version, iso_country) super(version) # Path Solution - @solution = {iso_country: iso_country,} + @solution = {iso_country: iso_country} @uri = "/Messaging/Countries/#{@solution[:iso_country]}" end @@ -166,7 +166,7 @@ def fetch params, ) - CountryInstance.new(@version, payload, iso_country: @solution[:iso_country],) + CountryInstance.new(@version, payload, iso_country: @solution[:iso_country]) end ## @@ -199,7 +199,7 @@ def initialize(version, payload, iso_country: nil) # Context @instance_context = nil - @params = {'iso_country' => iso_country || @properties['iso_country'],} + @params = {'iso_country' => iso_country || @properties['iso_country']} end ## @@ -208,7 +208,7 @@ def initialize(version, payload, iso_country: nil) # @return [CountryContext] CountryContext for this CountryInstance def context unless @instance_context - @instance_context = CountryContext.new(@version, @params['iso_country'],) + @instance_context = CountryContext.new(@version, @params['iso_country']) end @instance_context end diff --git a/lib/twilio-ruby/rest/pricing/v1/phone_number.rb b/lib/twilio-ruby/rest/pricing/v1/phone_number.rb index 96b4566e2..fd7b2d425 100644 --- a/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +++ b/lib/twilio-ruby/rest/pricing/v1/phone_number.rb @@ -32,10 +32,10 @@ def countries(iso_country=:unset) raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil? if iso_country != :unset - return CountryContext.new(@version, iso_country,) + return CountryContext.new(@version, iso_country) end - @countries ||= CountryList.new(@version,) + @countries ||= CountryList.new(@version) end ## @@ -64,7 +64,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload,) + PhoneNumberInstance.new(@version, payload) end ## @@ -84,7 +84,7 @@ def initialize(version, payload) super(version) # Marshaled Properties - @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links'],} + @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links']} end ## diff --git a/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb b/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb index 17b6e96b1..31af56838 100644 --- a/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +++ b/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb @@ -51,7 +51,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -63,7 +63,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -130,7 +130,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CountryInstance] CountryInstance def get_instance(payload) - CountryInstance.new(@version, payload,) + CountryInstance.new(@version, payload) end ## @@ -150,7 +150,7 @@ def initialize(version, iso_country) super(version) # Path Solution - @solution = {iso_country: iso_country,} + @solution = {iso_country: iso_country} @uri = "/PhoneNumbers/Countries/#{@solution[:iso_country]}" end @@ -166,7 +166,7 @@ def fetch params, ) - CountryInstance.new(@version, payload, iso_country: @solution[:iso_country],) + CountryInstance.new(@version, payload, iso_country: @solution[:iso_country]) end ## @@ -198,7 +198,7 @@ def initialize(version, payload, iso_country: nil) # Context @instance_context = nil - @params = {'iso_country' => iso_country || @properties['iso_country'],} + @params = {'iso_country' => iso_country || @properties['iso_country']} end ## @@ -207,7 +207,7 @@ def initialize(version, payload, iso_country: nil) # @return [CountryContext] CountryContext for this CountryInstance def context unless @instance_context - @instance_context = CountryContext.new(@version, @params['iso_country'],) + @instance_context = CountryContext.new(@version, @params['iso_country']) end @instance_context end diff --git a/lib/twilio-ruby/rest/pricing/v1/voice.rb b/lib/twilio-ruby/rest/pricing/v1/voice.rb index 7e8f58659..fa276788b 100644 --- a/lib/twilio-ruby/rest/pricing/v1/voice.rb +++ b/lib/twilio-ruby/rest/pricing/v1/voice.rb @@ -33,10 +33,10 @@ def numbers(number=:unset) raise ArgumentError, 'number cannot be nil' if number.nil? if number != :unset - return NumberContext.new(@version, number,) + return NumberContext.new(@version, number) end - @numbers ||= NumberList.new(@version,) + @numbers ||= NumberList.new(@version) end ## @@ -48,10 +48,10 @@ def countries(iso_country=:unset) raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil? if iso_country != :unset - return CountryContext.new(@version, iso_country,) + return CountryContext.new(@version, iso_country) end - @countries ||= CountryList.new(@version,) + @countries ||= CountryList.new(@version) end ## @@ -80,7 +80,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [VoiceInstance] VoiceInstance def get_instance(payload) - VoiceInstance.new(@version, payload,) + VoiceInstance.new(@version, payload) end ## @@ -100,7 +100,7 @@ def initialize(version, payload) super(version) # Marshaled Properties - @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links'],} + @properties = {'name' => payload['name'], 'url' => payload['url'], 'links' => payload['links']} end ## diff --git a/lib/twilio-ruby/rest/pricing/v1/voice/country.rb b/lib/twilio-ruby/rest/pricing/v1/voice/country.rb index d5d055a38..35befc390 100644 --- a/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +++ b/lib/twilio-ruby/rest/pricing/v1/voice/country.rb @@ -51,7 +51,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -63,7 +63,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -130,7 +130,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CountryInstance] CountryInstance def get_instance(payload) - CountryInstance.new(@version, payload,) + CountryInstance.new(@version, payload) end ## @@ -150,7 +150,7 @@ def initialize(version, iso_country) super(version) # Path Solution - @solution = {iso_country: iso_country,} + @solution = {iso_country: iso_country} @uri = "/Voice/Countries/#{@solution[:iso_country]}" end @@ -166,7 +166,7 @@ def fetch params, ) - CountryInstance.new(@version, payload, iso_country: @solution[:iso_country],) + CountryInstance.new(@version, payload, iso_country: @solution[:iso_country]) end ## @@ -199,7 +199,7 @@ def initialize(version, payload, iso_country: nil) # Context @instance_context = nil - @params = {'iso_country' => iso_country || @properties['iso_country'],} + @params = {'iso_country' => iso_country || @properties['iso_country']} end ## @@ -208,7 +208,7 @@ def initialize(version, payload, iso_country: nil) # @return [CountryContext] CountryContext for this CountryInstance def context unless @instance_context - @instance_context = CountryContext.new(@version, @params['iso_country'],) + @instance_context = CountryContext.new(@version, @params['iso_country']) end @instance_context end diff --git a/lib/twilio-ruby/rest/pricing/v1/voice/number.rb b/lib/twilio-ruby/rest/pricing/v1/voice/number.rb index 44b4ecfae..6c8ee1fa0 100644 --- a/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +++ b/lib/twilio-ruby/rest/pricing/v1/voice/number.rb @@ -47,7 +47,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [NumberInstance] NumberInstance def get_instance(payload) - NumberInstance.new(@version, payload,) + NumberInstance.new(@version, payload) end ## @@ -67,7 +67,7 @@ def initialize(version, number) super(version) # Path Solution - @solution = {number: number,} + @solution = {number: number} @uri = "/Voice/Numbers/#{@solution[:number]}" end @@ -83,7 +83,7 @@ def fetch params, ) - NumberInstance.new(@version, payload, number: @solution[:number],) + NumberInstance.new(@version, payload, number: @solution[:number]) end ## @@ -117,7 +117,7 @@ def initialize(version, payload, number: nil) # Context @instance_context = nil - @params = {'number' => number || @properties['number'],} + @params = {'number' => number || @properties['number']} end ## @@ -126,7 +126,7 @@ def initialize(version, payload, number: nil) # @return [NumberContext] NumberContext for this NumberInstance def context unless @instance_context - @instance_context = NumberContext.new(@version, @params['number'],) + @instance_context = NumberContext.new(@version, @params['number']) end @instance_context end diff --git a/lib/twilio-ruby/rest/proxy/v1.rb b/lib/twilio-ruby/rest/proxy/v1.rb index 292ccffc1..43d6fe62d 100644 --- a/lib/twilio-ruby/rest/proxy/v1.rb +++ b/lib/twilio-ruby/rest/proxy/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid A 34 character string that uniquely identifies this Service. - # @return [Twilio::REST::Proxy::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Proxy::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Proxy::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/proxy/v1/service.rb b/lib/twilio-ruby/rest/proxy/v1/service.rb index 9bcaf0ebb..29846887b 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -112,12 +112,24 @@ def get_page(target_url) # to 64 characters. # @param [String] default_ttl The default Time to Live for a Session, in seconds. # @param [String] callback_url The URL Twilio will send callbacks to. + # @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in + # the same areacode. + # @param [service.NumberSelectionBehavior] number_selection_behavior What behavior + # to use when choosing a proxy number. + # @param [String] intercept_callback_url A URL for Twilio call before each + # Interaction. An error status code will prevent the interaction from continuing. + # @param [String] out_of_session_callback_url A URL for Twilio call when a new + # Interaction has no Session. # @return [ServiceInstance] Newly created ServiceInstance - def create(friendly_name: :unset, default_ttl: :unset, callback_url: :unset) + def create(friendly_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'DefaultTtl' => default_ttl, 'CallbackUrl' => callback_url, + 'GeoMatchLevel' => geo_match_level, + 'NumberSelectionBehavior' => number_selection_behavior, + 'InterceptCallbackUrl' => intercept_callback_url, + 'OutOfSessionCallbackUrl' => out_of_session_callback_url, }) payload = @version.create( @@ -126,7 +138,7 @@ def create(friendly_name: :unset, default_ttl: :unset, callback_url: :unset) data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -157,7 +169,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -179,7 +191,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -200,7 +212,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -216,12 +228,24 @@ def delete # to 64 characters. # @param [String] default_ttl The default Time to Live for a Session, in seconds. # @param [String] callback_url The URL Twilio will send callbacks to. + # @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in + # the same areacode. + # @param [service.NumberSelectionBehavior] number_selection_behavior What behavior + # to use when choosing a proxy number. + # @param [String] intercept_callback_url A URL for Twilio call before each + # Interaction. An error status code will prevent the interaction from continuing. + # @param [String] out_of_session_callback_url A URL for Twilio call when a new + # Interaction has no Session. # @return [ServiceInstance] Updated ServiceInstance - def update(friendly_name: :unset, default_ttl: :unset, callback_url: :unset) + def update(friendly_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'DefaultTtl' => default_ttl, 'CallbackUrl' => callback_url, + 'GeoMatchLevel' => geo_match_level, + 'NumberSelectionBehavior' => number_selection_behavior, + 'InterceptCallbackUrl' => intercept_callback_url, + 'OutOfSessionCallbackUrl' => out_of_session_callback_url, }) payload = @version.update( @@ -230,7 +254,7 @@ def update(friendly_name: :unset, default_ttl: :unset, callback_url: :unset) data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -241,11 +265,11 @@ def sessions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SessionContext.new(@version, @solution[:sid], sid,) + return SessionContext.new(@version, @solution[:sid], sid) end unless @sessions - @sessions = SessionList.new(@version, service_sid: @solution[:sid],) + @sessions = SessionList.new(@version, service_sid: @solution[:sid]) end @sessions @@ -259,11 +283,11 @@ def phone_numbers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PhoneNumberContext.new(@version, @solution[:sid], sid,) + return PhoneNumberContext.new(@version, @solution[:sid], sid) end unless @phone_numbers - @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid],) + @phone_numbers = PhoneNumberList.new(@version, service_sid: @solution[:sid]) end @phone_numbers @@ -277,11 +301,11 @@ def short_codes(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ShortCodeContext.new(@version, @solution[:sid], sid,) + return ShortCodeContext.new(@version, @solution[:sid], sid) end unless @short_codes - @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid],) + @short_codes = ShortCodeList.new(@version, service_sid: @solution[:sid]) end @short_codes @@ -314,6 +338,10 @@ def initialize(version, payload, sid: nil) 'account_sid' => payload['account_sid'], 'callback_url' => payload['callback_url'], 'default_ttl' => payload['default_ttl'].to_i, + 'number_selection_behavior' => payload['number_selection_behavior'], + 'geo_match_level' => payload['geo_match_level'], + 'intercept_callback_url' => payload['intercept_callback_url'], + 'out_of_session_callback_url' => payload['out_of_session_callback_url'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], @@ -322,7 +350,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -331,7 +359,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end @@ -366,6 +394,30 @@ def default_ttl @properties['default_ttl'] end + ## + # @return [service.NumberSelectionBehavior] What behavior to use when choosing a proxy number. + def number_selection_behavior + @properties['number_selection_behavior'] + end + + ## + # @return [service.GeoMatchLevel] Whether to find proxy numbers in the same areacode. + def geo_match_level + @properties['geo_match_level'] + end + + ## + # @return [String] A URL for Twilio call before each Interaction. + def intercept_callback_url + @properties['intercept_callback_url'] + end + + ## + # @return [String] A URL for Twilio call when a new Interaction has no Session. + def out_of_session_callback_url + @properties['out_of_session_callback_url'] + end + ## # @return [Time] The date this Service was created def date_created @@ -410,9 +462,25 @@ def delete # to 64 characters. # @param [String] default_ttl The default Time to Live for a Session, in seconds. # @param [String] callback_url The URL Twilio will send callbacks to. + # @param [service.GeoMatchLevel] geo_match_level Whether to find proxy numbers in + # the same areacode. + # @param [service.NumberSelectionBehavior] number_selection_behavior What behavior + # to use when choosing a proxy number. + # @param [String] intercept_callback_url A URL for Twilio call before each + # Interaction. An error status code will prevent the interaction from continuing. + # @param [String] out_of_session_callback_url A URL for Twilio call when a new + # Interaction has no Session. # @return [ServiceInstance] Updated ServiceInstance - def update(friendly_name: :unset, default_ttl: :unset, callback_url: :unset) - context.update(friendly_name: friendly_name, default_ttl: default_ttl, callback_url: callback_url,) + def update(friendly_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset) + context.update( + friendly_name: friendly_name, + default_ttl: default_ttl, + callback_url: callback_url, + geo_match_level: geo_match_level, + number_selection_behavior: number_selection_behavior, + intercept_callback_url: intercept_callback_url, + out_of_session_callback_url: out_of_session_callback_url, + ) end ## diff --git a/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb b/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb index 575adbe1b..45077ff8d 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb @@ -30,9 +30,10 @@ def initialize(version, service_sid: nil) # Request is executed immediately. # @param [String] sid A 34 character string that uniquely identifies this Phone # Number. + # @param [String] phone_number The phone_number # @return [PhoneNumberInstance] Newly created PhoneNumberInstance - def create(sid: nil) - data = Twilio::Values.of({'Sid' => sid,}) + def create(sid: :unset, phone_number: :unset) + data = Twilio::Values.of({'Sid' => sid, 'PhoneNumber' => phone_number}) payload = @version.create( 'POST', @@ -40,7 +41,7 @@ def create(sid: nil) data: data ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -72,7 +73,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -84,7 +85,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +154,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +178,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/PhoneNumbers/#{@solution[:sid]}" end @@ -200,7 +201,7 @@ def fetch params, ) - PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + PhoneNumberInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -241,7 +242,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -250,7 +251,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance def context unless @instance_context - @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = PhoneNumberContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/proxy/v1/service/session.rb b/lib/twilio-ruby/rest/proxy/v1/service/session.rb index 5ab029716..18c71fb11 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/session.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/session.rb @@ -64,7 +64,7 @@ def list(unique_name: :unset, status: :unset, limit: nil, page_size: nil) def stream(unique_name: :unset, status: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(unique_name: unique_name, status: status, page_size: limits[:page_size],) + page = self.page(unique_name: unique_name, status: status, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -76,7 +76,7 @@ def stream(unique_name: :unset, status: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -133,17 +133,20 @@ def get_page(target_url) # @param [Time] date_expiry The date that this Session was expiry, given in ISO # 8601 format. # @param [String] ttl The Time to Live for a Session, in seconds. + # @param [session.Mode] mode The Mode of this Session. One of `message-only`, + # `voice-only` or `voice-and-message`. # @param [session.Status] status The Status of this Session. One of `in-progess`, # `closed`, `failed`, `unknown` or `completed`. - # @param [String] participants A list of phone numbers to add to this Session. + # @param [Hash] participants A list of phone numbers to add to this Session. # @return [SessionInstance] Newly created SessionInstance - def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, status: :unset, participants: :unset) + def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset) data = Twilio::Values.of({ 'UniqueName' => unique_name, 'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry), 'Ttl' => ttl, + 'Mode' => mode, 'Status' => status, - 'Participants' => Twilio.serialize_list(participants) { |e| e }, + 'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) }, }) payload = @version.create( @@ -152,7 +155,7 @@ def create(unique_name: :unset, date_expiry: :unset, ttl: :unset, status: :unset data: data ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -183,7 +186,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SessionInstance] SessionInstance def get_instance(payload) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -206,7 +209,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:sid]}" # Dependents @@ -226,7 +229,7 @@ def fetch params, ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -244,17 +247,20 @@ def delete # @param [Time] date_expiry The date that this Session was expiry, given in ISO # 8601 format. # @param [String] ttl The Time to Live for a Session, in seconds. + # @param [session.Mode] mode The Mode of this Session. One of `message-only`, + # `voice-only` or `voice-and-message`. # @param [session.Status] status The Status of this Session. One of `in-progess`, # `closed`, `failed`, `unknown` or `completed`. - # @param [String] participants A list of phone numbers to add to this Session. + # @param [Hash] participants A list of phone numbers to add to this Session. # @return [SessionInstance] Updated SessionInstance - def update(unique_name: :unset, date_expiry: :unset, ttl: :unset, status: :unset, participants: :unset) + def update(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset) data = Twilio::Values.of({ 'UniqueName' => unique_name, 'DateExpiry' => Twilio.serialize_iso8601_datetime(date_expiry), 'Ttl' => ttl, + 'Mode' => mode, 'Status' => status, - 'Participants' => Twilio.serialize_list(participants) { |e| e }, + 'Participants' => Twilio.serialize_list(participants) { |e| Twilio.serialize_object(e) }, }) payload = @version.update( @@ -263,7 +269,7 @@ def update(unique_name: :unset, date_expiry: :unset, ttl: :unset, status: :unset data: data, ) - SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SessionInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -274,7 +280,7 @@ def interactions(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return InteractionContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return InteractionContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @interactions @@ -296,7 +302,7 @@ def participants(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ParticipantContext.new(@version, @solution[:service_sid], @solution[:sid], sid,) + return ParticipantContext.new(@version, @solution[:service_sid], @solution[:sid], sid) end unless @participants @@ -344,6 +350,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) 'status' => payload['status'], 'closed_reason' => payload['closed_reason'], 'ttl' => payload['ttl'].to_i, + 'mode' => payload['mode'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], @@ -352,7 +359,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -361,7 +368,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SessionContext] SessionContext for this SessionInstance def context unless @instance_context - @instance_context = SessionContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SessionContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -432,6 +439,12 @@ def ttl @properties['ttl'] end + ## + # @return [session.Mode] The Mode of this Session + def mode + @properties['mode'] + end + ## # @return [Time] The date this Session was created def date_created @@ -478,15 +491,18 @@ def delete # @param [Time] date_expiry The date that this Session was expiry, given in ISO # 8601 format. # @param [String] ttl The Time to Live for a Session, in seconds. + # @param [session.Mode] mode The Mode of this Session. One of `message-only`, + # `voice-only` or `voice-and-message`. # @param [session.Status] status The Status of this Session. One of `in-progess`, # `closed`, `failed`, `unknown` or `completed`. - # @param [String] participants A list of phone numbers to add to this Session. + # @param [Hash] participants A list of phone numbers to add to this Session. # @return [SessionInstance] Updated SessionInstance - def update(unique_name: :unset, date_expiry: :unset, ttl: :unset, status: :unset, participants: :unset) + def update(unique_name: :unset, date_expiry: :unset, ttl: :unset, mode: :unset, status: :unset, participants: :unset) context.update( unique_name: unique_name, date_expiry: date_expiry, ttl: ttl, + mode: mode, status: status, participants: participants, ) diff --git a/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb b/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb index fb3fdad96..6dc2a2749 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb @@ -97,7 +97,7 @@ def stream(inbound_participant_status: :unset, outbound_participant_status: :uns def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -208,7 +208,7 @@ def initialize(version, service_sid, session_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid,} + @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Interactions/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb b/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb index 3b9552262..c44f6c1ae 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb @@ -31,7 +31,6 @@ def initialize(version, service_sid: nil, session_sid: nil) # Lists ParticipantInstance records from the API as a list. # Unlike stream(), this operation is eager and will load `limit` records into # memory before returning. - # @param [participant.ParticipantType] participant_type The participant_type # @param [String] identifier The identifier # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit @@ -40,20 +39,14 @@ def initialize(version, service_sid: nil, session_sid: nil) # but a limit is defined, stream() will attempt to read the limit with the most # efficient page size, i.e. min(limit, 1000) # @return [Array] Array of up to limit results - def list(participant_type: :unset, identifier: :unset, limit: nil, page_size: nil) - self.stream( - participant_type: participant_type, - identifier: identifier, - limit: limit, - page_size: page_size - ).entries + def list(identifier: :unset, limit: nil, page_size: nil) + self.stream(identifier: identifier, limit: limit, page_size: page_size).entries end ## # Streams ParticipantInstance records from the API as an Enumerable. # This operation lazily loads records as efficiently as possible until the limit # is reached. - # @param [participant.ParticipantType] participant_type The participant_type # @param [String] identifier The identifier # @param [Integer] limit Upper limit for the number of records to return. stream() # guarantees to never return more than limit. Default is no limit. @@ -62,14 +55,10 @@ def list(participant_type: :unset, identifier: :unset, limit: nil, page_size: ni # but a limit is defined, stream() will attempt to read the limit with the most # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results - def stream(participant_type: :unset, identifier: :unset, limit: nil, page_size: nil) + def stream(identifier: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page( - participant_type: participant_type, - identifier: identifier, - page_size: limits[:page_size], - ) + page = self.page(identifier: identifier, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -81,7 +70,7 @@ def stream(participant_type: :unset, identifier: :unset, limit: nil, page_size: def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -91,15 +80,13 @@ def each ## # Retrieve a single page of ParticipantInstance records from the API. # Request is executed immediately. - # @param [participant.ParticipantType] participant_type The participant_type # @param [String] identifier The identifier # @param [String] page_token PageToken provided by the API # @param [Integer] page_number Page Number, this value is simply for client state # @param [Integer] page_size Number of records to return, defaults to 50 # @return [Page] Page of ParticipantInstance - def page(participant_type: :unset, identifier: :unset, page_token: :unset, page_number: :unset, page_size: :unset) + def page(identifier: :unset, page_token: :unset, page_number: :unset, page_size: :unset) params = Twilio::Values.of({ - 'ParticipantType' => participant_type, 'Identifier' => identifier, 'PageToken' => page_token, 'Page' => page_number, @@ -132,17 +119,14 @@ def get_page(target_url) # @param [String] identifier The phone number of this Participant. # @param [String] friendly_name A human readable description of this resource, up # to 64 characters. - # @param [participant.ParticipantType] participant_type The Participant Type of - # this Participant. One of `message-only`, `voice-only` or `voice-and-message`. # @param [String] proxy_identifier The proxy phone number for this Participant. # @param [String] proxy_identifier_sid The unique SID identifier of the Proxy # Identifier. # @return [ParticipantInstance] Newly created ParticipantInstance - def create(identifier: nil, friendly_name: :unset, participant_type: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) + def create(identifier: nil, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) data = Twilio::Values.of({ 'Identifier' => identifier, 'FriendlyName' => friendly_name, - 'ParticipantType' => participant_type, 'ProxyIdentifier' => proxy_identifier, 'ProxyIdentifierSid' => proxy_identifier_sid, }) @@ -219,7 +203,7 @@ def initialize(version, service_sid, session_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid,} + @solution = {service_sid: service_sid, session_sid: session_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Sessions/#{@solution[:session_sid]}/Participants/#{@solution[:sid]}" # Dependents @@ -256,8 +240,6 @@ def delete ## # Update the ParticipantInstance - # @param [participant.ParticipantType] participant_type The Participant Type of - # this Participant. One of `message-only`, `voice-only` or `voice-and-message`. # @param [String] identifier The phone number of this Participant. # @param [String] friendly_name A human readable description of this resource, up # to 64 characters. @@ -265,9 +247,8 @@ def delete # @param [String] proxy_identifier_sid The unique SID identifier of the Proxy # Identifier. # @return [ParticipantInstance] Updated ParticipantInstance - def update(participant_type: :unset, identifier: :unset, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) + def update(identifier: :unset, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) data = Twilio::Values.of({ - 'ParticipantType' => participant_type, 'Identifier' => identifier, 'FriendlyName' => friendly_name, 'ProxyIdentifier' => proxy_identifier, @@ -348,7 +329,6 @@ def initialize(version, payload, service_sid: nil, session_sid: nil, sid: nil) 'service_sid' => payload['service_sid'], 'account_sid' => payload['account_sid'], 'friendly_name' => payload['friendly_name'], - 'participant_type' => payload['participant_type'], 'identifier' => payload['identifier'], 'proxy_identifier' => payload['proxy_identifier'], 'proxy_identifier_sid' => payload['proxy_identifier_sid'], @@ -414,12 +394,6 @@ def friendly_name @properties['friendly_name'] end - ## - # @return [participant.ParticipantType] The Participant Type of this Participant - def participant_type - @properties['participant_type'] - end - ## # @return [String] The phone number of this Participant. def identifier @@ -427,7 +401,7 @@ def identifier end ## - # @return [String] The proxy phone number for this Participant. + # @return [String] The proxy_identifier def proxy_identifier @properties['proxy_identifier'] end @@ -484,8 +458,6 @@ def delete ## # Update the ParticipantInstance - # @param [participant.ParticipantType] participant_type The Participant Type of - # this Participant. One of `message-only`, `voice-only` or `voice-and-message`. # @param [String] identifier The phone number of this Participant. # @param [String] friendly_name A human readable description of this resource, up # to 64 characters. @@ -493,9 +465,8 @@ def delete # @param [String] proxy_identifier_sid The unique SID identifier of the Proxy # Identifier. # @return [ParticipantInstance] Updated ParticipantInstance - def update(participant_type: :unset, identifier: :unset, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) + def update(identifier: :unset, friendly_name: :unset, proxy_identifier: :unset, proxy_identifier_sid: :unset) context.update( - participant_type: participant_type, identifier: identifier, friendly_name: friendly_name, proxy_identifier: proxy_identifier, diff --git a/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb b/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb index b0803c486..5fcfa44ce 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb @@ -36,7 +36,7 @@ def initialize(version, service_sid: nil, session_sid: nil, participant_sid: nil # @param [String] media_url The media_url # @return [MessageInteractionInstance] Newly created MessageInteractionInstance def create(body: :unset, media_url: :unset) - data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e },}) + data = Twilio::Values.of({'Body' => body, 'MediaUrl' => Twilio.serialize_list(media_url) { |e| e }}) payload = @version.create( 'POST', @@ -82,7 +82,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -94,7 +94,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], diff --git a/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb b/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb index 064f0d359..f35b3b8cf 100644 --- a/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +++ b/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil) # Code. # @return [ShortCodeInstance] Newly created ShortCodeInstance def create(sid: nil) - data = Twilio::Values.of({'Sid' => sid,}) + data = Twilio::Values.of({'Sid' => sid}) payload = @version.create( 'POST', @@ -40,7 +40,7 @@ def create(sid: nil) data: data ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -72,7 +72,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -84,7 +84,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ShortCodeInstance] ShortCodeInstance def get_instance(payload) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -177,7 +177,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/ShortCodes/#{@solution[:sid]}" end @@ -200,7 +200,7 @@ def fetch params, ) - ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + ShortCodeInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -240,7 +240,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -249,7 +249,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [ShortCodeContext] ShortCodeContext for this ShortCodeInstance def context unless @instance_context - @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = ShortCodeContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -297,7 +297,7 @@ def iso_country end ## - # @return [Hash] Nested resource URLs. + # @return [String] Nested resource URLs. def capabilities @properties['capabilities'] end diff --git a/lib/twilio-ruby/rest/sync/v1.rb b/lib/twilio-ruby/rest/sync/v1.rb index fb4a849ad..70902e37a 100644 --- a/lib/twilio-ruby/rest/sync/v1.rb +++ b/lib/twilio-ruby/rest/sync/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Sync::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Sync::V1::ServiceContext] if sid was passed. # @return [Twilio::REST::Sync::V1::ServiceList] def services(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/sync/v1/service.rb b/lib/twilio-ruby/rest/sync/v1/service.rb index 774f78189..e55b03258 100644 --- a/lib/twilio-ruby/rest/sync/v1/service.rb +++ b/lib/twilio-ruby/rest/sync/v1/service.rb @@ -45,7 +45,7 @@ def create(friendly_name: :unset, webhook_url: :unset, reachability_webhooks_ena data: data ) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -77,7 +77,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -89,7 +89,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ServiceInstance] ServiceInstance def get_instance(payload) - ServiceInstance.new(@version, payload,) + ServiceInstance.new(@version, payload) end ## @@ -180,7 +180,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Services/#{@solution[:sid]}" # Dependents @@ -202,7 +202,7 @@ def fetch params, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -233,7 +233,7 @@ def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_ena data: data, ) - ServiceInstance.new(@version, payload, sid: @solution[:sid],) + ServiceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -244,11 +244,11 @@ def documents(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return DocumentContext.new(@version, @solution[:sid], sid,) + return DocumentContext.new(@version, @solution[:sid], sid) end unless @documents - @documents = DocumentList.new(@version, service_sid: @solution[:sid],) + @documents = DocumentList.new(@version, service_sid: @solution[:sid]) end @documents @@ -262,11 +262,11 @@ def sync_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SyncListContext.new(@version, @solution[:sid], sid,) + return SyncListContext.new(@version, @solution[:sid], sid) end unless @sync_lists - @sync_lists = SyncListList.new(@version, service_sid: @solution[:sid],) + @sync_lists = SyncListList.new(@version, service_sid: @solution[:sid]) end @sync_lists @@ -280,11 +280,11 @@ def sync_maps(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SyncMapContext.new(@version, @solution[:sid], sid,) + return SyncMapContext.new(@version, @solution[:sid], sid) end unless @sync_maps - @sync_maps = SyncMapList.new(@version, service_sid: @solution[:sid],) + @sync_maps = SyncMapList.new(@version, service_sid: @solution[:sid]) end @sync_maps @@ -298,11 +298,11 @@ def sync_streams(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return SyncStreamContext.new(@version, @solution[:sid], sid,) + return SyncStreamContext.new(@version, @solution[:sid], sid) end unless @sync_streams - @sync_streams = SyncStreamList.new(@version, service_sid: @solution[:sid],) + @sync_streams = SyncStreamList.new(@version, service_sid: @solution[:sid]) end @sync_streams @@ -345,7 +345,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -354,7 +354,7 @@ def initialize(version, payload, sid: nil) # @return [ServiceContext] ServiceContext for this ServiceInstance def context unless @instance_context - @instance_context = ServiceContext.new(@version, @params['sid'],) + @instance_context = ServiceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/sync/v1/service/document.rb b/lib/twilio-ruby/rest/sync/v1/service/document.rb index 66e5c7cae..7f4380d32 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/document.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/document.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil) # @param [Hash] data The data # @return [DocumentInstance] Newly created DocumentInstance def create(unique_name: :unset, data: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -40,7 +40,7 @@ def create(unique_name: :unset, data: :unset) data: data ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -72,7 +72,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -84,7 +84,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DocumentInstance] DocumentInstance def get_instance(payload) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Documents/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -210,7 +210,7 @@ def delete # @param [Hash] data The data # @return [DocumentInstance] Updated DocumentInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -218,7 +218,7 @@ def update(data: nil) data: data, ) - DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + DocumentInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -229,7 +229,7 @@ def document_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return DocumentPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return DocumentPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @document_permissions @@ -281,7 +281,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -290,7 +290,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [DocumentContext] DocumentContext for this DocumentInstance def context unless @instance_context - @instance_context = DocumentContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = DocumentContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end @@ -380,7 +380,7 @@ def delete # @param [Hash] data The data # @return [DocumentInstance] Updated DocumentInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb b/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb index b82a9ffc9..e8d6a4d33 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, document_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, document_sid: document_sid, identity: identity,} + @solution = {service_sid: service_sid, document_sid: document_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Documents/#{@solution[:document_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync Document. # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync Document. # @return [DocumentPermissionInstance] Updated DocumentPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb index 38b3f0c33..1386fe8bb 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] unique_name The unique_name # @return [SyncListInstance] Newly created SyncListInstance def create(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(unique_name: :unset) data: data ) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SyncListInstance] SyncListInstance def get_instance(payload) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SyncListInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -213,7 +213,7 @@ def sync_list_items(index=:unset) raise ArgumentError, 'index cannot be nil' if index.nil? if index != :unset - return SyncListItemContext.new(@version, @solution[:service_sid], @solution[:sid], index,) + return SyncListItemContext.new(@version, @solution[:service_sid], @solution[:sid], index) end unless @sync_list_items @@ -235,7 +235,7 @@ def sync_list_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return SyncListPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return SyncListPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @sync_list_permissions @@ -286,7 +286,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -295,7 +295,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SyncListContext] SyncListContext for this SyncListInstance def context unless @instance_context - @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SyncListContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb index e61271fa9..6fea39e65 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb @@ -33,7 +33,7 @@ def initialize(version, service_sid: nil, list_sid: nil) # @param [Hash] data The data # @return [SyncListItemInstance] Newly created SyncListItemInstance def create(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -84,7 +84,7 @@ def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size],) + page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -96,7 +96,7 @@ def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: n def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -200,7 +200,7 @@ def initialize(version, service_sid, list_sid, index) super(version) # Path Solution - @solution = {service_sid: service_sid, list_sid: list_sid, index: index,} + @solution = {service_sid: service_sid, list_sid: list_sid, index: index} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Items/#{@solution[:index]}" end @@ -237,7 +237,7 @@ def delete # @param [Hash] data The data # @return [SyncListItemInstance] Updated SyncListItemInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -394,7 +394,7 @@ def delete # @param [Hash] data The data # @return [SyncListItemInstance] Updated SyncListItemInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb index 998ef22c5..dc26dacd1 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, list_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, list_sid: list_sid, identity: identity,} + @solution = {service_sid: service_sid, list_sid: list_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Lists/#{@solution[:list_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync List. # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync List. # @return [SyncListPermissionInstance] Updated SyncListPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb index b756336da..661b7b24f 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb @@ -31,7 +31,7 @@ def initialize(version, service_sid: nil) # @param [String] unique_name The unique_name # @return [SyncMapInstance] Newly created SyncMapInstance def create(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -39,7 +39,7 @@ def create(unique_name: :unset) data: data ) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -71,7 +71,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -83,7 +83,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -152,7 +152,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SyncMapInstance] SyncMapInstance def get_instance(payload) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -175,7 +175,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SyncMapInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -213,7 +213,7 @@ def sync_map_items(key=:unset) raise ArgumentError, 'key cannot be nil' if key.nil? if key != :unset - return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key,) + return SyncMapItemContext.new(@version, @solution[:service_sid], @solution[:sid], key) end unless @sync_map_items @@ -235,7 +235,7 @@ def sync_map_permissions(identity=:unset) raise ArgumentError, 'identity cannot be nil' if identity.nil? if identity != :unset - return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity,) + return SyncMapPermissionContext.new(@version, @solution[:service_sid], @solution[:sid], identity) end unless @sync_map_permissions @@ -286,7 +286,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -295,7 +295,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SyncMapContext] SyncMapContext for this SyncMapInstance def context unless @instance_context - @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SyncMapContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb index 114154b5e..7030b33b6 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb @@ -34,7 +34,7 @@ def initialize(version, service_sid: nil, map_sid: nil) # @param [Hash] data The data # @return [SyncMapItemInstance] Newly created SyncMapItemInstance def create(key: nil, data: nil) - data = Twilio::Values.of({'Key' => key, 'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Key' => key, 'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -85,7 +85,7 @@ def list(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size],) + page = self.page(order: order, from: from, bounds: bounds, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -97,7 +97,7 @@ def stream(order: :unset, from: :unset, bounds: :unset, limit: nil, page_size: n def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -201,7 +201,7 @@ def initialize(version, service_sid, map_sid, key) super(version) # Path Solution - @solution = {service_sid: service_sid, map_sid: map_sid, key: key,} + @solution = {service_sid: service_sid, map_sid: map_sid, key: key} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:map_sid]}/Items/#{@solution[:key]}" end @@ -238,7 +238,7 @@ def delete # @param [Hash] data The data # @return [SyncMapItemInstance] Updated SyncMapItemInstance def update(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.update( 'POST', @@ -293,7 +293,7 @@ def initialize(version, payload, service_sid: nil, map_sid: nil, key: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'map_sid' => map_sid, 'key' => key || @properties['key'],} + @params = {'service_sid' => service_sid, 'map_sid' => map_sid, 'key' => key || @properties['key']} end ## @@ -391,7 +391,7 @@ def delete # @param [Hash] data The data # @return [SyncMapItemInstance] Updated SyncMapItemInstance def update(data: nil) - context.update(data: data,) + context.update(data: data) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb index c1c3662b5..7f3297767 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb @@ -58,7 +58,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -170,7 +170,7 @@ def initialize(version, service_sid, map_sid, identity) super(version) # Path Solution - @solution = {service_sid: service_sid, map_sid: map_sid, identity: identity,} + @solution = {service_sid: service_sid, map_sid: map_sid, identity: identity} @uri = "/Services/#{@solution[:service_sid]}/Maps/#{@solution[:map_sid]}/Permissions/#{@solution[:identity]}" end @@ -212,7 +212,7 @@ def delete # the Sync Map. # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance def update(read: nil, write: nil, manage: nil) - data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage,}) + data = Twilio::Values.of({'Read' => read, 'Write' => write, 'Manage' => manage}) payload = @version.update( 'POST', @@ -363,7 +363,7 @@ def delete # the Sync Map. # @return [SyncMapPermissionInstance] Updated SyncMapPermissionInstance def update(read: nil, write: nil, manage: nil) - context.update(read: read, write: write, manage: manage,) + context.update(read: read, write: write, manage: manage) end ## diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb index 71cc123e8..484ebce15 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb @@ -32,7 +32,7 @@ def initialize(version, service_sid: nil) # Optional, up to 256 characters long. # @return [SyncStreamInstance] Newly created SyncStreamInstance def create(unique_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name}) payload = @version.create( 'POST', @@ -40,7 +40,7 @@ def create(unique_name: :unset) data: data ) - SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -72,7 +72,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -84,7 +84,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SyncStreamInstance] SyncStreamInstance def get_instance(payload) - SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid],) + SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid]) end ## @@ -176,7 +176,7 @@ def initialize(version, service_sid, sid) super(version) # Path Solution - @solution = {service_sid: service_sid, sid: sid,} + @solution = {service_sid: service_sid, sid: sid} @uri = "/Services/#{@solution[:service_sid]}/Streams/#{@solution[:sid]}" # Dependents @@ -195,7 +195,7 @@ def fetch params, ) - SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid],) + SyncStreamInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid]) end ## @@ -257,7 +257,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'],} + @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end ## @@ -266,7 +266,7 @@ def initialize(version, payload, service_sid: nil, sid: nil) # @return [SyncStreamContext] SyncStreamContext for this SyncStreamInstance def context unless @instance_context - @instance_context = SyncStreamContext.new(@version, @params['service_sid'], @params['sid'],) + @instance_context = SyncStreamContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb b/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb index 098901985..a2cd2e9c9 100644 --- a/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +++ b/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb @@ -34,7 +34,7 @@ def initialize(version, service_sid: nil, stream_sid: nil) # maximum size 4KB. # @return [StreamMessageInstance] Newly created StreamMessageInstance def create(data: nil) - data = Twilio::Values.of({'Data' => Twilio.serialize_object(data),}) + data = Twilio::Values.of({'Data' => Twilio.serialize_object(data)}) payload = @version.create( 'POST', @@ -107,7 +107,7 @@ def initialize(version, payload, service_sid: nil, stream_sid: nil) super(version) # Marshaled Properties - @properties = {'sid' => payload['sid'], 'data' => payload['data'],} + @properties = {'sid' => payload['sid'], 'data' => payload['data']} end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1.rb b/lib/twilio-ruby/rest/taskrouter/v1.rb index c75418ddc..6d0ff8da9 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Taskrouter::V1::WorkspaceInstance] if sid was passed. + # @return [Twilio::REST::Taskrouter::V1::WorkspaceContext] if sid was passed. # @return [Twilio::REST::Taskrouter::V1::WorkspaceList] def workspaces(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb index 97cd3380f..661de2f15 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb @@ -52,7 +52,7 @@ def list(friendly_name: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(friendly_name: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -133,7 +133,7 @@ def create(friendly_name: nil, event_callback_url: :unset, events_filter: :unset data: data ) - WorkspaceInstance.new(@version, payload,) + WorkspaceInstance.new(@version, payload) end ## @@ -162,7 +162,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkspaceInstance] WorkspaceInstance def get_instance(payload) - WorkspaceInstance.new(@version, payload,) + WorkspaceInstance.new(@version, payload) end ## @@ -182,7 +182,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Workspaces/#{@solution[:sid]}" # Dependents @@ -210,7 +210,7 @@ def fetch params, ) - WorkspaceInstance.new(@version, payload, sid: @solution[:sid],) + WorkspaceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -240,7 +240,7 @@ def update(default_activity_sid: :unset, event_callback_url: :unset, events_filt data: data, ) - WorkspaceInstance.new(@version, payload, sid: @solution[:sid],) + WorkspaceInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -258,11 +258,11 @@ def activities(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ActivityContext.new(@version, @solution[:sid], sid,) + return ActivityContext.new(@version, @solution[:sid], sid) end unless @activities - @activities = ActivityList.new(@version, workspace_sid: @solution[:sid],) + @activities = ActivityList.new(@version, workspace_sid: @solution[:sid]) end @activities @@ -276,11 +276,11 @@ def events(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return EventContext.new(@version, @solution[:sid], sid,) + return EventContext.new(@version, @solution[:sid], sid) end unless @events - @events = EventList.new(@version, workspace_sid: @solution[:sid],) + @events = EventList.new(@version, workspace_sid: @solution[:sid]) end @events @@ -294,11 +294,11 @@ def tasks(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskContext.new(@version, @solution[:sid], sid,) + return TaskContext.new(@version, @solution[:sid], sid) end unless @tasks - @tasks = TaskList.new(@version, workspace_sid: @solution[:sid],) + @tasks = TaskList.new(@version, workspace_sid: @solution[:sid]) end @tasks @@ -312,11 +312,11 @@ def task_queues(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskQueueContext.new(@version, @solution[:sid], sid,) + return TaskQueueContext.new(@version, @solution[:sid], sid) end unless @task_queues - @task_queues = TaskQueueList.new(@version, workspace_sid: @solution[:sid],) + @task_queues = TaskQueueList.new(@version, workspace_sid: @solution[:sid]) end @task_queues @@ -330,11 +330,11 @@ def workers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return WorkerContext.new(@version, @solution[:sid], sid,) + return WorkerContext.new(@version, @solution[:sid], sid) end unless @workers - @workers = WorkerList.new(@version, workspace_sid: @solution[:sid],) + @workers = WorkerList.new(@version, workspace_sid: @solution[:sid]) end @workers @@ -348,11 +348,11 @@ def workflows(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return WorkflowContext.new(@version, @solution[:sid], sid,) + return WorkflowContext.new(@version, @solution[:sid], sid) end unless @workflows - @workflows = WorkflowList.new(@version, workspace_sid: @solution[:sid],) + @workflows = WorkflowList.new(@version, workspace_sid: @solution[:sid]) end @workflows @@ -363,7 +363,7 @@ def workflows(sid=:unset) # @return [WorkspaceStatisticsList] # @return [WorkspaceStatisticsContext] def statistics - WorkspaceStatisticsContext.new(@version, @solution[:sid],) + WorkspaceStatisticsContext.new(@version, @solution[:sid]) end ## @@ -371,7 +371,7 @@ def statistics # @return [WorkspaceRealTimeStatisticsList] # @return [WorkspaceRealTimeStatisticsContext] def real_time_statistics - WorkspaceRealTimeStatisticsContext.new(@version, @solution[:sid],) + WorkspaceRealTimeStatisticsContext.new(@version, @solution[:sid]) end ## @@ -379,7 +379,7 @@ def real_time_statistics # @return [WorkspaceCumulativeStatisticsList] # @return [WorkspaceCumulativeStatisticsContext] def cumulative_statistics - WorkspaceCumulativeStatisticsContext.new(@version, @solution[:sid],) + WorkspaceCumulativeStatisticsContext.new(@version, @solution[:sid]) end ## @@ -390,11 +390,11 @@ def task_channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskChannelContext.new(@version, @solution[:sid], sid,) + return TaskChannelContext.new(@version, @solution[:sid], sid) end unless @task_channels - @task_channels = TaskChannelList.new(@version, workspace_sid: @solution[:sid],) + @task_channels = TaskChannelList.new(@version, workspace_sid: @solution[:sid]) end @task_channels @@ -439,7 +439,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -448,7 +448,7 @@ def initialize(version, payload, sid: nil) # @return [WorkspaceContext] WorkspaceContext for this WorkspaceInstance def context unless @instance_context - @instance_context = WorkspaceContext.new(@version, @params['sid'],) + @instance_context = WorkspaceContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb index 050269ae3..59fd00135 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb @@ -61,7 +61,7 @@ def list(friendly_name: :unset, available: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, available: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, available: available, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, available: available, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -73,7 +73,7 @@ def stream(friendly_name: :unset, available: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -125,7 +125,7 @@ def get_page(target_url) # @param [Boolean] available The available # @return [ActivityInstance] Newly created ActivityInstance def create(friendly_name: nil, available: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Available' => available,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name, 'Available' => available}) payload = @version.create( 'POST', @@ -133,7 +133,7 @@ def create(friendly_name: nil, available: :unset) data: data ) - ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -162,7 +162,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [ActivityInstance] ActivityInstance def get_instance(payload) - ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -183,7 +183,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Activities/#{@solution[:sid]}" end @@ -199,7 +199,7 @@ def fetch params, ) - ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -207,7 +207,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [ActivityInstance] Updated ActivityInstance def update(friendly_name: :unset) - data = Twilio::Values.of({'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -215,7 +215,7 @@ def update(friendly_name: :unset) data: data, ) - ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + ActivityInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -258,7 +258,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -267,7 +267,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [ActivityContext] ActivityContext for this ActivityInstance def context unless @instance_context - @instance_context = ActivityContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = ActivityContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end @@ -332,7 +332,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [ActivityInstance] Updated ActivityInstance def update(friendly_name: :unset) - context.update(friendly_name: friendly_name,) + context.update(friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb index efe34f3b2..f9811c0d0 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb @@ -105,7 +105,7 @@ def stream(end_date: :unset, event_type: :unset, minutes: :unset, reservation_si def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -190,7 +190,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [EventInstance] EventInstance def get_instance(payload) - EventInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + EventInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -211,7 +211,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Events/#{@solution[:sid]}" end @@ -227,7 +227,7 @@ def fetch params, ) - EventInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + EventInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -270,7 +270,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -279,7 +279,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [EventContext] EventContext for this EventInstance def context unless @instance_context - @instance_context = EventContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = EventContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb index 6f4e7da9b..247776938 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb @@ -105,7 +105,7 @@ def stream(priority: :unset, assignment_status: :unset, workflow_sid: :unset, wo def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -188,7 +188,7 @@ def create(timeout: :unset, priority: :unset, task_channel: :unset, workflow_sid data: data ) - TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -217,7 +217,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TaskInstance] TaskInstance def get_instance(payload) - TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -238,7 +238,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks/#{@solution[:sid]}" # Dependents @@ -257,7 +257,7 @@ def fetch params, ) - TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -283,7 +283,7 @@ def update(attributes: :unset, assignment_status: :unset, reason: :unset, priori data: data, ) - TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + TaskInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -301,7 +301,7 @@ def reservations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid,) + return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid) end unless @reservations @@ -360,7 +360,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -369,7 +369,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [TaskContext] TaskContext for this TaskInstance def context unless @instance_context - @instance_context = TaskContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = TaskContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb index 322bc300b..685ec4ec8 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb @@ -56,7 +56,7 @@ def list(reservation_status: :unset, limit: nil, page_size: nil) def stream(reservation_status: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(reservation_status: reservation_status, page_size: limits[:page_size],) + page = self.page(reservation_status: reservation_status, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(reservation_status: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, workspace_sid, task_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, task_sid: task_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, task_sid: task_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Tasks/#{@solution[:task_sid]}/Reservations/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb index 7cf381361..8fbded92f 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -131,7 +131,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TaskChannelInstance] TaskChannelInstance def get_instance(payload) - TaskChannelInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskChannelInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -152,7 +152,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskChannels/#{@solution[:sid]}" end @@ -209,7 +209,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -218,7 +218,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [TaskChannelContext] TaskChannelContext for this TaskChannelInstance def context unless @instance_context - @instance_context = TaskChannelContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = TaskChannelContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb index 0d54059d1..ddb1a0209 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb @@ -84,7 +84,7 @@ def stream(friendly_name: :unset, evaluate_worker_attributes: :unset, worker_sid def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -157,7 +157,7 @@ def create(friendly_name: nil, reservation_activity_sid: nil, assignment_activit data: data ) - TaskQueueInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskQueueInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -165,7 +165,7 @@ def create(friendly_name: nil, reservation_activity_sid: nil, assignment_activit # @return [TaskQueuesStatisticsList] # @return [TaskQueuesStatisticsContext] def statistics - @statistics ||= TaskQueuesStatisticsList.new(@version, workspace_sid: @solution[:workspace_sid],) + @statistics ||= TaskQueuesStatisticsList.new(@version, workspace_sid: @solution[:workspace_sid]) end ## @@ -194,7 +194,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TaskQueueInstance] TaskQueueInstance def get_instance(payload) - TaskQueueInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskQueueInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -215,7 +215,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/#{@solution[:sid]}" # Dependents @@ -289,7 +289,7 @@ def delete # @return [TaskQueueStatisticsList] # @return [TaskQueueStatisticsContext] def statistics - TaskQueueStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + TaskQueueStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -297,7 +297,7 @@ def statistics # @return [TaskQueueRealTimeStatisticsList] # @return [TaskQueueRealTimeStatisticsContext] def real_time_statistics - TaskQueueRealTimeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + TaskQueueRealTimeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -305,7 +305,7 @@ def real_time_statistics # @return [TaskQueueCumulativeStatisticsList] # @return [TaskQueueCumulativeStatisticsContext] def cumulative_statistics - TaskQueueCumulativeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + TaskQueueCumulativeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -348,7 +348,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -357,7 +357,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [TaskQueueContext] TaskQueueContext for this TaskQueueInstance def context unless @instance_context - @instance_context = TaskQueueContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = TaskQueueContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb index e9fa8172f..2da311d48 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, task_queue_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid,} + @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/#{@solution[:task_queue_sid]}/CumulativeStatistics" end @@ -157,7 +157,7 @@ def initialize(version, payload, workspace_sid: nil, task_queue_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid,} + @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid} end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb index f12577aa9..8b6fc0c6a 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, task_queue_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid,} + @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/#{@solution[:task_queue_sid]}/RealTimeStatistics" end @@ -85,7 +85,7 @@ def initialize(version, workspace_sid, task_queue_sid) # @param [String] task_channel The task_channel # @return [TaskQueueRealTimeStatisticsInstance] Fetched TaskQueueRealTimeStatisticsInstance def fetch(task_channel: :unset) - params = Twilio::Values.of({'TaskChannel' => task_channel,}) + params = Twilio::Values.of({'TaskChannel' => task_channel}) payload = @version.fetch( 'GET', @@ -137,7 +137,7 @@ def initialize(version, payload, workspace_sid: nil, task_queue_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid,} + @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid} end ## @@ -226,7 +226,7 @@ def url # @param [String] task_channel The task_channel # @return [TaskQueueRealTimeStatisticsInstance] Fetched TaskQueueRealTimeStatisticsInstance def fetch(task_channel: :unset) - context.fetch(task_channel: task_channel,) + context.fetch(task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb index 9f7ce70fd..3dd0d7d5d 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, task_queue_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid,} + @solution = {workspace_sid: workspace_sid, task_queue_sid: task_queue_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/#{@solution[:task_queue_sid]}/Statistics" end @@ -142,7 +142,7 @@ def initialize(version, payload, workspace_sid: nil, task_queue_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid,} + @params = {'workspace_sid' => workspace_sid, 'task_queue_sid' => task_queue_sid} end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb index 4d88ce15d..f3a987f28 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb @@ -94,7 +94,7 @@ def stream(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -173,7 +173,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TaskQueuesStatisticsInstance] TaskQueuesStatisticsInstance def get_instance(payload) - TaskQueuesStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + TaskQueuesStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb index 85365665b..7248f1ee2 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb @@ -100,7 +100,7 @@ def stream(activity_name: :unset, activity_sid: :unset, available: :unset, frien def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -175,7 +175,7 @@ def create(friendly_name: nil, activity_sid: :unset, attributes: :unset) data: data ) - WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -183,9 +183,9 @@ def create(friendly_name: nil, activity_sid: :unset, attributes: :unset) # @return [WorkersStatisticsList] # @return [WorkersStatisticsContext] def statistics - return WorkersStatisticsContext.new(@version, @solution[:workspace_sid],) + return WorkersStatisticsContext.new(@version, @solution[:workspace_sid]) - @statistics ||= WorkersStatisticsList.new(@version, workspace_sid: @solution[:workspace_sid],) + @statistics ||= WorkersStatisticsList.new(@version, workspace_sid: @solution[:workspace_sid]) end ## @@ -214,7 +214,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkerInstance] WorkerInstance def get_instance(payload) - WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -235,7 +235,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/#{@solution[:sid]}" # Dependents @@ -258,7 +258,7 @@ def fetch params, ) - WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -280,7 +280,7 @@ def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset) data: data, ) - WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + WorkerInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -295,7 +295,7 @@ def delete # @return [WorkersRealTimeStatisticsList] # @return [WorkersRealTimeStatisticsContext] def real_time_statistics - WorkersRealTimeStatisticsContext.new(@version, @solution[:workspace_sid],) + WorkersRealTimeStatisticsContext.new(@version, @solution[:workspace_sid]) end ## @@ -303,7 +303,7 @@ def real_time_statistics # @return [WorkersCumulativeStatisticsList] # @return [WorkersCumulativeStatisticsContext] def cumulative_statistics - WorkersCumulativeStatisticsContext.new(@version, @solution[:workspace_sid],) + WorkersCumulativeStatisticsContext.new(@version, @solution[:workspace_sid]) end ## @@ -311,7 +311,7 @@ def cumulative_statistics # @return [WorkerStatisticsList] # @return [WorkerStatisticsContext] def statistics - WorkerStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + WorkerStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -322,7 +322,7 @@ def reservations(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid,) + return ReservationContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid) end unless @reservations @@ -344,7 +344,7 @@ def worker_channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return WorkerChannelContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid,) + return WorkerChannelContext.new(@version, @solution[:workspace_sid], @solution[:sid], sid) end unless @worker_channels @@ -396,7 +396,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -405,7 +405,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [WorkerContext] WorkerContext for this WorkerInstance def context unless @instance_context - @instance_context = WorkerContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = WorkerContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end @@ -502,7 +502,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [WorkerInstance] Updated WorkerInstance def update(activity_sid: :unset, attributes: :unset, friendly_name: :unset) - context.update(activity_sid: activity_sid, attributes: attributes, friendly_name: friendly_name,) + context.update(activity_sid: activity_sid, attributes: attributes, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb index 03afa0c45..5ec1e3884 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb @@ -56,7 +56,7 @@ def list(reservation_status: :unset, limit: nil, page_size: nil) def stream(reservation_status: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(reservation_status: reservation_status, page_size: limits[:page_size],) + page = self.page(reservation_status: reservation_status, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -68,7 +68,7 @@ def stream(reservation_status: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, workspace_sid, worker_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/#{@solution[:worker_sid]}/Reservations/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb index a6acd2944..24ff5f962 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, workspace_sid, worker_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/#{@solution[:worker_sid]}/Channels/#{@solution[:sid]}" end @@ -191,7 +191,7 @@ def fetch # @param [Boolean] available The available # @return [WorkerChannelInstance] Updated WorkerChannelInstance def update(capacity: :unset, available: :unset) - data = Twilio::Values.of({'Capacity' => capacity, 'Available' => available,}) + data = Twilio::Values.of({'Capacity' => capacity, 'Available' => available}) payload = @version.update( 'POST', @@ -368,7 +368,7 @@ def fetch # @param [Boolean] available The available # @return [WorkerChannelInstance] Updated WorkerChannelInstance def update(capacity: :unset, available: :unset) - context.update(capacity: capacity, available: available,) + context.update(capacity: capacity, available: available) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb index e0fc540c3..92fdd59a1 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, worker_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid,} + @solution = {workspace_sid: workspace_sid, worker_sid: worker_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/#{@solution[:worker_sid]}/Statistics" end @@ -139,7 +139,7 @@ def initialize(version, payload, workspace_sid: nil, worker_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'worker_sid' => worker_sid,} + @params = {'workspace_sid' => workspace_sid, 'worker_sid' => worker_sid} end ## @@ -195,7 +195,7 @@ def url # @param [String] task_channel The task_channel # @return [WorkerStatisticsInstance] Fetched WorkerStatisticsInstance def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: :unset) - context.fetch(minutes: minutes, start_date: start_date, end_date: end_date, task_channel: task_channel,) + context.fetch(minutes: minutes, start_date: start_date, end_date: end_date, task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb index 71506a0a1..c2af40afe 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb @@ -49,7 +49,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkersCumulativeStatisticsInstance] WorkersCumulativeStatisticsInstance def get_instance(payload) - WorkersCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -69,7 +69,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/CumulativeStatistics" end @@ -94,7 +94,7 @@ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: : params, ) - WorkersCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -133,7 +133,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -142,7 +142,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkersCumulativeStatisticsContext] WorkersCumulativeStatisticsContext for this WorkersCumulativeStatisticsInstance def context unless @instance_context - @instance_context = WorkersCumulativeStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkersCumulativeStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end @@ -227,7 +227,7 @@ def url # @param [String] task_channel The task_channel # @return [WorkersCumulativeStatisticsInstance] Fetched WorkersCumulativeStatisticsInstance def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset) - context.fetch(end_date: end_date, minutes: minutes, start_date: start_date, task_channel: task_channel,) + context.fetch(end_date: end_date, minutes: minutes, start_date: start_date, task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb index 7c1fa6752..a8f44cd58 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb @@ -49,7 +49,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkersRealTimeStatisticsInstance] WorkersRealTimeStatisticsInstance def get_instance(payload) - WorkersRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -69,7 +69,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/RealTimeStatistics" end @@ -78,7 +78,7 @@ def initialize(version, workspace_sid) # @param [String] task_channel The task_channel # @return [WorkersRealTimeStatisticsInstance] Fetched WorkersRealTimeStatisticsInstance def fetch(task_channel: :unset) - params = Twilio::Values.of({'TaskChannel' => task_channel,}) + params = Twilio::Values.of({'TaskChannel' => task_channel}) payload = @version.fetch( 'GET', @@ -86,7 +86,7 @@ def fetch(task_channel: :unset) params, ) - WorkersRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -118,7 +118,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -127,7 +127,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkersRealTimeStatisticsContext] WorkersRealTimeStatisticsContext for this WorkersRealTimeStatisticsInstance def context unless @instance_context - @instance_context = WorkersRealTimeStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkersRealTimeStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end @@ -167,7 +167,7 @@ def url # @param [String] task_channel The task_channel # @return [WorkersRealTimeStatisticsInstance] Fetched WorkersRealTimeStatisticsInstance def fetch(task_channel: :unset) - context.fetch(task_channel: task_channel,) + context.fetch(task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb index 24664d17e..74ae51ae2 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb @@ -49,7 +49,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkersStatisticsInstance] WorkersStatisticsInstance def get_instance(payload) - WorkersStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -69,7 +69,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/Statistics" end @@ -100,7 +100,7 @@ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_queue_sid: params, ) - WorkersStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkersStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -132,7 +132,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -141,7 +141,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkersStatisticsContext] WorkersStatisticsContext for this WorkersStatisticsInstance def context unless @instance_context - @instance_context = WorkersStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkersStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb index 24970f47a..acb4ded65 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb @@ -54,7 +54,7 @@ def list(friendly_name: :unset, limit: nil, page_size: nil) def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(friendly_name: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -134,7 +134,7 @@ def create(friendly_name: nil, configuration: nil, assignment_callback_url: :uns data: data ) - WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -163,7 +163,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkflowInstance] WorkflowInstance def get_instance(payload) - WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -184,7 +184,7 @@ def initialize(version, workspace_sid, sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, sid: sid,} + @solution = {workspace_sid: workspace_sid, sid: sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:sid]}" # Dependents @@ -205,7 +205,7 @@ def fetch params, ) - WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -232,7 +232,7 @@ def update(friendly_name: :unset, assignment_callback_url: :unset, fallback_assi data: data, ) - WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid],) + WorkflowInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid], sid: @solution[:sid]) end ## @@ -247,7 +247,7 @@ def delete # @return [WorkflowStatisticsList] # @return [WorkflowStatisticsContext] def statistics - WorkflowStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + WorkflowStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -255,7 +255,7 @@ def statistics # @return [WorkflowRealTimeStatisticsList] # @return [WorkflowRealTimeStatisticsContext] def real_time_statistics - WorkflowRealTimeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + WorkflowRealTimeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -263,7 +263,7 @@ def real_time_statistics # @return [WorkflowCumulativeStatisticsList] # @return [WorkflowCumulativeStatisticsContext] def cumulative_statistics - WorkflowCumulativeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid],) + WorkflowCumulativeStatisticsContext.new(@version, @solution[:workspace_sid], @solution[:sid]) end ## @@ -304,7 +304,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid'],} + @params = {'workspace_sid' => workspace_sid, 'sid' => sid || @properties['sid']} end ## @@ -313,7 +313,7 @@ def initialize(version, payload, workspace_sid: nil, sid: nil) # @return [WorkflowContext] WorkflowContext for this WorkflowInstance def context unless @instance_context - @instance_context = WorkflowContext.new(@version, @params['workspace_sid'], @params['sid'],) + @instance_context = WorkflowContext.new(@version, @params['workspace_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb index 208d0c296..1c2768c36 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, workflow_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid,} + @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/CumulativeStatistics" end @@ -158,7 +158,7 @@ def initialize(version, payload, workspace_sid: nil, workflow_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid,} + @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid} end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb index 20d1b394d..ebe9b3e1f 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, workflow_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid,} + @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/RealTimeStatistics" end @@ -85,7 +85,7 @@ def initialize(version, workspace_sid, workflow_sid) # @param [String] task_channel The task_channel # @return [WorkflowRealTimeStatisticsInstance] Fetched WorkflowRealTimeStatisticsInstance def fetch(task_channel: :unset) - params = Twilio::Values.of({'TaskChannel' => task_channel,}) + params = Twilio::Values.of({'TaskChannel' => task_channel}) payload = @version.fetch( 'GET', @@ -134,7 +134,7 @@ def initialize(version, payload, workspace_sid: nil, workflow_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid,} + @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid} end ## @@ -205,7 +205,7 @@ def url # @param [String] task_channel The task_channel # @return [WorkflowRealTimeStatisticsInstance] Fetched WorkflowRealTimeStatisticsInstance def fetch(task_channel: :unset) - context.fetch(task_channel: task_channel,) + context.fetch(task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb index a3ac1cbc2..db1a2b408 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb @@ -76,7 +76,7 @@ def initialize(version, workspace_sid, workflow_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid,} + @solution = {workspace_sid: workspace_sid, workflow_sid: workflow_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/Statistics" end @@ -142,7 +142,7 @@ def initialize(version, payload, workspace_sid: nil, workflow_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid,} + @params = {'workspace_sid' => workspace_sid, 'workflow_sid' => workflow_sid} end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb index 19797efad..063e702ff 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb @@ -48,7 +48,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkspaceCumulativeStatisticsInstance] WorkspaceCumulativeStatisticsInstance def get_instance(payload) - WorkspaceCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -68,7 +68,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/CumulativeStatistics" end @@ -95,7 +95,7 @@ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: : params, ) - WorkspaceCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceCumulativeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -143,7 +143,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -152,7 +152,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkspaceCumulativeStatisticsContext] WorkspaceCumulativeStatisticsContext for this WorkspaceCumulativeStatisticsInstance def context unless @instance_context - @instance_context = WorkspaceCumulativeStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkspaceCumulativeStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb index 176245b25..8e5780892 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb @@ -48,7 +48,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkspaceRealTimeStatisticsInstance] WorkspaceRealTimeStatisticsInstance def get_instance(payload) - WorkspaceRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -68,7 +68,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/RealTimeStatistics" end @@ -77,7 +77,7 @@ def initialize(version, workspace_sid) # @param [String] task_channel The task_channel # @return [WorkspaceRealTimeStatisticsInstance] Fetched WorkspaceRealTimeStatisticsInstance def fetch(task_channel: :unset) - params = Twilio::Values.of({'TaskChannel' => task_channel,}) + params = Twilio::Values.of({'TaskChannel' => task_channel}) payload = @version.fetch( 'GET', @@ -85,7 +85,7 @@ def fetch(task_channel: :unset) params, ) - WorkspaceRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceRealTimeStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -121,7 +121,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -130,7 +130,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkspaceRealTimeStatisticsContext] WorkspaceRealTimeStatisticsContext for this WorkspaceRealTimeStatisticsInstance def context unless @instance_context - @instance_context = WorkspaceRealTimeStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkspaceRealTimeStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end @@ -194,7 +194,7 @@ def url # @param [String] task_channel The task_channel # @return [WorkspaceRealTimeStatisticsInstance] Fetched WorkspaceRealTimeStatisticsInstance def fetch(task_channel: :unset) - context.fetch(task_channel: task_channel,) + context.fetch(task_channel: task_channel) end ## diff --git a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb index a17f730ee..3e613a205 100644 --- a/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +++ b/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb @@ -48,7 +48,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [WorkspaceStatisticsInstance] WorkspaceStatisticsInstance def get_instance(payload) - WorkspaceStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -68,7 +68,7 @@ def initialize(version, workspace_sid) super(version) # Path Solution - @solution = {workspace_sid: workspace_sid,} + @solution = {workspace_sid: workspace_sid} @uri = "/Workspaces/#{@solution[:workspace_sid]}/Statistics" end @@ -95,7 +95,7 @@ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: : params, ) - WorkspaceStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid],) + WorkspaceStatisticsInstance.new(@version, payload, workspace_sid: @solution[:workspace_sid]) end ## @@ -127,7 +127,7 @@ def initialize(version, payload, workspace_sid: nil) # Context @instance_context = nil - @params = {'workspace_sid' => workspace_sid,} + @params = {'workspace_sid' => workspace_sid} end ## @@ -136,7 +136,7 @@ def initialize(version, payload, workspace_sid: nil) # @return [WorkspaceStatisticsContext] WorkspaceStatisticsContext for this WorkspaceStatisticsInstance def context unless @instance_context - @instance_context = WorkspaceStatisticsContext.new(@version, @params['workspace_sid'],) + @instance_context = WorkspaceStatisticsContext.new(@version, @params['workspace_sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/trunking/v1.rb b/lib/twilio-ruby/rest/trunking/v1.rb index ac203eaca..2e62d9c16 100644 --- a/lib/twilio-ruby/rest/trunking/v1.rb +++ b/lib/twilio-ruby/rest/trunking/v1.rb @@ -18,7 +18,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Trunking::V1::TrunkInstance] if sid was passed. + # @return [Twilio::REST::Trunking::V1::TrunkContext] if sid was passed. # @return [Twilio::REST::Trunking::V1::TrunkList] def trunks(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/trunking/v1/trunk.rb b/lib/twilio-ruby/rest/trunking/v1/trunk.rb index fc3f86bfa..2569fa457 100644 --- a/lib/twilio-ruby/rest/trunking/v1/trunk.rb +++ b/lib/twilio-ruby/rest/trunking/v1/trunk.rb @@ -47,7 +47,7 @@ def create(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :u data: data ) - TrunkInstance.new(@version, payload,) + TrunkInstance.new(@version, payload) end ## @@ -79,7 +79,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [TrunkInstance] TrunkInstance def get_instance(payload) - TrunkInstance.new(@version, payload,) + TrunkInstance.new(@version, payload) end ## @@ -178,7 +178,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Trunks/#{@solution[:sid]}" # Dependents @@ -200,7 +200,7 @@ def fetch params, ) - TrunkInstance.new(@version, payload, sid: @solution[:sid],) + TrunkInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -235,7 +235,7 @@ def update(friendly_name: :unset, domain_name: :unset, disaster_recovery_url: :u data: data, ) - TrunkInstance.new(@version, payload, sid: @solution[:sid],) + TrunkInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -246,11 +246,11 @@ def origination_urls(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return OriginationUrlContext.new(@version, @solution[:sid], sid,) + return OriginationUrlContext.new(@version, @solution[:sid], sid) end unless @origination_urls - @origination_urls = OriginationUrlList.new(@version, trunk_sid: @solution[:sid],) + @origination_urls = OriginationUrlList.new(@version, trunk_sid: @solution[:sid]) end @origination_urls @@ -264,11 +264,11 @@ def credentials_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return CredentialListContext.new(@version, @solution[:sid], sid,) + return CredentialListContext.new(@version, @solution[:sid], sid) end unless @credentials_lists - @credentials_lists = CredentialListList.new(@version, trunk_sid: @solution[:sid],) + @credentials_lists = CredentialListList.new(@version, trunk_sid: @solution[:sid]) end @credentials_lists @@ -282,11 +282,11 @@ def ip_access_control_lists(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return IpAccessControlListContext.new(@version, @solution[:sid], sid,) + return IpAccessControlListContext.new(@version, @solution[:sid], sid) end unless @ip_access_control_lists - @ip_access_control_lists = IpAccessControlListList.new(@version, trunk_sid: @solution[:sid],) + @ip_access_control_lists = IpAccessControlListList.new(@version, trunk_sid: @solution[:sid]) end @ip_access_control_lists @@ -300,11 +300,11 @@ def phone_numbers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PhoneNumberContext.new(@version, @solution[:sid], sid,) + return PhoneNumberContext.new(@version, @solution[:sid], sid) end unless @phone_numbers - @phone_numbers = PhoneNumberList.new(@version, trunk_sid: @solution[:sid],) + @phone_numbers = PhoneNumberList.new(@version, trunk_sid: @solution[:sid]) end @phone_numbers @@ -348,7 +348,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -357,7 +357,7 @@ def initialize(version, payload, sid: nil) # @return [TrunkContext] TrunkContext for this TrunkInstance def context unless @instance_context - @instance_context = TrunkContext.new(@version, @params['sid'],) + @instance_context = TrunkContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb b/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb index 4fe0dd6d4..1dbec6941 100644 --- a/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +++ b/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb @@ -29,7 +29,7 @@ def initialize(version, trunk_sid: nil) # @param [String] credential_list_sid The credential_list_sid # @return [CredentialListInstance] Newly created CredentialListInstance def create(credential_list_sid: nil) - data = Twilio::Values.of({'CredentialListSid' => credential_list_sid,}) + data = Twilio::Values.of({'CredentialListSid' => credential_list_sid}) payload = @version.create( 'POST', @@ -37,7 +37,7 @@ def create(credential_list_sid: nil) data: data ) - CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -69,7 +69,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -81,7 +81,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -148,7 +148,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CredentialListInstance] CredentialListInstance def get_instance(payload) - CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -169,7 +169,7 @@ def initialize(version, trunk_sid, sid) super(version) # Path Solution - @solution = {trunk_sid: trunk_sid, sid: sid,} + @solution = {trunk_sid: trunk_sid, sid: sid} @uri = "/Trunks/#{@solution[:trunk_sid]}/CredentialLists/#{@solution[:sid]}" end @@ -185,7 +185,7 @@ def fetch params, ) - CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid],) + CredentialListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid]) end ## @@ -227,7 +227,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'],} + @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid']} end ## @@ -236,7 +236,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # @return [CredentialListContext] CredentialListContext for this CredentialListInstance def context unless @instance_context - @instance_context = CredentialListContext.new(@version, @params['trunk_sid'], @params['sid'],) + @instance_context = CredentialListContext.new(@version, @params['trunk_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb b/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb index c081d6d45..a92e0ed31 100644 --- a/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +++ b/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb @@ -29,7 +29,7 @@ def initialize(version, trunk_sid: nil) # @param [String] ip_access_control_list_sid The ip_access_control_list_sid # @return [IpAccessControlListInstance] Newly created IpAccessControlListInstance def create(ip_access_control_list_sid: nil) - data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid,}) + data = Twilio::Values.of({'IpAccessControlListSid' => ip_access_control_list_sid}) payload = @version.create( 'POST', @@ -37,7 +37,7 @@ def create(ip_access_control_list_sid: nil) data: data ) - IpAccessControlListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + IpAccessControlListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -69,7 +69,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -81,7 +81,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -148,7 +148,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [IpAccessControlListInstance] IpAccessControlListInstance def get_instance(payload) - IpAccessControlListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + IpAccessControlListInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -169,7 +169,7 @@ def initialize(version, trunk_sid, sid) super(version) # Path Solution - @solution = {trunk_sid: trunk_sid, sid: sid,} + @solution = {trunk_sid: trunk_sid, sid: sid} @uri = "/Trunks/#{@solution[:trunk_sid]}/IpAccessControlLists/#{@solution[:sid]}" end @@ -232,7 +232,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'],} + @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid']} end ## @@ -241,7 +241,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # @return [IpAccessControlListContext] IpAccessControlListContext for this IpAccessControlListInstance def context unless @instance_context - @instance_context = IpAccessControlListContext.new(@version, @params['trunk_sid'], @params['sid'],) + @instance_context = IpAccessControlListContext.new(@version, @params['trunk_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb b/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb index 1d4c87b49..bef753ce4 100644 --- a/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +++ b/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb @@ -47,7 +47,7 @@ def create(weight: nil, priority: nil, enabled: nil, friendly_name: nil, sip_url data: data ) - OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -79,7 +79,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -91,7 +91,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -158,7 +158,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [OriginationUrlInstance] OriginationUrlInstance def get_instance(payload) - OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -179,7 +179,7 @@ def initialize(version, trunk_sid, sid) super(version) # Path Solution - @solution = {trunk_sid: trunk_sid, sid: sid,} + @solution = {trunk_sid: trunk_sid, sid: sid} @uri = "/Trunks/#{@solution[:trunk_sid]}/OriginationUrls/#{@solution[:sid]}" end @@ -195,7 +195,7 @@ def fetch params, ) - OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid],) + OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid]) end ## @@ -228,7 +228,7 @@ def update(weight: :unset, priority: :unset, enabled: :unset, friendly_name: :un data: data, ) - OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid],) + OriginationUrlInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid]) end ## @@ -267,7 +267,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'],} + @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid']} end ## @@ -276,7 +276,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # @return [OriginationUrlContext] OriginationUrlContext for this OriginationUrlInstance def context unless @instance_context - @instance_context = OriginationUrlContext.new(@version, @params['trunk_sid'], @params['sid'],) + @instance_context = OriginationUrlContext.new(@version, @params['trunk_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb b/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb index e4eabdc56..f2caccbb1 100644 --- a/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +++ b/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb @@ -29,7 +29,7 @@ def initialize(version, trunk_sid: nil) # @param [String] phone_number_sid The phone_number_sid # @return [PhoneNumberInstance] Newly created PhoneNumberInstance def create(phone_number_sid: nil) - data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid,}) + data = Twilio::Values.of({'PhoneNumberSid' => phone_number_sid}) payload = @version.create( 'POST', @@ -37,7 +37,7 @@ def create(phone_number_sid: nil) data: data ) - PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -69,7 +69,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -81,7 +81,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -148,7 +148,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [PhoneNumberInstance] PhoneNumberInstance def get_instance(payload) - PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid],) + PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid]) end ## @@ -169,7 +169,7 @@ def initialize(version, trunk_sid, sid) super(version) # Path Solution - @solution = {trunk_sid: trunk_sid, sid: sid,} + @solution = {trunk_sid: trunk_sid, sid: sid} @uri = "/Trunks/#{@solution[:trunk_sid]}/PhoneNumbers/#{@solution[:sid]}" end @@ -185,7 +185,7 @@ def fetch params, ) - PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid],) + PhoneNumberInstance.new(@version, payload, trunk_sid: @solution[:trunk_sid], sid: @solution[:sid]) end ## @@ -246,7 +246,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid'],} + @params = {'trunk_sid' => trunk_sid, 'sid' => sid || @properties['sid']} end ## @@ -255,7 +255,7 @@ def initialize(version, payload, trunk_sid: nil, sid: nil) # @return [PhoneNumberContext] PhoneNumberContext for this PhoneNumberInstance def context unless @instance_context - @instance_context = PhoneNumberContext.new(@version, @params['trunk_sid'], @params['sid'],) + @instance_context = PhoneNumberContext.new(@version, @params['trunk_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/video/v1.rb b/lib/twilio-ruby/rest/video/v1.rb index 93b223f75..0d0522c3c 100644 --- a/lib/twilio-ruby/rest/video/v1.rb +++ b/lib/twilio-ruby/rest/video/v1.rb @@ -19,7 +19,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Video::V1::RecordingInstance] if sid was passed. + # @return [Twilio::REST::Video::V1::RecordingContext] if sid was passed. # @return [Twilio::REST::Video::V1::RecordingList] def recordings(sid=:unset) if sid.nil? @@ -33,7 +33,7 @@ def recordings(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Video::V1::RoomInstance] if sid was passed. + # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed. # @return [Twilio::REST::Video::V1::RoomList] def rooms(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/video/v1/recording.rb b/lib/twilio-ruby/rest/video/v1/recording.rb index 27c407704..113f2e257 100644 --- a/lib/twilio-ruby/rest/video/v1/recording.rb +++ b/lib/twilio-ruby/rest/video/v1/recording.rb @@ -87,7 +87,7 @@ def stream(status: :unset, source_sid: :unset, grouping_sid: :unset, date_create def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -164,7 +164,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RecordingInstance] RecordingInstance def get_instance(payload) - RecordingInstance.new(@version, payload,) + RecordingInstance.new(@version, payload) end ## @@ -184,7 +184,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Recordings/#{@solution[:sid]}" end @@ -200,7 +200,7 @@ def fetch params, ) - RecordingInstance.new(@version, payload, sid: @solution[:sid],) + RecordingInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -247,7 +247,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -256,7 +256,7 @@ def initialize(version, payload, sid: nil) # @return [RecordingContext] RecordingContext for this RecordingInstance def context unless @instance_context - @instance_context = RecordingContext.new(@version, @params['sid'],) + @instance_context = RecordingContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/video/v1/room.rb b/lib/twilio-ruby/rest/video/v1/room.rb index 9ecbf1002..2c4e21c1e 100644 --- a/lib/twilio-ruby/rest/video/v1/room.rb +++ b/lib/twilio-ruby/rest/video/v1/room.rb @@ -54,7 +54,7 @@ def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callba data: data ) - RoomInstance.new(@version, payload,) + RoomInstance.new(@version, payload) end ## @@ -119,7 +119,7 @@ def stream(status: :unset, unique_name: :unset, date_created_after: :unset, date def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -194,7 +194,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoomInstance] RoomInstance def get_instance(payload) - RoomInstance.new(@version, payload,) + RoomInstance.new(@version, payload) end ## @@ -214,7 +214,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Rooms/#{@solution[:sid]}" # Dependents @@ -234,7 +234,7 @@ def fetch params, ) - RoomInstance.new(@version, payload, sid: @solution[:sid],) + RoomInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -242,7 +242,7 @@ def fetch # @param [room.RoomStatus] status The status # @return [RoomInstance] Updated RoomInstance def update(status: nil) - data = Twilio::Values.of({'Status' => status,}) + data = Twilio::Values.of({'Status' => status}) payload = @version.update( 'POST', @@ -250,7 +250,7 @@ def update(status: nil) data: data, ) - RoomInstance.new(@version, payload, sid: @solution[:sid],) + RoomInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -261,11 +261,11 @@ def recordings(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoomRecordingContext.new(@version, @solution[:sid], sid,) + return RoomRecordingContext.new(@version, @solution[:sid], sid) end unless @recordings - @recordings = RoomRecordingList.new(@version, room_sid: @solution[:sid],) + @recordings = RoomRecordingList.new(@version, room_sid: @solution[:sid]) end @recordings @@ -279,11 +279,11 @@ def participants(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return RoomParticipantContext.new(@version, @solution[:sid], sid,) + return RoomParticipantContext.new(@version, @solution[:sid], sid) end unless @participants - @participants = RoomParticipantList.new(@version, room_sid: @solution[:sid],) + @participants = RoomParticipantList.new(@version, room_sid: @solution[:sid]) end @participants @@ -330,7 +330,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -339,7 +339,7 @@ def initialize(version, payload, sid: nil) # @return [RoomContext] RoomContext for this RoomInstance def context unless @instance_context - @instance_context = RoomContext.new(@version, @params['sid'],) + @instance_context = RoomContext.new(@version, @params['sid']) end @instance_context end @@ -458,7 +458,7 @@ def fetch # @param [room.RoomStatus] status The status # @return [RoomInstance] Updated RoomInstance def update(status: nil) - context.update(status: status,) + context.update(status: status) end ## diff --git a/lib/twilio-ruby/rest/video/v1/room/recording.rb b/lib/twilio-ruby/rest/video/v1/room/recording.rb index 76a9d142e..2776c0f01 100644 --- a/lib/twilio-ruby/rest/video/v1/room/recording.rb +++ b/lib/twilio-ruby/rest/video/v1/room/recording.rb @@ -85,7 +85,7 @@ def stream(status: :unset, source_sid: :unset, date_created_after: :unset, date_ def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoomRecordingInstance] RoomRecordingInstance def get_instance(payload) - RoomRecordingInstance.new(@version, payload, room_sid: @solution[:room_sid],) + RoomRecordingInstance.new(@version, payload, room_sid: @solution[:room_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, room_sid, sid) super(version) # Path Solution - @solution = {room_sid: room_sid, sid: sid,} + @solution = {room_sid: room_sid, sid: sid} @uri = "/Rooms/#{@solution[:room_sid]}/Recordings/#{@solution[:sid]}" end @@ -197,7 +197,7 @@ def fetch params, ) - RoomRecordingInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid],) + RoomRecordingInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid]) end ## @@ -239,7 +239,7 @@ def initialize(version, payload, room_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'room_sid' => room_sid, 'sid' => sid || @properties['sid'],} + @params = {'room_sid' => room_sid, 'sid' => sid || @properties['sid']} end ## @@ -248,7 +248,7 @@ def initialize(version, payload, room_sid: nil, sid: nil) # @return [RoomRecordingContext] RoomRecordingContext for this RoomRecordingInstance def context unless @instance_context - @instance_context = RoomRecordingContext.new(@version, @params['room_sid'], @params['sid'],) + @instance_context = RoomRecordingContext.new(@version, @params['room_sid'], @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/video/v1/room/room_participant.rb b/lib/twilio-ruby/rest/video/v1/room/room_participant.rb index 69a1d0a62..b451ba3fd 100644 --- a/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +++ b/lib/twilio-ruby/rest/video/v1/room/room_participant.rb @@ -85,7 +85,7 @@ def stream(status: :unset, identity: :unset, date_created_after: :unset, date_cr def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RoomParticipantInstance] RoomParticipantInstance def get_instance(payload) - RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid],) + RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid]) end ## @@ -181,7 +181,7 @@ def initialize(version, room_sid, sid) super(version) # Path Solution - @solution = {room_sid: room_sid, sid: sid,} + @solution = {room_sid: room_sid, sid: sid} @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:sid]}" # Dependents @@ -200,7 +200,7 @@ def fetch params, ) - RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid],) + RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid]) end ## @@ -208,7 +208,7 @@ def fetch # @param [room_participant.Status] status The status # @return [RoomParticipantInstance] Updated RoomParticipantInstance def update(status: :unset) - data = Twilio::Values.of({'Status' => status,}) + data = Twilio::Values.of({'Status' => status}) payload = @version.update( 'POST', @@ -216,7 +216,7 @@ def update(status: :unset) data: data, ) - RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid],) + RoomParticipantInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid]) end ## @@ -227,7 +227,7 @@ def published_tracks(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return PublishedTrackContext.new(@version, @solution[:room_sid], @solution[:sid], sid,) + return PublishedTrackContext.new(@version, @solution[:room_sid], @solution[:sid], sid) end unless @published_tracks @@ -278,7 +278,7 @@ def initialize(version, payload, room_sid: nil, sid: nil) # Context @instance_context = nil - @params = {'room_sid' => room_sid, 'sid' => sid || @properties['sid'],} + @params = {'room_sid' => room_sid, 'sid' => sid || @properties['sid']} end ## @@ -287,7 +287,7 @@ def initialize(version, payload, room_sid: nil, sid: nil) # @return [RoomParticipantContext] RoomParticipantContext for this RoomParticipantInstance def context unless @instance_context - @instance_context = RoomParticipantContext.new(@version, @params['room_sid'], @params['sid'],) + @instance_context = RoomParticipantContext.new(@version, @params['room_sid'], @params['sid']) end @instance_context end @@ -376,7 +376,7 @@ def fetch # @param [room_participant.Status] status The status # @return [RoomParticipantInstance] Updated RoomParticipantInstance def update(status: :unset) - context.update(status: status,) + context.update(status: status) end ## diff --git a/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb b/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb index d54de6aff..9c5062b28 100644 --- a/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +++ b/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb @@ -54,7 +54,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -66,7 +66,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -160,7 +160,7 @@ def initialize(version, room_sid, participant_sid, sid) super(version) # Path Solution - @solution = {room_sid: room_sid, participant_sid: participant_sid, sid: sid,} + @solution = {room_sid: room_sid, participant_sid: participant_sid, sid: sid} @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:participant_sid]}/PublishedTracks/#{@solution[:sid]}" end diff --git a/lib/twilio-ruby/rest/wireless/v1.rb b/lib/twilio-ruby/rest/wireless/v1.rb index 7dcef2cf3..71cf8fe3e 100644 --- a/lib/twilio-ruby/rest/wireless/v1.rb +++ b/lib/twilio-ruby/rest/wireless/v1.rb @@ -20,7 +20,7 @@ def initialize(domain) ## # @param [String] sid The sid - # @return [Twilio::REST::Wireless::V1::CommandInstance] if sid was passed. + # @return [Twilio::REST::Wireless::V1::CommandContext] if sid was passed. # @return [Twilio::REST::Wireless::V1::CommandList] def commands(sid=:unset) if sid.nil? @@ -34,7 +34,7 @@ def commands(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Wireless::V1::RatePlanInstance] if sid was passed. + # @return [Twilio::REST::Wireless::V1::RatePlanContext] if sid was passed. # @return [Twilio::REST::Wireless::V1::RatePlanList] def rate_plans(sid=:unset) if sid.nil? @@ -48,7 +48,7 @@ def rate_plans(sid=:unset) ## # @param [String] sid The sid - # @return [Twilio::REST::Wireless::V1::SimInstance] if sid was passed. + # @return [Twilio::REST::Wireless::V1::SimContext] if sid was passed. # @return [Twilio::REST::Wireless::V1::SimList] def sims(sid=:unset) if sid.nil? diff --git a/lib/twilio-ruby/rest/wireless/v1/command.rb b/lib/twilio-ruby/rest/wireless/v1/command.rb index d5344d72b..a2bff1144 100644 --- a/lib/twilio-ruby/rest/wireless/v1/command.rb +++ b/lib/twilio-ruby/rest/wireless/v1/command.rb @@ -58,7 +58,7 @@ def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size],) + page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -143,7 +143,7 @@ def create(command: nil, sim: :unset, callback_method: :unset, callback_url: :un data: data ) - CommandInstance.new(@version, payload,) + CommandInstance.new(@version, payload) end ## @@ -174,7 +174,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [CommandInstance] CommandInstance def get_instance(payload) - CommandInstance.new(@version, payload,) + CommandInstance.new(@version, payload) end ## @@ -196,7 +196,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Commands/#{@solution[:sid]}" end @@ -212,7 +212,7 @@ def fetch params, ) - CommandInstance.new(@version, payload, sid: @solution[:sid],) + CommandInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -251,7 +251,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -260,7 +260,7 @@ def initialize(version, payload, sid: nil) # @return [CommandContext] CommandContext for this CommandInstance def context unless @instance_context - @instance_context = CommandContext.new(@version, @params['sid'],) + @instance_context = CommandContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb b/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb index 8b0f63fbc..0b9fc9fcc 100644 --- a/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +++ b/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb @@ -52,7 +52,7 @@ def list(limit: nil, page_size: nil) def stream(limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -64,7 +64,7 @@ def stream(limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -142,7 +142,7 @@ def create(unique_name: :unset, friendly_name: :unset, data_enabled: :unset, dat data: data ) - RatePlanInstance.new(@version, payload,) + RatePlanInstance.new(@version, payload) end ## @@ -173,7 +173,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [RatePlanInstance] RatePlanInstance def get_instance(payload) - RatePlanInstance.new(@version, payload,) + RatePlanInstance.new(@version, payload) end ## @@ -195,7 +195,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/RatePlans/#{@solution[:sid]}" end @@ -211,7 +211,7 @@ def fetch params, ) - RatePlanInstance.new(@version, payload, sid: @solution[:sid],) + RatePlanInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -220,7 +220,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [RatePlanInstance] Updated RatePlanInstance def update(unique_name: :unset, friendly_name: :unset) - data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name,}) + data = Twilio::Values.of({'UniqueName' => unique_name, 'FriendlyName' => friendly_name}) payload = @version.update( 'POST', @@ -228,7 +228,7 @@ def update(unique_name: :unset, friendly_name: :unset) data: data, ) - RatePlanInstance.new(@version, payload, sid: @solution[:sid],) + RatePlanInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -280,7 +280,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -289,7 +289,7 @@ def initialize(version, payload, sid: nil) # @return [RatePlanContext] RatePlanContext for this RatePlanInstance def context unless @instance_context - @instance_context = RatePlanContext.new(@version, @params['sid'],) + @instance_context = RatePlanContext.new(@version, @params['sid']) end @instance_context end @@ -403,7 +403,7 @@ def fetch # @param [String] friendly_name The friendly_name # @return [RatePlanInstance] Updated RatePlanInstance def update(unique_name: :unset, friendly_name: :unset) - context.update(unique_name: unique_name, friendly_name: friendly_name,) + context.update(unique_name: unique_name, friendly_name: friendly_name) end ## diff --git a/lib/twilio-ruby/rest/wireless/v1/sim.rb b/lib/twilio-ruby/rest/wireless/v1/sim.rb index 284d7fecc..7a1c12aa7 100644 --- a/lib/twilio-ruby/rest/wireless/v1/sim.rb +++ b/lib/twilio-ruby/rest/wireless/v1/sim.rb @@ -89,7 +89,7 @@ def stream(status: :unset, iccid: :unset, rate_plan: :unset, e_id: :unset, sim_r def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -168,7 +168,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [SimInstance] SimInstance def get_instance(payload) - SimInstance.new(@version, payload,) + SimInstance.new(@version, payload) end ## @@ -190,7 +190,7 @@ def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Sims/#{@solution[:sid]}" # Dependents @@ -210,7 +210,7 @@ def fetch params, ) - SimInstance.new(@version, payload, sid: @solution[:sid],) + SimInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -258,7 +258,7 @@ def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, f data: data, ) - SimInstance.new(@version, payload, sid: @solution[:sid],) + SimInstance.new(@version, payload, sid: @solution[:sid]) end ## @@ -267,7 +267,7 @@ def update(unique_name: :unset, callback_method: :unset, callback_url: :unset, f # @return [UsageRecordContext] def usage_records unless @usage_records - @usage_records = UsageRecordList.new(@version, sim_sid: @solution[:sid],) + @usage_records = UsageRecordList.new(@version, sim_sid: @solution[:sid]) end @usage_records @@ -279,7 +279,7 @@ def usage_records # @return [DataSessionContext] def data_sessions unless @data_sessions - @data_sessions = DataSessionList.new(@version, sim_sid: @solution[:sid],) + @data_sessions = DataSessionList.new(@version, sim_sid: @solution[:sid]) end @data_sessions @@ -334,7 +334,7 @@ def initialize(version, payload, sid: nil) # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## @@ -343,7 +343,7 @@ def initialize(version, payload, sid: nil) # @return [SimContext] SimContext for this SimInstance def context unless @instance_context - @instance_context = SimContext.new(@version, @params['sid'],) + @instance_context = SimContext.new(@version, @params['sid']) end @instance_context end diff --git a/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb b/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb index 90c47d33c..37ef8f410 100644 --- a/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +++ b/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb @@ -58,7 +58,7 @@ def list(end_: :unset, start: :unset, limit: nil, page_size: nil) def stream(end_: :unset, start: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(end_: end_, start: start, page_size: limits[:page_size],) + page = self.page(end_: end_, start: start, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -70,7 +70,7 @@ def stream(end_: :unset, start: :unset, limit: nil, page_size: nil) def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -143,7 +143,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [DataSessionInstance] DataSessionInstance def get_instance(payload) - DataSessionInstance.new(@version, payload, sim_sid: @solution[:sim_sid],) + DataSessionInstance.new(@version, payload, sim_sid: @solution[:sim_sid]) end ## diff --git a/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb b/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb index b5d22379f..b397a2a28 100644 --- a/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +++ b/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb @@ -66,7 +66,7 @@ def list(end_: :unset, start: :unset, granularity: :unset, limit: nil, page_size def stream(end_: :unset, start: :unset, granularity: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(end_: end_, start: start, granularity: granularity, page_size: limits[:page_size],) + page = self.page(end_: end_, start: start, granularity: granularity, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end @@ -78,7 +78,7 @@ def stream(end_: :unset, start: :unset, granularity: :unset, limit: nil, page_si def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], @@ -153,7 +153,7 @@ def initialize(version, response, solution) # @param [Hash] payload Payload response from the API # @return [UsageRecordInstance] UsageRecordInstance def get_instance(payload) - UsageRecordInstance.new(@version, payload, sim_sid: @solution[:sim_sid],) + UsageRecordInstance.new(@version, payload, sim_sid: @solution[:sim_sid]) end ## diff --git a/spec/integration/accounts/v1/credential/aws_spec.rb b/spec/integration/accounts/v1/credential/aws_spec.rb new file mode 100644 index 000000000..fbb7c490d --- /dev/null +++ b/spec/integration/accounts/v1/credential/aws_spec.rb @@ -0,0 +1,224 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +require 'spec_helper.rb' + +describe 'Aws' do + it "can read" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.accounts.v1.credentials \ + .aws.list() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://accounts.twilio.com/v1/Credentials/AWS', + ))).to eq(true) + end + + it "receives read_empty responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "credentials": [], + "meta": { + "first_page_url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0", + "key": "credentials", + "next_page_url": null, + "page": 0, + "page_size": 50, + "previous_page_url": null, + "url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0" + } + } + ] + )) + + actual = @client.accounts.v1.credentials \ + .aws.list() + + expect(actual).to_not eq(nil) + end + + it "receives read_full responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "credentials": [ + { + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "date_created": "2015-07-31T04:00:00Z", + "date_updated": "2015-07-31T04:00:00Z", + "friendly_name": "friendly_name", + "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "meta": { + "first_page_url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0", + "key": "credentials", + "next_page_url": null, + "page": 0, + "page_size": 50, + "previous_page_url": null, + "url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0" + } + } + ] + )) + + actual = @client.accounts.v1.credentials \ + .aws.list() + + expect(actual).to_not eq(nil) + end + + it "can create" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.accounts.v1.credentials \ + .aws.create(credentials: "AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") + }.to raise_exception(Twilio::REST::TwilioError) + + values = {'Credentials' => "AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'post', + url: 'https://accounts.twilio.com/v1/Credentials/AWS', + data: values, + ))).to eq(true) + end + + it "receives create responses" do + @holodeck.mock(Twilio::Response.new( + 201, + %q[ + { + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "date_created": "2015-07-31T04:00:00Z", + "date_updated": "2015-07-31T04:00:00Z", + "friendly_name": "friendly_name", + "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + )) + + actual = @client.accounts.v1.credentials \ + .aws.create(credentials: "AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY") + + expect(actual).to_not eq(nil) + end + + it "can fetch" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives fetch responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "date_created": "2015-07-31T04:00:00Z", + "date_updated": "2015-07-31T04:00:00Z", + "friendly_name": "friendly_name", + "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + )) + + actual = @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + + expect(actual).to_not eq(nil) + end + + it "can update" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'post', + url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives update responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "date_created": "2015-07-31T04:00:00Z", + "date_updated": "2015-07-31T04:00:00Z", + "friendly_name": "friendly_name", + "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + )) + + actual = @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update() + + expect(actual).to_not eq(nil) + end + + it "can delete" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'delete', + url: 'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives delete responses" do + @holodeck.mock(Twilio::Response.new( + 204, + nil, + )) + + actual = @client.accounts.v1.credentials \ + .aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + + expect(actual).to eq(true) + end +end \ No newline at end of file diff --git a/spec/integration/accounts/v1/credential/public_key_spec.rb b/spec/integration/accounts/v1/credential/public_key_spec.rb index b44134643..bdb014b13 100644 --- a/spec/integration/accounts/v1/credential/public_key_spec.rb +++ b/spec/integration/accounts/v1/credential/public_key_spec.rb @@ -90,7 +90,7 @@ .public_key.create(public_key: "publickey") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PublicKey' => "publickey",} + values = {'PublicKey' => "publickey"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/application_spec.rb b/spec/integration/api/v2010/account/application_spec.rb index 233b90a9e..e6bde10c4 100644 --- a/spec/integration/api/v2010/account/application_spec.rb +++ b/spec/integration/api/v2010/account/application_spec.rb @@ -15,7 +15,7 @@ .applications.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/call/feedback_spec.rb b/spec/integration/api/v2010/account/call/feedback_spec.rb index 3b1fa7020..d2807ec42 100644 --- a/spec/integration/api/v2010/account/call/feedback_spec.rb +++ b/spec/integration/api/v2010/account/call/feedback_spec.rb @@ -16,7 +16,7 @@ .feedback().create(quality_score: 1) }.to raise_exception(Twilio::REST::TwilioError) - values = {'QualityScore' => 1,} + values = {'QualityScore' => 1} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -101,7 +101,7 @@ .feedback().update(quality_score: 1) }.to raise_exception(Twilio::REST::TwilioError) - values = {'QualityScore' => 1,} + values = {'QualityScore' => 1} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/call_spec.rb b/spec/integration/api/v2010/account/call_spec.rb index 902813362..32160576b 100644 --- a/spec/integration/api/v2010/account/call_spec.rb +++ b/spec/integration/api/v2010/account/call_spec.rb @@ -15,7 +15,7 @@ .calls.create(to: "+123456789", from: "+987654321") }.to raise_exception(Twilio::REST::TwilioError) - values = {'To' => "+123456789", 'From' => "+987654321",} + values = {'To' => "+123456789", 'From' => "+987654321"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/conference/participant_spec.rb b/spec/integration/api/v2010/account/conference/participant_spec.rb index 7082ac98e..d865034d8 100644 --- a/spec/integration/api/v2010/account/conference/participant_spec.rb +++ b/spec/integration/api/v2010/account/conference/participant_spec.rb @@ -104,7 +104,7 @@ .participants.create(from: "+987654321", to: "+123456789") }.to raise_exception(Twilio::REST::TwilioError) - values = {'From' => "+987654321", 'To' => "+123456789",} + values = {'From' => "+987654321", 'To' => "+123456789"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb b/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb index 0febe6059..4c34a1974 100644 --- a/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +++ b/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb @@ -149,7 +149,7 @@ .assigned_add_ons.create(installed_add_on_sid: "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'InstalledAddOnSid' => "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'InstalledAddOnSid' => "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb b/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb index 7ddfeb028..3954ec6e5 100644 --- a/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +++ b/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb @@ -124,7 +124,7 @@ .local.create(phone_number: "+987654321") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumber' => "+987654321",} + values = {'PhoneNumber' => "+987654321"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb b/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb index 17a8a6093..aad2ea539 100644 --- a/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +++ b/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb @@ -124,7 +124,7 @@ .mobile.create(phone_number: "+987654321") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumber' => "+987654321",} + values = {'PhoneNumber' => "+987654321"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb b/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb index 4dae3f819..3066de641 100644 --- a/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +++ b/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb @@ -124,7 +124,7 @@ .toll_free.create(phone_number: "+987654321") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumber' => "+987654321",} + values = {'PhoneNumber' => "+987654321"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/message_spec.rb b/spec/integration/api/v2010/account/message_spec.rb index 1b7953b38..2b88b2b8c 100644 --- a/spec/integration/api/v2010/account/message_spec.rb +++ b/spec/integration/api/v2010/account/message_spec.rb @@ -15,7 +15,7 @@ .messages.create(to: "+123456789") }.to raise_exception(Twilio::REST::TwilioError) - values = {'To' => "+123456789",} + values = {'To' => "+123456789"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -245,7 +245,7 @@ .messages("MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(body: "body") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Body' => "body",} + values = {'Body' => "body"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/queue/member_spec.rb b/spec/integration/api/v2010/account/queue/member_spec.rb index 78e402c1f..f2c416ab9 100644 --- a/spec/integration/api/v2010/account/queue/member_spec.rb +++ b/spec/integration/api/v2010/account/queue/member_spec.rb @@ -54,7 +54,7 @@ .members("CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(url: "https://example.com", method: "GET") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Url' => "https://example.com", 'Method' => "GET",} + values = {'Url' => "https://example.com", 'Method' => "GET"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/queue_spec.rb b/spec/integration/api/v2010/account/queue_spec.rb index 9bab40c20..b4cbe413e 100644 --- a/spec/integration/api/v2010/account/queue_spec.rb +++ b/spec/integration/api/v2010/account/queue_spec.rb @@ -205,7 +205,7 @@ .queues.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb b/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb index f4bbedd3b..b3355f7b4 100644 --- a/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +++ b/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb @@ -103,7 +103,7 @@ .credentials.create(username: "username", password: "password") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Username' => "username", 'Password' => "password",} + values = {'Username' => "username", 'Password' => "password"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/credential_list_spec.rb b/spec/integration/api/v2010/account/sip/credential_list_spec.rb index 100a2c24d..ce1b9fe16 100644 --- a/spec/integration/api/v2010/account/sip/credential_list_spec.rb +++ b/spec/integration/api/v2010/account/sip/credential_list_spec.rb @@ -91,7 +91,7 @@ .credential_lists.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -176,7 +176,7 @@ .credential_lists("CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb b/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb index eaeee6fa5..8738d9fc6 100644 --- a/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +++ b/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb @@ -17,7 +17,7 @@ .credential_list_mappings.create(credential_list_sid: "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'CredentialListSid' => "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'CredentialListSid' => "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb b/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb index 46f2fc175..cf3489881 100644 --- a/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +++ b/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb @@ -61,7 +61,7 @@ .ip_access_control_list_mappings.create(ip_access_control_list_sid: "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'IpAccessControlListSid' => "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'IpAccessControlListSid' => "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/domain_spec.rb b/spec/integration/api/v2010/account/sip/domain_spec.rb index 26abdc8e1..fe7e09c76 100644 --- a/spec/integration/api/v2010/account/sip/domain_spec.rb +++ b/spec/integration/api/v2010/account/sip/domain_spec.rb @@ -102,7 +102,7 @@ .domains.create(domain_name: "domain_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'DomainName' => "domain_name",} + values = {'DomainName' => "domain_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb b/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb index b0b4d2697..c2012a140 100644 --- a/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +++ b/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb @@ -104,7 +104,7 @@ .ip_addresses.create(friendly_name: "friendly_name", ip_address: "ip_address") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name", 'IpAddress' => "ip_address",} + values = {'FriendlyName' => "friendly_name", 'IpAddress' => "ip_address"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb b/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb index f836541ba..0daed5ea3 100644 --- a/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +++ b/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb @@ -101,7 +101,7 @@ .ip_access_control_lists.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -186,7 +186,7 @@ .ip_access_control_lists("ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/api/v2010/account/validation_request_spec.rb b/spec/integration/api/v2010/account/validation_request_spec.rb index a6e203cc8..c1e1b59f3 100644 --- a/spec/integration/api/v2010/account/validation_request_spec.rb +++ b/spec/integration/api/v2010/account/validation_request_spec.rb @@ -15,7 +15,7 @@ .validation_requests.create(phone_number: "+987654321") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumber' => "+987654321",} + values = {'PhoneNumber' => "+987654321"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/credential_spec.rb b/spec/integration/chat/v1/credential_spec.rb index 370fb959e..c6663ff66 100644 --- a/spec/integration/chat/v1/credential_spec.rb +++ b/spec/integration/chat/v1/credential_spec.rb @@ -88,7 +88,7 @@ @client.chat.v1.credentials.create(type: "gcm") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Type' => "gcm",} + values = {'Type' => "gcm"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service/channel/invite_spec.rb b/spec/integration/chat/v1/service/channel/invite_spec.rb index 5cb444bb8..76a78ccf1 100644 --- a/spec/integration/chat/v1/service/channel/invite_spec.rb +++ b/spec/integration/chat/v1/service/channel/invite_spec.rb @@ -59,7 +59,7 @@ .invites.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service/channel/member_spec.rb b/spec/integration/chat/v1/service/channel/member_spec.rb index 3e5351ffc..a377da630 100644 --- a/spec/integration/chat/v1/service/channel/member_spec.rb +++ b/spec/integration/chat/v1/service/channel/member_spec.rb @@ -60,7 +60,7 @@ .members.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service/channel/message_spec.rb b/spec/integration/chat/v1/service/channel/message_spec.rb index 47d5eab81..7adda65b4 100644 --- a/spec/integration/chat/v1/service/channel/message_spec.rb +++ b/spec/integration/chat/v1/service/channel/message_spec.rb @@ -62,7 +62,7 @@ .messages.create(body: "body") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Body' => "body",} + values = {'Body' => "body"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service/role_spec.rb b/spec/integration/chat/v1/service/role_spec.rb index acec8475d..5eb783e30 100644 --- a/spec/integration/chat/v1/service/role_spec.rb +++ b/spec/integration/chat/v1/service/role_spec.rb @@ -221,7 +221,7 @@ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e },} + values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e }} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service/user_spec.rb b/spec/integration/chat/v1/service/user_spec.rb index 659a5c00a..c16f44479 100644 --- a/spec/integration/chat/v1/service/user_spec.rb +++ b/spec/integration/chat/v1/service/user_spec.rb @@ -90,7 +90,7 @@ .users.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v1/service_spec.rb b/spec/integration/chat/v1/service_spec.rb index 78e4a32dd..dbbca1cf9 100644 --- a/spec/integration/chat/v1/service_spec.rb +++ b/spec/integration/chat/v1/service_spec.rb @@ -96,7 +96,7 @@ @client.chat.v1.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/credential_spec.rb b/spec/integration/chat/v2/credential_spec.rb index 4f138c9dc..223326b3c 100644 --- a/spec/integration/chat/v2/credential_spec.rb +++ b/spec/integration/chat/v2/credential_spec.rb @@ -88,7 +88,7 @@ @client.chat.v2.credentials.create(type: "gcm") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Type' => "gcm",} + values = {'Type' => "gcm"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/service/channel/invite_spec.rb b/spec/integration/chat/v2/service/channel/invite_spec.rb index e59884e36..3821757e8 100644 --- a/spec/integration/chat/v2/service/channel/invite_spec.rb +++ b/spec/integration/chat/v2/service/channel/invite_spec.rb @@ -59,7 +59,7 @@ .invites.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/service/channel/member_spec.rb b/spec/integration/chat/v2/service/channel/member_spec.rb index ae2a438bd..ae65dbc60 100644 --- a/spec/integration/chat/v2/service/channel/member_spec.rb +++ b/spec/integration/chat/v2/service/channel/member_spec.rb @@ -60,7 +60,7 @@ .members.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/service/role_spec.rb b/spec/integration/chat/v2/service/role_spec.rb index 4e4845c9e..9c0e0252f 100644 --- a/spec/integration/chat/v2/service/role_spec.rb +++ b/spec/integration/chat/v2/service/role_spec.rb @@ -221,7 +221,7 @@ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e },} + values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e }} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/service/user_spec.rb b/spec/integration/chat/v2/service/user_spec.rb index a2f1ac5c0..3a6ee0d58 100644 --- a/spec/integration/chat/v2/service/user_spec.rb +++ b/spec/integration/chat/v2/service/user_spec.rb @@ -91,7 +91,7 @@ .users.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/chat/v2/service_spec.rb b/spec/integration/chat/v2/service_spec.rb index 3c2f101d8..6d53195c1 100644 --- a/spec/integration/chat/v2/service_spec.rb +++ b/spec/integration/chat/v2/service_spec.rb @@ -105,7 +105,7 @@ @client.chat.v2.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/fax/v1/fax_spec.rb b/spec/integration/fax/v1/fax_spec.rb index e45fae379..ba30ce878 100644 --- a/spec/integration/fax/v1/fax_spec.rb +++ b/spec/integration/fax/v1/fax_spec.rb @@ -149,7 +149,7 @@ @client.fax.v1.faxes.create(to: "to", media_url: "https://example.com") }.to raise_exception(Twilio::REST::TwilioError) - values = {'To' => "to", 'MediaUrl' => "https://example.com",} + values = {'To' => "to", 'MediaUrl' => "https://example.com"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/credential_spec.rb b/spec/integration/ip_messaging/v1/credential_spec.rb index 23dd96eb1..7a39fd76c 100644 --- a/spec/integration/ip_messaging/v1/credential_spec.rb +++ b/spec/integration/ip_messaging/v1/credential_spec.rb @@ -88,7 +88,7 @@ @client.ip_messaging.v1.credentials.create(type: "gcm") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Type' => "gcm",} + values = {'Type' => "gcm"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb b/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb index 10a009f38..f027aa231 100644 --- a/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +++ b/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb @@ -59,7 +59,7 @@ .invites.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service/channel/member_spec.rb b/spec/integration/ip_messaging/v1/service/channel/member_spec.rb index 60527683c..80ecd8877 100644 --- a/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +++ b/spec/integration/ip_messaging/v1/service/channel/member_spec.rb @@ -60,7 +60,7 @@ .members.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service/channel/message_spec.rb b/spec/integration/ip_messaging/v1/service/channel/message_spec.rb index c2cadcfe5..7c0d53ba5 100644 --- a/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +++ b/spec/integration/ip_messaging/v1/service/channel/message_spec.rb @@ -62,7 +62,7 @@ .messages.create(body: "body") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Body' => "body",} + values = {'Body' => "body"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service/role_spec.rb b/spec/integration/ip_messaging/v1/service/role_spec.rb index d2d62f3a2..f341ca968 100644 --- a/spec/integration/ip_messaging/v1/service/role_spec.rb +++ b/spec/integration/ip_messaging/v1/service/role_spec.rb @@ -221,7 +221,7 @@ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e },} + values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e }} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service/user_spec.rb b/spec/integration/ip_messaging/v1/service/user_spec.rb index 6c24aeb49..dca6e5662 100644 --- a/spec/integration/ip_messaging/v1/service/user_spec.rb +++ b/spec/integration/ip_messaging/v1/service/user_spec.rb @@ -90,7 +90,7 @@ .users.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v1/service_spec.rb b/spec/integration/ip_messaging/v1/service_spec.rb index 5b65609f8..470e0f0b6 100644 --- a/spec/integration/ip_messaging/v1/service_spec.rb +++ b/spec/integration/ip_messaging/v1/service_spec.rb @@ -96,7 +96,7 @@ @client.ip_messaging.v1.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/credential_spec.rb b/spec/integration/ip_messaging/v2/credential_spec.rb index 90cf6b2b7..63a1d9024 100644 --- a/spec/integration/ip_messaging/v2/credential_spec.rb +++ b/spec/integration/ip_messaging/v2/credential_spec.rb @@ -88,7 +88,7 @@ @client.ip_messaging.v2.credentials.create(type: "gcm") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Type' => "gcm",} + values = {'Type' => "gcm"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb b/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb index ec12e869e..91b31d95b 100644 --- a/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +++ b/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb @@ -59,7 +59,7 @@ .invites.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/service/channel/member_spec.rb b/spec/integration/ip_messaging/v2/service/channel/member_spec.rb index b2a1bae1f..eb1553e84 100644 --- a/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +++ b/spec/integration/ip_messaging/v2/service/channel/member_spec.rb @@ -60,7 +60,7 @@ .members.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/service/role_spec.rb b/spec/integration/ip_messaging/v2/service/role_spec.rb index d26a43307..4f113642f 100644 --- a/spec/integration/ip_messaging/v2/service/role_spec.rb +++ b/spec/integration/ip_messaging/v2/service/role_spec.rb @@ -221,7 +221,7 @@ .roles("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(permission: ['permission']) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e },} + values = {'Permission' => Twilio.serialize_list(['permission']) { |e| e }} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/service/user_spec.rb b/spec/integration/ip_messaging/v2/service/user_spec.rb index 7dd32cb7c..340485101 100644 --- a/spec/integration/ip_messaging/v2/service/user_spec.rb +++ b/spec/integration/ip_messaging/v2/service/user_spec.rb @@ -91,7 +91,7 @@ .users.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/ip_messaging/v2/service_spec.rb b/spec/integration/ip_messaging/v2/service_spec.rb index 181b48681..57a5f208b 100644 --- a/spec/integration/ip_messaging/v2/service_spec.rb +++ b/spec/integration/ip_messaging/v2/service_spec.rb @@ -105,7 +105,7 @@ @client.ip_messaging.v2.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/messaging/v1/service/alpha_sender_spec.rb b/spec/integration/messaging/v1/service/alpha_sender_spec.rb index eaed0a521..e1b3d2ca7 100644 --- a/spec/integration/messaging/v1/service/alpha_sender_spec.rb +++ b/spec/integration/messaging/v1/service/alpha_sender_spec.rb @@ -15,7 +15,7 @@ .alpha_senders.create(alpha_sender: "alpha_sender") }.to raise_exception(Twilio::REST::TwilioError) - values = {'AlphaSender' => "alpha_sender",} + values = {'AlphaSender' => "alpha_sender"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/messaging/v1/service/phone_number_spec.rb b/spec/integration/messaging/v1/service/phone_number_spec.rb index 4581a26f4..00cd2f569 100644 --- a/spec/integration/messaging/v1/service/phone_number_spec.rb +++ b/spec/integration/messaging/v1/service/phone_number_spec.rb @@ -15,7 +15,7 @@ .phone_numbers.create(phone_number_sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumberSid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'PhoneNumberSid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/messaging/v1/service/short_code_spec.rb b/spec/integration/messaging/v1/service/short_code_spec.rb index 9f3bc92b9..d58d9dfff 100644 --- a/spec/integration/messaging/v1/service/short_code_spec.rb +++ b/spec/integration/messaging/v1/service/short_code_spec.rb @@ -15,7 +15,7 @@ .short_codes.create(short_code_sid: "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'ShortCodeSid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'ShortCodeSid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/messaging/v1/service_spec.rb b/spec/integration/messaging/v1/service_spec.rb index 85282b7fd..41351620b 100644 --- a/spec/integration/messaging/v1/service_spec.rb +++ b/spec/integration/messaging/v1/service_spec.rb @@ -14,7 +14,7 @@ @client.messaging.v1.services.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/notify/v1/credential_spec.rb b/spec/integration/notify/v1/credential_spec.rb index 8c6af7b0a..c3ae3baa9 100644 --- a/spec/integration/notify/v1/credential_spec.rb +++ b/spec/integration/notify/v1/credential_spec.rb @@ -88,7 +88,7 @@ @client.notify.v1.credentials.create(type: "gcm") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Type' => "gcm",} + values = {'Type' => "gcm"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/notify/v1/service/binding_spec.rb b/spec/integration/notify/v1/service/binding_spec.rb index 78d15371f..6e9666e2e 100644 --- a/spec/integration/notify/v1/service/binding_spec.rb +++ b/spec/integration/notify/v1/service/binding_spec.rb @@ -92,7 +92,7 @@ .bindings.create(identity: "identity", binding_type: "apn", address: "address") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity", 'BindingType' => "apn", 'Address' => "address",} + values = {'Identity' => "identity", 'BindingType' => "apn", 'Address' => "address"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/notify/v1/service/user/segment_memberships_spec.rb b/spec/integration/notify/v1/service/user/segment_memberships_spec.rb index 0c1a1f417..47bf0da43 100644 --- a/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +++ b/spec/integration/notify/v1/service/user/segment_memberships_spec.rb @@ -16,7 +16,7 @@ .segment_memberships.create(segment: "segment") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Segment' => "segment",} + values = {'Segment' => "segment"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/notify/v1/service/user/user_binding_spec.rb b/spec/integration/notify/v1/service/user/user_binding_spec.rb index b8cef70c7..cd0eeb49e 100644 --- a/spec/integration/notify/v1/service/user/user_binding_spec.rb +++ b/spec/integration/notify/v1/service/user/user_binding_spec.rb @@ -97,7 +97,7 @@ .bindings.create(binding_type: "apn", address: "address") }.to raise_exception(Twilio::REST::TwilioError) - values = {'BindingType' => "apn", 'Address' => "address",} + values = {'BindingType' => "apn", 'Address' => "address"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/notify/v1/service/user_spec.rb b/spec/integration/notify/v1/service/user_spec.rb index 7e74183e1..db82c814a 100644 --- a/spec/integration/notify/v1/service/user_spec.rb +++ b/spec/integration/notify/v1/service/user_spec.rb @@ -15,7 +15,7 @@ .users.create(identity: "identity") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identity' => "identity",} + values = {'Identity' => "identity"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/acc_security/service/verification_check_spec.rb b/spec/integration/preview/acc_security/service/verification_check_spec.rb index 20c0135f8..a5f7cef2c 100644 --- a/spec/integration/preview/acc_security/service/verification_check_spec.rb +++ b/spec/integration/preview/acc_security/service/verification_check_spec.rb @@ -15,7 +15,7 @@ .verification_checks.create(code: "code") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Code' => "code",} + values = {'Code' => "code"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/acc_security/service/verification_spec.rb b/spec/integration/preview/acc_security/service/verification_spec.rb index ce02a9ce5..6adaf8544 100644 --- a/spec/integration/preview/acc_security/service/verification_spec.rb +++ b/spec/integration/preview/acc_security/service/verification_spec.rb @@ -15,7 +15,7 @@ .verifications.create(to: "to", channel: "channel") }.to raise_exception(Twilio::REST::TwilioError) - values = {'To' => "to", 'Channel' => "channel",} + values = {'To' => "to", 'Channel' => "channel"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/acc_security/service_spec.rb b/spec/integration/preview/acc_security/service_spec.rb index a8c7a55cf..72e2b9c7a 100644 --- a/spec/integration/preview/acc_security/service_spec.rb +++ b/spec/integration/preview/acc_security/service_spec.rb @@ -14,7 +14,7 @@ @client.preview.acc_security.services.create(name: "name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Name' => "name",} + values = {'Name' => "name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb b/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb index 21ba4c265..1392ac32c 100644 --- a/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +++ b/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb @@ -83,7 +83,7 @@ .certificates.create(certificate_data: "certificate_data") }.to raise_exception(Twilio::REST::TwilioError) - values = {'CertificateData' => "certificate_data",} + values = {'CertificateData' => "certificate_data"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb b/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb index 084385343..4f8a02596 100644 --- a/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +++ b/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb @@ -227,10 +227,10 @@ @holodeck.mock(Twilio::Response.new(500, '')) expect { - @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", iso_country: "iso_country", sms_capability: true) + @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", sms_capability: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumber' => "+987654321", 'IsoCountry' => "iso_country", 'SmsCapability' => true,} + values = {'PhoneNumber' => "+987654321", 'SmsCapability' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -267,7 +267,7 @@ ] )) - actual = @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", iso_country: "iso_country", sms_capability: true) + actual = @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", sms_capability: true) expect(actual).to_not eq(nil) end @@ -300,7 +300,7 @@ ] )) - actual = @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", iso_country: "iso_country", sms_capability: true) + actual = @client.preview.hosted_numbers.hosted_number_orders.create(phone_number: "+987654321", sms_capability: true) expect(actual).to_not eq(nil) end diff --git a/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb b/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb index e5b40c3f4..693151176 100644 --- a/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +++ b/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb @@ -53,7 +53,7 @@ .extensions("XFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(enabled: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Enabled' => true,} + values = {'Enabled' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/proxy/service/phone_number_spec.rb b/spec/integration/preview/proxy/service/phone_number_spec.rb index d53b075b4..3ed588fd5 100644 --- a/spec/integration/preview/proxy/service/phone_number_spec.rb +++ b/spec/integration/preview/proxy/service/phone_number_spec.rb @@ -15,7 +15,7 @@ .phone_numbers.create(sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Sid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'Sid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/proxy/service/session/participant_spec.rb b/spec/integration/preview/proxy/service/session/participant_spec.rb index db7a8c5ce..121dcf882 100644 --- a/spec/integration/preview/proxy/service/session/participant_spec.rb +++ b/spec/integration/preview/proxy/service/session/participant_spec.rb @@ -106,7 +106,7 @@ .participants.create(identifier: "identifier") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identifier' => "identifier",} + values = {'Identifier' => "identifier"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/proxy/service/short_code_spec.rb b/spec/integration/preview/proxy/service/short_code_spec.rb index 85ad73c83..f0a6f14f3 100644 --- a/spec/integration/preview/proxy/service/short_code_spec.rb +++ b/spec/integration/preview/proxy/service/short_code_spec.rb @@ -15,7 +15,7 @@ .short_codes.create(sid: "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Sid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'Sid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/studio/flow/engagement/step_spec.rb b/spec/integration/preview/studio/flow/engagement/step_spec.rb new file mode 100644 index 000000000..77b9a3bac --- /dev/null +++ b/spec/integration/preview/studio/flow/engagement/step_spec.rb @@ -0,0 +1,96 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +require 'spec_helper.rb' + +describe 'Step' do + it "can read" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .steps.list() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps', + ))).to eq(true) + end + + it "receives read_empty responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "meta": { + "previous_page_url": null, + "next_page_url": null, + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0", + "page": 0, + "first_page_url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0", + "page_size": 50, + "key": "steps" + }, + "steps": [] + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .steps.list() + + expect(actual).to_not eq(nil) + end + + it "can fetch" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .steps("FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives fetch responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "sid": "FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "engagement_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "name": "incomingRequest", + "context": {}, + "transitioned_from": "Trigger", + "transitioned_to": "Ended", + "date_created": "2017-11-06T12:00:00Z", + "date_updated": null, + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .steps("FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + + expect(actual).to_not eq(nil) + end +end \ No newline at end of file diff --git a/spec/integration/preview/studio/flow/engagement_spec.rb b/spec/integration/preview/studio/flow/engagement_spec.rb new file mode 100644 index 000000000..bdf8674c2 --- /dev/null +++ b/spec/integration/preview/studio/flow/engagement_spec.rb @@ -0,0 +1,171 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +require 'spec_helper.rb' + +describe 'Engagement' do + it "can read" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements.list() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements', + ))).to eq(true) + end + + it "receives read_empty responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "meta": { + "previous_page_url": null, + "next_page_url": null, + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0", + "page": 0, + "first_page_url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements?PageSize=50&Page=0", + "page_size": 50, + "key": "engagements" + }, + "engagements": [] + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements.list() + + expect(actual).to_not eq(nil) + end + + it "can fetch" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives fetch responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "contact_channel_address": "+14155555555", + "status": "ended", + "context": {}, + "date_created": "2017-11-06T12:00:00Z", + "date_updated": null, + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "links": { + "steps": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps" + } + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + + expect(actual).to_not eq(nil) + end + + it "can create" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements.create(to: "+123456789", from: "+987654321") + }.to raise_exception(Twilio::REST::TwilioError) + + values = {'To' => "+123456789", 'From' => "+987654321"} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'post', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements', + data: values, + ))).to eq(true) + end + + it "receives create responses" do + @holodeck.mock(Twilio::Response.new( + 201, + %q[ + { + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "context": { + "flow": { + "first_name": "Foo" + } + }, + "contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "contact_channel_address": "+18001234567", + "status": "active", + "date_created": "2015-07-30T20:00:00Z", + "date_updated": "2015-07-30T20:00:00Z", + "links": { + "steps": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps" + } + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements.create(to: "+123456789", from: "+987654321") + + expect(actual).to_not eq(nil) + end + + it "can delete" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'delete', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives delete responses" do + @holodeck.mock(Twilio::Response.new( + 204, + nil, + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ + .engagements("FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + + expect(actual).to eq(true) + end +end \ No newline at end of file diff --git a/spec/integration/preview/studio/flow_spec.rb b/spec/integration/preview/studio/flow_spec.rb new file mode 100644 index 000000000..266459c07 --- /dev/null +++ b/spec/integration/preview/studio/flow_spec.rb @@ -0,0 +1,115 @@ +## +# This code was generated by +# \ / _ _ _| _ _ +# | (_)\/(_)(_|\/| |(/_ v1.0.0 +# / / + +require 'spec_helper.rb' + +describe 'Flow' do + it "can read" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows.list() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows', + ))).to eq(true) + end + + it "receives read_empty responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "meta": { + "previous_page_url": null, + "next_page_url": null, + "url": "https://preview.twilio.com/Studio/Flows?PageSize=50&Page=0", + "page": 0, + "first_page_url": "https://preview.twilio.com/Studio/Flows?PageSize=50&Page=0", + "page_size": 50, + "key": "flows" + }, + "flows": [] + } + ] + )) + + actual = @client.preview.studio.flows.list() + + expect(actual).to_not eq(nil) + end + + it "can fetch" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'get', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives fetch responses" do + @holodeck.mock(Twilio::Response.new( + 200, + %q[ + { + "sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "friendly_name": "Test Flow", + "status": "published", + "debug": false, + "version": 1, + "date_created": "2017-11-06T12:00:00Z", + "date_updated": null, + "url": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "links": { + "engagements": "https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Engagements" + } + } + ] + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch() + + expect(actual).to_not eq(nil) + end + + it "can delete" do + @holodeck.mock(Twilio::Response.new(500, '')) + + expect { + @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + }.to raise_exception(Twilio::REST::TwilioError) + + values = {} + expect( + @holodeck.has_request?(Holodeck::Request.new( + method: 'delete', + url: 'https://preview.twilio.com/Studio/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + ))).to eq(true) + end + + it "receives delete responses" do + @holodeck.mock(Twilio::Response.new( + 204, + nil, + )) + + actual = @client.preview.studio.flows("FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete() + + expect(actual).to eq(true) + end +end \ No newline at end of file diff --git a/spec/integration/preview/sync/service/document/document_permission_spec.rb b/spec/integration/preview/sync/service/document/document_permission_spec.rb index 0608eb3b8..24756eb6c 100644 --- a/spec/integration/preview/sync/service/document/document_permission_spec.rb +++ b/spec/integration/preview/sync/service/document/document_permission_spec.rb @@ -167,7 +167,7 @@ .document_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/sync/service/document_spec.rb b/spec/integration/preview/sync/service/document_spec.rb index 61529a854..81fb1683d 100644 --- a/spec/integration/preview/sync/service/document_spec.rb +++ b/spec/integration/preview/sync/service/document_spec.rb @@ -213,7 +213,7 @@ .documents("ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb b/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb index dd922314a..f6348919a 100644 --- a/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +++ b/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb @@ -89,7 +89,7 @@ .sync_list_items.create(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -215,7 +215,7 @@ .sync_list_items(1).update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb b/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb index 6354ea959..f4662d334 100644 --- a/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +++ b/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb @@ -167,7 +167,7 @@ .sync_list_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb b/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb index 229506c53..a4784fa8a 100644 --- a/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +++ b/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb @@ -89,7 +89,7 @@ .sync_map_items.create(key: "key", data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Key' => "key", 'Data' => Twilio.serialize_object("{}"),} + values = {'Key' => "key", 'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -215,7 +215,7 @@ .sync_map_items("key").update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb b/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb index 81513040d..4fcd39e39 100644 --- a/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +++ b/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb @@ -167,7 +167,7 @@ .sync_map_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/field_type/field_value_spec.rb b/spec/integration/preview/understand/service/field_type/field_value_spec.rb index a178d82bd..d83f42fdd 100644 --- a/spec/integration/preview/understand/service/field_type/field_value_spec.rb +++ b/spec/integration/preview/understand/service/field_type/field_value_spec.rb @@ -139,7 +139,7 @@ .field_values.create(language: "language", value: "value") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Language' => "language", 'Value' => "value",} + values = {'Language' => "language", 'Value' => "value"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/field_type_spec.rb b/spec/integration/preview/understand/service/field_type_spec.rb index 8df8a0b2f..59d6ed552 100644 --- a/spec/integration/preview/understand/service/field_type_spec.rb +++ b/spec/integration/preview/understand/service/field_type_spec.rb @@ -137,7 +137,7 @@ .field_types.create(unique_name: "unique_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'UniqueName' => "unique_name",} + values = {'UniqueName' => "unique_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/intent/field_spec.rb b/spec/integration/preview/understand/service/intent/field_spec.rb index 10e9dc7d0..0ee27b6de 100644 --- a/spec/integration/preview/understand/service/intent/field_spec.rb +++ b/spec/integration/preview/understand/service/intent/field_spec.rb @@ -139,7 +139,7 @@ .fields.create(field_type: "field_type", unique_name: "unique_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FieldType' => "field_type", 'UniqueName' => "unique_name",} + values = {'FieldType' => "field_type", 'UniqueName' => "unique_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/intent/sample_spec.rb b/spec/integration/preview/understand/service/intent/sample_spec.rb index 4b901e8c8..0158896cb 100644 --- a/spec/integration/preview/understand/service/intent/sample_spec.rb +++ b/spec/integration/preview/understand/service/intent/sample_spec.rb @@ -139,7 +139,7 @@ .samples.create(language: "language", tagged_text: "tagged_text") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Language' => "language", 'TaggedText' => "tagged_text",} + values = {'Language' => "language", 'TaggedText' => "tagged_text"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/intent_spec.rb b/spec/integration/preview/understand/service/intent_spec.rb index ead598534..9c02a837b 100644 --- a/spec/integration/preview/understand/service/intent_spec.rb +++ b/spec/integration/preview/understand/service/intent_spec.rb @@ -141,7 +141,7 @@ .intents.create(unique_name: "unique_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'UniqueName' => "unique_name",} + values = {'UniqueName' => "unique_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/understand/service/query_spec.rb b/spec/integration/preview/understand/service/query_spec.rb index b08994a22..8f80848dc 100644 --- a/spec/integration/preview/understand/service/query_spec.rb +++ b/spec/integration/preview/understand/service/query_spec.rb @@ -165,7 +165,7 @@ .queries.create(language: "language", query: "query") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Language' => "language", 'Query' => "query",} + values = {'Language' => "language", 'Query' => "query"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/preview/wireless/command_spec.rb b/spec/integration/preview/wireless/command_spec.rb index 0144fafc7..55d1695ff 100644 --- a/spec/integration/preview/wireless/command_spec.rb +++ b/spec/integration/preview/wireless/command_spec.rb @@ -131,7 +131,7 @@ @client.preview.wireless.commands.create(command: "command") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Command' => "command",} + values = {'Command' => "command"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/proxy/v1/service/phone_number_spec.rb b/spec/integration/proxy/v1/service/phone_number_spec.rb index f9807b052..a52e795b6 100644 --- a/spec/integration/proxy/v1/service/phone_number_spec.rb +++ b/spec/integration/proxy/v1/service/phone_number_spec.rb @@ -12,15 +12,14 @@ expect { @client.proxy.v1.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .phone_numbers.create(sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + .phone_numbers.create() }.to raise_exception(Twilio::REST::TwilioError) - values = {'Sid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', url: 'https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers', - data: values, ))).to eq(true) end @@ -37,14 +36,17 @@ "phone_number": "+987654321", "friendly_name": "Friendly Name", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] )) actual = @client.proxy.v1.services("KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \ - .phone_numbers.create(sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + .phone_numbers.create() expect(actual).to_not eq(nil) end @@ -117,7 +119,10 @@ "phone_number": "+987654321", "friendly_name": "Friendly Name", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] @@ -160,7 +165,10 @@ "phone_number": "12345", "friendly_name": "Friendly Name", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] diff --git a/spec/integration/proxy/v1/service/session/participant_spec.rb b/spec/integration/proxy/v1/service/session/participant_spec.rb index 2d4213072..94fdb2290 100644 --- a/spec/integration/proxy/v1/service/session/participant_spec.rb +++ b/spec/integration/proxy/v1/service/session/participant_spec.rb @@ -33,7 +33,6 @@ "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "participant_type": "message-only", "identifier": "identifier", "proxy_identifier": "proxy_identifier", "proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", @@ -108,7 +107,7 @@ .participants.create(identifier: "identifier") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Identifier' => "identifier",} + values = {'Identifier' => "identifier"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -126,7 +125,6 @@ "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "participant_type": "message-only", "identifier": "identifier", "proxy_identifier": "proxy_identifier", "proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", @@ -205,7 +203,6 @@ "session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "participant_type": "message-only", "identifier": "identifier", "proxy_identifier": "proxy_identifier", "proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", diff --git a/spec/integration/proxy/v1/service/session_spec.rb b/spec/integration/proxy/v1/service/session_spec.rb index 9ff2a5eff..5981dc1be 100644 --- a/spec/integration/proxy/v1/service/session_spec.rb +++ b/spec/integration/proxy/v1/service/session_spec.rb @@ -36,6 +36,7 @@ "date_last_interaction": "2015-07-30T20:00:00Z", "date_expiry": "2015-07-30T20:00:00Z", "ttl": 3600, + "mode": "message-only", "closed_reason": "", "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_updated": "2015-07-30T20:00:00Z", @@ -126,6 +127,7 @@ "date_last_interaction": "2015-07-30T20:00:00Z", "date_expiry": "2015-07-30T20:00:00Z", "ttl": 3600, + "mode": "message-only", "closed_reason": "", "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_updated": "2015-07-30T20:00:00Z", @@ -203,6 +205,7 @@ "date_last_interaction": "2015-07-30T20:00:00Z", "date_expiry": "2015-07-30T20:00:00Z", "ttl": 3600, + "mode": "message-only", "closed_reason": "", "sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "date_updated": "2015-07-30T20:00:00Z", diff --git a/spec/integration/proxy/v1/service/short_code_spec.rb b/spec/integration/proxy/v1/service/short_code_spec.rb index 326578302..0074d756a 100644 --- a/spec/integration/proxy/v1/service/short_code_spec.rb +++ b/spec/integration/proxy/v1/service/short_code_spec.rb @@ -15,7 +15,7 @@ .short_codes.create(sid: "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Sid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'Sid' => "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -36,7 +36,10 @@ "date_updated": "2015-07-30T20:00:00Z", "short_code": "12345", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] @@ -115,7 +118,10 @@ "date_updated": "2015-07-30T20:00:00Z", "short_code": "12345", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] @@ -157,7 +163,10 @@ "date_updated": "2015-07-30T20:00:00Z", "short_code": "12345", "iso_country": "US", - "capabilities": [], + "capabilities": { + "sms_outbound": true, + "voice_inbound": false + }, "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } ] diff --git a/spec/integration/proxy/v1/service_spec.rb b/spec/integration/proxy/v1/service_spec.rb index e201168c5..c79b19b80 100644 --- a/spec/integration/proxy/v1/service_spec.rb +++ b/spec/integration/proxy/v1/service_spec.rb @@ -32,6 +32,10 @@ "friendly_name": "friendly_name", "default_ttl": 3600, "callback_url": "http://www.example.com", + "geo_match_level": "country", + "number_selection_behavior": "prefer_sticky", + "intercept_callback_url": "http://www.example.com", + "out_of_session_callback_url": "http://www.example.com", "date_created": "2015-07-30T20:00:00Z", "date_updated": "2015-07-30T20:00:00Z", "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", @@ -113,6 +117,10 @@ "friendly_name": "friendly_name", "default_ttl": 3600, "callback_url": "http://www.example.com", + "geo_match_level": "country", + "number_selection_behavior": "prefer_sticky", + "intercept_callback_url": "http://www.example.com", + "out_of_session_callback_url": "http://www.example.com", "date_created": "2015-07-30T20:00:00Z", "date_updated": "2015-07-30T20:00:00Z", "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", @@ -181,6 +189,10 @@ "friendly_name": "friendly_name", "default_ttl": 3600, "callback_url": "http://www.example.com", + "geo_match_level": "country", + "number_selection_behavior": "prefer_sticky", + "intercept_callback_url": "http://www.example.com", + "out_of_session_callback_url": "http://www.example.com", "date_created": "2015-07-30T20:00:00Z", "date_updated": "2015-07-30T20:00:00Z", "url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", diff --git a/spec/integration/sync/v1/service/document/document_permission_spec.rb b/spec/integration/sync/v1/service/document/document_permission_spec.rb index d250eb09e..2c199ff26 100644 --- a/spec/integration/sync/v1/service/document/document_permission_spec.rb +++ b/spec/integration/sync/v1/service/document/document_permission_spec.rb @@ -167,7 +167,7 @@ .document_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/document_spec.rb b/spec/integration/sync/v1/service/document_spec.rb index 6760efb7a..201c0e0fc 100644 --- a/spec/integration/sync/v1/service/document_spec.rb +++ b/spec/integration/sync/v1/service/document_spec.rb @@ -213,7 +213,7 @@ .documents("ETaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb b/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb index c219581d1..795861d18 100644 --- a/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +++ b/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb @@ -89,7 +89,7 @@ .sync_list_items.create(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -215,7 +215,7 @@ .sync_list_items(1).update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb b/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb index 0b6060e60..5accbcf6e 100644 --- a/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +++ b/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb @@ -167,7 +167,7 @@ .sync_list_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb b/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb index 3e06cb8b5..1f42025aa 100644 --- a/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +++ b/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb @@ -89,7 +89,7 @@ .sync_map_items.create(key: "key", data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Key' => "key", 'Data' => Twilio.serialize_object("{}"),} + values = {'Key' => "key", 'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', @@ -215,7 +215,7 @@ .sync_map_items("key").update(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb b/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb index bfb0b1d8c..eecf65198 100644 --- a/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +++ b/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb @@ -167,7 +167,7 @@ .sync_map_permissions("identity").update(read: true, write: true, manage: true) }.to raise_exception(Twilio::REST::TwilioError) - values = {'Read' => true, 'Write' => true, 'Manage' => true,} + values = {'Read' => true, 'Write' => true, 'Manage' => true} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb b/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb index 468bb5012..29566eb71 100644 --- a/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +++ b/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb @@ -16,7 +16,7 @@ .stream_messages.create(data: "{}") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Data' => Twilio.serialize_object("{}"),} + values = {'Data' => Twilio.serialize_object("{}")} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/taskrouter/v1/workspace/activity_spec.rb b/spec/integration/taskrouter/v1/workspace/activity_spec.rb index d9f8a3ed2..815da8d2e 100644 --- a/spec/integration/taskrouter/v1/workspace/activity_spec.rb +++ b/spec/integration/taskrouter/v1/workspace/activity_spec.rb @@ -200,7 +200,7 @@ .activities.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/taskrouter/v1/workspace/worker_spec.rb b/spec/integration/taskrouter/v1/workspace/worker_spec.rb index 559fe0fb8..d90f2286b 100644 --- a/spec/integration/taskrouter/v1/workspace/worker_spec.rb +++ b/spec/integration/taskrouter/v1/workspace/worker_spec.rb @@ -107,7 +107,7 @@ .workers.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/taskrouter/v1/workspace/workflow_spec.rb b/spec/integration/taskrouter/v1/workspace/workflow_spec.rb index b71955951..f83862a60 100644 --- a/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +++ b/spec/integration/taskrouter/v1/workspace/workflow_spec.rb @@ -227,7 +227,7 @@ .workflows.create(friendly_name: "friendly_name", configuration: "configuration") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name", 'Configuration' => "configuration",} + values = {'FriendlyName' => "friendly_name", 'Configuration' => "configuration"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/taskrouter/v1/workspace_spec.rb b/spec/integration/taskrouter/v1/workspace_spec.rb index ea9012497..d83fe1df8 100644 --- a/spec/integration/taskrouter/v1/workspace_spec.rb +++ b/spec/integration/taskrouter/v1/workspace_spec.rb @@ -216,7 +216,7 @@ @client.taskrouter.v1.workspaces.create(friendly_name: "friendly_name") }.to raise_exception(Twilio::REST::TwilioError) - values = {'FriendlyName' => "friendly_name",} + values = {'FriendlyName' => "friendly_name"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/trunking/v1/trunk/credential_list_spec.rb b/spec/integration/trunking/v1/trunk/credential_list_spec.rb index b47d522f6..013ab3fa9 100644 --- a/spec/integration/trunking/v1/trunk/credential_list_spec.rb +++ b/spec/integration/trunking/v1/trunk/credential_list_spec.rb @@ -81,7 +81,7 @@ .credentials_lists.create(credential_list_sid: "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'CredentialListSid' => "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'CredentialListSid' => "CLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb b/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb index 64877e9a2..a7edbf4d1 100644 --- a/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +++ b/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb @@ -81,7 +81,7 @@ .ip_access_control_lists.create(ip_access_control_list_sid: "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'IpAccessControlListSid' => "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'IpAccessControlListSid' => "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/trunking/v1/trunk/phone_number_spec.rb b/spec/integration/trunking/v1/trunk/phone_number_spec.rb index 7e1815420..91c965220 100644 --- a/spec/integration/trunking/v1/trunk/phone_number_spec.rb +++ b/spec/integration/trunking/v1/trunk/phone_number_spec.rb @@ -106,7 +106,7 @@ .phone_numbers.create(phone_number_sid: "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") }.to raise_exception(Twilio::REST::TwilioError) - values = {'PhoneNumberSid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",} + values = {'PhoneNumberSid' => "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/video/v1/room_spec.rb b/spec/integration/video/v1/room_spec.rb index 58619ac65..a1976de76 100644 --- a/spec/integration/video/v1/room_spec.rb +++ b/spec/integration/video/v1/room_spec.rb @@ -204,7 +204,7 @@ @client.video.v1.rooms("RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(status: "in-progress") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Status' => "in-progress",} + values = {'Status' => "in-progress"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post', diff --git a/spec/integration/wireless/v1/command_spec.rb b/spec/integration/wireless/v1/command_spec.rb index 68ca5de62..a13660517 100644 --- a/spec/integration/wireless/v1/command_spec.rb +++ b/spec/integration/wireless/v1/command_spec.rb @@ -129,7 +129,7 @@ @client.wireless.v1.commands.create(command: "command") }.to raise_exception(Twilio::REST::TwilioError) - values = {'Command' => "command",} + values = {'Command' => "command"} expect( @holodeck.has_request?(Holodeck::Request.new( method: 'post',