phone_com_client 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +69 -0
- data/LICENSE +21 -0
- data/README.md +344 -0
- data/Rakefile +8 -0
- data/docs/AccountFull.md +14 -0
- data/docs/AccountSummary.md +9 -0
- data/docs/AccountsApi.md +127 -0
- data/docs/Address.md +13 -0
- data/docs/AddressListContacts.md +13 -0
- data/docs/ApplicationFull.md +9 -0
- data/docs/ApplicationSummary.md +9 -0
- data/docs/ApplicationsApi.md +137 -0
- data/docs/AvailableNumbersApi.md +94 -0
- data/docs/AvailableNumbersFull.md +18 -0
- data/docs/CallDetails.md +12 -0
- data/docs/CallFull.md +8 -0
- data/docs/CallLogFull.md +27 -0
- data/docs/CallLogsApi.md +149 -0
- data/docs/CallNotifications.md +9 -0
- data/docs/CallbackObject.md +13 -0
- data/docs/CallerIdFull.md +10 -0
- data/docs/CallerIdPhoneNumber.md +9 -0
- data/docs/CallerIdsApi.md +82 -0
- data/docs/CallsApi.md +67 -0
- data/docs/ContactAccount.md +14 -0
- data/docs/ContactFull.md +26 -0
- data/docs/ContactResponse.md +14 -0
- data/docs/ContactSummary.md +15 -0
- data/docs/ContactsApi.md +333 -0
- data/docs/CreateCallParams.md +15 -0
- data/docs/CreateContactParams.md +23 -0
- data/docs/CreateDeviceParams.md +9 -0
- data/docs/CreateExtensionParams.md +20 -0
- data/docs/CreateGroupParams.md +8 -0
- data/docs/CreateListenerParams.md +10 -0
- data/docs/CreateMediaParams.md +17 -0
- data/docs/CreateMenuParams.md +14 -0
- data/docs/CreateOauthParams.md +16 -0
- data/docs/CreatePaymentParams.md +11 -0
- data/docs/CreatePhoneNumberParams.md +15 -0
- data/docs/CreatePricingParams.md +10 -0
- data/docs/CreateQueueParams.md +14 -0
- data/docs/CreateRedirectUriParams.md +8 -0
- data/docs/CreateRouteParams.md +10 -0
- data/docs/CreateSmsParams.md +11 -0
- data/docs/CreateSubaccountParams.md +11 -0
- data/docs/CreateTrunkParams.md +14 -0
- data/docs/DefaultApi.md +57 -0
- data/docs/DeleteEntry.md +8 -0
- data/docs/DeviceFull.md +11 -0
- data/docs/DeviceMembership.md +9 -0
- data/docs/DeviceSummary.md +9 -0
- data/docs/DevicesApi.md +316 -0
- data/docs/Email.md +9 -0
- data/docs/ExpressServiceCodeFull.md +10 -0
- data/docs/ExpressServiceCodesApi.md +125 -0
- data/docs/ExtensionFull.md +24 -0
- data/docs/ExtensionSummary.md +10 -0
- data/docs/ExtensionsApi.md +262 -0
- data/docs/FilterCallLogs.md +13 -0
- data/docs/FilterIdArray.md +8 -0
- data/docs/FilterIdDirectionFrom.md +10 -0
- data/docs/FilterIdExtensionNameArray.md +10 -0
- data/docs/FilterIdGroupIdUpdatedAtArray.md +10 -0
- data/docs/FilterIdNameArray.md +9 -0
- data/docs/FilterIdNamePhoneNumberArray.md +10 -0
- data/docs/FilterListAvailableNumbers.md +17 -0
- data/docs/FilterListPhoneNumbersRegions.md +14 -0
- data/docs/FilterNameNumberArray.md +9 -0
- data/docs/FilterVoicemailArray.md +13 -0
- data/docs/FromObject.md +11 -0
- data/docs/GetOauthAccessToken.md +10 -0
- data/docs/Greeting.md +11 -0
- data/docs/GreetingInput.md +11 -0
- data/docs/GroupFull.md +9 -0
- data/docs/GroupListContacts.md +9 -0
- data/docs/GroupSummary.md +9 -0
- data/docs/GroupsApi.md +329 -0
- data/docs/HoldMusic.md +9 -0
- data/docs/Line.md +9 -0
- data/docs/ListAccounts.md +13 -0
- data/docs/ListApplications.md +13 -0
- data/docs/ListAvailableNumbers.md +13 -0
- data/docs/ListCallLogs.md +13 -0
- data/docs/ListCallerIds.md +13 -0
- data/docs/ListContacts.md +13 -0
- data/docs/ListDevices.md +13 -0
- data/docs/ListExpressServiceCodes.md +13 -0
- data/docs/ListExtensions.md +13 -0
- data/docs/ListGroups.md +13 -0
- data/docs/ListListeners.md +13 -0
- data/docs/ListMedia.md +13 -0
- data/docs/ListMenus.md +13 -0
- data/docs/ListOauthClients.md +13 -0
- data/docs/ListOauthClientsRedirectUris.md +12 -0
- data/docs/ListPaymentMethods.md +13 -0
- data/docs/ListPhoneNumbers.md +13 -0
- data/docs/ListPhoneNumbersRegions.md +14 -0
- data/docs/ListPricings.md +13 -0
- data/docs/ListQueues.md +13 -0
- data/docs/ListRoutes.md +13 -0
- data/docs/ListSchedules.md +13 -0
- data/docs/ListSms.md +13 -0
- data/docs/ListTrunks.md +13 -0
- data/docs/ListVoicemail.md +13 -0
- data/docs/ListenerFull.md +14 -0
- data/docs/ListenersApi.md +312 -0
- data/docs/MediaApi.md +441 -0
- data/docs/MediaFull.md +10 -0
- data/docs/MediaSummary.md +9 -0
- data/docs/Member.md +9 -0
- data/docs/MenuFull.md +15 -0
- data/docs/MenuSummary.md +9 -0
- data/docs/MenusApi.md +316 -0
- data/docs/Notification.md +9 -0
- data/docs/NumberRegionsApi.md +98 -0
- data/docs/OauthAccessToken.md +12 -0
- data/docs/OauthApi.md +176 -0
- data/docs/OauthClientFull.md +9 -0
- data/docs/OauthClientRedirectUriFull.md +10 -0
- data/docs/OauthClientsApi.md +191 -0
- data/docs/OauthClientsRedirectUrisApi.md +262 -0
- data/docs/Option.md +9 -0
- data/docs/PatchPaymentParams.md +8 -0
- data/docs/PatchSmsParams.md +8 -0
- data/docs/PatchVoicemailParams.md +8 -0
- data/docs/PaymentFull.md +20 -0
- data/docs/PaymentMethodsApi.md +311 -0
- data/docs/PaymentSummary.md +13 -0
- data/docs/PhoneNumberContact.md +10 -0
- data/docs/PhoneNumberFull.md +16 -0
- data/docs/PhoneNumbersApi.md +262 -0
- data/docs/PhoneNumbersRegionFull.md +15 -0
- data/docs/PingResponse.md +11 -0
- data/docs/PricingFull.md +13 -0
- data/docs/PricingObject.md +9 -0
- data/docs/QueueFull.md +15 -0
- data/docs/QueueSummary.md +9 -0
- data/docs/QueuesApi.md +316 -0
- data/docs/Recipient.md +9 -0
- data/docs/RedirectUriFull.md +10 -0
- data/docs/ReplaceExtensionParams.md +21 -0
- data/docs/ReplaceMenuParams.md +14 -0
- data/docs/ReplacePhoneNumberParams.md +13 -0
- data/docs/RouteFull.md +11 -0
- data/docs/RouteSummary.md +9 -0
- data/docs/RoutesApi.md +316 -0
- data/docs/RuleSet.md +9 -0
- data/docs/RuleSetAction.md +17 -0
- data/docs/RuleSetFilter.md +11 -0
- data/docs/RuleSetForwardItem.md +14 -0
- data/docs/ScheduleFull.md +9 -0
- data/docs/ScheduleSummary.md +9 -0
- data/docs/SchedulesApi.md +137 -0
- data/docs/ScopeDetails.md +8 -0
- data/docs/SipAuthentication.md +11 -0
- data/docs/SmsApi.md +265 -0
- data/docs/SmsForwarding.md +10 -0
- data/docs/SmsForwardingParams.md +10 -0
- data/docs/SmsFull.md +15 -0
- data/docs/SortCallLogs.md +10 -0
- data/docs/SortId.md +8 -0
- data/docs/SortIdCreatedAt.md +9 -0
- data/docs/SortIdExtensionName.md +10 -0
- data/docs/SortIdName.md +9 -0
- data/docs/SortIdNamePhoneNumber.md +10 -0
- data/docs/SortIdUpdatedAt.md +9 -0
- data/docs/SortListAvailableNumbers.md +10 -0
- data/docs/SortListPhoneNumbersRegions.md +14 -0
- data/docs/SortNameNumber.md +9 -0
- data/docs/SubaccountPricingApi.md +261 -0
- data/docs/SubaccountsApi.md +133 -0
- data/docs/TrunkFull.md +15 -0
- data/docs/TrunkSummary.md +9 -0
- data/docs/TrunksApi.md +314 -0
- data/docs/Voicemail.md +13 -0
- data/docs/VoicemailApi.md +207 -0
- data/docs/VoicemailFull.md +16 -0
- data/docs/VoicemailInput.md +13 -0
- data/git_push.sh +55 -0
- data/lib/phone_com_client/api/accounts_api.rb +144 -0
- data/lib/phone_com_client/api/applications_api.rb +166 -0
- data/lib/phone_com_client/api/available_numbers_api.rb +131 -0
- data/lib/phone_com_client/api/call_logs_api.rb +204 -0
- data/lib/phone_com_client/api/caller_ids_api.rb +112 -0
- data/lib/phone_com_client/api/calls_api.rb +79 -0
- data/lib/phone_com_client/api/contacts_api.rb +377 -0
- data/lib/phone_com_client/api/default_api.rb +71 -0
- data/lib/phone_com_client/api/devices_api.rb +344 -0
- data/lib/phone_com_client/api/express_service_codes_api.rb +140 -0
- data/lib/phone_com_client/api/extensions_api.rb +294 -0
- data/lib/phone_com_client/api/groups_api.rb +382 -0
- data/lib/phone_com_client/api/listeners_api.rb +334 -0
- data/lib/phone_com_client/api/media_api.rb +470 -0
- data/lib/phone_com_client/api/menus_api.rb +344 -0
- data/lib/phone_com_client/api/number_regions_api.rb +149 -0
- data/lib/phone_com_client/api/oauth_api.rb +196 -0
- data/lib/phone_com_client/api/oauth_clients_api.rb +216 -0
- data/lib/phone_com_client/api/oauth_clients_redirect_uris_api.rb +296 -0
- data/lib/phone_com_client/api/payment_methods_api.rb +338 -0
- data/lib/phone_com_client/api/phone_numbers_api.rb +294 -0
- data/lib/phone_com_client/api/queues_api.rb +344 -0
- data/lib/phone_com_client/api/routes_api.rb +344 -0
- data/lib/phone_com_client/api/schedules_api.rb +166 -0
- data/lib/phone_com_client/api/sms_api.rb +316 -0
- data/lib/phone_com_client/api/subaccount_pricing_api.rb +300 -0
- data/lib/phone_com_client/api/subaccounts_api.rb +156 -0
- data/lib/phone_com_client/api/trunks_api.rb +352 -0
- data/lib/phone_com_client/api/voicemail_api.rb +252 -0
- data/lib/phone_com_client/api_client.rb +389 -0
- data/lib/phone_com_client/api_error.rb +38 -0
- data/lib/phone_com_client/configuration.rb +209 -0
- data/lib/phone_com_client/models/account_full.rb +245 -0
- data/lib/phone_com_client/models/account_summary.rb +195 -0
- data/lib/phone_com_client/models/address.rb +250 -0
- data/lib/phone_com_client/models/address_list_contacts.rb +234 -0
- data/lib/phone_com_client/models/application_full.rb +195 -0
- data/lib/phone_com_client/models/application_summary.rb +195 -0
- data/lib/phone_com_client/models/available_numbers_full.rb +285 -0
- data/lib/phone_com_client/models/call_details.rb +225 -0
- data/lib/phone_com_client/models/call_full.rb +185 -0
- data/lib/phone_com_client/models/call_log_full.rb +377 -0
- data/lib/phone_com_client/models/call_notifications.rb +197 -0
- data/lib/phone_com_client/models/callback_object.rb +234 -0
- data/lib/phone_com_client/models/caller_id_full.rb +205 -0
- data/lib/phone_com_client/models/caller_id_phone_number.rb +210 -0
- data/lib/phone_com_client/models/contact_account.rb +243 -0
- data/lib/phone_com_client/models/contact_full.rb +370 -0
- data/lib/phone_com_client/models/contact_response.rb +243 -0
- data/lib/phone_com_client/models/contact_summary.rb +255 -0
- data/lib/phone_com_client/models/create_call_params.rb +254 -0
- data/lib/phone_com_client/models/create_contact_params.rb +340 -0
- data/lib/phone_com_client/models/create_device_params.rb +196 -0
- data/lib/phone_com_client/models/create_extension_params.rb +302 -0
- data/lib/phone_com_client/models/create_group_params.rb +184 -0
- data/lib/phone_com_client/models/create_listener_params.rb +206 -0
- data/lib/phone_com_client/models/create_media_params.rb +274 -0
- data/lib/phone_com_client/models/create_menu_params.rb +239 -0
- data/lib/phone_com_client/models/create_oauth_params.rb +264 -0
- data/lib/phone_com_client/models/create_payment_params.rb +214 -0
- data/lib/phone_com_client/models/create_phone_number_params.rb +251 -0
- data/lib/phone_com_client/models/create_pricing_params.rb +204 -0
- data/lib/phone_com_client/models/create_queue_params.rb +246 -0
- data/lib/phone_com_client/models/create_redirect_uri_params.rb +184 -0
- data/lib/phone_com_client/models/create_route_params.rb +206 -0
- data/lib/phone_com_client/models/create_sms_params.rb +229 -0
- data/lib/phone_com_client/models/create_subaccount_params.rb +224 -0
- data/lib/phone_com_client/models/create_trunk_params.rb +246 -0
- data/lib/phone_com_client/models/delete_entry.rb +183 -0
- data/lib/phone_com_client/models/device_full.rb +216 -0
- data/lib/phone_com_client/models/device_membership.rb +195 -0
- data/lib/phone_com_client/models/device_summary.rb +195 -0
- data/lib/phone_com_client/models/email.rb +194 -0
- data/lib/phone_com_client/models/express_service_code_full.rb +207 -0
- data/lib/phone_com_client/models/extension_full.rb +342 -0
- data/lib/phone_com_client/models/extension_summary.rb +205 -0
- data/lib/phone_com_client/models/filter_call_logs.rb +228 -0
- data/lib/phone_com_client/models/filter_id_array.rb +183 -0
- data/lib/phone_com_client/models/filter_id_direction_from.rb +201 -0
- data/lib/phone_com_client/models/filter_id_extension_name_array.rb +201 -0
- data/lib/phone_com_client/models/filter_id_group_id_updated_at_array.rb +201 -0
- data/lib/phone_com_client/models/filter_id_name_array.rb +192 -0
- data/lib/phone_com_client/models/filter_id_name_phone_number_array.rb +201 -0
- data/lib/phone_com_client/models/filter_list_available_numbers.rb +264 -0
- data/lib/phone_com_client/models/filter_list_phone_numbers_regions.rb +237 -0
- data/lib/phone_com_client/models/filter_name_number_array.rb +192 -0
- data/lib/phone_com_client/models/filter_voicemail_array.rb +228 -0
- data/lib/phone_com_client/models/from_object.rb +215 -0
- data/lib/phone_com_client/models/get_oauth_access_token.rb +203 -0
- data/lib/phone_com_client/models/greeting.rb +215 -0
- data/lib/phone_com_client/models/greeting_input.rb +215 -0
- data/lib/phone_com_client/models/group_full.rb +195 -0
- data/lib/phone_com_client/models/group_list_contacts.rb +195 -0
- data/lib/phone_com_client/models/group_summary.rb +195 -0
- data/lib/phone_com_client/models/hold_music.rb +195 -0
- data/lib/phone_com_client/models/line.rb +194 -0
- data/lib/phone_com_client/models/list_accounts.rb +230 -0
- data/lib/phone_com_client/models/list_applications.rb +230 -0
- data/lib/phone_com_client/models/list_available_numbers.rb +230 -0
- data/lib/phone_com_client/models/list_call_logs.rb +230 -0
- data/lib/phone_com_client/models/list_caller_ids.rb +230 -0
- data/lib/phone_com_client/models/list_contacts.rb +230 -0
- data/lib/phone_com_client/models/list_devices.rb +230 -0
- data/lib/phone_com_client/models/list_express_service_codes.rb +232 -0
- data/lib/phone_com_client/models/list_extensions.rb +230 -0
- data/lib/phone_com_client/models/list_groups.rb +230 -0
- data/lib/phone_com_client/models/list_listeners.rb +230 -0
- data/lib/phone_com_client/models/list_media.rb +230 -0
- data/lib/phone_com_client/models/list_menus.rb +230 -0
- data/lib/phone_com_client/models/list_oauth_clients.rb +230 -0
- data/lib/phone_com_client/models/list_oauth_clients_redirect_uris.rb +221 -0
- data/lib/phone_com_client/models/list_payment_methods.rb +230 -0
- data/lib/phone_com_client/models/list_phone_numbers.rb +231 -0
- data/lib/phone_com_client/models/list_phone_numbers_regions.rb +241 -0
- data/lib/phone_com_client/models/list_pricings.rb +230 -0
- data/lib/phone_com_client/models/list_queues.rb +230 -0
- data/lib/phone_com_client/models/list_routes.rb +230 -0
- data/lib/phone_com_client/models/list_schedules.rb +230 -0
- data/lib/phone_com_client/models/list_sms.rb +230 -0
- data/lib/phone_com_client/models/list_trunks.rb +230 -0
- data/lib/phone_com_client/models/list_voicemail.rb +230 -0
- data/lib/phone_com_client/models/listener_full.rb +244 -0
- data/lib/phone_com_client/models/media_full.rb +220 -0
- data/lib/phone_com_client/models/media_summary.rb +195 -0
- data/lib/phone_com_client/models/member.rb +194 -0
- data/lib/phone_com_client/models/menu_full.rb +257 -0
- data/lib/phone_com_client/models/menu_summary.rb +195 -0
- data/lib/phone_com_client/models/notification.rb +197 -0
- data/lib/phone_com_client/models/oauth_access_token.rb +219 -0
- data/lib/phone_com_client/models/oauth_client_full.rb +195 -0
- data/lib/phone_com_client/models/oauth_client_redirect_uri_full.rb +205 -0
- data/lib/phone_com_client/models/option.rb +194 -0
- data/lib/phone_com_client/models/patch_payment_params.rb +184 -0
- data/lib/phone_com_client/models/patch_sms_params.rb +184 -0
- data/lib/phone_com_client/models/patch_voicemail_params.rb +184 -0
- data/lib/phone_com_client/models/payment_full.rb +305 -0
- data/lib/phone_com_client/models/payment_summary.rb +235 -0
- data/lib/phone_com_client/models/phone_number_contact.rb +204 -0
- data/lib/phone_com_client/models/phone_number_full.rb +262 -0
- data/lib/phone_com_client/models/phone_numbers_region_full.rb +255 -0
- data/lib/phone_com_client/models/ping_response.rb +211 -0
- data/lib/phone_com_client/models/pricing_full.rb +235 -0
- data/lib/phone_com_client/models/pricing_object.rb +194 -0
- data/lib/phone_com_client/models/queue_full.rb +266 -0
- data/lib/phone_com_client/models/queue_summary.rb +205 -0
- data/lib/phone_com_client/models/recipient.rb +194 -0
- data/lib/phone_com_client/models/redirect_uri_full.rb +204 -0
- data/lib/phone_com_client/models/replace_extension_params.rb +312 -0
- data/lib/phone_com_client/models/replace_menu_params.rb +239 -0
- data/lib/phone_com_client/models/replace_phone_number_params.rb +251 -0
- data/lib/phone_com_client/models/route_full.rb +217 -0
- data/lib/phone_com_client/models/route_summary.rb +195 -0
- data/lib/phone_com_client/models/rule_set.rb +195 -0
- data/lib/phone_com_client/models/rule_set_action.rb +292 -0
- data/lib/phone_com_client/models/rule_set_filter.rb +230 -0
- data/lib/phone_com_client/models/rule_set_forward_item.rb +294 -0
- data/lib/phone_com_client/models/schedule_full.rb +195 -0
- data/lib/phone_com_client/models/schedule_summary.rb +195 -0
- data/lib/phone_com_client/models/scope_details.rb +183 -0
- data/lib/phone_com_client/models/sip_authentication.rb +215 -0
- data/lib/phone_com_client/models/sms_forwarding.rb +220 -0
- data/lib/phone_com_client/models/sms_forwarding_params.rb +220 -0
- data/lib/phone_com_client/models/sms_full.rb +257 -0
- data/lib/phone_com_client/models/sort_call_logs.rb +201 -0
- data/lib/phone_com_client/models/sort_id.rb +183 -0
- data/lib/phone_com_client/models/sort_id_created_at.rb +192 -0
- data/lib/phone_com_client/models/sort_id_extension_name.rb +201 -0
- data/lib/phone_com_client/models/sort_id_name.rb +192 -0
- data/lib/phone_com_client/models/sort_id_name_phone_number.rb +201 -0
- data/lib/phone_com_client/models/sort_id_updated_at.rb +192 -0
- data/lib/phone_com_client/models/sort_list_available_numbers.rb +201 -0
- data/lib/phone_com_client/models/sort_list_phone_numbers_regions.rb +237 -0
- data/lib/phone_com_client/models/sort_name_number.rb +192 -0
- data/lib/phone_com_client/models/trunk_full.rb +297 -0
- data/lib/phone_com_client/models/trunk_summary.rb +205 -0
- data/lib/phone_com_client/models/voicemail.rb +234 -0
- data/lib/phone_com_client/models/voicemail_full.rb +265 -0
- data/lib/phone_com_client/models/voicemail_input.rb +234 -0
- data/lib/phone_com_client/version.rb +15 -0
- data/lib/phone_com_client.rb +214 -0
- data/phone_com_client.gemspec +45 -0
- data/spec/api/accounts_api_spec.rb +63 -0
- data/spec/api/applications_api_spec.rb +67 -0
- data/spec/api/available_numbers_api_spec.rb +62 -0
- data/spec/api/call_logs_api_spec.rb +73 -0
- data/spec/api/caller_ids_api_spec.rb +55 -0
- data/spec/api/calls_api_spec.rb +48 -0
- data/spec/api/contacts_api_spec.rb +113 -0
- data/spec/api/default_api_spec.rb +46 -0
- data/spec/api/devices_api_spec.rb +107 -0
- data/spec/api/express_service_codes_api_spec.rb +61 -0
- data/spec/api/extensions_api_spec.rb +96 -0
- data/spec/api/groups_api_spec.rb +112 -0
- data/spec/api/listeners_api_spec.rb +105 -0
- data/spec/api/media_api_spec.rb +136 -0
- data/spec/api/menus_api_spec.rb +107 -0
- data/spec/api/number_regions_api_spec.rb +64 -0
- data/spec/api/oauth_api_spec.rb +73 -0
- data/spec/api/oauth_clients_api_spec.rb +78 -0
- data/spec/api/oauth_clients_redirect_uris_api_spec.rb +95 -0
- data/spec/api/payment_methods_api_spec.rb +105 -0
- data/spec/api/phone_numbers_api_spec.rb +96 -0
- data/spec/api/queues_api_spec.rb +107 -0
- data/spec/api/routes_api_spec.rb +107 -0
- data/spec/api/schedules_api_spec.rb +67 -0
- data/spec/api/sms_api_spec.rb +98 -0
- data/spec/api/subaccount_pricing_api_spec.rb +95 -0
- data/spec/api/subaccounts_api_spec.rb +65 -0
- data/spec/api/trunks_api_spec.rb +107 -0
- data/spec/api/voicemail_api_spec.rb +85 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_full_spec.rb +77 -0
- data/spec/models/account_summary_spec.rb +47 -0
- data/spec/models/address_list_contacts_spec.rb +71 -0
- data/spec/models/address_spec.rb +71 -0
- data/spec/models/application_full_spec.rb +47 -0
- data/spec/models/application_summary_spec.rb +47 -0
- data/spec/models/available_numbers_full_spec.rb +101 -0
- data/spec/models/call_details_spec.rb +65 -0
- data/spec/models/call_full_spec.rb +41 -0
- data/spec/models/call_log_full_spec.rb +155 -0
- data/spec/models/call_notifications_spec.rb +47 -0
- data/spec/models/callback_object_spec.rb +71 -0
- data/spec/models/caller_id_full_spec.rb +53 -0
- data/spec/models/caller_id_phone_number_spec.rb +47 -0
- data/spec/models/contact_account_spec.rb +77 -0
- data/spec/models/contact_full_spec.rb +149 -0
- data/spec/models/contact_response_spec.rb +77 -0
- data/spec/models/contact_summary_spec.rb +83 -0
- data/spec/models/create_call_params_spec.rb +83 -0
- data/spec/models/create_contact_params_spec.rb +131 -0
- data/spec/models/create_device_params_spec.rb +47 -0
- data/spec/models/create_extension_params_spec.rb +113 -0
- data/spec/models/create_group_params_spec.rb +41 -0
- data/spec/models/create_listener_params_spec.rb +53 -0
- data/spec/models/create_media_params_spec.rb +95 -0
- data/spec/models/create_menu_params_spec.rb +77 -0
- data/spec/models/create_oauth_params_spec.rb +89 -0
- data/spec/models/create_payment_params_spec.rb +59 -0
- data/spec/models/create_phone_number_params_spec.rb +83 -0
- data/spec/models/create_pricing_params_spec.rb +53 -0
- data/spec/models/create_queue_params_spec.rb +77 -0
- data/spec/models/create_redirect_uri_params_spec.rb +41 -0
- data/spec/models/create_route_params_spec.rb +53 -0
- data/spec/models/create_sms_params_spec.rb +59 -0
- data/spec/models/create_subaccount_params_spec.rb +59 -0
- data/spec/models/create_trunk_params_spec.rb +77 -0
- data/spec/models/delete_entry_spec.rb +41 -0
- data/spec/models/device_full_spec.rb +59 -0
- data/spec/models/device_membership_spec.rb +47 -0
- data/spec/models/device_summary_spec.rb +47 -0
- data/spec/models/email_spec.rb +47 -0
- data/spec/models/express_service_code_full_spec.rb +53 -0
- data/spec/models/extension_full_spec.rb +137 -0
- data/spec/models/extension_summary_spec.rb +53 -0
- data/spec/models/filter_call_logs_spec.rb +71 -0
- data/spec/models/filter_id_array_spec.rb +41 -0
- data/spec/models/filter_id_direction_from_spec.rb +53 -0
- data/spec/models/filter_id_extension_name_array_spec.rb +53 -0
- data/spec/models/filter_id_group_id_updated_at_array_spec.rb +53 -0
- data/spec/models/filter_id_name_array_spec.rb +47 -0
- data/spec/models/filter_id_name_phone_number_array_spec.rb +53 -0
- data/spec/models/filter_list_available_numbers_spec.rb +95 -0
- data/spec/models/filter_list_phone_numbers_regions_spec.rb +77 -0
- data/spec/models/filter_name_number_array_spec.rb +47 -0
- data/spec/models/filter_voicemail_array_spec.rb +71 -0
- data/spec/models/from_object_spec.rb +59 -0
- data/spec/models/get_oauth_access_token_spec.rb +53 -0
- data/spec/models/greeting_input_spec.rb +59 -0
- data/spec/models/greeting_spec.rb +59 -0
- data/spec/models/group_full_spec.rb +47 -0
- data/spec/models/group_list_contacts_spec.rb +47 -0
- data/spec/models/group_summary_spec.rb +47 -0
- data/spec/models/hold_music_spec.rb +47 -0
- data/spec/models/line_spec.rb +47 -0
- data/spec/models/list_accounts_spec.rb +71 -0
- data/spec/models/list_applications_spec.rb +71 -0
- data/spec/models/list_available_numbers_spec.rb +71 -0
- data/spec/models/list_call_logs_spec.rb +71 -0
- data/spec/models/list_caller_ids_spec.rb +71 -0
- data/spec/models/list_contacts_spec.rb +71 -0
- data/spec/models/list_devices_spec.rb +71 -0
- data/spec/models/list_express_service_codes_spec.rb +71 -0
- data/spec/models/list_extensions_spec.rb +71 -0
- data/spec/models/list_groups_spec.rb +71 -0
- data/spec/models/list_listeners_spec.rb +71 -0
- data/spec/models/list_media_spec.rb +71 -0
- data/spec/models/list_menus_spec.rb +71 -0
- data/spec/models/list_oauth_clients_redirect_uris_spec.rb +65 -0
- data/spec/models/list_oauth_clients_spec.rb +71 -0
- data/spec/models/list_payment_methods_spec.rb +71 -0
- data/spec/models/list_phone_numbers_regions_spec.rb +77 -0
- data/spec/models/list_phone_numbers_spec.rb +71 -0
- data/spec/models/list_pricings_spec.rb +71 -0
- data/spec/models/list_queues_spec.rb +71 -0
- data/spec/models/list_routes_spec.rb +71 -0
- data/spec/models/list_schedules_spec.rb +71 -0
- data/spec/models/list_sms_spec.rb +71 -0
- data/spec/models/list_trunks_spec.rb +71 -0
- data/spec/models/list_voicemail_spec.rb +71 -0
- data/spec/models/listener_full_spec.rb +77 -0
- data/spec/models/media_full_spec.rb +53 -0
- data/spec/models/media_summary_spec.rb +47 -0
- data/spec/models/member_spec.rb +47 -0
- data/spec/models/menu_full_spec.rb +83 -0
- data/spec/models/menu_summary_spec.rb +47 -0
- data/spec/models/notification_spec.rb +47 -0
- data/spec/models/oauth_access_token_spec.rb +65 -0
- data/spec/models/oauth_client_full_spec.rb +47 -0
- data/spec/models/oauth_client_redirect_uri_full_spec.rb +53 -0
- data/spec/models/option_spec.rb +47 -0
- data/spec/models/patch_payment_params_spec.rb +41 -0
- data/spec/models/patch_sms_params_spec.rb +41 -0
- data/spec/models/patch_voicemail_params_spec.rb +41 -0
- data/spec/models/payment_full_spec.rb +113 -0
- data/spec/models/payment_summary_spec.rb +71 -0
- data/spec/models/phone_number_contact_spec.rb +53 -0
- data/spec/models/phone_number_full_spec.rb +89 -0
- data/spec/models/phone_numbers_region_full_spec.rb +83 -0
- data/spec/models/ping_response_spec.rb +59 -0
- data/spec/models/pricing_full_spec.rb +71 -0
- data/spec/models/pricing_object_spec.rb +47 -0
- data/spec/models/queue_full_spec.rb +83 -0
- data/spec/models/queue_summary_spec.rb +47 -0
- data/spec/models/recipient_spec.rb +47 -0
- data/spec/models/redirect_uri_full_spec.rb +53 -0
- data/spec/models/replace_extension_params_spec.rb +119 -0
- data/spec/models/replace_menu_params_spec.rb +77 -0
- data/spec/models/replace_phone_number_params_spec.rb +83 -0
- data/spec/models/route_full_spec.rb +59 -0
- data/spec/models/route_summary_spec.rb +47 -0
- data/spec/models/rule_set_action_spec.rb +95 -0
- data/spec/models/rule_set_filter_spec.rb +59 -0
- data/spec/models/rule_set_forward_item_spec.rb +77 -0
- data/spec/models/rule_set_spec.rb +47 -0
- data/spec/models/schedule_full_spec.rb +47 -0
- data/spec/models/schedule_summary_spec.rb +47 -0
- data/spec/models/scope_details_spec.rb +41 -0
- data/spec/models/sip_authentication_spec.rb +59 -0
- data/spec/models/sms_forwarding_params_spec.rb +53 -0
- data/spec/models/sms_forwarding_spec.rb +53 -0
- data/spec/models/sms_full_spec.rb +83 -0
- data/spec/models/sort_call_logs_spec.rb +53 -0
- data/spec/models/sort_id_created_at_spec.rb +47 -0
- data/spec/models/sort_id_extension_name_spec.rb +53 -0
- data/spec/models/sort_id_name_phone_number_spec.rb +53 -0
- data/spec/models/sort_id_name_spec.rb +47 -0
- data/spec/models/sort_id_spec.rb +41 -0
- data/spec/models/sort_id_updated_at_spec.rb +47 -0
- data/spec/models/sort_list_available_numbers_spec.rb +53 -0
- data/spec/models/sort_list_phone_numbers_regions_spec.rb +77 -0
- data/spec/models/sort_name_number_spec.rb +47 -0
- data/spec/models/trunk_full_spec.rb +83 -0
- data/spec/models/trunk_summary_spec.rb +47 -0
- data/spec/models/voicemail_full_spec.rb +89 -0
- data/spec/models/voicemail_input_spec.rb +71 -0
- data/spec/models/voicemail_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +942 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Phone.com API
|
|
3
|
+
|
|
4
|
+
#This is a Phone.com api PhoneCom definition
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0.0
|
|
7
|
+
Contact: apisupport@phone.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
PhoneCom Codegen version: 2.4.4
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PhoneComClient
|
|
16
|
+
# Filter Object. Optional. See below for details.
|
|
17
|
+
class RuleSetFilter
|
|
18
|
+
# Required.
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
# Schedule that this filter refers to. Output is a Schedule Summary Object. Input must be a Schedule Lookup Object. Required.
|
|
22
|
+
attr_accessor :schedule
|
|
23
|
+
|
|
24
|
+
# Address Book Contact that this filter refers to. Output is a Contact Summary Object. Input must be a Contact Lookup Object. Required.
|
|
25
|
+
attr_accessor :contact
|
|
26
|
+
|
|
27
|
+
# Address Book Group that this filter refers to. Output is a Contact Group Summary Object. Input must be a Contact Group Lookup Object. Required.
|
|
28
|
+
attr_accessor :group
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'type' => :'type',
|
|
34
|
+
:'schedule' => :'schedule',
|
|
35
|
+
:'contact' => :'contact',
|
|
36
|
+
:'group' => :'group'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.swagger_types
|
|
42
|
+
{
|
|
43
|
+
:'type' => :'String',
|
|
44
|
+
:'schedule' => :'ScheduleSummary',
|
|
45
|
+
:'contact' => :'ContactSummary',
|
|
46
|
+
:'group' => :'GroupSummary'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
57
|
+
|
|
58
|
+
if attributes.has_key?(:'type')
|
|
59
|
+
self.type = attributes[:'type']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes.has_key?(:'schedule')
|
|
63
|
+
self.schedule = attributes[:'schedule']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes.has_key?(:'contact')
|
|
67
|
+
self.contact = attributes[:'contact']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'group')
|
|
71
|
+
self.group = attributes[:'group']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
if !@type.nil? && @type !~ Regexp.new(/schedule|contact|contact_group/)
|
|
80
|
+
invalid_properties.push('invalid value for "type", must conform to the pattern /schedule|contact|contact_group/.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
return false if !@type.nil? && @type !~ Regexp.new(/schedule|contact|contact_group/)
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] type Value to be assigned
|
|
95
|
+
def type=(type)
|
|
96
|
+
if !type.nil? && type !~ Regexp.new(/schedule|contact|contact_group/)
|
|
97
|
+
fail ArgumentError, 'invalid value for "type", must conform to the pattern /schedule|contact|contact_group/.'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@type = type
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
type == o.type &&
|
|
109
|
+
schedule == o.schedule &&
|
|
110
|
+
contact == o.contact &&
|
|
111
|
+
group == o.group
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @see the `==` method
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Fixnum] Hash code
|
|
122
|
+
def hash
|
|
123
|
+
[type, schedule, contact, group].hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
140
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
self
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def _deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :DateTime
|
|
153
|
+
DateTime.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :BOOLEAN
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
temp_model = PhoneComClient.const_get(type).new
|
|
184
|
+
temp_model.build_from_hash(value)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the string representation of the object
|
|
189
|
+
# @return [String] String presentation of the object
|
|
190
|
+
def to_s
|
|
191
|
+
to_hash.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
next if value.nil?
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Outputs non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
# @param [Object] value Any valid value
|
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
|
216
|
+
def _to_hash(value)
|
|
217
|
+
if value.is_a?(Array)
|
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
|
219
|
+
elsif value.is_a?(Hash)
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
+
end
|
|
223
|
+
elsif value.respond_to? :to_hash
|
|
224
|
+
value.to_hash
|
|
225
|
+
else
|
|
226
|
+
value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Phone.com API
|
|
3
|
+
|
|
4
|
+
#This is a Phone.com api PhoneCom definition
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0.0
|
|
7
|
+
Contact: apisupport@phone.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
PhoneCom Codegen version: 2.4.4
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PhoneComClient
|
|
16
|
+
# Array of Forward Item Objects. See below for details. Required.
|
|
17
|
+
class RuleSetForwardItem
|
|
18
|
+
# Required. Must equal phone_number or extension.
|
|
19
|
+
attr_accessor :type
|
|
20
|
+
|
|
21
|
+
# Required if type = \"extension\". Extension that callers should be directed to. Output is an Extension Summary Object. Input must be an Extension Lookup Object.
|
|
22
|
+
attr_accessor :extension
|
|
23
|
+
|
|
24
|
+
# Required if type = \"phone_number\". Phone number that callers should be directed to. Must be a string in E.164 format.
|
|
25
|
+
attr_accessor :number
|
|
26
|
+
|
|
27
|
+
# Boolean. Optional. Default is FALSE. Use this to activate call screening. If TRUE, the timeout on the parent action should be at least 30 seconds.
|
|
28
|
+
attr_accessor :screening
|
|
29
|
+
|
|
30
|
+
# Optional. Must equal calling_number or called_number. Defines which phone number should be used for Caller ID. Default is calling_number.
|
|
31
|
+
attr_accessor :caller_id
|
|
32
|
+
|
|
33
|
+
# Optional string. If screening = TRUE, this value will be passed into our Text-To-Speech engine and used to inform the caller of who they have reached.
|
|
34
|
+
attr_accessor :voice_tag
|
|
35
|
+
|
|
36
|
+
# Optional. Must equal one of: DEFAULT, STYLE_2, STYLE_3, STYLE_4, STYLE_5, STYLE_6, STYLE_7, STYLE_8, or STYLE_9. Identifies the style of ring tone you will hear when an incoming call is waiting.
|
|
37
|
+
attr_accessor :distinctive_ring
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'type' => :'type',
|
|
43
|
+
:'extension' => :'extension',
|
|
44
|
+
:'number' => :'number',
|
|
45
|
+
:'screening' => :'screening',
|
|
46
|
+
:'caller_id' => :'caller_id',
|
|
47
|
+
:'voice_tag' => :'voice_tag',
|
|
48
|
+
:'distinctive_ring' => :'distinctive_ring'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute type mapping.
|
|
53
|
+
def self.swagger_types
|
|
54
|
+
{
|
|
55
|
+
:'type' => :'String',
|
|
56
|
+
:'extension' => :'ExtensionSummary',
|
|
57
|
+
:'number' => :'String',
|
|
58
|
+
:'screening' => :'BOOLEAN',
|
|
59
|
+
:'caller_id' => :'String',
|
|
60
|
+
:'voice_tag' => :'String',
|
|
61
|
+
:'distinctive_ring' => :'String'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Initializes the object
|
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
return unless attributes.is_a?(Hash)
|
|
69
|
+
|
|
70
|
+
# convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
72
|
+
|
|
73
|
+
if attributes.has_key?(:'type')
|
|
74
|
+
self.type = attributes[:'type']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.has_key?(:'extension')
|
|
78
|
+
self.extension = attributes[:'extension']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.has_key?(:'number')
|
|
82
|
+
self.number = attributes[:'number']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.has_key?(:'screening')
|
|
86
|
+
self.screening = attributes[:'screening']
|
|
87
|
+
else
|
|
88
|
+
self.screening = false
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.has_key?(:'caller_id')
|
|
92
|
+
self.caller_id = attributes[:'caller_id']
|
|
93
|
+
else
|
|
94
|
+
self.caller_id = 'calling_number'
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.has_key?(:'voice_tag')
|
|
98
|
+
self.voice_tag = attributes[:'voice_tag']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.has_key?(:'distinctive_ring')
|
|
102
|
+
self.distinctive_ring = attributes[:'distinctive_ring']
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
if !@type.nil? && @type !~ Regexp.new(/phone_number|extension/)
|
|
111
|
+
invalid_properties.push('invalid value for "type", must conform to the pattern /phone_number|extension/.')
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if !@caller_id.nil? && @caller_id !~ Regexp.new(/calling_number|called_number/)
|
|
115
|
+
invalid_properties.push('invalid value for "caller_id", must conform to the pattern /calling_number|called_number/.')
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if !@distinctive_ring.nil? && @distinctive_ring !~ Regexp.new(/DEFAULT|STYLE_2|STYLE_3|STYLE_4|STYLE_5|STYLE_6|STYLE_7|STYLE_8|STYLE_9/)
|
|
119
|
+
invalid_properties.push('invalid value for "distinctive_ring", must conform to the pattern /DEFAULT|STYLE_2|STYLE_3|STYLE_4|STYLE_5|STYLE_6|STYLE_7|STYLE_8|STYLE_9/.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
invalid_properties
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Check to see if the all the properties in the model are valid
|
|
126
|
+
# @return true if the model is valid
|
|
127
|
+
def valid?
|
|
128
|
+
return false if !@type.nil? && @type !~ Regexp.new(/phone_number|extension/)
|
|
129
|
+
return false if !@caller_id.nil? && @caller_id !~ Regexp.new(/calling_number|called_number/)
|
|
130
|
+
return false if !@distinctive_ring.nil? && @distinctive_ring !~ Regexp.new(/DEFAULT|STYLE_2|STYLE_3|STYLE_4|STYLE_5|STYLE_6|STYLE_7|STYLE_8|STYLE_9/)
|
|
131
|
+
true
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Custom attribute writer method with validation
|
|
135
|
+
# @param [Object] type Value to be assigned
|
|
136
|
+
def type=(type)
|
|
137
|
+
if !type.nil? && type !~ Regexp.new(/phone_number|extension/)
|
|
138
|
+
fail ArgumentError, 'invalid value for "type", must conform to the pattern /phone_number|extension/.'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
@type = type
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] caller_id Value to be assigned
|
|
146
|
+
def caller_id=(caller_id)
|
|
147
|
+
if !caller_id.nil? && caller_id !~ Regexp.new(/calling_number|called_number/)
|
|
148
|
+
fail ArgumentError, 'invalid value for "caller_id", must conform to the pattern /calling_number|called_number/.'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@caller_id = caller_id
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] distinctive_ring Value to be assigned
|
|
156
|
+
def distinctive_ring=(distinctive_ring)
|
|
157
|
+
if !distinctive_ring.nil? && distinctive_ring !~ Regexp.new(/DEFAULT|STYLE_2|STYLE_3|STYLE_4|STYLE_5|STYLE_6|STYLE_7|STYLE_8|STYLE_9/)
|
|
158
|
+
fail ArgumentError, 'invalid value for "distinctive_ring", must conform to the pattern /DEFAULT|STYLE_2|STYLE_3|STYLE_4|STYLE_5|STYLE_6|STYLE_7|STYLE_8|STYLE_9/.'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
@distinctive_ring = distinctive_ring
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Checks equality by comparing each attribute.
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def ==(o)
|
|
167
|
+
return true if self.equal?(o)
|
|
168
|
+
self.class == o.class &&
|
|
169
|
+
type == o.type &&
|
|
170
|
+
extension == o.extension &&
|
|
171
|
+
number == o.number &&
|
|
172
|
+
screening == o.screening &&
|
|
173
|
+
caller_id == o.caller_id &&
|
|
174
|
+
voice_tag == o.voice_tag &&
|
|
175
|
+
distinctive_ring == o.distinctive_ring
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# @see the `==` method
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def eql?(o)
|
|
181
|
+
self == o
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Calculates hash code according to all attributes.
|
|
185
|
+
# @return [Fixnum] Hash code
|
|
186
|
+
def hash
|
|
187
|
+
[type, extension, number, screening, caller_id, voice_tag, distinctive_ring].hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
196
|
+
if type =~ /\AArray<(.*)>/i
|
|
197
|
+
# check to ensure the input is an array given that the the attribute
|
|
198
|
+
# is documented as an array but the input is not
|
|
199
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
200
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
201
|
+
end
|
|
202
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
203
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
204
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
self
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Deserializes the data based on type
|
|
211
|
+
# @param string type Data type
|
|
212
|
+
# @param string value Value to be deserialized
|
|
213
|
+
# @return [Object] Deserialized data
|
|
214
|
+
def _deserialize(type, value)
|
|
215
|
+
case type.to_sym
|
|
216
|
+
when :DateTime
|
|
217
|
+
DateTime.parse(value)
|
|
218
|
+
when :Date
|
|
219
|
+
Date.parse(value)
|
|
220
|
+
when :String
|
|
221
|
+
value.to_s
|
|
222
|
+
when :Integer
|
|
223
|
+
value.to_i
|
|
224
|
+
when :Float
|
|
225
|
+
value.to_f
|
|
226
|
+
when :BOOLEAN
|
|
227
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
228
|
+
true
|
|
229
|
+
else
|
|
230
|
+
false
|
|
231
|
+
end
|
|
232
|
+
when :Object
|
|
233
|
+
# generic object (usually a Hash), return directly
|
|
234
|
+
value
|
|
235
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
236
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
237
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
238
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
239
|
+
k_type = Regexp.last_match[:k_type]
|
|
240
|
+
v_type = Regexp.last_match[:v_type]
|
|
241
|
+
{}.tap do |hash|
|
|
242
|
+
value.each do |k, v|
|
|
243
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
else # model
|
|
247
|
+
temp_model = PhoneComClient.const_get(type).new
|
|
248
|
+
temp_model.build_from_hash(value)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Returns the string representation of the object
|
|
253
|
+
# @return [String] String presentation of the object
|
|
254
|
+
def to_s
|
|
255
|
+
to_hash.to_s
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
259
|
+
# @return [Hash] Returns the object in the form of hash
|
|
260
|
+
def to_body
|
|
261
|
+
to_hash
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Returns the object in the form of hash
|
|
265
|
+
# @return [Hash] Returns the object in the form of hash
|
|
266
|
+
def to_hash
|
|
267
|
+
hash = {}
|
|
268
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
269
|
+
value = self.send(attr)
|
|
270
|
+
next if value.nil?
|
|
271
|
+
hash[param] = _to_hash(value)
|
|
272
|
+
end
|
|
273
|
+
hash
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Outputs non-array value in the form of hash
|
|
277
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
278
|
+
# @param [Object] value Any valid value
|
|
279
|
+
# @return [Hash] Returns the value in the form of hash
|
|
280
|
+
def _to_hash(value)
|
|
281
|
+
if value.is_a?(Array)
|
|
282
|
+
value.compact.map { |v| _to_hash(v) }
|
|
283
|
+
elsif value.is_a?(Hash)
|
|
284
|
+
{}.tap do |hash|
|
|
285
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
286
|
+
end
|
|
287
|
+
elsif value.respond_to? :to_hash
|
|
288
|
+
value.to_hash
|
|
289
|
+
else
|
|
290
|
+
value
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
end
|