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,251 @@
|
|
|
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
|
+
class CreatePhoneNumberParams
|
|
17
|
+
# Phone number
|
|
18
|
+
attr_accessor :phone_number
|
|
19
|
+
|
|
20
|
+
# Route lookup object
|
|
21
|
+
attr_accessor :route
|
|
22
|
+
|
|
23
|
+
# Phone Name
|
|
24
|
+
attr_accessor :name
|
|
25
|
+
|
|
26
|
+
# Block incoming calls
|
|
27
|
+
attr_accessor :block_incoming
|
|
28
|
+
|
|
29
|
+
# Block anonymous calls
|
|
30
|
+
attr_accessor :block_anonymous
|
|
31
|
+
|
|
32
|
+
attr_accessor :caller_id
|
|
33
|
+
|
|
34
|
+
attr_accessor :sms_forwarding
|
|
35
|
+
|
|
36
|
+
attr_accessor :call_notifications
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'phone_number' => :'phone_number',
|
|
42
|
+
:'route' => :'route',
|
|
43
|
+
:'name' => :'name',
|
|
44
|
+
:'block_incoming' => :'block_incoming',
|
|
45
|
+
:'block_anonymous' => :'block_anonymous',
|
|
46
|
+
:'caller_id' => :'caller_id',
|
|
47
|
+
:'sms_forwarding' => :'sms_forwarding',
|
|
48
|
+
:'call_notifications' => :'call_notifications'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Attribute type mapping.
|
|
53
|
+
def self.swagger_types
|
|
54
|
+
{
|
|
55
|
+
:'phone_number' => :'Object',
|
|
56
|
+
:'route' => :'Object',
|
|
57
|
+
:'name' => :'String',
|
|
58
|
+
:'block_incoming' => :'String',
|
|
59
|
+
:'block_anonymous' => :'String',
|
|
60
|
+
:'caller_id' => :'CallerIdPhoneNumber',
|
|
61
|
+
:'sms_forwarding' => :'SmsForwardingParams',
|
|
62
|
+
:'call_notifications' => :'CallNotifications'
|
|
63
|
+
}
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
return unless attributes.is_a?(Hash)
|
|
70
|
+
|
|
71
|
+
# convert string to symbol for hash key
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'phone_number')
|
|
75
|
+
self.phone_number = attributes[:'phone_number']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'route')
|
|
79
|
+
self.route = attributes[:'route']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.has_key?(:'name')
|
|
83
|
+
self.name = attributes[:'name']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'block_incoming')
|
|
87
|
+
self.block_incoming = attributes[:'block_incoming']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.has_key?(:'block_anonymous')
|
|
91
|
+
self.block_anonymous = attributes[:'block_anonymous']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.has_key?(:'caller_id')
|
|
95
|
+
self.caller_id = attributes[:'caller_id']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.has_key?(:'sms_forwarding')
|
|
99
|
+
self.sms_forwarding = attributes[:'sms_forwarding']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.has_key?(:'call_notifications')
|
|
103
|
+
self.call_notifications = attributes[:'call_notifications']
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
invalid_properties
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Check to see if the all the properties in the model are valid
|
|
115
|
+
# @return true if the model is valid
|
|
116
|
+
def valid?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
phone_number == o.phone_number &&
|
|
126
|
+
route == o.route &&
|
|
127
|
+
name == o.name &&
|
|
128
|
+
block_incoming == o.block_incoming &&
|
|
129
|
+
block_anonymous == o.block_anonymous &&
|
|
130
|
+
caller_id == o.caller_id &&
|
|
131
|
+
sms_forwarding == o.sms_forwarding &&
|
|
132
|
+
call_notifications == o.call_notifications
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# @see the `==` method
|
|
136
|
+
# @param [Object] Object to be compared
|
|
137
|
+
def eql?(o)
|
|
138
|
+
self == o
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Calculates hash code according to all attributes.
|
|
142
|
+
# @return [Fixnum] Hash code
|
|
143
|
+
def hash
|
|
144
|
+
[phone_number, route, name, block_incoming, block_anonymous, caller_id, sms_forwarding, call_notifications].hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Builds the object from hash
|
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
149
|
+
# @return [Object] Returns the model itself
|
|
150
|
+
def build_from_hash(attributes)
|
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
|
152
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
153
|
+
if type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
157
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
160
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
161
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
self
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Deserializes the data based on type
|
|
168
|
+
# @param string type Data type
|
|
169
|
+
# @param string value Value to be deserialized
|
|
170
|
+
# @return [Object] Deserialized data
|
|
171
|
+
def _deserialize(type, value)
|
|
172
|
+
case type.to_sym
|
|
173
|
+
when :DateTime
|
|
174
|
+
DateTime.parse(value)
|
|
175
|
+
when :Date
|
|
176
|
+
Date.parse(value)
|
|
177
|
+
when :String
|
|
178
|
+
value.to_s
|
|
179
|
+
when :Integer
|
|
180
|
+
value.to_i
|
|
181
|
+
when :Float
|
|
182
|
+
value.to_f
|
|
183
|
+
when :BOOLEAN
|
|
184
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
185
|
+
true
|
|
186
|
+
else
|
|
187
|
+
false
|
|
188
|
+
end
|
|
189
|
+
when :Object
|
|
190
|
+
# generic object (usually a Hash), return directly
|
|
191
|
+
value
|
|
192
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
193
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
194
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
195
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
196
|
+
k_type = Regexp.last_match[:k_type]
|
|
197
|
+
v_type = Regexp.last_match[:v_type]
|
|
198
|
+
{}.tap do |hash|
|
|
199
|
+
value.each do |k, v|
|
|
200
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
else # model
|
|
204
|
+
temp_model = PhoneComClient.const_get(type).new
|
|
205
|
+
temp_model.build_from_hash(value)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the string representation of the object
|
|
210
|
+
# @return [String] String presentation of the object
|
|
211
|
+
def to_s
|
|
212
|
+
to_hash.to_s
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_body
|
|
218
|
+
to_hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_hash
|
|
224
|
+
hash = {}
|
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
next if value.nil?
|
|
228
|
+
hash[param] = _to_hash(value)
|
|
229
|
+
end
|
|
230
|
+
hash
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Outputs non-array value in the form of hash
|
|
234
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
235
|
+
# @param [Object] value Any valid value
|
|
236
|
+
# @return [Hash] Returns the value in the form of hash
|
|
237
|
+
def _to_hash(value)
|
|
238
|
+
if value.is_a?(Array)
|
|
239
|
+
value.compact.map { |v| _to_hash(v) }
|
|
240
|
+
elsif value.is_a?(Hash)
|
|
241
|
+
{}.tap do |hash|
|
|
242
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
243
|
+
end
|
|
244
|
+
elsif value.respond_to? :to_hash
|
|
245
|
+
value.to_hash
|
|
246
|
+
else
|
|
247
|
+
value
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
@@ -0,0 +1,204 @@
|
|
|
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
|
+
class CreatePricingParams
|
|
17
|
+
# Pricing plan code
|
|
18
|
+
attr_accessor :pricing_id
|
|
19
|
+
|
|
20
|
+
# Reason this pricing plan is added to the subaccount
|
|
21
|
+
attr_accessor :reason
|
|
22
|
+
|
|
23
|
+
# Pricing plan expiration time in UNIX format. Disregard or set it to null for plan which never expires
|
|
24
|
+
attr_accessor :expire_date
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'pricing_id' => :'pricing_id',
|
|
30
|
+
:'reason' => :'reason',
|
|
31
|
+
:'expire_date' => :'expire_date'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.swagger_types
|
|
37
|
+
{
|
|
38
|
+
:'pricing_id' => :'Integer',
|
|
39
|
+
:'reason' => :'String',
|
|
40
|
+
:'expire_date' => :'Integer'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Initializes the object
|
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
return unless attributes.is_a?(Hash)
|
|
48
|
+
|
|
49
|
+
# convert string to symbol for hash key
|
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
51
|
+
|
|
52
|
+
if attributes.has_key?(:'pricing_id')
|
|
53
|
+
self.pricing_id = attributes[:'pricing_id']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
if attributes.has_key?(:'reason')
|
|
57
|
+
self.reason = attributes[:'reason']
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.has_key?(:'expire_date')
|
|
61
|
+
self.expire_date = attributes[:'expire_date']
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
+
# @return Array for valid properties with the reasons
|
|
67
|
+
def list_invalid_properties
|
|
68
|
+
invalid_properties = Array.new
|
|
69
|
+
invalid_properties
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Check to see if the all the properties in the model are valid
|
|
73
|
+
# @return true if the model is valid
|
|
74
|
+
def valid?
|
|
75
|
+
true
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Checks equality by comparing each attribute.
|
|
79
|
+
# @param [Object] Object to be compared
|
|
80
|
+
def ==(o)
|
|
81
|
+
return true if self.equal?(o)
|
|
82
|
+
self.class == o.class &&
|
|
83
|
+
pricing_id == o.pricing_id &&
|
|
84
|
+
reason == o.reason &&
|
|
85
|
+
expire_date == o.expire_date
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# @see the `==` method
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def eql?(o)
|
|
91
|
+
self == o
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Calculates hash code according to all attributes.
|
|
95
|
+
# @return [Fixnum] Hash code
|
|
96
|
+
def hash
|
|
97
|
+
[pricing_id, reason, expire_date].hash
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Builds the object from hash
|
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
102
|
+
# @return [Object] Returns the model itself
|
|
103
|
+
def build_from_hash(attributes)
|
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
|
107
|
+
# check to ensure the input is an array given that the the attribute
|
|
108
|
+
# is documented as an array but the input is not
|
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
111
|
+
end
|
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
self
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Deserializes the data based on type
|
|
121
|
+
# @param string type Data type
|
|
122
|
+
# @param string value Value to be deserialized
|
|
123
|
+
# @return [Object] Deserialized data
|
|
124
|
+
def _deserialize(type, value)
|
|
125
|
+
case type.to_sym
|
|
126
|
+
when :DateTime
|
|
127
|
+
DateTime.parse(value)
|
|
128
|
+
when :Date
|
|
129
|
+
Date.parse(value)
|
|
130
|
+
when :String
|
|
131
|
+
value.to_s
|
|
132
|
+
when :Integer
|
|
133
|
+
value.to_i
|
|
134
|
+
when :Float
|
|
135
|
+
value.to_f
|
|
136
|
+
when :BOOLEAN
|
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
138
|
+
true
|
|
139
|
+
else
|
|
140
|
+
false
|
|
141
|
+
end
|
|
142
|
+
when :Object
|
|
143
|
+
# generic object (usually a Hash), return directly
|
|
144
|
+
value
|
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
|
151
|
+
{}.tap do |hash|
|
|
152
|
+
value.each do |k, v|
|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
else # model
|
|
157
|
+
temp_model = PhoneComClient.const_get(type).new
|
|
158
|
+
temp_model.build_from_hash(value)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the string representation of the object
|
|
163
|
+
# @return [String] String presentation of the object
|
|
164
|
+
def to_s
|
|
165
|
+
to_hash.to_s
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
|
170
|
+
def to_body
|
|
171
|
+
to_hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
next if value.nil?
|
|
181
|
+
hash[param] = _to_hash(value)
|
|
182
|
+
end
|
|
183
|
+
hash
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Outputs non-array value in the form of hash
|
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
188
|
+
# @param [Object] value Any valid value
|
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
|
190
|
+
def _to_hash(value)
|
|
191
|
+
if value.is_a?(Array)
|
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
|
193
|
+
elsif value.is_a?(Hash)
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
196
|
+
end
|
|
197
|
+
elsif value.respond_to? :to_hash
|
|
198
|
+
value.to_hash
|
|
199
|
+
else
|
|
200
|
+
value
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
end
|
|
204
|
+
end
|
|
@@ -0,0 +1,246 @@
|
|
|
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
|
+
class CreateQueueParams
|
|
17
|
+
# Name of queue
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
# Recording lookup object
|
|
21
|
+
attr_accessor :greeting
|
|
22
|
+
|
|
23
|
+
# Recording lookup object
|
|
24
|
+
attr_accessor :hold_music
|
|
25
|
+
|
|
26
|
+
# Max seconds for hold
|
|
27
|
+
attr_accessor :max_hold_time
|
|
28
|
+
|
|
29
|
+
# Type of caller id
|
|
30
|
+
attr_accessor :caller_id_type
|
|
31
|
+
|
|
32
|
+
# Number of seconds to ring each member
|
|
33
|
+
attr_accessor :ring_time
|
|
34
|
+
|
|
35
|
+
# Extensions or phone numbers
|
|
36
|
+
attr_accessor :members
|
|
37
|
+
|
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
39
|
+
def self.attribute_map
|
|
40
|
+
{
|
|
41
|
+
:'name' => :'name',
|
|
42
|
+
:'greeting' => :'greeting',
|
|
43
|
+
:'hold_music' => :'hold_music',
|
|
44
|
+
:'max_hold_time' => :'max_hold_time',
|
|
45
|
+
:'caller_id_type' => :'caller_id_type',
|
|
46
|
+
:'ring_time' => :'ring_time',
|
|
47
|
+
:'members' => :'members'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.swagger_types
|
|
53
|
+
{
|
|
54
|
+
:'name' => :'String',
|
|
55
|
+
:'greeting' => :'Object',
|
|
56
|
+
:'hold_music' => :'Object',
|
|
57
|
+
:'max_hold_time' => :'Integer',
|
|
58
|
+
:'caller_id_type' => :'String',
|
|
59
|
+
:'ring_time' => :'Integer',
|
|
60
|
+
:'members' => :'Array<Object>'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
return unless attributes.is_a?(Hash)
|
|
68
|
+
|
|
69
|
+
# convert string to symbol for hash key
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
71
|
+
|
|
72
|
+
if attributes.has_key?(:'name')
|
|
73
|
+
self.name = attributes[:'name']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.has_key?(:'greeting')
|
|
77
|
+
self.greeting = attributes[:'greeting']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.has_key?(:'hold_music')
|
|
81
|
+
self.hold_music = attributes[:'hold_music']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.has_key?(:'max_hold_time')
|
|
85
|
+
self.max_hold_time = attributes[:'max_hold_time']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.has_key?(:'caller_id_type')
|
|
89
|
+
self.caller_id_type = attributes[:'caller_id_type']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.has_key?(:'ring_time')
|
|
93
|
+
self.ring_time = attributes[:'ring_time']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.has_key?(:'members')
|
|
97
|
+
if (value = attributes[:'members']).is_a?(Array)
|
|
98
|
+
self.members = value
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
104
|
+
# @return Array for valid properties with the reasons
|
|
105
|
+
def list_invalid_properties
|
|
106
|
+
invalid_properties = Array.new
|
|
107
|
+
invalid_properties
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Check to see if the all the properties in the model are valid
|
|
111
|
+
# @return true if the model is valid
|
|
112
|
+
def valid?
|
|
113
|
+
true
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
name == o.name &&
|
|
122
|
+
greeting == o.greeting &&
|
|
123
|
+
hold_music == o.hold_music &&
|
|
124
|
+
max_hold_time == o.max_hold_time &&
|
|
125
|
+
caller_id_type == o.caller_id_type &&
|
|
126
|
+
ring_time == o.ring_time &&
|
|
127
|
+
members == o.members
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# @see the `==` method
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def eql?(o)
|
|
133
|
+
self == o
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Calculates hash code according to all attributes.
|
|
137
|
+
# @return [Fixnum] Hash code
|
|
138
|
+
def hash
|
|
139
|
+
[name, greeting, hold_music, max_hold_time, caller_id_type, ring_time, members].hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Builds the object from hash
|
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
144
|
+
# @return [Object] Returns the model itself
|
|
145
|
+
def build_from_hash(attributes)
|
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
|
147
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
148
|
+
if type =~ /\AArray<(.*)>/i
|
|
149
|
+
# check to ensure the input is an array given that the the attribute
|
|
150
|
+
# is documented as an array but the input is not
|
|
151
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
152
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
153
|
+
end
|
|
154
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
155
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
156
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
self
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Deserializes the data based on type
|
|
163
|
+
# @param string type Data type
|
|
164
|
+
# @param string value Value to be deserialized
|
|
165
|
+
# @return [Object] Deserialized data
|
|
166
|
+
def _deserialize(type, value)
|
|
167
|
+
case type.to_sym
|
|
168
|
+
when :DateTime
|
|
169
|
+
DateTime.parse(value)
|
|
170
|
+
when :Date
|
|
171
|
+
Date.parse(value)
|
|
172
|
+
when :String
|
|
173
|
+
value.to_s
|
|
174
|
+
when :Integer
|
|
175
|
+
value.to_i
|
|
176
|
+
when :Float
|
|
177
|
+
value.to_f
|
|
178
|
+
when :BOOLEAN
|
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
180
|
+
true
|
|
181
|
+
else
|
|
182
|
+
false
|
|
183
|
+
end
|
|
184
|
+
when :Object
|
|
185
|
+
# generic object (usually a Hash), return directly
|
|
186
|
+
value
|
|
187
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
188
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
189
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
191
|
+
k_type = Regexp.last_match[:k_type]
|
|
192
|
+
v_type = Regexp.last_match[:v_type]
|
|
193
|
+
{}.tap do |hash|
|
|
194
|
+
value.each do |k, v|
|
|
195
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
else # model
|
|
199
|
+
temp_model = PhoneComClient.const_get(type).new
|
|
200
|
+
temp_model.build_from_hash(value)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the string representation of the object
|
|
205
|
+
# @return [String] String presentation of the object
|
|
206
|
+
def to_s
|
|
207
|
+
to_hash.to_s
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_body
|
|
213
|
+
to_hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the object in the form of hash
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_hash
|
|
219
|
+
hash = {}
|
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
221
|
+
value = self.send(attr)
|
|
222
|
+
next if value.nil?
|
|
223
|
+
hash[param] = _to_hash(value)
|
|
224
|
+
end
|
|
225
|
+
hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Outputs non-array value in the form of hash
|
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
230
|
+
# @param [Object] value Any valid value
|
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
|
232
|
+
def _to_hash(value)
|
|
233
|
+
if value.is_a?(Array)
|
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
|
235
|
+
elsif value.is_a?(Hash)
|
|
236
|
+
{}.tap do |hash|
|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
238
|
+
end
|
|
239
|
+
elsif value.respond_to? :to_hash
|
|
240
|
+
value.to_hash
|
|
241
|
+
else
|
|
242
|
+
value
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
end
|