twilio-ruby 5.47.0 → 5.52.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +125 -0
- data/README.md +7 -6
- data/lib/twilio-ruby/rest/api.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +7 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +10 -8
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +15 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +15 -1
- data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
- data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
- data/lib/twilio-ruby/rest/client.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
- data/lib/twilio-ruby/rest/events/v1.rb +20 -16
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +16 -16
- data/lib/twilio-ruby/rest/events/v1/schema/{schema_version.rb → version.rb} +41 -41
- data/lib/twilio-ruby/rest/events/v1/sink.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +14 -8
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +139 -9
- data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
- data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
- data/lib/twilio-ruby/rest/insights.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
- data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
- data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
- data/lib/twilio-ruby/rest/messaging.rb +9 -11
- data/lib/twilio-ruby/rest/messaging/v1.rb +20 -26
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +143 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +112 -26
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +266 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +125 -0
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +111 -0
- data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
- data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +10 -8
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
- data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
- data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
- data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
- data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
- data/lib/twilio-ruby/rest/supersim.rb +9 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +41 -20
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +55 -3
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +16 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +371 -0
- data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +9 -16
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +9 -15
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +22 -33
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +9 -15
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +22 -35
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +9 -15
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +12 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +31 -7
- data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
- data/lib/twilio-ruby/rest/trusthub.rb +100 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +146 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +523 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +359 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +328 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +356 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +271 -0
- data/lib/twilio-ruby/rest/{messaging/v1/use_case.rb → trusthub/v1/policies.rb} +110 -46
- data/lib/twilio-ruby/rest/{messaging/v1/campaign.rb → trusthub/v1/supporting_document.rb} +125 -143
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +271 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +523 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +359 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +328 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +26 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +61 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +24 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +43 -4
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +202 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +41 -52
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +274 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +329 -0
- data/lib/twilio-ruby/rest/video/v1.rb +20 -16
- data/lib/twilio-ruby/rest/video/v1/room.rb +4 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +0 -6
- data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
- data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
- data/lib/twilio-ruby/twiml/voice_response.rb +22 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +27 -826
- data/spec/framework/request_spec.rb +0 -36
- data/spec/framework/serialize_spec.rb +0 -80
- data/spec/framework/version_spec.rb +0 -219
- data/spec/holodeck/holodeck.rb +0 -66
- data/spec/holodeck/hologram.rb +0 -4
- data/spec/http/http_client_spec.rb +0 -122
- data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +0 -44
- data/spec/integration/accounts/v1/credential/aws_spec.rb +0 -222
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +0 -222
- data/spec/integration/accounts/v1/credential_spec.rb +0 -12
- data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +0 -69
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +0 -106
- data/spec/integration/api/v2010/account/address_spec.rb +0 -269
- data/spec/integration/api/v2010/account/application_spec.rb +0 -274
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +0 -137
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/machine_to_machine_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +0 -101
- data/spec/integration/api/v2010/account/available_phone_number/national_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/shared_cost_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +0 -101
- data/spec/integration/api/v2010/account/available_phone_number/voip_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +0 -128
- data/spec/integration/api/v2010/account/balance_spec.rb +0 -44
- data/spec/integration/api/v2010/account/call/event_spec.rb +0 -102
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +0 -138
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +0 -149
- data/spec/integration/api/v2010/account/call/notification_spec.rb +0 -143
- data/spec/integration/api/v2010/account/call/payment_spec.rb +0 -135
- data/spec/integration/api/v2010/account/call/recording_spec.rb +0 -287
- data/spec/integration/api/v2010/account/call_spec.rb +0 -660
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +0 -768
- data/spec/integration/api/v2010/account/conference/recording_spec.rb +0 -234
- data/spec/integration/api/v2010/account/conference_spec.rb +0 -716
- data/spec/integration/api/v2010/account/connect_app_spec.rb +0 -197
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +0 -135
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +0 -220
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +0 -189
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +0 -189
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +0 -189
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +0 -370
- data/spec/integration/api/v2010/account/key_spec.rb +0 -176
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +0 -49
- data/spec/integration/api/v2010/account/message/media_spec.rb +0 -161
- data/spec/integration/api/v2010/account/message_spec.rb +0 -507
- data/spec/integration/api/v2010/account/new_key_spec.rb +0 -46
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +0 -46
- data/spec/integration/api/v2010/account/notification_spec.rb +0 -138
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +0 -185
- data/spec/integration/api/v2010/account/queue/member_spec.rb +0 -208
- data/spec/integration/api/v2010/account/queue_spec.rb +0 -244
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +0 -174
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +0 -165
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +0 -173
- data/spec/integration/api/v2010/account/recording_spec.rb +0 -184
- data/spec/integration/api/v2010/account/short_code_spec.rb +0 -179
- data/spec/integration/api/v2010/account/signing_key_spec.rb +0 -176
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +0 -252
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +0 -241
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping_spec.rb +0 -217
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping_spec.rb +0 -217
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_calls_mapping_spec.rb +0 -12
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping_spec.rb +0 -217
- data/spec/integration/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping_spec.rb +0 -12
- data/spec/integration/api/v2010/account/sip/domain/auth_types_spec.rb +0 -12
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +0 -207
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +0 -217
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +0 -303
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +0 -254
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +0 -251
- data/spec/integration/api/v2010/account/sip_spec.rb +0 -12
- data/spec/integration/api/v2010/account/token_spec.rb +0 -71
- data/spec/integration/api/v2010/account/transcription_spec.rb +0 -166
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record_spec.rb +0 -110
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +0 -281
- data/spec/integration/api/v2010/account/usage_spec.rb +0 -12
- data/spec/integration/api/v2010/account/validation_request_spec.rb +0 -48
- data/spec/integration/api/v2010/account_spec.rb +0 -327
- data/spec/integration/autopilot/v1/assistant/defaults_spec.rb +0 -79
- data/spec/integration/autopilot/v1/assistant/dialogue_spec.rb +0 -46
- data/spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb +0 -207
- data/spec/integration/autopilot/v1/assistant/field_type_spec.rb +0 -242
- data/spec/integration/autopilot/v1/assistant/model_build_spec.rb +0 -236
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +0 -290
- data/spec/integration/autopilot/v1/assistant/style_sheet_spec.rb +0 -79
- data/spec/integration/autopilot/v1/assistant/task/field_spec.rb +0 -204
- data/spec/integration/autopilot/v1/assistant/task/sample_spec.rb +0 -249
- data/spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb +0 -85
- data/spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb +0 -49
- data/spec/integration/autopilot/v1/assistant/task_spec.rb +0 -258
- data/spec/integration/autopilot/v1/assistant/webhook_spec.rb +0 -242
- data/spec/integration/autopilot/v1/assistant_spec.rb +0 -277
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +0 -53
- data/spec/integration/bulkexports/v1/export/day_spec.rb +0 -115
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +0 -129
- data/spec/integration/bulkexports/v1/export/job_spec.rb +0 -78
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +0 -77
- data/spec/integration/bulkexports/v1/export_spec.rb +0 -44
- data/spec/integration/chat/v1/credential_spec.rb +0 -219
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +0 -207
- data/spec/integration/chat/v1/service/channel/member_spec.rb +0 -280
- data/spec/integration/chat/v1/service/channel/message_spec.rb +0 -290
- data/spec/integration/chat/v1/service/channel_spec.rb +0 -272
- data/spec/integration/chat/v1/service/role_spec.rb +0 -260
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +0 -93
- data/spec/integration/chat/v1/service/user_spec.rb +0 -262
- data/spec/integration/chat/v1/service_spec.rb +0 -295
- data/spec/integration/chat/v2/credential_spec.rb +0 -219
- data/spec/integration/chat/v2/service/binding_spec.rb +0 -174
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +0 -207
- data/spec/integration/chat/v2/service/channel/member_spec.rb +0 -263
- data/spec/integration/chat/v2/service/channel/message_spec.rb +0 -406
- data/spec/integration/chat/v2/service/channel/webhook_spec.rb +0 -303
- data/spec/integration/chat/v2/service/channel_spec.rb +0 -282
- data/spec/integration/chat/v2/service/role_spec.rb +0 -260
- data/spec/integration/chat/v2/service/user/user_binding_spec.rb +0 -177
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +0 -247
- data/spec/integration/chat/v2/service/user_spec.rb +0 -270
- data/spec/integration/chat/v2/service_spec.rb +0 -350
- data/spec/integration/conversations/v1/configuration/webhook_spec.rb +0 -90
- data/spec/integration/conversations/v1/configuration_spec.rb +0 -87
- data/spec/integration/conversations/v1/conversation/message/delivery_receipt_spec.rb +0 -136
- data/spec/integration/conversations/v1/conversation/message_spec.rb +0 -409
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +0 -402
- data/spec/integration/conversations/v1/conversation/webhook_spec.rb +0 -282
- data/spec/integration/conversations/v1/conversation_spec.rb +0 -278
- data/spec/integration/conversations/v1/credential_spec.rb +0 -219
- data/spec/integration/conversations/v1/role_spec.rb +0 -249
- data/spec/integration/conversations/v1/service/binding_spec.rb +0 -166
- data/spec/integration/conversations/v1/service/configuration/notification_spec.rb +0 -115
- data/spec/integration/conversations/v1/service/configuration_spec.rb +0 -89
- data/spec/integration/conversations/v1/service/conversation/message/delivery_receipt_spec.rb +0 -144
- data/spec/integration/conversations/v1/service/conversation/message_spec.rb +0 -429
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +0 -427
- data/spec/integration/conversations/v1/service/conversation/webhook_spec.rb +0 -299
- data/spec/integration/conversations/v1/service/conversation_spec.rb +0 -289
- data/spec/integration/conversations/v1/service/role_spec.rb +0 -260
- data/spec/integration/conversations/v1/service/user_spec.rb +0 -241
- data/spec/integration/conversations/v1/service_spec.rb +0 -174
- data/spec/integration/conversations/v1/user_spec.rb +0 -231
- data/spec/integration/events/v1/event_type_spec.rb +0 -133
- data/spec/integration/events/v1/schema/schema_version_spec.rb +0 -126
- data/spec/integration/events/v1/schema_spec.rb +0 -46
- data/spec/integration/events/v1/sink/sink_test_spec.rb +0 -42
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +0 -44
- data/spec/integration/events/v1/sink_spec.rb +0 -231
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +0 -91
- data/spec/integration/events/v1/subscription_spec.rb +0 -292
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +0 -125
- data/spec/integration/fax/v1/fax_spec.rb +0 -267
- data/spec/integration/flex_api/v1/channel_spec.rb +0 -188
- data/spec/integration/flex_api/v1/configuration_spec.rb +0 -578
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +0 -259
- data/spec/integration/flex_api/v1/web_channel_spec.rb +0 -216
- data/spec/integration/insights/v1/call/event_spec.rb +0 -166
- data/spec/integration/insights/v1/call/metric_spec.rb +0 -154
- data/spec/integration/insights/v1/call/summary_spec.rb +0 -64
- data/spec/integration/insights/v1/call_spec.rb +0 -46
- data/spec/integration/insights/v1/room/participant_spec.rb +0 -147
- data/spec/integration/insights/v1/room_spec.rb +0 -164
- data/spec/integration/ip_messaging/v1/credential_spec.rb +0 -219
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +0 -207
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +0 -280
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +0 -290
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +0 -272
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +0 -260
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +0 -93
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +0 -262
- data/spec/integration/ip_messaging/v1/service_spec.rb +0 -295
- data/spec/integration/ip_messaging/v2/credential_spec.rb +0 -219
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +0 -174
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +0 -207
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +0 -263
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +0 -406
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +0 -303
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +0 -282
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +0 -260
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +0 -177
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +0 -247
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +0 -270
- data/spec/integration/ip_messaging/v2/service_spec.rb +0 -350
- data/spec/integration/lookups/v1/phone_number_spec.rb +0 -336
- data/spec/integration/messaging/v1/brand_registration_spec.rb +0 -143
- data/spec/integration/messaging/v1/campaign_spec.rb +0 -194
- data/spec/integration/messaging/v1/deactivation_spec.rb +0 -40
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +0 -173
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +0 -198
- data/spec/integration/messaging/v1/service/short_code_spec.rb +0 -176
- data/spec/integration/messaging/v1/service_spec.rb +0 -267
- data/spec/integration/messaging/v1/use_case_spec.rb +0 -55
- data/spec/integration/monitor/v1/alert_spec.rb +0 -138
- data/spec/integration/monitor/v1/event_spec.rb +0 -148
- data/spec/integration/notify/v1/credential_spec.rb +0 -219
- data/spec/integration/notify/v1/service/binding_spec.rb +0 -222
- data/spec/integration/notify/v1/service/notification_spec.rb +0 -98
- data/spec/integration/notify/v1/service_spec.rb +0 -289
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +0 -620
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/item_assignment_spec.rb +0 -195
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +0 -258
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +0 -238
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_type_spec.rb +0 -141
- data/spec/integration/numbers/v2/regulatory_compliance/regulation_spec.rb +0 -181
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_spec.rb +0 -250
- data/spec/integration/numbers/v2/regulatory_compliance/supporting_document_type_spec.rb +0 -131
- data/spec/integration/numbers/v2/regulatory_compliance_spec.rb +0 -12
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +0 -115
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +0 -129
- data/spec/integration/preview/bulk_exports/export/job_spec.rb +0 -78
- data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +0 -77
- data/spec/integration/preview/bulk_exports/export_spec.rb +0 -44
- data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +0 -234
- data/spec/integration/preview/deployed_devices/fleet/deployment_spec.rb +0 -228
- data/spec/integration/preview/deployed_devices/fleet/device_spec.rb +0 -244
- data/spec/integration/preview/deployed_devices/fleet/key_spec.rb +0 -232
- data/spec/integration/preview/deployed_devices/fleet_spec.rb +0 -241
- data/spec/integration/preview/hosted_numbers/authorization_document/dependent_hosted_number_order_spec.rb +0 -110
- data/spec/integration/preview/hosted_numbers/authorization_document_spec.rb +0 -224
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +0 -389
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +0 -121
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +0 -142
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +0 -162
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +0 -250
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +0 -201
- data/spec/integration/preview/sync/service/document_spec.rb +0 -252
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +0 -255
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +0 -201
- data/spec/integration/preview/sync/service/sync_list_spec.rb +0 -205
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +0 -255
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +0 -201
- data/spec/integration/preview/sync/service/sync_map_spec.rb +0 -205
- data/spec/integration/preview/sync/service_spec.rb +0 -241
- data/spec/integration/preview/trusted_comms/branded_channel/channel_spec.rb +0 -50
- data/spec/integration/preview/trusted_comms/branded_channel_spec.rb +0 -47
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/cps_spec.rb +0 -44
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +0 -58
- data/spec/integration/preview/understand/assistant/assistant_fallback_actions_spec.rb +0 -79
- data/spec/integration/preview/understand/assistant/assistant_initiation_actions_spec.rb +0 -79
- data/spec/integration/preview/understand/assistant/dialogue_spec.rb +0 -46
- data/spec/integration/preview/understand/assistant/field_type/field_value_spec.rb +0 -207
- data/spec/integration/preview/understand/assistant/field_type_spec.rb +0 -242
- data/spec/integration/preview/understand/assistant/model_build_spec.rb +0 -236
- data/spec/integration/preview/understand/assistant/query_spec.rb +0 -302
- data/spec/integration/preview/understand/assistant/style_sheet_spec.rb +0 -79
- data/spec/integration/preview/understand/assistant/task/field_spec.rb +0 -204
- data/spec/integration/preview/understand/assistant/task/sample_spec.rb +0 -249
- data/spec/integration/preview/understand/assistant/task/task_actions_spec.rb +0 -85
- data/spec/integration/preview/understand/assistant/task/task_statistics_spec.rb +0 -49
- data/spec/integration/preview/understand/assistant/task_spec.rb +0 -258
- data/spec/integration/preview/understand/assistant_spec.rb +0 -269
- data/spec/integration/preview/wireless/command_spec.rb +0 -167
- data/spec/integration/preview/wireless/rate_plan_spec.rb +0 -257
- data/spec/integration/preview/wireless/sim/usage_spec.rb +0 -50
- data/spec/integration/preview/wireless/sim_spec.rb +0 -207
- data/spec/integration/pricing/v1/messaging/country_spec.rb +0 -137
- data/spec/integration/pricing/v1/messaging_spec.rb +0 -12
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +0 -128
- data/spec/integration/pricing/v1/phone_number_spec.rb +0 -12
- data/spec/integration/pricing/v1/voice/country_spec.rb +0 -138
- data/spec/integration/pricing/v1/voice/number_spec.rb +0 -55
- data/spec/integration/pricing/v1/voice_spec.rb +0 -12
- data/spec/integration/pricing/v2/voice/country_spec.rb +0 -179
- data/spec/integration/pricing/v2/voice/number_spec.rb +0 -61
- data/spec/integration/pricing/v2/voice_spec.rb +0 -12
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +0 -231
- data/spec/integration/proxy/v1/service/session/interaction_spec.rb +0 -133
- data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +0 -163
- data/spec/integration/proxy/v1/service/session/participant_spec.rb +0 -240
- data/spec/integration/proxy/v1/service/session_spec.rb +0 -225
- data/spec/integration/proxy/v1/service/short_code_spec.rb +0 -225
- data/spec/integration/proxy/v1/service_spec.rb +0 -214
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +0 -93
- data/spec/integration/serverless/v1/service/asset_spec.rb +0 -202
- data/spec/integration/serverless/v1/service/build/build_status_spec.rb +0 -48
- data/spec/integration/serverless/v1/service/build_spec.rb +0 -224
- data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +0 -133
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +0 -97
- data/spec/integration/serverless/v1/service/environment/variable_spec.rb +0 -207
- data/spec/integration/serverless/v1/service/environment_spec.rb +0 -170
- data/spec/integration/serverless/v1/service/function/function_version/function_version_content_spec.rb +0 -51
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +0 -96
- data/spec/integration/serverless/v1/service/function_spec.rb +0 -202
- data/spec/integration/serverless/v1/service_spec.rb +0 -205
- data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +0 -50
- data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +0 -53
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +0 -99
- data/spec/integration/studio/v1/flow/engagement_spec.rb +0 -168
- data/spec/integration/studio/v1/flow/execution/execution_context_spec.rb +0 -50
- data/spec/integration/studio/v1/flow/execution/execution_step/execution_step_context_spec.rb +0 -53
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +0 -100
- data/spec/integration/studio/v1/flow/execution_spec.rb +0 -214
- data/spec/integration/studio/v1/flow_spec.rb +0 -114
- data/spec/integration/studio/v2/flow/execution/execution_context_spec.rb +0 -50
- data/spec/integration/studio/v2/flow/execution/execution_step/execution_step_context_spec.rb +0 -53
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +0 -100
- data/spec/integration/studio/v2/flow/execution_spec.rb +0 -211
- data/spec/integration/studio/v2/flow/flow_revision_spec.rb +0 -110
- data/spec/integration/studio/v2/flow/test_user_spec.rb +0 -85
- data/spec/integration/studio/v2/flow_spec.rb +0 -251
- data/spec/integration/studio/v2/flow_validate_spec.rb +0 -46
- data/spec/integration/supersim/v1/command_spec.rb +0 -184
- data/spec/integration/supersim/v1/fleet_spec.rb +0 -222
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +0 -176
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +0 -219
- data/spec/integration/supersim/v1/network_spec.rb +0 -137
- data/spec/integration/supersim/v1/sim_spec.rb +0 -323
- data/spec/integration/supersim/v1/usage_record_spec.rb +0 -647
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +0 -201
- data/spec/integration/sync/v1/service/document_spec.rb +0 -254
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +0 -201
- data/spec/integration/sync/v1/service/sync_list_spec.rb +0 -252
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +0 -201
- data/spec/integration/sync/v1/service/sync_map_spec.rb +0 -252
- data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +0 -47
- data/spec/integration/sync/v1/service/sync_stream_spec.rb +0 -244
- data/spec/integration/sync/v1/service_spec.rb +0 -261
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +0 -232
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +0 -163
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +0 -222
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +0 -312
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +0 -101
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +0 -83
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +0 -107
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +0 -145
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +0 -290
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +0 -325
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +0 -191
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +0 -185
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +0 -91
- data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +0 -88
- data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +0 -69
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +0 -115
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +0 -290
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +0 -96
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +0 -57
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +0 -70
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +0 -266
- data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +0 -93
- data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +0 -72
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +0 -104
- data/spec/integration/taskrouter/v1/workspace_spec.rb +0 -291
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +0 -189
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +0 -189
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +0 -248
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +0 -264
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +0 -75
- data/spec/integration/trunking/v1/trunk_spec.rb +0 -281
- data/spec/integration/verify/v2/form_spec.rb +0 -47
- data/spec/integration/verify/v2/service/access_token_spec.rb +0 -44
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +0 -288
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +0 -277
- data/spec/integration/verify/v2/service/entity_spec.rb +0 -201
- data/spec/integration/verify/v2/service/messaging_configuration_spec.rb +0 -228
- data/spec/integration/verify/v2/service/rate_limit/bucket_spec.rb +0 -245
- data/spec/integration/verify/v2/service/rate_limit_spec.rb +0 -217
- data/spec/integration/verify/v2/service/verification_check_spec.rb +0 -80
- data/spec/integration/verify/v2/service/verification_spec.rb +0 -318
- data/spec/integration/verify/v2/service/webhook_spec.rb +0 -258
- data/spec/integration/verify/v2/service_spec.rb +0 -279
- data/spec/integration/video/v1/composition_hook_spec.rb +0 -407
- data/spec/integration/video/v1/composition_settings_spec.rb +0 -85
- data/spec/integration/video/v1/composition_spec.rb +0 -347
- data/spec/integration/video/v1/recording_settings_spec.rb +0 -85
- data/spec/integration/video/v1/recording_spec.rb +0 -176
- data/spec/integration/video/v1/room/recording_spec.rb +0 -185
- data/spec/integration/video/v1/room/room_participant/room_participant_published_track_spec.rb +0 -94
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +0 -103
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +0 -95
- data/spec/integration/video/v1/room/room_participant_spec.rb +0 -187
- data/spec/integration/video/v1/room/room_recording_rule_spec.rb +0 -89
- data/spec/integration/video/v1/room_spec.rb +0 -301
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +0 -245
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +0 -242
- data/spec/integration/voice/v1/connection_policy_spec.rb +0 -221
- data/spec/integration/voice/v1/dialing_permissions/bulk_country_update_spec.rb +0 -45
- data/spec/integration/voice/v1/dialing_permissions/country/highrisk_special_prefix_spec.rb +0 -60
- data/spec/integration/voice/v1/dialing_permissions/country_spec.rb +0 -110
- data/spec/integration/voice/v1/dialing_permissions/settings_spec.rb +0 -75
- data/spec/integration/voice/v1/dialing_permissions_spec.rb +0 -12
- data/spec/integration/voice/v1/ip_record_spec.rb +0 -219
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +0 -216
- data/spec/integration/wireless/v1/command_spec.rb +0 -286
- data/spec/integration/wireless/v1/rate_plan_spec.rb +0 -277
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +0 -88
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +0 -114
- data/spec/integration/wireless/v1/sim_spec.rb +0 -325
- data/spec/integration/wireless/v1/usage_record_spec.rb +0 -110
- data/spec/jwt/access_token_spec.rb +0 -159
- data/spec/jwt/client_capability_spec.rb +0 -104
- data/spec/jwt/task_router_spec.rb +0 -172
- data/spec/rack/twilio_webhook_authentication_spec.rb +0 -106
- data/spec/rest/client_spec.rb +0 -255
- data/spec/security/request_validator_spec.rb +0 -125
- data/spec/spec_helper.rb +0 -38
- data/spec/support/fakeweb.rb +0 -2
- data/spec/twilio_spec.rb +0 -17
- data/spec/twiml/messaging_response_spec.rb +0 -235
- data/spec/twiml/voice_response_spec.rb +0 -847
- data/spec/util/configuration_spec.rb +0 -33
- data/spec/util/url_encode_spec.rb +0 -12
@@ -0,0 +1,271 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Trusthub < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class SupportingDocumentTypeList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the SupportingDocumentTypeList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [SupportingDocumentTypeList] SupportingDocumentTypeList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
@uri = "/SupportingDocumentTypes"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Lists SupportingDocumentTypeInstance records from the API as a list.
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
|
+
# memory before returning.
|
30
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
31
|
+
# guarantees to never return more than limit. Default is no limit
|
32
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
33
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
34
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
35
|
+
# efficient page size, i.e. min(limit, 1000)
|
36
|
+
# @return [Array] Array of up to limit results
|
37
|
+
def list(limit: nil, page_size: nil)
|
38
|
+
self.stream(limit: limit, page_size: page_size).entries
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Streams SupportingDocumentTypeInstance records from the API as an Enumerable.
|
43
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
44
|
+
# is reached.
|
45
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
|
+
# guarantees to never return more than limit. Default is no limit.
|
47
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
48
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
49
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
|
+
# efficient page size, i.e. min(limit, 1000)
|
51
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
52
|
+
def stream(limit: nil, page_size: nil)
|
53
|
+
limits = @version.read_limits(limit, page_size)
|
54
|
+
|
55
|
+
page = self.page(page_size: limits[:page_size], )
|
56
|
+
|
57
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# When passed a block, yields SupportingDocumentTypeInstance records from the API.
|
62
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
63
|
+
# is reached.
|
64
|
+
def each
|
65
|
+
limits = @version.read_limits
|
66
|
+
|
67
|
+
page = self.page(page_size: limits[:page_size], )
|
68
|
+
|
69
|
+
@version.stream(page,
|
70
|
+
limit: limits[:limit],
|
71
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Retrieve a single page of SupportingDocumentTypeInstance records from the API.
|
76
|
+
# Request is executed immediately.
|
77
|
+
# @param [String] page_token PageToken provided by the API
|
78
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
79
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
80
|
+
# @return [Page] Page of SupportingDocumentTypeInstance
|
81
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
82
|
+
params = Twilio::Values.of({
|
83
|
+
'PageToken' => page_token,
|
84
|
+
'Page' => page_number,
|
85
|
+
'PageSize' => page_size,
|
86
|
+
})
|
87
|
+
|
88
|
+
response = @version.page('GET', @uri, params: params)
|
89
|
+
|
90
|
+
SupportingDocumentTypePage.new(@version, response, @solution)
|
91
|
+
end
|
92
|
+
|
93
|
+
##
|
94
|
+
# Retrieve a single page of SupportingDocumentTypeInstance records from the API.
|
95
|
+
# Request is executed immediately.
|
96
|
+
# @param [String] target_url API-generated URL for the requested results page
|
97
|
+
# @return [Page] Page of SupportingDocumentTypeInstance
|
98
|
+
def get_page(target_url)
|
99
|
+
response = @version.domain.request(
|
100
|
+
'GET',
|
101
|
+
target_url
|
102
|
+
)
|
103
|
+
SupportingDocumentTypePage.new(@version, response, @solution)
|
104
|
+
end
|
105
|
+
|
106
|
+
##
|
107
|
+
# Provide a user friendly representation
|
108
|
+
def to_s
|
109
|
+
'#<Twilio.Trusthub.V1.SupportingDocumentTypeList>'
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
class SupportingDocumentTypePage < Page
|
114
|
+
##
|
115
|
+
# Initialize the SupportingDocumentTypePage
|
116
|
+
# @param [Version] version Version that contains the resource
|
117
|
+
# @param [Response] response Response from the API
|
118
|
+
# @param [Hash] solution Path solution for the resource
|
119
|
+
# @return [SupportingDocumentTypePage] SupportingDocumentTypePage
|
120
|
+
def initialize(version, response, solution)
|
121
|
+
super(version, response)
|
122
|
+
|
123
|
+
# Path Solution
|
124
|
+
@solution = solution
|
125
|
+
end
|
126
|
+
|
127
|
+
##
|
128
|
+
# Build an instance of SupportingDocumentTypeInstance
|
129
|
+
# @param [Hash] payload Payload response from the API
|
130
|
+
# @return [SupportingDocumentTypeInstance] SupportingDocumentTypeInstance
|
131
|
+
def get_instance(payload)
|
132
|
+
SupportingDocumentTypeInstance.new(@version, payload, )
|
133
|
+
end
|
134
|
+
|
135
|
+
##
|
136
|
+
# Provide a user friendly representation
|
137
|
+
def to_s
|
138
|
+
'<Twilio.Trusthub.V1.SupportingDocumentTypePage>'
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
class SupportingDocumentTypeContext < InstanceContext
|
143
|
+
##
|
144
|
+
# Initialize the SupportingDocumentTypeContext
|
145
|
+
# @param [Version] version Version that contains the resource
|
146
|
+
# @param [String] sid The unique string that identifies the Supporting Document
|
147
|
+
# Type resource.
|
148
|
+
# @return [SupportingDocumentTypeContext] SupportingDocumentTypeContext
|
149
|
+
def initialize(version, sid)
|
150
|
+
super(version)
|
151
|
+
|
152
|
+
# Path Solution
|
153
|
+
@solution = {sid: sid, }
|
154
|
+
@uri = "/SupportingDocumentTypes/#{@solution[:sid]}"
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Fetch the SupportingDocumentTypeInstance
|
159
|
+
# @return [SupportingDocumentTypeInstance] Fetched SupportingDocumentTypeInstance
|
160
|
+
def fetch
|
161
|
+
payload = @version.fetch('GET', @uri)
|
162
|
+
|
163
|
+
SupportingDocumentTypeInstance.new(@version, payload, sid: @solution[:sid], )
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Provide a user friendly representation
|
168
|
+
def to_s
|
169
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
170
|
+
"#<Twilio.Trusthub.V1.SupportingDocumentTypeContext #{context}>"
|
171
|
+
end
|
172
|
+
|
173
|
+
##
|
174
|
+
# Provide a detailed, user friendly representation
|
175
|
+
def inspect
|
176
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
177
|
+
"#<Twilio.Trusthub.V1.SupportingDocumentTypeContext #{context}>"
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class SupportingDocumentTypeInstance < InstanceResource
|
182
|
+
##
|
183
|
+
# Initialize the SupportingDocumentTypeInstance
|
184
|
+
# @param [Version] version Version that contains the resource
|
185
|
+
# @param [Hash] payload payload that contains response from Twilio
|
186
|
+
# @param [String] sid The unique string that identifies the Supporting Document
|
187
|
+
# Type resource.
|
188
|
+
# @return [SupportingDocumentTypeInstance] SupportingDocumentTypeInstance
|
189
|
+
def initialize(version, payload, sid: nil)
|
190
|
+
super(version)
|
191
|
+
|
192
|
+
# Marshaled Properties
|
193
|
+
@properties = {
|
194
|
+
'sid' => payload['sid'],
|
195
|
+
'friendly_name' => payload['friendly_name'],
|
196
|
+
'machine_name' => payload['machine_name'],
|
197
|
+
'fields' => payload['fields'],
|
198
|
+
'url' => payload['url'],
|
199
|
+
}
|
200
|
+
|
201
|
+
# Context
|
202
|
+
@instance_context = nil
|
203
|
+
@params = {'sid' => sid || @properties['sid'], }
|
204
|
+
end
|
205
|
+
|
206
|
+
##
|
207
|
+
# Generate an instance context for the instance, the context is capable of
|
208
|
+
# performing various actions. All instance actions are proxied to the context
|
209
|
+
# @return [SupportingDocumentTypeContext] SupportingDocumentTypeContext for this SupportingDocumentTypeInstance
|
210
|
+
def context
|
211
|
+
unless @instance_context
|
212
|
+
@instance_context = SupportingDocumentTypeContext.new(@version, @params['sid'], )
|
213
|
+
end
|
214
|
+
@instance_context
|
215
|
+
end
|
216
|
+
|
217
|
+
##
|
218
|
+
# @return [String] The unique string that identifies the Supporting Document Type resource
|
219
|
+
def sid
|
220
|
+
@properties['sid']
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# @return [String] A human-readable description of the Supporting Document Type resource
|
225
|
+
def friendly_name
|
226
|
+
@properties['friendly_name']
|
227
|
+
end
|
228
|
+
|
229
|
+
##
|
230
|
+
# @return [String] The machine-readable description of the Supporting Document Type resource
|
231
|
+
def machine_name
|
232
|
+
@properties['machine_name']
|
233
|
+
end
|
234
|
+
|
235
|
+
##
|
236
|
+
# @return [Array[Hash]] The required information for creating a Supporting Document
|
237
|
+
def fields
|
238
|
+
@properties['fields']
|
239
|
+
end
|
240
|
+
|
241
|
+
##
|
242
|
+
# @return [String] The absolute URL of the Supporting Document Type resource
|
243
|
+
def url
|
244
|
+
@properties['url']
|
245
|
+
end
|
246
|
+
|
247
|
+
##
|
248
|
+
# Fetch the SupportingDocumentTypeInstance
|
249
|
+
# @return [SupportingDocumentTypeInstance] Fetched SupportingDocumentTypeInstance
|
250
|
+
def fetch
|
251
|
+
context.fetch
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# Provide a user friendly representation
|
256
|
+
def to_s
|
257
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
258
|
+
"<Twilio.Trusthub.V1.SupportingDocumentTypeInstance #{values}>"
|
259
|
+
end
|
260
|
+
|
261
|
+
##
|
262
|
+
# Provide a detailed, user friendly representation
|
263
|
+
def inspect
|
264
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
265
|
+
"<Twilio.Trusthub.V1.SupportingDocumentTypeInstance #{values}>"
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
@@ -0,0 +1,523 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Trusthub < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class TrustProductsList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the TrustProductsList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [TrustProductsList] TrustProductsList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
@uri = "/TrustProducts"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Create the TrustProductsInstance
|
28
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
29
|
+
# resource.
|
30
|
+
# @param [String] email The email address that will receive updates when the
|
31
|
+
# Customer-Profile resource changes status.
|
32
|
+
# @param [String] policy_sid The unique string of a policy that is associated to
|
33
|
+
# the Customer-Profile resource.
|
34
|
+
# @param [String] status_callback The URL we call to inform your application of
|
35
|
+
# status changes.
|
36
|
+
# @return [TrustProductsInstance] Created TrustProductsInstance
|
37
|
+
def create(friendly_name: nil, email: nil, policy_sid: nil, status_callback: :unset)
|
38
|
+
data = Twilio::Values.of({
|
39
|
+
'FriendlyName' => friendly_name,
|
40
|
+
'Email' => email,
|
41
|
+
'PolicySid' => policy_sid,
|
42
|
+
'StatusCallback' => status_callback,
|
43
|
+
})
|
44
|
+
|
45
|
+
payload = @version.create('POST', @uri, data: data)
|
46
|
+
|
47
|
+
TrustProductsInstance.new(@version, payload, )
|
48
|
+
end
|
49
|
+
|
50
|
+
##
|
51
|
+
# Lists TrustProductsInstance records from the API as a list.
|
52
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
53
|
+
# memory before returning.
|
54
|
+
# @param [trust_products.Status] status The verification status of the
|
55
|
+
# Customer-Profile resource.
|
56
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
57
|
+
# resource.
|
58
|
+
# @param [String] policy_sid The unique string of a policy that is associated to
|
59
|
+
# the Customer-Profile resource.
|
60
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
61
|
+
# guarantees to never return more than limit. Default is no limit
|
62
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
63
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
64
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
65
|
+
# efficient page size, i.e. min(limit, 1000)
|
66
|
+
# @return [Array] Array of up to limit results
|
67
|
+
def list(status: :unset, friendly_name: :unset, policy_sid: :unset, limit: nil, page_size: nil)
|
68
|
+
self.stream(
|
69
|
+
status: status,
|
70
|
+
friendly_name: friendly_name,
|
71
|
+
policy_sid: policy_sid,
|
72
|
+
limit: limit,
|
73
|
+
page_size: page_size
|
74
|
+
).entries
|
75
|
+
end
|
76
|
+
|
77
|
+
##
|
78
|
+
# Streams TrustProductsInstance records from the API as an Enumerable.
|
79
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
80
|
+
# is reached.
|
81
|
+
# @param [trust_products.Status] status The verification status of the
|
82
|
+
# Customer-Profile resource.
|
83
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
84
|
+
# resource.
|
85
|
+
# @param [String] policy_sid The unique string of a policy that is associated to
|
86
|
+
# the Customer-Profile resource.
|
87
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
88
|
+
# guarantees to never return more than limit. Default is no limit.
|
89
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
90
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
91
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
92
|
+
# efficient page size, i.e. min(limit, 1000)
|
93
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
94
|
+
def stream(status: :unset, friendly_name: :unset, policy_sid: :unset, limit: nil, page_size: nil)
|
95
|
+
limits = @version.read_limits(limit, page_size)
|
96
|
+
|
97
|
+
page = self.page(
|
98
|
+
status: status,
|
99
|
+
friendly_name: friendly_name,
|
100
|
+
policy_sid: policy_sid,
|
101
|
+
page_size: limits[:page_size],
|
102
|
+
)
|
103
|
+
|
104
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# When passed a block, yields TrustProductsInstance records from the API.
|
109
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
110
|
+
# is reached.
|
111
|
+
def each
|
112
|
+
limits = @version.read_limits
|
113
|
+
|
114
|
+
page = self.page(page_size: limits[:page_size], )
|
115
|
+
|
116
|
+
@version.stream(page,
|
117
|
+
limit: limits[:limit],
|
118
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
119
|
+
end
|
120
|
+
|
121
|
+
##
|
122
|
+
# Retrieve a single page of TrustProductsInstance records from the API.
|
123
|
+
# Request is executed immediately.
|
124
|
+
# @param [trust_products.Status] status The verification status of the
|
125
|
+
# Customer-Profile resource.
|
126
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
127
|
+
# resource.
|
128
|
+
# @param [String] policy_sid The unique string of a policy that is associated to
|
129
|
+
# the Customer-Profile resource.
|
130
|
+
# @param [String] page_token PageToken provided by the API
|
131
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
132
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
133
|
+
# @return [Page] Page of TrustProductsInstance
|
134
|
+
def page(status: :unset, friendly_name: :unset, policy_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
135
|
+
params = Twilio::Values.of({
|
136
|
+
'Status' => status,
|
137
|
+
'FriendlyName' => friendly_name,
|
138
|
+
'PolicySid' => policy_sid,
|
139
|
+
'PageToken' => page_token,
|
140
|
+
'Page' => page_number,
|
141
|
+
'PageSize' => page_size,
|
142
|
+
})
|
143
|
+
|
144
|
+
response = @version.page('GET', @uri, params: params)
|
145
|
+
|
146
|
+
TrustProductsPage.new(@version, response, @solution)
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Retrieve a single page of TrustProductsInstance records from the API.
|
151
|
+
# Request is executed immediately.
|
152
|
+
# @param [String] target_url API-generated URL for the requested results page
|
153
|
+
# @return [Page] Page of TrustProductsInstance
|
154
|
+
def get_page(target_url)
|
155
|
+
response = @version.domain.request(
|
156
|
+
'GET',
|
157
|
+
target_url
|
158
|
+
)
|
159
|
+
TrustProductsPage.new(@version, response, @solution)
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# Provide a user friendly representation
|
164
|
+
def to_s
|
165
|
+
'#<Twilio.Trusthub.V1.TrustProductsList>'
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
class TrustProductsPage < Page
|
170
|
+
##
|
171
|
+
# Initialize the TrustProductsPage
|
172
|
+
# @param [Version] version Version that contains the resource
|
173
|
+
# @param [Response] response Response from the API
|
174
|
+
# @param [Hash] solution Path solution for the resource
|
175
|
+
# @return [TrustProductsPage] TrustProductsPage
|
176
|
+
def initialize(version, response, solution)
|
177
|
+
super(version, response)
|
178
|
+
|
179
|
+
# Path Solution
|
180
|
+
@solution = solution
|
181
|
+
end
|
182
|
+
|
183
|
+
##
|
184
|
+
# Build an instance of TrustProductsInstance
|
185
|
+
# @param [Hash] payload Payload response from the API
|
186
|
+
# @return [TrustProductsInstance] TrustProductsInstance
|
187
|
+
def get_instance(payload)
|
188
|
+
TrustProductsInstance.new(@version, payload, )
|
189
|
+
end
|
190
|
+
|
191
|
+
##
|
192
|
+
# Provide a user friendly representation
|
193
|
+
def to_s
|
194
|
+
'<Twilio.Trusthub.V1.TrustProductsPage>'
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
class TrustProductsContext < InstanceContext
|
199
|
+
##
|
200
|
+
# Initialize the TrustProductsContext
|
201
|
+
# @param [Version] version Version that contains the resource
|
202
|
+
# @param [String] sid The unique string that we created to identify the
|
203
|
+
# Customer-Profile resource.
|
204
|
+
# @return [TrustProductsContext] TrustProductsContext
|
205
|
+
def initialize(version, sid)
|
206
|
+
super(version)
|
207
|
+
|
208
|
+
# Path Solution
|
209
|
+
@solution = {sid: sid, }
|
210
|
+
@uri = "/TrustProducts/#{@solution[:sid]}"
|
211
|
+
|
212
|
+
# Dependents
|
213
|
+
@trust_products_entity_assignments = nil
|
214
|
+
@trust_products_evaluations = nil
|
215
|
+
@trust_products_channel_endpoint_assignment = nil
|
216
|
+
end
|
217
|
+
|
218
|
+
##
|
219
|
+
# Fetch the TrustProductsInstance
|
220
|
+
# @return [TrustProductsInstance] Fetched TrustProductsInstance
|
221
|
+
def fetch
|
222
|
+
payload = @version.fetch('GET', @uri)
|
223
|
+
|
224
|
+
TrustProductsInstance.new(@version, payload, sid: @solution[:sid], )
|
225
|
+
end
|
226
|
+
|
227
|
+
##
|
228
|
+
# Update the TrustProductsInstance
|
229
|
+
# @param [trust_products.Status] status The verification status of the
|
230
|
+
# Customer-Profile resource.
|
231
|
+
# @param [String] status_callback The URL we call to inform your application of
|
232
|
+
# status changes.
|
233
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
234
|
+
# resource.
|
235
|
+
# @param [String] email The email address that will receive updates when the
|
236
|
+
# Customer-Profile resource changes status.
|
237
|
+
# @return [TrustProductsInstance] Updated TrustProductsInstance
|
238
|
+
def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
|
239
|
+
data = Twilio::Values.of({
|
240
|
+
'Status' => status,
|
241
|
+
'StatusCallback' => status_callback,
|
242
|
+
'FriendlyName' => friendly_name,
|
243
|
+
'Email' => email,
|
244
|
+
})
|
245
|
+
|
246
|
+
payload = @version.update('POST', @uri, data: data)
|
247
|
+
|
248
|
+
TrustProductsInstance.new(@version, payload, sid: @solution[:sid], )
|
249
|
+
end
|
250
|
+
|
251
|
+
##
|
252
|
+
# Delete the TrustProductsInstance
|
253
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
254
|
+
def delete
|
255
|
+
@version.delete('DELETE', @uri)
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# Access the trust_products_entity_assignments
|
260
|
+
# @return [TrustProductsEntityAssignmentsList]
|
261
|
+
# @return [TrustProductsEntityAssignmentsContext] if sid was passed.
|
262
|
+
def trust_products_entity_assignments(sid=:unset)
|
263
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
264
|
+
|
265
|
+
if sid != :unset
|
266
|
+
return TrustProductsEntityAssignmentsContext.new(@version, @solution[:sid], sid, )
|
267
|
+
end
|
268
|
+
|
269
|
+
unless @trust_products_entity_assignments
|
270
|
+
@trust_products_entity_assignments = TrustProductsEntityAssignmentsList.new(
|
271
|
+
@version,
|
272
|
+
trust_product_sid: @solution[:sid],
|
273
|
+
)
|
274
|
+
end
|
275
|
+
|
276
|
+
@trust_products_entity_assignments
|
277
|
+
end
|
278
|
+
|
279
|
+
##
|
280
|
+
# Access the trust_products_evaluations
|
281
|
+
# @return [TrustProductsEvaluationsList]
|
282
|
+
# @return [TrustProductsEvaluationsContext] if sid was passed.
|
283
|
+
def trust_products_evaluations(sid=:unset)
|
284
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
285
|
+
|
286
|
+
if sid != :unset
|
287
|
+
return TrustProductsEvaluationsContext.new(@version, @solution[:sid], sid, )
|
288
|
+
end
|
289
|
+
|
290
|
+
unless @trust_products_evaluations
|
291
|
+
@trust_products_evaluations = TrustProductsEvaluationsList.new(
|
292
|
+
@version,
|
293
|
+
trust_product_sid: @solution[:sid],
|
294
|
+
)
|
295
|
+
end
|
296
|
+
|
297
|
+
@trust_products_evaluations
|
298
|
+
end
|
299
|
+
|
300
|
+
##
|
301
|
+
# Access the trust_products_channel_endpoint_assignment
|
302
|
+
# @return [TrustProductsChannelEndpointAssignmentList]
|
303
|
+
# @return [TrustProductsChannelEndpointAssignmentContext] if sid was passed.
|
304
|
+
def trust_products_channel_endpoint_assignment(sid=:unset)
|
305
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
306
|
+
|
307
|
+
if sid != :unset
|
308
|
+
return TrustProductsChannelEndpointAssignmentContext.new(@version, @solution[:sid], sid, )
|
309
|
+
end
|
310
|
+
|
311
|
+
unless @trust_products_channel_endpoint_assignment
|
312
|
+
@trust_products_channel_endpoint_assignment = TrustProductsChannelEndpointAssignmentList.new(
|
313
|
+
@version,
|
314
|
+
trust_product_sid: @solution[:sid],
|
315
|
+
)
|
316
|
+
end
|
317
|
+
|
318
|
+
@trust_products_channel_endpoint_assignment
|
319
|
+
end
|
320
|
+
|
321
|
+
##
|
322
|
+
# Provide a user friendly representation
|
323
|
+
def to_s
|
324
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
325
|
+
"#<Twilio.Trusthub.V1.TrustProductsContext #{context}>"
|
326
|
+
end
|
327
|
+
|
328
|
+
##
|
329
|
+
# Provide a detailed, user friendly representation
|
330
|
+
def inspect
|
331
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
332
|
+
"#<Twilio.Trusthub.V1.TrustProductsContext #{context}>"
|
333
|
+
end
|
334
|
+
end
|
335
|
+
|
336
|
+
class TrustProductsInstance < InstanceResource
|
337
|
+
##
|
338
|
+
# Initialize the TrustProductsInstance
|
339
|
+
# @param [Version] version Version that contains the resource
|
340
|
+
# @param [Hash] payload payload that contains response from Twilio
|
341
|
+
# @param [String] sid The unique string that we created to identify the
|
342
|
+
# Customer-Profile resource.
|
343
|
+
# @return [TrustProductsInstance] TrustProductsInstance
|
344
|
+
def initialize(version, payload, sid: nil)
|
345
|
+
super(version)
|
346
|
+
|
347
|
+
# Marshaled Properties
|
348
|
+
@properties = {
|
349
|
+
'sid' => payload['sid'],
|
350
|
+
'account_sid' => payload['account_sid'],
|
351
|
+
'policy_sid' => payload['policy_sid'],
|
352
|
+
'friendly_name' => payload['friendly_name'],
|
353
|
+
'status' => payload['status'],
|
354
|
+
'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
|
355
|
+
'email' => payload['email'],
|
356
|
+
'status_callback' => payload['status_callback'],
|
357
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
358
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
359
|
+
'url' => payload['url'],
|
360
|
+
'links' => payload['links'],
|
361
|
+
}
|
362
|
+
|
363
|
+
# Context
|
364
|
+
@instance_context = nil
|
365
|
+
@params = {'sid' => sid || @properties['sid'], }
|
366
|
+
end
|
367
|
+
|
368
|
+
##
|
369
|
+
# Generate an instance context for the instance, the context is capable of
|
370
|
+
# performing various actions. All instance actions are proxied to the context
|
371
|
+
# @return [TrustProductsContext] TrustProductsContext for this TrustProductsInstance
|
372
|
+
def context
|
373
|
+
unless @instance_context
|
374
|
+
@instance_context = TrustProductsContext.new(@version, @params['sid'], )
|
375
|
+
end
|
376
|
+
@instance_context
|
377
|
+
end
|
378
|
+
|
379
|
+
##
|
380
|
+
# @return [String] The unique string that identifies the resource.
|
381
|
+
def sid
|
382
|
+
@properties['sid']
|
383
|
+
end
|
384
|
+
|
385
|
+
##
|
386
|
+
# @return [String] The SID of the Account that created the resource
|
387
|
+
def account_sid
|
388
|
+
@properties['account_sid']
|
389
|
+
end
|
390
|
+
|
391
|
+
##
|
392
|
+
# @return [String] The unique string of a policy.
|
393
|
+
def policy_sid
|
394
|
+
@properties['policy_sid']
|
395
|
+
end
|
396
|
+
|
397
|
+
##
|
398
|
+
# @return [String] The string that you assigned to describe the resource
|
399
|
+
def friendly_name
|
400
|
+
@properties['friendly_name']
|
401
|
+
end
|
402
|
+
|
403
|
+
##
|
404
|
+
# @return [trust_products.Status] The verification status of the Customer-Profile resource
|
405
|
+
def status
|
406
|
+
@properties['status']
|
407
|
+
end
|
408
|
+
|
409
|
+
##
|
410
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource will be valid until.
|
411
|
+
def valid_until
|
412
|
+
@properties['valid_until']
|
413
|
+
end
|
414
|
+
|
415
|
+
##
|
416
|
+
# @return [String] The email address
|
417
|
+
def email
|
418
|
+
@properties['email']
|
419
|
+
end
|
420
|
+
|
421
|
+
##
|
422
|
+
# @return [String] The URL we call to inform your application of status changes.
|
423
|
+
def status_callback
|
424
|
+
@properties['status_callback']
|
425
|
+
end
|
426
|
+
|
427
|
+
##
|
428
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
429
|
+
def date_created
|
430
|
+
@properties['date_created']
|
431
|
+
end
|
432
|
+
|
433
|
+
##
|
434
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
435
|
+
def date_updated
|
436
|
+
@properties['date_updated']
|
437
|
+
end
|
438
|
+
|
439
|
+
##
|
440
|
+
# @return [String] The absolute URL of the Customer-Profile resource
|
441
|
+
def url
|
442
|
+
@properties['url']
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# @return [String] The URLs of the Assigned Items of the Customer-Profile resource
|
447
|
+
def links
|
448
|
+
@properties['links']
|
449
|
+
end
|
450
|
+
|
451
|
+
##
|
452
|
+
# Fetch the TrustProductsInstance
|
453
|
+
# @return [TrustProductsInstance] Fetched TrustProductsInstance
|
454
|
+
def fetch
|
455
|
+
context.fetch
|
456
|
+
end
|
457
|
+
|
458
|
+
##
|
459
|
+
# Update the TrustProductsInstance
|
460
|
+
# @param [trust_products.Status] status The verification status of the
|
461
|
+
# Customer-Profile resource.
|
462
|
+
# @param [String] status_callback The URL we call to inform your application of
|
463
|
+
# status changes.
|
464
|
+
# @param [String] friendly_name The string that you assigned to describe the
|
465
|
+
# resource.
|
466
|
+
# @param [String] email The email address that will receive updates when the
|
467
|
+
# Customer-Profile resource changes status.
|
468
|
+
# @return [TrustProductsInstance] Updated TrustProductsInstance
|
469
|
+
def update(status: :unset, status_callback: :unset, friendly_name: :unset, email: :unset)
|
470
|
+
context.update(
|
471
|
+
status: status,
|
472
|
+
status_callback: status_callback,
|
473
|
+
friendly_name: friendly_name,
|
474
|
+
email: email,
|
475
|
+
)
|
476
|
+
end
|
477
|
+
|
478
|
+
##
|
479
|
+
# Delete the TrustProductsInstance
|
480
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
481
|
+
def delete
|
482
|
+
context.delete
|
483
|
+
end
|
484
|
+
|
485
|
+
##
|
486
|
+
# Access the trust_products_entity_assignments
|
487
|
+
# @return [trust_products_entity_assignments] trust_products_entity_assignments
|
488
|
+
def trust_products_entity_assignments
|
489
|
+
context.trust_products_entity_assignments
|
490
|
+
end
|
491
|
+
|
492
|
+
##
|
493
|
+
# Access the trust_products_evaluations
|
494
|
+
# @return [trust_products_evaluations] trust_products_evaluations
|
495
|
+
def trust_products_evaluations
|
496
|
+
context.trust_products_evaluations
|
497
|
+
end
|
498
|
+
|
499
|
+
##
|
500
|
+
# Access the trust_products_channel_endpoint_assignment
|
501
|
+
# @return [trust_products_channel_endpoint_assignment] trust_products_channel_endpoint_assignment
|
502
|
+
def trust_products_channel_endpoint_assignment
|
503
|
+
context.trust_products_channel_endpoint_assignment
|
504
|
+
end
|
505
|
+
|
506
|
+
##
|
507
|
+
# Provide a user friendly representation
|
508
|
+
def to_s
|
509
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
510
|
+
"<Twilio.Trusthub.V1.TrustProductsInstance #{values}>"
|
511
|
+
end
|
512
|
+
|
513
|
+
##
|
514
|
+
# Provide a detailed, user friendly representation
|
515
|
+
def inspect
|
516
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
517
|
+
"<Twilio.Trusthub.V1.TrustProductsInstance #{values}>"
|
518
|
+
end
|
519
|
+
end
|
520
|
+
end
|
521
|
+
end
|
522
|
+
end
|
523
|
+
end
|