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,470 @@
|
|
|
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 'uri'
|
|
14
|
+
|
|
15
|
+
module PhoneComClient
|
|
16
|
+
class MediaApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB)
|
|
23
|
+
# See Account Media for more info on the properties.
|
|
24
|
+
# @param account_id Account ID
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :json Media extra parameters
|
|
27
|
+
# @option opts [File] :file Media file
|
|
28
|
+
# @return [MediaFull]
|
|
29
|
+
def create_account_media_files(account_id, opts = {})
|
|
30
|
+
data, _status_code, _headers = create_account_media_files_with_http_info(account_id, opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB)
|
|
35
|
+
# See Account Media for more info on the properties.
|
|
36
|
+
# @param account_id Account ID
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @option opts [String] :json Media extra parameters
|
|
39
|
+
# @option opts [File] :file Media file
|
|
40
|
+
# @return [Array<(MediaFull, Fixnum, Hash)>] MediaFull data, response status code and response headers
|
|
41
|
+
def create_account_media_files_with_http_info(account_id, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.create_account_media_files ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'account_id' is set
|
|
46
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.create_account_media_files"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/accounts/{account_id}/media/files'.sub('{' + 'account_id' + '}', account_id.to_s)
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
59
|
+
# HTTP header 'Content-Type'
|
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = {}
|
|
64
|
+
form_params['json'] = opts[:'json'] if !opts[:'json'].nil?
|
|
65
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
66
|
+
|
|
67
|
+
# http body (model)
|
|
68
|
+
post_body = nil
|
|
69
|
+
auth_names = ['apiKey']
|
|
70
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => 'MediaFull')
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: MediaApi#create_account_media_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
# Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB)
|
|
83
|
+
# See Account Media for more info on the properties.
|
|
84
|
+
# @param account_id Account ID
|
|
85
|
+
# @param [Hash] opts the optional parameters
|
|
86
|
+
# @option opts [CreateMediaParams] :data Media data
|
|
87
|
+
# @return [MediaFull]
|
|
88
|
+
def create_account_media_tts(account_id, opts = {})
|
|
89
|
+
data, _status_code, _headers = create_account_media_tts_with_http_info(account_id, opts)
|
|
90
|
+
data
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Add a media object to your account that can be used as a greeting or hold music. Users may create a media by using the built-in Text-to-speech (TTS) facility or upload a file of their choice. (Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB)
|
|
94
|
+
# See Account Media for more info on the properties.
|
|
95
|
+
# @param account_id Account ID
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [CreateMediaParams] :data Media data
|
|
98
|
+
# @return [Array<(MediaFull, Fixnum, Hash)>] MediaFull data, response status code and response headers
|
|
99
|
+
def create_account_media_tts_with_http_info(account_id, opts = {})
|
|
100
|
+
if @api_client.config.debugging
|
|
101
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.create_account_media_tts ...'
|
|
102
|
+
end
|
|
103
|
+
# verify the required parameter 'account_id' is set
|
|
104
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.create_account_media_tts"
|
|
106
|
+
end
|
|
107
|
+
# resource path
|
|
108
|
+
local_var_path = '/accounts/{account_id}/media/tts'.sub('{' + 'account_id' + '}', account_id.to_s)
|
|
109
|
+
|
|
110
|
+
# query parameters
|
|
111
|
+
query_params = {}
|
|
112
|
+
|
|
113
|
+
# header parameters
|
|
114
|
+
header_params = {}
|
|
115
|
+
# HTTP header 'Accept' (if needed)
|
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
117
|
+
# HTTP header 'Content-Type'
|
|
118
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
119
|
+
|
|
120
|
+
# form parameters
|
|
121
|
+
form_params = {}
|
|
122
|
+
|
|
123
|
+
# http body (model)
|
|
124
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
|
125
|
+
auth_names = ['apiKey']
|
|
126
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
127
|
+
:header_params => header_params,
|
|
128
|
+
:query_params => query_params,
|
|
129
|
+
:form_params => form_params,
|
|
130
|
+
:body => post_body,
|
|
131
|
+
:auth_names => auth_names,
|
|
132
|
+
:return_type => 'MediaFull')
|
|
133
|
+
if @api_client.config.debugging
|
|
134
|
+
@api_client.config.logger.debug "API called: MediaApi#create_account_media_tts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
135
|
+
end
|
|
136
|
+
return data, status_code, headers
|
|
137
|
+
end
|
|
138
|
+
# Delete an individual media record
|
|
139
|
+
# See Account Media for more info on the properties.
|
|
140
|
+
# @param account_id Account ID
|
|
141
|
+
# @param media_id Media ID
|
|
142
|
+
# @param [Hash] opts the optional parameters
|
|
143
|
+
# @return [DeleteEntry]
|
|
144
|
+
def delete_account_media(account_id, media_id, opts = {})
|
|
145
|
+
data, _status_code, _headers = delete_account_media_with_http_info(account_id, media_id, opts)
|
|
146
|
+
data
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Delete an individual media record
|
|
150
|
+
# See Account Media for more info on the properties.
|
|
151
|
+
# @param account_id Account ID
|
|
152
|
+
# @param media_id Media ID
|
|
153
|
+
# @param [Hash] opts the optional parameters
|
|
154
|
+
# @return [Array<(DeleteEntry, Fixnum, Hash)>] DeleteEntry data, response status code and response headers
|
|
155
|
+
def delete_account_media_with_http_info(account_id, media_id, opts = {})
|
|
156
|
+
if @api_client.config.debugging
|
|
157
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.delete_account_media ...'
|
|
158
|
+
end
|
|
159
|
+
# verify the required parameter 'account_id' is set
|
|
160
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
161
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.delete_account_media"
|
|
162
|
+
end
|
|
163
|
+
# verify the required parameter 'media_id' is set
|
|
164
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
|
165
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling MediaApi.delete_account_media"
|
|
166
|
+
end
|
|
167
|
+
# resource path
|
|
168
|
+
local_var_path = '/accounts/{account_id}/media/{media_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'media_id' + '}', media_id.to_s)
|
|
169
|
+
|
|
170
|
+
# query parameters
|
|
171
|
+
query_params = {}
|
|
172
|
+
|
|
173
|
+
# header parameters
|
|
174
|
+
header_params = {}
|
|
175
|
+
# HTTP header 'Accept' (if needed)
|
|
176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
177
|
+
# HTTP header 'Content-Type'
|
|
178
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
179
|
+
|
|
180
|
+
# form parameters
|
|
181
|
+
form_params = {}
|
|
182
|
+
|
|
183
|
+
# http body (model)
|
|
184
|
+
post_body = nil
|
|
185
|
+
auth_names = ['apiKey']
|
|
186
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
187
|
+
:header_params => header_params,
|
|
188
|
+
:query_params => query_params,
|
|
189
|
+
:form_params => form_params,
|
|
190
|
+
:body => post_body,
|
|
191
|
+
:auth_names => auth_names,
|
|
192
|
+
:return_type => 'DeleteEntry')
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug "API called: MediaApi#delete_account_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
|
+
end
|
|
196
|
+
return data, status_code, headers
|
|
197
|
+
end
|
|
198
|
+
# Show details of an individual media recording (Greeting or Hold Music)
|
|
199
|
+
# Get individual media recording
|
|
200
|
+
# @param account_id Account ID
|
|
201
|
+
# @param media_id Media ID
|
|
202
|
+
# @param [Hash] opts the optional parameters
|
|
203
|
+
# @return [MediaFull]
|
|
204
|
+
def get_account_media(account_id, media_id, opts = {})
|
|
205
|
+
data, _status_code, _headers = get_account_media_with_http_info(account_id, media_id, opts)
|
|
206
|
+
data
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Show details of an individual media recording (Greeting or Hold Music)
|
|
210
|
+
# Get individual media recording
|
|
211
|
+
# @param account_id Account ID
|
|
212
|
+
# @param media_id Media ID
|
|
213
|
+
# @param [Hash] opts the optional parameters
|
|
214
|
+
# @return [Array<(MediaFull, Fixnum, Hash)>] MediaFull data, response status code and response headers
|
|
215
|
+
def get_account_media_with_http_info(account_id, media_id, opts = {})
|
|
216
|
+
if @api_client.config.debugging
|
|
217
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.get_account_media ...'
|
|
218
|
+
end
|
|
219
|
+
# verify the required parameter 'account_id' is set
|
|
220
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
221
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.get_account_media"
|
|
222
|
+
end
|
|
223
|
+
# verify the required parameter 'media_id' is set
|
|
224
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
|
225
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling MediaApi.get_account_media"
|
|
226
|
+
end
|
|
227
|
+
# resource path
|
|
228
|
+
local_var_path = '/accounts/{account_id}/media/{media_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'media_id' + '}', media_id.to_s)
|
|
229
|
+
|
|
230
|
+
# query parameters
|
|
231
|
+
query_params = {}
|
|
232
|
+
|
|
233
|
+
# header parameters
|
|
234
|
+
header_params = {}
|
|
235
|
+
# HTTP header 'Accept' (if needed)
|
|
236
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
237
|
+
# HTTP header 'Content-Type'
|
|
238
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
239
|
+
|
|
240
|
+
# form parameters
|
|
241
|
+
form_params = {}
|
|
242
|
+
|
|
243
|
+
# http body (model)
|
|
244
|
+
post_body = nil
|
|
245
|
+
auth_names = ['apiKey']
|
|
246
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
247
|
+
:header_params => header_params,
|
|
248
|
+
:query_params => query_params,
|
|
249
|
+
:form_params => form_params,
|
|
250
|
+
:body => post_body,
|
|
251
|
+
:auth_names => auth_names,
|
|
252
|
+
:return_type => 'MediaFull')
|
|
253
|
+
if @api_client.config.debugging
|
|
254
|
+
@api_client.config.logger.debug "API called: MediaApi#get_account_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
255
|
+
end
|
|
256
|
+
return data, status_code, headers
|
|
257
|
+
end
|
|
258
|
+
# Get a list of media recordings for an account.
|
|
259
|
+
# Get a list of media recordings for an account. See Account Media for more info on the properties. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level List Media API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/media
|
|
260
|
+
# @param account_id Account ID
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @option opts [Array<String>] :filters_id ID filter
|
|
263
|
+
# @option opts [Array<String>] :filters_name Name filter
|
|
264
|
+
# @option opts [String] :sort_id ID sorting
|
|
265
|
+
# @option opts [String] :sort_name Name sorting
|
|
266
|
+
# @option opts [Integer] :limit Max results
|
|
267
|
+
# @option opts [Integer] :offset Results to skip
|
|
268
|
+
# @option opts [String] :fields Field set
|
|
269
|
+
# @return [ListMedia]
|
|
270
|
+
def list_account_media(account_id, opts = {})
|
|
271
|
+
data, _status_code, _headers = list_account_media_with_http_info(account_id, opts)
|
|
272
|
+
data
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Get a list of media recordings for an account.
|
|
276
|
+
# Get a list of media recordings for an account. See Account Media for more info on the properties. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level List Media API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/media
|
|
277
|
+
# @param account_id Account ID
|
|
278
|
+
# @param [Hash] opts the optional parameters
|
|
279
|
+
# @option opts [Array<String>] :filters_id ID filter
|
|
280
|
+
# @option opts [Array<String>] :filters_name Name filter
|
|
281
|
+
# @option opts [String] :sort_id ID sorting
|
|
282
|
+
# @option opts [String] :sort_name Name sorting
|
|
283
|
+
# @option opts [Integer] :limit Max results
|
|
284
|
+
# @option opts [Integer] :offset Results to skip
|
|
285
|
+
# @option opts [String] :fields Field set
|
|
286
|
+
# @return [Array<(ListMedia, Fixnum, Hash)>] ListMedia data, response status code and response headers
|
|
287
|
+
def list_account_media_with_http_info(account_id, opts = {})
|
|
288
|
+
if @api_client.config.debugging
|
|
289
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.list_account_media ...'
|
|
290
|
+
end
|
|
291
|
+
# verify the required parameter 'account_id' is set
|
|
292
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
293
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.list_account_media"
|
|
294
|
+
end
|
|
295
|
+
if @api_client.config.client_side_validation && !opts[:'sort_id'].nil? && opts[:'sort_id'] !~ Regexp.new(/asc|desc/)
|
|
296
|
+
fail ArgumentError, "invalid value for 'opts[:\"sort_id\"]' when calling MediaApi.list_account_media, must conform to the pattern /asc|desc/."
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if @api_client.config.client_side_validation && !opts[:'sort_name'].nil? && opts[:'sort_name'] !~ Regexp.new(/asc|desc/)
|
|
300
|
+
fail ArgumentError, "invalid value for 'opts[:\"sort_name\"]' when calling MediaApi.list_account_media, must conform to the pattern /asc|desc/."
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# resource path
|
|
304
|
+
local_var_path = '/accounts/{account_id}/media'.sub('{' + 'account_id' + '}', account_id.to_s)
|
|
305
|
+
|
|
306
|
+
# query parameters
|
|
307
|
+
query_params = {}
|
|
308
|
+
query_params[:'filters[id]'] = @api_client.build_collection_param(opts[:'filters_id'], :multi) if !opts[:'filters_id'].nil?
|
|
309
|
+
query_params[:'filters[name]'] = @api_client.build_collection_param(opts[:'filters_name'], :multi) if !opts[:'filters_name'].nil?
|
|
310
|
+
query_params[:'sort[id]'] = opts[:'sort_id'] if !opts[:'sort_id'].nil?
|
|
311
|
+
query_params[:'sort[name]'] = opts[:'sort_name'] if !opts[:'sort_name'].nil?
|
|
312
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
313
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
314
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
315
|
+
|
|
316
|
+
# header parameters
|
|
317
|
+
header_params = {}
|
|
318
|
+
# HTTP header 'Accept' (if needed)
|
|
319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
320
|
+
# HTTP header 'Content-Type'
|
|
321
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
322
|
+
|
|
323
|
+
# form parameters
|
|
324
|
+
form_params = {}
|
|
325
|
+
|
|
326
|
+
# http body (model)
|
|
327
|
+
post_body = nil
|
|
328
|
+
auth_names = ['apiKey']
|
|
329
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
330
|
+
:header_params => header_params,
|
|
331
|
+
:query_params => query_params,
|
|
332
|
+
:form_params => form_params,
|
|
333
|
+
:body => post_body,
|
|
334
|
+
:auth_names => auth_names,
|
|
335
|
+
:return_type => 'ListMedia')
|
|
336
|
+
if @api_client.config.debugging
|
|
337
|
+
@api_client.config.logger.debug "API called: MediaApi#list_account_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
338
|
+
end
|
|
339
|
+
return data, status_code, headers
|
|
340
|
+
end
|
|
341
|
+
# Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB.
|
|
342
|
+
# See Account Media for more info on the properties.
|
|
343
|
+
# @param account_id Account ID
|
|
344
|
+
# @param media_id Media ID
|
|
345
|
+
# @param [Hash] opts the optional parameters
|
|
346
|
+
# @option opts [String] :json Media extra parameters
|
|
347
|
+
# @option opts [File] :file Media file
|
|
348
|
+
# @return [MediaFull]
|
|
349
|
+
def replace_account_media_files(account_id, media_id, opts = {})
|
|
350
|
+
data, _status_code, _headers = replace_account_media_files_with_http_info(account_id, media_id, opts)
|
|
351
|
+
data
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB.
|
|
355
|
+
# See Account Media for more info on the properties.
|
|
356
|
+
# @param account_id Account ID
|
|
357
|
+
# @param media_id Media ID
|
|
358
|
+
# @param [Hash] opts the optional parameters
|
|
359
|
+
# @option opts [String] :json Media extra parameters
|
|
360
|
+
# @option opts [File] :file Media file
|
|
361
|
+
# @return [Array<(MediaFull, Fixnum, Hash)>] MediaFull data, response status code and response headers
|
|
362
|
+
def replace_account_media_files_with_http_info(account_id, media_id, opts = {})
|
|
363
|
+
if @api_client.config.debugging
|
|
364
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.replace_account_media_files ...'
|
|
365
|
+
end
|
|
366
|
+
# verify the required parameter 'account_id' is set
|
|
367
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
368
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.replace_account_media_files"
|
|
369
|
+
end
|
|
370
|
+
# verify the required parameter 'media_id' is set
|
|
371
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
|
372
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling MediaApi.replace_account_media_files"
|
|
373
|
+
end
|
|
374
|
+
# resource path
|
|
375
|
+
local_var_path = '/accounts/{account_id}/media/files/{media_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'media_id' + '}', media_id.to_s)
|
|
376
|
+
|
|
377
|
+
# query parameters
|
|
378
|
+
query_params = {}
|
|
379
|
+
|
|
380
|
+
# header parameters
|
|
381
|
+
header_params = {}
|
|
382
|
+
# HTTP header 'Accept' (if needed)
|
|
383
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
384
|
+
# HTTP header 'Content-Type'
|
|
385
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
|
386
|
+
|
|
387
|
+
# form parameters
|
|
388
|
+
form_params = {}
|
|
389
|
+
form_params['json'] = opts[:'json'] if !opts[:'json'].nil?
|
|
390
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
391
|
+
|
|
392
|
+
# http body (model)
|
|
393
|
+
post_body = nil
|
|
394
|
+
auth_names = ['apiKey']
|
|
395
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
396
|
+
:header_params => header_params,
|
|
397
|
+
:query_params => query_params,
|
|
398
|
+
:form_params => form_params,
|
|
399
|
+
:body => post_body,
|
|
400
|
+
:auth_names => auth_names,
|
|
401
|
+
:return_type => 'MediaFull')
|
|
402
|
+
if @api_client.config.debugging
|
|
403
|
+
@api_client.config.logger.debug "API called: MediaApi#replace_account_media_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
404
|
+
end
|
|
405
|
+
return data, status_code, headers
|
|
406
|
+
end
|
|
407
|
+
# Update a media object to your account.
|
|
408
|
+
# Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB. See Account Media for more info on the properties. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Replace Media API with the following definition: PUT https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/media/:media_id
|
|
409
|
+
# @param account_id Account ID
|
|
410
|
+
# @param media_id Media ID
|
|
411
|
+
# @param [Hash] opts the optional parameters
|
|
412
|
+
# @option opts [CreateMediaParams] :data Media data
|
|
413
|
+
# @return [MediaFull]
|
|
414
|
+
def replace_account_media_tts(account_id, media_id, opts = {})
|
|
415
|
+
data, _status_code, _headers = replace_account_media_tts_with_http_info(account_id, media_id, opts)
|
|
416
|
+
data
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Update a media object to your account.
|
|
420
|
+
# Update a media object to your account. Note: The maximum size for media files or JSON objects included with a POST or PUT request is 10 MB. See Account Media for more info on the properties. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Replace Media API with the following definition: PUT https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/media/:media_id
|
|
421
|
+
# @param account_id Account ID
|
|
422
|
+
# @param media_id Media ID
|
|
423
|
+
# @param [Hash] opts the optional parameters
|
|
424
|
+
# @option opts [CreateMediaParams] :data Media data
|
|
425
|
+
# @return [Array<(MediaFull, Fixnum, Hash)>] MediaFull data, response status code and response headers
|
|
426
|
+
def replace_account_media_tts_with_http_info(account_id, media_id, opts = {})
|
|
427
|
+
if @api_client.config.debugging
|
|
428
|
+
@api_client.config.logger.debug 'Calling API: MediaApi.replace_account_media_tts ...'
|
|
429
|
+
end
|
|
430
|
+
# verify the required parameter 'account_id' is set
|
|
431
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
432
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling MediaApi.replace_account_media_tts"
|
|
433
|
+
end
|
|
434
|
+
# verify the required parameter 'media_id' is set
|
|
435
|
+
if @api_client.config.client_side_validation && media_id.nil?
|
|
436
|
+
fail ArgumentError, "Missing the required parameter 'media_id' when calling MediaApi.replace_account_media_tts"
|
|
437
|
+
end
|
|
438
|
+
# resource path
|
|
439
|
+
local_var_path = '/accounts/{account_id}/media/tts/{media_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'media_id' + '}', media_id.to_s)
|
|
440
|
+
|
|
441
|
+
# query parameters
|
|
442
|
+
query_params = {}
|
|
443
|
+
|
|
444
|
+
# header parameters
|
|
445
|
+
header_params = {}
|
|
446
|
+
# HTTP header 'Accept' (if needed)
|
|
447
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
448
|
+
# HTTP header 'Content-Type'
|
|
449
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
450
|
+
|
|
451
|
+
# form parameters
|
|
452
|
+
form_params = {}
|
|
453
|
+
|
|
454
|
+
# http body (model)
|
|
455
|
+
post_body = @api_client.object_to_http_body(opts[:'data'])
|
|
456
|
+
auth_names = ['apiKey']
|
|
457
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
458
|
+
:header_params => header_params,
|
|
459
|
+
:query_params => query_params,
|
|
460
|
+
:form_params => form_params,
|
|
461
|
+
:body => post_body,
|
|
462
|
+
:auth_names => auth_names,
|
|
463
|
+
:return_type => 'MediaFull')
|
|
464
|
+
if @api_client.config.debugging
|
|
465
|
+
@api_client.config.logger.debug "API called: MediaApi#replace_account_media_tts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
466
|
+
end
|
|
467
|
+
return data, status_code, headers
|
|
468
|
+
end
|
|
469
|
+
end
|
|
470
|
+
end
|