phone_com_client 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (542) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/Gemfile.lock +69 -0
  4. data/LICENSE +21 -0
  5. data/README.md +344 -0
  6. data/Rakefile +8 -0
  7. data/docs/AccountFull.md +14 -0
  8. data/docs/AccountSummary.md +9 -0
  9. data/docs/AccountsApi.md +127 -0
  10. data/docs/Address.md +13 -0
  11. data/docs/AddressListContacts.md +13 -0
  12. data/docs/ApplicationFull.md +9 -0
  13. data/docs/ApplicationSummary.md +9 -0
  14. data/docs/ApplicationsApi.md +137 -0
  15. data/docs/AvailableNumbersApi.md +94 -0
  16. data/docs/AvailableNumbersFull.md +18 -0
  17. data/docs/CallDetails.md +12 -0
  18. data/docs/CallFull.md +8 -0
  19. data/docs/CallLogFull.md +27 -0
  20. data/docs/CallLogsApi.md +149 -0
  21. data/docs/CallNotifications.md +9 -0
  22. data/docs/CallbackObject.md +13 -0
  23. data/docs/CallerIdFull.md +10 -0
  24. data/docs/CallerIdPhoneNumber.md +9 -0
  25. data/docs/CallerIdsApi.md +82 -0
  26. data/docs/CallsApi.md +67 -0
  27. data/docs/ContactAccount.md +14 -0
  28. data/docs/ContactFull.md +26 -0
  29. data/docs/ContactResponse.md +14 -0
  30. data/docs/ContactSummary.md +15 -0
  31. data/docs/ContactsApi.md +333 -0
  32. data/docs/CreateCallParams.md +15 -0
  33. data/docs/CreateContactParams.md +23 -0
  34. data/docs/CreateDeviceParams.md +9 -0
  35. data/docs/CreateExtensionParams.md +20 -0
  36. data/docs/CreateGroupParams.md +8 -0
  37. data/docs/CreateListenerParams.md +10 -0
  38. data/docs/CreateMediaParams.md +17 -0
  39. data/docs/CreateMenuParams.md +14 -0
  40. data/docs/CreateOauthParams.md +16 -0
  41. data/docs/CreatePaymentParams.md +11 -0
  42. data/docs/CreatePhoneNumberParams.md +15 -0
  43. data/docs/CreatePricingParams.md +10 -0
  44. data/docs/CreateQueueParams.md +14 -0
  45. data/docs/CreateRedirectUriParams.md +8 -0
  46. data/docs/CreateRouteParams.md +10 -0
  47. data/docs/CreateSmsParams.md +11 -0
  48. data/docs/CreateSubaccountParams.md +11 -0
  49. data/docs/CreateTrunkParams.md +14 -0
  50. data/docs/DefaultApi.md +57 -0
  51. data/docs/DeleteEntry.md +8 -0
  52. data/docs/DeviceFull.md +11 -0
  53. data/docs/DeviceMembership.md +9 -0
  54. data/docs/DeviceSummary.md +9 -0
  55. data/docs/DevicesApi.md +316 -0
  56. data/docs/Email.md +9 -0
  57. data/docs/ExpressServiceCodeFull.md +10 -0
  58. data/docs/ExpressServiceCodesApi.md +125 -0
  59. data/docs/ExtensionFull.md +24 -0
  60. data/docs/ExtensionSummary.md +10 -0
  61. data/docs/ExtensionsApi.md +262 -0
  62. data/docs/FilterCallLogs.md +13 -0
  63. data/docs/FilterIdArray.md +8 -0
  64. data/docs/FilterIdDirectionFrom.md +10 -0
  65. data/docs/FilterIdExtensionNameArray.md +10 -0
  66. data/docs/FilterIdGroupIdUpdatedAtArray.md +10 -0
  67. data/docs/FilterIdNameArray.md +9 -0
  68. data/docs/FilterIdNamePhoneNumberArray.md +10 -0
  69. data/docs/FilterListAvailableNumbers.md +17 -0
  70. data/docs/FilterListPhoneNumbersRegions.md +14 -0
  71. data/docs/FilterNameNumberArray.md +9 -0
  72. data/docs/FilterVoicemailArray.md +13 -0
  73. data/docs/FromObject.md +11 -0
  74. data/docs/GetOauthAccessToken.md +10 -0
  75. data/docs/Greeting.md +11 -0
  76. data/docs/GreetingInput.md +11 -0
  77. data/docs/GroupFull.md +9 -0
  78. data/docs/GroupListContacts.md +9 -0
  79. data/docs/GroupSummary.md +9 -0
  80. data/docs/GroupsApi.md +329 -0
  81. data/docs/HoldMusic.md +9 -0
  82. data/docs/Line.md +9 -0
  83. data/docs/ListAccounts.md +13 -0
  84. data/docs/ListApplications.md +13 -0
  85. data/docs/ListAvailableNumbers.md +13 -0
  86. data/docs/ListCallLogs.md +13 -0
  87. data/docs/ListCallerIds.md +13 -0
  88. data/docs/ListContacts.md +13 -0
  89. data/docs/ListDevices.md +13 -0
  90. data/docs/ListExpressServiceCodes.md +13 -0
  91. data/docs/ListExtensions.md +13 -0
  92. data/docs/ListGroups.md +13 -0
  93. data/docs/ListListeners.md +13 -0
  94. data/docs/ListMedia.md +13 -0
  95. data/docs/ListMenus.md +13 -0
  96. data/docs/ListOauthClients.md +13 -0
  97. data/docs/ListOauthClientsRedirectUris.md +12 -0
  98. data/docs/ListPaymentMethods.md +13 -0
  99. data/docs/ListPhoneNumbers.md +13 -0
  100. data/docs/ListPhoneNumbersRegions.md +14 -0
  101. data/docs/ListPricings.md +13 -0
  102. data/docs/ListQueues.md +13 -0
  103. data/docs/ListRoutes.md +13 -0
  104. data/docs/ListSchedules.md +13 -0
  105. data/docs/ListSms.md +13 -0
  106. data/docs/ListTrunks.md +13 -0
  107. data/docs/ListVoicemail.md +13 -0
  108. data/docs/ListenerFull.md +14 -0
  109. data/docs/ListenersApi.md +312 -0
  110. data/docs/MediaApi.md +441 -0
  111. data/docs/MediaFull.md +10 -0
  112. data/docs/MediaSummary.md +9 -0
  113. data/docs/Member.md +9 -0
  114. data/docs/MenuFull.md +15 -0
  115. data/docs/MenuSummary.md +9 -0
  116. data/docs/MenusApi.md +316 -0
  117. data/docs/Notification.md +9 -0
  118. data/docs/NumberRegionsApi.md +98 -0
  119. data/docs/OauthAccessToken.md +12 -0
  120. data/docs/OauthApi.md +176 -0
  121. data/docs/OauthClientFull.md +9 -0
  122. data/docs/OauthClientRedirectUriFull.md +10 -0
  123. data/docs/OauthClientsApi.md +191 -0
  124. data/docs/OauthClientsRedirectUrisApi.md +262 -0
  125. data/docs/Option.md +9 -0
  126. data/docs/PatchPaymentParams.md +8 -0
  127. data/docs/PatchSmsParams.md +8 -0
  128. data/docs/PatchVoicemailParams.md +8 -0
  129. data/docs/PaymentFull.md +20 -0
  130. data/docs/PaymentMethodsApi.md +311 -0
  131. data/docs/PaymentSummary.md +13 -0
  132. data/docs/PhoneNumberContact.md +10 -0
  133. data/docs/PhoneNumberFull.md +16 -0
  134. data/docs/PhoneNumbersApi.md +262 -0
  135. data/docs/PhoneNumbersRegionFull.md +15 -0
  136. data/docs/PingResponse.md +11 -0
  137. data/docs/PricingFull.md +13 -0
  138. data/docs/PricingObject.md +9 -0
  139. data/docs/QueueFull.md +15 -0
  140. data/docs/QueueSummary.md +9 -0
  141. data/docs/QueuesApi.md +316 -0
  142. data/docs/Recipient.md +9 -0
  143. data/docs/RedirectUriFull.md +10 -0
  144. data/docs/ReplaceExtensionParams.md +21 -0
  145. data/docs/ReplaceMenuParams.md +14 -0
  146. data/docs/ReplacePhoneNumberParams.md +13 -0
  147. data/docs/RouteFull.md +11 -0
  148. data/docs/RouteSummary.md +9 -0
  149. data/docs/RoutesApi.md +316 -0
  150. data/docs/RuleSet.md +9 -0
  151. data/docs/RuleSetAction.md +17 -0
  152. data/docs/RuleSetFilter.md +11 -0
  153. data/docs/RuleSetForwardItem.md +14 -0
  154. data/docs/ScheduleFull.md +9 -0
  155. data/docs/ScheduleSummary.md +9 -0
  156. data/docs/SchedulesApi.md +137 -0
  157. data/docs/ScopeDetails.md +8 -0
  158. data/docs/SipAuthentication.md +11 -0
  159. data/docs/SmsApi.md +265 -0
  160. data/docs/SmsForwarding.md +10 -0
  161. data/docs/SmsForwardingParams.md +10 -0
  162. data/docs/SmsFull.md +15 -0
  163. data/docs/SortCallLogs.md +10 -0
  164. data/docs/SortId.md +8 -0
  165. data/docs/SortIdCreatedAt.md +9 -0
  166. data/docs/SortIdExtensionName.md +10 -0
  167. data/docs/SortIdName.md +9 -0
  168. data/docs/SortIdNamePhoneNumber.md +10 -0
  169. data/docs/SortIdUpdatedAt.md +9 -0
  170. data/docs/SortListAvailableNumbers.md +10 -0
  171. data/docs/SortListPhoneNumbersRegions.md +14 -0
  172. data/docs/SortNameNumber.md +9 -0
  173. data/docs/SubaccountPricingApi.md +261 -0
  174. data/docs/SubaccountsApi.md +133 -0
  175. data/docs/TrunkFull.md +15 -0
  176. data/docs/TrunkSummary.md +9 -0
  177. data/docs/TrunksApi.md +314 -0
  178. data/docs/Voicemail.md +13 -0
  179. data/docs/VoicemailApi.md +207 -0
  180. data/docs/VoicemailFull.md +16 -0
  181. data/docs/VoicemailInput.md +13 -0
  182. data/git_push.sh +55 -0
  183. data/lib/phone_com_client/api/accounts_api.rb +144 -0
  184. data/lib/phone_com_client/api/applications_api.rb +166 -0
  185. data/lib/phone_com_client/api/available_numbers_api.rb +131 -0
  186. data/lib/phone_com_client/api/call_logs_api.rb +204 -0
  187. data/lib/phone_com_client/api/caller_ids_api.rb +112 -0
  188. data/lib/phone_com_client/api/calls_api.rb +79 -0
  189. data/lib/phone_com_client/api/contacts_api.rb +377 -0
  190. data/lib/phone_com_client/api/default_api.rb +71 -0
  191. data/lib/phone_com_client/api/devices_api.rb +344 -0
  192. data/lib/phone_com_client/api/express_service_codes_api.rb +140 -0
  193. data/lib/phone_com_client/api/extensions_api.rb +294 -0
  194. data/lib/phone_com_client/api/groups_api.rb +382 -0
  195. data/lib/phone_com_client/api/listeners_api.rb +334 -0
  196. data/lib/phone_com_client/api/media_api.rb +470 -0
  197. data/lib/phone_com_client/api/menus_api.rb +344 -0
  198. data/lib/phone_com_client/api/number_regions_api.rb +149 -0
  199. data/lib/phone_com_client/api/oauth_api.rb +196 -0
  200. data/lib/phone_com_client/api/oauth_clients_api.rb +216 -0
  201. data/lib/phone_com_client/api/oauth_clients_redirect_uris_api.rb +296 -0
  202. data/lib/phone_com_client/api/payment_methods_api.rb +338 -0
  203. data/lib/phone_com_client/api/phone_numbers_api.rb +294 -0
  204. data/lib/phone_com_client/api/queues_api.rb +344 -0
  205. data/lib/phone_com_client/api/routes_api.rb +344 -0
  206. data/lib/phone_com_client/api/schedules_api.rb +166 -0
  207. data/lib/phone_com_client/api/sms_api.rb +316 -0
  208. data/lib/phone_com_client/api/subaccount_pricing_api.rb +300 -0
  209. data/lib/phone_com_client/api/subaccounts_api.rb +156 -0
  210. data/lib/phone_com_client/api/trunks_api.rb +352 -0
  211. data/lib/phone_com_client/api/voicemail_api.rb +252 -0
  212. data/lib/phone_com_client/api_client.rb +389 -0
  213. data/lib/phone_com_client/api_error.rb +38 -0
  214. data/lib/phone_com_client/configuration.rb +209 -0
  215. data/lib/phone_com_client/models/account_full.rb +245 -0
  216. data/lib/phone_com_client/models/account_summary.rb +195 -0
  217. data/lib/phone_com_client/models/address.rb +250 -0
  218. data/lib/phone_com_client/models/address_list_contacts.rb +234 -0
  219. data/lib/phone_com_client/models/application_full.rb +195 -0
  220. data/lib/phone_com_client/models/application_summary.rb +195 -0
  221. data/lib/phone_com_client/models/available_numbers_full.rb +285 -0
  222. data/lib/phone_com_client/models/call_details.rb +225 -0
  223. data/lib/phone_com_client/models/call_full.rb +185 -0
  224. data/lib/phone_com_client/models/call_log_full.rb +377 -0
  225. data/lib/phone_com_client/models/call_notifications.rb +197 -0
  226. data/lib/phone_com_client/models/callback_object.rb +234 -0
  227. data/lib/phone_com_client/models/caller_id_full.rb +205 -0
  228. data/lib/phone_com_client/models/caller_id_phone_number.rb +210 -0
  229. data/lib/phone_com_client/models/contact_account.rb +243 -0
  230. data/lib/phone_com_client/models/contact_full.rb +370 -0
  231. data/lib/phone_com_client/models/contact_response.rb +243 -0
  232. data/lib/phone_com_client/models/contact_summary.rb +255 -0
  233. data/lib/phone_com_client/models/create_call_params.rb +254 -0
  234. data/lib/phone_com_client/models/create_contact_params.rb +340 -0
  235. data/lib/phone_com_client/models/create_device_params.rb +196 -0
  236. data/lib/phone_com_client/models/create_extension_params.rb +302 -0
  237. data/lib/phone_com_client/models/create_group_params.rb +184 -0
  238. data/lib/phone_com_client/models/create_listener_params.rb +206 -0
  239. data/lib/phone_com_client/models/create_media_params.rb +274 -0
  240. data/lib/phone_com_client/models/create_menu_params.rb +239 -0
  241. data/lib/phone_com_client/models/create_oauth_params.rb +264 -0
  242. data/lib/phone_com_client/models/create_payment_params.rb +214 -0
  243. data/lib/phone_com_client/models/create_phone_number_params.rb +251 -0
  244. data/lib/phone_com_client/models/create_pricing_params.rb +204 -0
  245. data/lib/phone_com_client/models/create_queue_params.rb +246 -0
  246. data/lib/phone_com_client/models/create_redirect_uri_params.rb +184 -0
  247. data/lib/phone_com_client/models/create_route_params.rb +206 -0
  248. data/lib/phone_com_client/models/create_sms_params.rb +229 -0
  249. data/lib/phone_com_client/models/create_subaccount_params.rb +224 -0
  250. data/lib/phone_com_client/models/create_trunk_params.rb +246 -0
  251. data/lib/phone_com_client/models/delete_entry.rb +183 -0
  252. data/lib/phone_com_client/models/device_full.rb +216 -0
  253. data/lib/phone_com_client/models/device_membership.rb +195 -0
  254. data/lib/phone_com_client/models/device_summary.rb +195 -0
  255. data/lib/phone_com_client/models/email.rb +194 -0
  256. data/lib/phone_com_client/models/express_service_code_full.rb +207 -0
  257. data/lib/phone_com_client/models/extension_full.rb +342 -0
  258. data/lib/phone_com_client/models/extension_summary.rb +205 -0
  259. data/lib/phone_com_client/models/filter_call_logs.rb +228 -0
  260. data/lib/phone_com_client/models/filter_id_array.rb +183 -0
  261. data/lib/phone_com_client/models/filter_id_direction_from.rb +201 -0
  262. data/lib/phone_com_client/models/filter_id_extension_name_array.rb +201 -0
  263. data/lib/phone_com_client/models/filter_id_group_id_updated_at_array.rb +201 -0
  264. data/lib/phone_com_client/models/filter_id_name_array.rb +192 -0
  265. data/lib/phone_com_client/models/filter_id_name_phone_number_array.rb +201 -0
  266. data/lib/phone_com_client/models/filter_list_available_numbers.rb +264 -0
  267. data/lib/phone_com_client/models/filter_list_phone_numbers_regions.rb +237 -0
  268. data/lib/phone_com_client/models/filter_name_number_array.rb +192 -0
  269. data/lib/phone_com_client/models/filter_voicemail_array.rb +228 -0
  270. data/lib/phone_com_client/models/from_object.rb +215 -0
  271. data/lib/phone_com_client/models/get_oauth_access_token.rb +203 -0
  272. data/lib/phone_com_client/models/greeting.rb +215 -0
  273. data/lib/phone_com_client/models/greeting_input.rb +215 -0
  274. data/lib/phone_com_client/models/group_full.rb +195 -0
  275. data/lib/phone_com_client/models/group_list_contacts.rb +195 -0
  276. data/lib/phone_com_client/models/group_summary.rb +195 -0
  277. data/lib/phone_com_client/models/hold_music.rb +195 -0
  278. data/lib/phone_com_client/models/line.rb +194 -0
  279. data/lib/phone_com_client/models/list_accounts.rb +230 -0
  280. data/lib/phone_com_client/models/list_applications.rb +230 -0
  281. data/lib/phone_com_client/models/list_available_numbers.rb +230 -0
  282. data/lib/phone_com_client/models/list_call_logs.rb +230 -0
  283. data/lib/phone_com_client/models/list_caller_ids.rb +230 -0
  284. data/lib/phone_com_client/models/list_contacts.rb +230 -0
  285. data/lib/phone_com_client/models/list_devices.rb +230 -0
  286. data/lib/phone_com_client/models/list_express_service_codes.rb +232 -0
  287. data/lib/phone_com_client/models/list_extensions.rb +230 -0
  288. data/lib/phone_com_client/models/list_groups.rb +230 -0
  289. data/lib/phone_com_client/models/list_listeners.rb +230 -0
  290. data/lib/phone_com_client/models/list_media.rb +230 -0
  291. data/lib/phone_com_client/models/list_menus.rb +230 -0
  292. data/lib/phone_com_client/models/list_oauth_clients.rb +230 -0
  293. data/lib/phone_com_client/models/list_oauth_clients_redirect_uris.rb +221 -0
  294. data/lib/phone_com_client/models/list_payment_methods.rb +230 -0
  295. data/lib/phone_com_client/models/list_phone_numbers.rb +231 -0
  296. data/lib/phone_com_client/models/list_phone_numbers_regions.rb +241 -0
  297. data/lib/phone_com_client/models/list_pricings.rb +230 -0
  298. data/lib/phone_com_client/models/list_queues.rb +230 -0
  299. data/lib/phone_com_client/models/list_routes.rb +230 -0
  300. data/lib/phone_com_client/models/list_schedules.rb +230 -0
  301. data/lib/phone_com_client/models/list_sms.rb +230 -0
  302. data/lib/phone_com_client/models/list_trunks.rb +230 -0
  303. data/lib/phone_com_client/models/list_voicemail.rb +230 -0
  304. data/lib/phone_com_client/models/listener_full.rb +244 -0
  305. data/lib/phone_com_client/models/media_full.rb +220 -0
  306. data/lib/phone_com_client/models/media_summary.rb +195 -0
  307. data/lib/phone_com_client/models/member.rb +194 -0
  308. data/lib/phone_com_client/models/menu_full.rb +257 -0
  309. data/lib/phone_com_client/models/menu_summary.rb +195 -0
  310. data/lib/phone_com_client/models/notification.rb +197 -0
  311. data/lib/phone_com_client/models/oauth_access_token.rb +219 -0
  312. data/lib/phone_com_client/models/oauth_client_full.rb +195 -0
  313. data/lib/phone_com_client/models/oauth_client_redirect_uri_full.rb +205 -0
  314. data/lib/phone_com_client/models/option.rb +194 -0
  315. data/lib/phone_com_client/models/patch_payment_params.rb +184 -0
  316. data/lib/phone_com_client/models/patch_sms_params.rb +184 -0
  317. data/lib/phone_com_client/models/patch_voicemail_params.rb +184 -0
  318. data/lib/phone_com_client/models/payment_full.rb +305 -0
  319. data/lib/phone_com_client/models/payment_summary.rb +235 -0
  320. data/lib/phone_com_client/models/phone_number_contact.rb +204 -0
  321. data/lib/phone_com_client/models/phone_number_full.rb +262 -0
  322. data/lib/phone_com_client/models/phone_numbers_region_full.rb +255 -0
  323. data/lib/phone_com_client/models/ping_response.rb +211 -0
  324. data/lib/phone_com_client/models/pricing_full.rb +235 -0
  325. data/lib/phone_com_client/models/pricing_object.rb +194 -0
  326. data/lib/phone_com_client/models/queue_full.rb +266 -0
  327. data/lib/phone_com_client/models/queue_summary.rb +205 -0
  328. data/lib/phone_com_client/models/recipient.rb +194 -0
  329. data/lib/phone_com_client/models/redirect_uri_full.rb +204 -0
  330. data/lib/phone_com_client/models/replace_extension_params.rb +312 -0
  331. data/lib/phone_com_client/models/replace_menu_params.rb +239 -0
  332. data/lib/phone_com_client/models/replace_phone_number_params.rb +251 -0
  333. data/lib/phone_com_client/models/route_full.rb +217 -0
  334. data/lib/phone_com_client/models/route_summary.rb +195 -0
  335. data/lib/phone_com_client/models/rule_set.rb +195 -0
  336. data/lib/phone_com_client/models/rule_set_action.rb +292 -0
  337. data/lib/phone_com_client/models/rule_set_filter.rb +230 -0
  338. data/lib/phone_com_client/models/rule_set_forward_item.rb +294 -0
  339. data/lib/phone_com_client/models/schedule_full.rb +195 -0
  340. data/lib/phone_com_client/models/schedule_summary.rb +195 -0
  341. data/lib/phone_com_client/models/scope_details.rb +183 -0
  342. data/lib/phone_com_client/models/sip_authentication.rb +215 -0
  343. data/lib/phone_com_client/models/sms_forwarding.rb +220 -0
  344. data/lib/phone_com_client/models/sms_forwarding_params.rb +220 -0
  345. data/lib/phone_com_client/models/sms_full.rb +257 -0
  346. data/lib/phone_com_client/models/sort_call_logs.rb +201 -0
  347. data/lib/phone_com_client/models/sort_id.rb +183 -0
  348. data/lib/phone_com_client/models/sort_id_created_at.rb +192 -0
  349. data/lib/phone_com_client/models/sort_id_extension_name.rb +201 -0
  350. data/lib/phone_com_client/models/sort_id_name.rb +192 -0
  351. data/lib/phone_com_client/models/sort_id_name_phone_number.rb +201 -0
  352. data/lib/phone_com_client/models/sort_id_updated_at.rb +192 -0
  353. data/lib/phone_com_client/models/sort_list_available_numbers.rb +201 -0
  354. data/lib/phone_com_client/models/sort_list_phone_numbers_regions.rb +237 -0
  355. data/lib/phone_com_client/models/sort_name_number.rb +192 -0
  356. data/lib/phone_com_client/models/trunk_full.rb +297 -0
  357. data/lib/phone_com_client/models/trunk_summary.rb +205 -0
  358. data/lib/phone_com_client/models/voicemail.rb +234 -0
  359. data/lib/phone_com_client/models/voicemail_full.rb +265 -0
  360. data/lib/phone_com_client/models/voicemail_input.rb +234 -0
  361. data/lib/phone_com_client/version.rb +15 -0
  362. data/lib/phone_com_client.rb +214 -0
  363. data/phone_com_client.gemspec +45 -0
  364. data/spec/api/accounts_api_spec.rb +63 -0
  365. data/spec/api/applications_api_spec.rb +67 -0
  366. data/spec/api/available_numbers_api_spec.rb +62 -0
  367. data/spec/api/call_logs_api_spec.rb +73 -0
  368. data/spec/api/caller_ids_api_spec.rb +55 -0
  369. data/spec/api/calls_api_spec.rb +48 -0
  370. data/spec/api/contacts_api_spec.rb +113 -0
  371. data/spec/api/default_api_spec.rb +46 -0
  372. data/spec/api/devices_api_spec.rb +107 -0
  373. data/spec/api/express_service_codes_api_spec.rb +61 -0
  374. data/spec/api/extensions_api_spec.rb +96 -0
  375. data/spec/api/groups_api_spec.rb +112 -0
  376. data/spec/api/listeners_api_spec.rb +105 -0
  377. data/spec/api/media_api_spec.rb +136 -0
  378. data/spec/api/menus_api_spec.rb +107 -0
  379. data/spec/api/number_regions_api_spec.rb +64 -0
  380. data/spec/api/oauth_api_spec.rb +73 -0
  381. data/spec/api/oauth_clients_api_spec.rb +78 -0
  382. data/spec/api/oauth_clients_redirect_uris_api_spec.rb +95 -0
  383. data/spec/api/payment_methods_api_spec.rb +105 -0
  384. data/spec/api/phone_numbers_api_spec.rb +96 -0
  385. data/spec/api/queues_api_spec.rb +107 -0
  386. data/spec/api/routes_api_spec.rb +107 -0
  387. data/spec/api/schedules_api_spec.rb +67 -0
  388. data/spec/api/sms_api_spec.rb +98 -0
  389. data/spec/api/subaccount_pricing_api_spec.rb +95 -0
  390. data/spec/api/subaccounts_api_spec.rb +65 -0
  391. data/spec/api/trunks_api_spec.rb +107 -0
  392. data/spec/api/voicemail_api_spec.rb +85 -0
  393. data/spec/api_client_spec.rb +226 -0
  394. data/spec/configuration_spec.rb +42 -0
  395. data/spec/models/account_full_spec.rb +77 -0
  396. data/spec/models/account_summary_spec.rb +47 -0
  397. data/spec/models/address_list_contacts_spec.rb +71 -0
  398. data/spec/models/address_spec.rb +71 -0
  399. data/spec/models/application_full_spec.rb +47 -0
  400. data/spec/models/application_summary_spec.rb +47 -0
  401. data/spec/models/available_numbers_full_spec.rb +101 -0
  402. data/spec/models/call_details_spec.rb +65 -0
  403. data/spec/models/call_full_spec.rb +41 -0
  404. data/spec/models/call_log_full_spec.rb +155 -0
  405. data/spec/models/call_notifications_spec.rb +47 -0
  406. data/spec/models/callback_object_spec.rb +71 -0
  407. data/spec/models/caller_id_full_spec.rb +53 -0
  408. data/spec/models/caller_id_phone_number_spec.rb +47 -0
  409. data/spec/models/contact_account_spec.rb +77 -0
  410. data/spec/models/contact_full_spec.rb +149 -0
  411. data/spec/models/contact_response_spec.rb +77 -0
  412. data/spec/models/contact_summary_spec.rb +83 -0
  413. data/spec/models/create_call_params_spec.rb +83 -0
  414. data/spec/models/create_contact_params_spec.rb +131 -0
  415. data/spec/models/create_device_params_spec.rb +47 -0
  416. data/spec/models/create_extension_params_spec.rb +113 -0
  417. data/spec/models/create_group_params_spec.rb +41 -0
  418. data/spec/models/create_listener_params_spec.rb +53 -0
  419. data/spec/models/create_media_params_spec.rb +95 -0
  420. data/spec/models/create_menu_params_spec.rb +77 -0
  421. data/spec/models/create_oauth_params_spec.rb +89 -0
  422. data/spec/models/create_payment_params_spec.rb +59 -0
  423. data/spec/models/create_phone_number_params_spec.rb +83 -0
  424. data/spec/models/create_pricing_params_spec.rb +53 -0
  425. data/spec/models/create_queue_params_spec.rb +77 -0
  426. data/spec/models/create_redirect_uri_params_spec.rb +41 -0
  427. data/spec/models/create_route_params_spec.rb +53 -0
  428. data/spec/models/create_sms_params_spec.rb +59 -0
  429. data/spec/models/create_subaccount_params_spec.rb +59 -0
  430. data/spec/models/create_trunk_params_spec.rb +77 -0
  431. data/spec/models/delete_entry_spec.rb +41 -0
  432. data/spec/models/device_full_spec.rb +59 -0
  433. data/spec/models/device_membership_spec.rb +47 -0
  434. data/spec/models/device_summary_spec.rb +47 -0
  435. data/spec/models/email_spec.rb +47 -0
  436. data/spec/models/express_service_code_full_spec.rb +53 -0
  437. data/spec/models/extension_full_spec.rb +137 -0
  438. data/spec/models/extension_summary_spec.rb +53 -0
  439. data/spec/models/filter_call_logs_spec.rb +71 -0
  440. data/spec/models/filter_id_array_spec.rb +41 -0
  441. data/spec/models/filter_id_direction_from_spec.rb +53 -0
  442. data/spec/models/filter_id_extension_name_array_spec.rb +53 -0
  443. data/spec/models/filter_id_group_id_updated_at_array_spec.rb +53 -0
  444. data/spec/models/filter_id_name_array_spec.rb +47 -0
  445. data/spec/models/filter_id_name_phone_number_array_spec.rb +53 -0
  446. data/spec/models/filter_list_available_numbers_spec.rb +95 -0
  447. data/spec/models/filter_list_phone_numbers_regions_spec.rb +77 -0
  448. data/spec/models/filter_name_number_array_spec.rb +47 -0
  449. data/spec/models/filter_voicemail_array_spec.rb +71 -0
  450. data/spec/models/from_object_spec.rb +59 -0
  451. data/spec/models/get_oauth_access_token_spec.rb +53 -0
  452. data/spec/models/greeting_input_spec.rb +59 -0
  453. data/spec/models/greeting_spec.rb +59 -0
  454. data/spec/models/group_full_spec.rb +47 -0
  455. data/spec/models/group_list_contacts_spec.rb +47 -0
  456. data/spec/models/group_summary_spec.rb +47 -0
  457. data/spec/models/hold_music_spec.rb +47 -0
  458. data/spec/models/line_spec.rb +47 -0
  459. data/spec/models/list_accounts_spec.rb +71 -0
  460. data/spec/models/list_applications_spec.rb +71 -0
  461. data/spec/models/list_available_numbers_spec.rb +71 -0
  462. data/spec/models/list_call_logs_spec.rb +71 -0
  463. data/spec/models/list_caller_ids_spec.rb +71 -0
  464. data/spec/models/list_contacts_spec.rb +71 -0
  465. data/spec/models/list_devices_spec.rb +71 -0
  466. data/spec/models/list_express_service_codes_spec.rb +71 -0
  467. data/spec/models/list_extensions_spec.rb +71 -0
  468. data/spec/models/list_groups_spec.rb +71 -0
  469. data/spec/models/list_listeners_spec.rb +71 -0
  470. data/spec/models/list_media_spec.rb +71 -0
  471. data/spec/models/list_menus_spec.rb +71 -0
  472. data/spec/models/list_oauth_clients_redirect_uris_spec.rb +65 -0
  473. data/spec/models/list_oauth_clients_spec.rb +71 -0
  474. data/spec/models/list_payment_methods_spec.rb +71 -0
  475. data/spec/models/list_phone_numbers_regions_spec.rb +77 -0
  476. data/spec/models/list_phone_numbers_spec.rb +71 -0
  477. data/spec/models/list_pricings_spec.rb +71 -0
  478. data/spec/models/list_queues_spec.rb +71 -0
  479. data/spec/models/list_routes_spec.rb +71 -0
  480. data/spec/models/list_schedules_spec.rb +71 -0
  481. data/spec/models/list_sms_spec.rb +71 -0
  482. data/spec/models/list_trunks_spec.rb +71 -0
  483. data/spec/models/list_voicemail_spec.rb +71 -0
  484. data/spec/models/listener_full_spec.rb +77 -0
  485. data/spec/models/media_full_spec.rb +53 -0
  486. data/spec/models/media_summary_spec.rb +47 -0
  487. data/spec/models/member_spec.rb +47 -0
  488. data/spec/models/menu_full_spec.rb +83 -0
  489. data/spec/models/menu_summary_spec.rb +47 -0
  490. data/spec/models/notification_spec.rb +47 -0
  491. data/spec/models/oauth_access_token_spec.rb +65 -0
  492. data/spec/models/oauth_client_full_spec.rb +47 -0
  493. data/spec/models/oauth_client_redirect_uri_full_spec.rb +53 -0
  494. data/spec/models/option_spec.rb +47 -0
  495. data/spec/models/patch_payment_params_spec.rb +41 -0
  496. data/spec/models/patch_sms_params_spec.rb +41 -0
  497. data/spec/models/patch_voicemail_params_spec.rb +41 -0
  498. data/spec/models/payment_full_spec.rb +113 -0
  499. data/spec/models/payment_summary_spec.rb +71 -0
  500. data/spec/models/phone_number_contact_spec.rb +53 -0
  501. data/spec/models/phone_number_full_spec.rb +89 -0
  502. data/spec/models/phone_numbers_region_full_spec.rb +83 -0
  503. data/spec/models/ping_response_spec.rb +59 -0
  504. data/spec/models/pricing_full_spec.rb +71 -0
  505. data/spec/models/pricing_object_spec.rb +47 -0
  506. data/spec/models/queue_full_spec.rb +83 -0
  507. data/spec/models/queue_summary_spec.rb +47 -0
  508. data/spec/models/recipient_spec.rb +47 -0
  509. data/spec/models/redirect_uri_full_spec.rb +53 -0
  510. data/spec/models/replace_extension_params_spec.rb +119 -0
  511. data/spec/models/replace_menu_params_spec.rb +77 -0
  512. data/spec/models/replace_phone_number_params_spec.rb +83 -0
  513. data/spec/models/route_full_spec.rb +59 -0
  514. data/spec/models/route_summary_spec.rb +47 -0
  515. data/spec/models/rule_set_action_spec.rb +95 -0
  516. data/spec/models/rule_set_filter_spec.rb +59 -0
  517. data/spec/models/rule_set_forward_item_spec.rb +77 -0
  518. data/spec/models/rule_set_spec.rb +47 -0
  519. data/spec/models/schedule_full_spec.rb +47 -0
  520. data/spec/models/schedule_summary_spec.rb +47 -0
  521. data/spec/models/scope_details_spec.rb +41 -0
  522. data/spec/models/sip_authentication_spec.rb +59 -0
  523. data/spec/models/sms_forwarding_params_spec.rb +53 -0
  524. data/spec/models/sms_forwarding_spec.rb +53 -0
  525. data/spec/models/sms_full_spec.rb +83 -0
  526. data/spec/models/sort_call_logs_spec.rb +53 -0
  527. data/spec/models/sort_id_created_at_spec.rb +47 -0
  528. data/spec/models/sort_id_extension_name_spec.rb +53 -0
  529. data/spec/models/sort_id_name_phone_number_spec.rb +53 -0
  530. data/spec/models/sort_id_name_spec.rb +47 -0
  531. data/spec/models/sort_id_spec.rb +41 -0
  532. data/spec/models/sort_id_updated_at_spec.rb +47 -0
  533. data/spec/models/sort_list_available_numbers_spec.rb +53 -0
  534. data/spec/models/sort_list_phone_numbers_regions_spec.rb +77 -0
  535. data/spec/models/sort_name_number_spec.rb +47 -0
  536. data/spec/models/trunk_full_spec.rb +83 -0
  537. data/spec/models/trunk_summary_spec.rb +47 -0
  538. data/spec/models/voicemail_full_spec.rb +89 -0
  539. data/spec/models/voicemail_input_spec.rb +71 -0
  540. data/spec/models/voicemail_spec.rb +71 -0
  541. data/spec/spec_helper.rb +111 -0
  542. metadata +942 -0
@@ -0,0 +1,316 @@
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 SmsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Send a SMS to one or a group of recipients.
23
+ # Send a SMS to one or a group of recipients. For details on the input fields, see Intro to SMS. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Create SMS API with the following definition: POST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms
24
+ # @param account_id Account ID
25
+ # @param data SMS data
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [SmsFull]
28
+ def create_account_sms(account_id, data, opts = {})
29
+ data, _status_code, _headers = create_account_sms_with_http_info(account_id, data, opts)
30
+ data
31
+ end
32
+
33
+ # Send a SMS to one or a group of recipients.
34
+ # Send a SMS to one or a group of recipients. For details on the input fields, see Intro to SMS. Note: This API is for users with Account Owner scope access token. Users with Extension User scope token should invoke the Extension level Create SMS API with the following definition: POST https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms
35
+ # @param account_id Account ID
36
+ # @param data SMS data
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(SmsFull, Fixnum, Hash)>] SmsFull data, response status code and response headers
39
+ def create_account_sms_with_http_info(account_id, data, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: SmsApi.create_account_sms ...'
42
+ end
43
+ # verify the required parameter 'account_id' is set
44
+ if @api_client.config.client_side_validation && account_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SmsApi.create_account_sms"
46
+ end
47
+ # verify the required parameter 'data' is set
48
+ if @api_client.config.client_side_validation && data.nil?
49
+ fail ArgumentError, "Missing the required parameter 'data' when calling SmsApi.create_account_sms"
50
+ end
51
+ # resource path
52
+ local_var_path = '/accounts/{account_id}/sms'.sub('{' + 'account_id' + '}', account_id.to_s)
53
+
54
+ # query parameters
55
+ query_params = {}
56
+
57
+ # header parameters
58
+ header_params = {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = {}
66
+
67
+ # http body (model)
68
+ post_body = @api_client.object_to_http_body(data)
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 => 'SmsFull')
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: SmsApi#create_account_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+ # This service shows the details of an individual SMS.
83
+ # This service shows the details of an individual SMS. See Intro to SMS 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 Get SMS API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms/:sms_id
84
+ # @param account_id Account ID
85
+ # @param sms_id SMS ID
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [SmsFull]
88
+ def get_account_sms(account_id, sms_id, opts = {})
89
+ data, _status_code, _headers = get_account_sms_with_http_info(account_id, sms_id, opts)
90
+ data
91
+ end
92
+
93
+ # This service shows the details of an individual SMS.
94
+ # This service shows the details of an individual SMS. See Intro to SMS 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 Get SMS API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms/:sms_id
95
+ # @param account_id Account ID
96
+ # @param sms_id SMS ID
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Array<(SmsFull, Fixnum, Hash)>] SmsFull data, response status code and response headers
99
+ def get_account_sms_with_http_info(account_id, sms_id, opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: SmsApi.get_account_sms ...'
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 SmsApi.get_account_sms"
106
+ end
107
+ # verify the required parameter 'sms_id' is set
108
+ if @api_client.config.client_side_validation && sms_id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsApi.get_account_sms"
110
+ end
111
+ # resource path
112
+ local_var_path = '/accounts/{account_id}/sms/{sms_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'sms_id' + '}', sms_id.to_s)
113
+
114
+ # query parameters
115
+ query_params = {}
116
+
117
+ # header parameters
118
+ header_params = {}
119
+ # HTTP header 'Accept' (if needed)
120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
121
+ # HTTP header 'Content-Type'
122
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
123
+
124
+ # form parameters
125
+ form_params = {}
126
+
127
+ # http body (model)
128
+ post_body = nil
129
+ auth_names = ['apiKey']
130
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => 'SmsFull')
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: SmsApi#get_account_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+ # Get a list of SMS messages for an account.
143
+ # Get a list of SMS messages for an account. See Intro to SMS 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 SMS API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms
144
+ # @param account_id Account ID
145
+ # @param [Hash] opts the optional parameters
146
+ # @option opts [Array<String>] :filters_id ID filter
147
+ # @option opts [String] :filters_from Caller ID filter
148
+ # @option opts [String] :filters_to Callee ID filter, the E.164 phone number to send the SMS TO. Note you must encode the + as %2B
149
+ # @option opts [String] :filters_direction Direction filter
150
+ # @option opts [Array<String>] :filters_extension Extension filter
151
+ # @option opts [String] :filters_created_at Date string representing the UTC time that sms was created
152
+ # @option opts [String] :sort_id ID sorting
153
+ # @option opts [String] :sort_created_at Sort by created time of message
154
+ # @option opts [Integer] :limit Max results
155
+ # @option opts [Integer] :offset Results to skip
156
+ # @option opts [String] :fields Field set
157
+ # @return [ListSms]
158
+ def list_account_sms(account_id, opts = {})
159
+ data, _status_code, _headers = list_account_sms_with_http_info(account_id, opts)
160
+ data
161
+ end
162
+
163
+ # Get a list of SMS messages for an account.
164
+ # Get a list of SMS messages for an account. See Intro to SMS 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 SMS API with the following definition: GET https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms
165
+ # @param account_id Account ID
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [Array<String>] :filters_id ID filter
168
+ # @option opts [String] :filters_from Caller ID filter
169
+ # @option opts [String] :filters_to Callee ID filter, the E.164 phone number to send the SMS TO. Note you must encode the + as %2B
170
+ # @option opts [String] :filters_direction Direction filter
171
+ # @option opts [Array<String>] :filters_extension Extension filter
172
+ # @option opts [String] :filters_created_at Date string representing the UTC time that sms was created
173
+ # @option opts [String] :sort_id ID sorting
174
+ # @option opts [String] :sort_created_at Sort by created time of message
175
+ # @option opts [Integer] :limit Max results
176
+ # @option opts [Integer] :offset Results to skip
177
+ # @option opts [String] :fields Field set
178
+ # @return [Array<(ListSms, Fixnum, Hash)>] ListSms data, response status code and response headers
179
+ def list_account_sms_with_http_info(account_id, opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: SmsApi.list_account_sms ...'
182
+ end
183
+ # verify the required parameter 'account_id' is set
184
+ if @api_client.config.client_side_validation && account_id.nil?
185
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SmsApi.list_account_sms"
186
+ end
187
+ if @api_client.config.client_side_validation && !opts[:'filters_from'].nil? && opts[:'filters_from'] !~ Regexp.new(/^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/)
188
+ fail ArgumentError, "invalid value for 'opts[:\"filters_from\"]' when calling SmsApi.list_account_sms, must conform to the pattern /^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/."
189
+ end
190
+
191
+ if @api_client.config.client_side_validation && !opts[:'filters_to'].nil? && opts[:'filters_to'] !~ Regexp.new(/^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/)
192
+ fail ArgumentError, "invalid value for 'opts[:\"filters_to\"]' when calling SmsApi.list_account_sms, must conform to the pattern /^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/."
193
+ end
194
+
195
+ if @api_client.config.client_side_validation && !opts[:'filters_direction'].nil? && opts[:'filters_direction'] !~ Regexp.new(/^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/)
196
+ fail ArgumentError, "invalid value for 'opts[:\"filters_direction\"]' when calling SmsApi.list_account_sms, must conform to the pattern /^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/."
197
+ end
198
+
199
+ if @api_client.config.client_side_validation && !opts[:'filters_created_at'].nil? && opts[:'filters_created_at'] !~ Regexp.new(/^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/)
200
+ fail ArgumentError, "invalid value for 'opts[:\"filters_created_at\"]' when calling SmsApi.list_account_sms, must conform to the pattern /^eq:.*|^ne:.*|^lt:.*|^gt:.*|^lte:.*|^gte:.*|^starts-with:.*|^ends-with:.*|^contains:.*|^not-starts-with:.*|^not-ends-with:.*|^not-contains:.*|^between:.*,.*|^not-between:.*,.*/."
201
+ end
202
+
203
+ if @api_client.config.client_side_validation && !opts[:'sort_id'].nil? && opts[:'sort_id'] !~ Regexp.new(/asc|desc/)
204
+ fail ArgumentError, "invalid value for 'opts[:\"sort_id\"]' when calling SmsApi.list_account_sms, must conform to the pattern /asc|desc/."
205
+ end
206
+
207
+ if @api_client.config.client_side_validation && !opts[:'sort_created_at'].nil? && opts[:'sort_created_at'] !~ Regexp.new(/asc|desc/)
208
+ fail ArgumentError, "invalid value for 'opts[:\"sort_created_at\"]' when calling SmsApi.list_account_sms, must conform to the pattern /asc|desc/."
209
+ end
210
+
211
+ # resource path
212
+ local_var_path = '/accounts/{account_id}/sms'.sub('{' + 'account_id' + '}', account_id.to_s)
213
+
214
+ # query parameters
215
+ query_params = {}
216
+ query_params[:'filters[id]'] = @api_client.build_collection_param(opts[:'filters_id'], :multi) if !opts[:'filters_id'].nil?
217
+ query_params[:'filters[from]'] = opts[:'filters_from'] if !opts[:'filters_from'].nil?
218
+ query_params[:'filters[to]'] = opts[:'filters_to'] if !opts[:'filters_to'].nil?
219
+ query_params[:'filters[direction]'] = opts[:'filters_direction'] if !opts[:'filters_direction'].nil?
220
+ query_params[:'filters[extension]'] = @api_client.build_collection_param(opts[:'filters_extension'], :multi) if !opts[:'filters_extension'].nil?
221
+ query_params[:'filters[created_at]'] = opts[:'filters_created_at'] if !opts[:'filters_created_at'].nil?
222
+ query_params[:'sort[id]'] = opts[:'sort_id'] if !opts[:'sort_id'].nil?
223
+ query_params[:'sort[created_at]'] = opts[:'sort_created_at'] if !opts[:'sort_created_at'].nil?
224
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
225
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
226
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
227
+
228
+ # header parameters
229
+ header_params = {}
230
+ # HTTP header 'Accept' (if needed)
231
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
232
+ # HTTP header 'Content-Type'
233
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
234
+
235
+ # form parameters
236
+ form_params = {}
237
+
238
+ # http body (model)
239
+ post_body = nil
240
+ auth_names = ['apiKey']
241
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
242
+ :header_params => header_params,
243
+ :query_params => query_params,
244
+ :form_params => form_params,
245
+ :body => post_body,
246
+ :auth_names => auth_names,
247
+ :return_type => 'ListSms')
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: SmsApi#list_account_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ # Update the is_new parameter in a sms record.
254
+ # Update the is_new parameter in a sms record. See Account SMS 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 Patch SMS API with the following definition: PATCH https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms/:sms_id
255
+ # @param account_id Account ID
256
+ # @param sms_id SMS ID
257
+ # @param [Hash] opts the optional parameters
258
+ # @option opts [PatchSmsParams] :data Sms data
259
+ # @return [SmsFull]
260
+ def patch_account_sms(account_id, sms_id, opts = {})
261
+ data, _status_code, _headers = patch_account_sms_with_http_info(account_id, sms_id, opts)
262
+ data
263
+ end
264
+
265
+ # Update the is_new parameter in a sms record.
266
+ # Update the is_new parameter in a sms record. See Account SMS 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 Patch SMS API with the following definition: PATCH https://api.phone.com/v4/accounts/:account_id/extensions/:extension_id/sms/:sms_id
267
+ # @param account_id Account ID
268
+ # @param sms_id SMS ID
269
+ # @param [Hash] opts the optional parameters
270
+ # @option opts [PatchSmsParams] :data Sms data
271
+ # @return [Array<(SmsFull, Fixnum, Hash)>] SmsFull data, response status code and response headers
272
+ def patch_account_sms_with_http_info(account_id, sms_id, opts = {})
273
+ if @api_client.config.debugging
274
+ @api_client.config.logger.debug 'Calling API: SmsApi.patch_account_sms ...'
275
+ end
276
+ # verify the required parameter 'account_id' is set
277
+ if @api_client.config.client_side_validation && account_id.nil?
278
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SmsApi.patch_account_sms"
279
+ end
280
+ # verify the required parameter 'sms_id' is set
281
+ if @api_client.config.client_side_validation && sms_id.nil?
282
+ fail ArgumentError, "Missing the required parameter 'sms_id' when calling SmsApi.patch_account_sms"
283
+ end
284
+ # resource path
285
+ local_var_path = '/accounts/{account_id}/sms/{sms_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'sms_id' + '}', sms_id.to_s)
286
+
287
+ # query parameters
288
+ query_params = {}
289
+
290
+ # header parameters
291
+ header_params = {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+ # HTTP header 'Content-Type'
295
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
296
+
297
+ # form parameters
298
+ form_params = {}
299
+
300
+ # http body (model)
301
+ post_body = @api_client.object_to_http_body(opts[:'data'])
302
+ auth_names = ['apiKey']
303
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
304
+ :header_params => header_params,
305
+ :query_params => query_params,
306
+ :form_params => form_params,
307
+ :body => post_body,
308
+ :auth_names => auth_names,
309
+ :return_type => 'SmsFull')
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug "API called: SmsApi#patch_account_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
312
+ end
313
+ return data, status_code, headers
314
+ end
315
+ end
316
+ end
@@ -0,0 +1,300 @@
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 SubaccountPricingApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add a pricing plan to a subaccount.
23
+ # Add a pricing plan to a subaccount. See Account Subaccount Pricing for more info on the properties.
24
+ # @param account_id Account ID
25
+ # @param subaccount_id Subaccount ID
26
+ # @param data Subaccount pricing data
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [PricingFull]
29
+ def create_account_subaccount_pricing(account_id, subaccount_id, data, opts = {})
30
+ data, _status_code, _headers = create_account_subaccount_pricing_with_http_info(account_id, subaccount_id, data, opts)
31
+ data
32
+ end
33
+
34
+ # Add a pricing plan to a subaccount.
35
+ # Add a pricing plan to a subaccount. See Account Subaccount Pricing for more info on the properties.
36
+ # @param account_id Account ID
37
+ # @param subaccount_id Subaccount ID
38
+ # @param data Subaccount pricing data
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(PricingFull, Fixnum, Hash)>] PricingFull data, response status code and response headers
41
+ def create_account_subaccount_pricing_with_http_info(account_id, subaccount_id, data, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SubaccountPricingApi.create_account_subaccount_pricing ...'
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 SubaccountPricingApi.create_account_subaccount_pricing"
48
+ end
49
+ # verify the required parameter 'subaccount_id' is set
50
+ if @api_client.config.client_side_validation && subaccount_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'subaccount_id' when calling SubaccountPricingApi.create_account_subaccount_pricing"
52
+ end
53
+ # verify the required parameter 'data' is set
54
+ if @api_client.config.client_side_validation && data.nil?
55
+ fail ArgumentError, "Missing the required parameter 'data' when calling SubaccountPricingApi.create_account_subaccount_pricing"
56
+ end
57
+ # resource path
58
+ local_var_path = '/accounts/{account_id}/subaccounts/{subaccount_id}/pricing'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'subaccount_id' + '}', subaccount_id.to_s)
59
+
60
+ # query parameters
61
+ query_params = {}
62
+
63
+ # header parameters
64
+ header_params = {}
65
+ # HTTP header 'Accept' (if needed)
66
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
67
+ # HTTP header 'Content-Type'
68
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = @api_client.object_to_http_body(data)
75
+ auth_names = ['apiKey']
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => 'PricingFull')
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: SubaccountPricingApi#create_account_subaccount_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ # Delete a pricing plan from a subaccount.
89
+ # Delete a pricing plan from a subaccount. See Account Subaccount Pricing for more info on the properties.
90
+ # @param account_id Account ID
91
+ # @param subaccount_id Subaccount ID
92
+ # @param pricing_id Pricing Object ID
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [DeleteEntry]
95
+ def delete_account_subaccount_pricing(account_id, subaccount_id, pricing_id, opts = {})
96
+ data, _status_code, _headers = delete_account_subaccount_pricing_with_http_info(account_id, subaccount_id, pricing_id, opts)
97
+ data
98
+ end
99
+
100
+ # Delete a pricing plan from a subaccount.
101
+ # Delete a pricing plan from a subaccount. See Account Subaccount Pricing for more info on the properties.
102
+ # @param account_id Account ID
103
+ # @param subaccount_id Subaccount ID
104
+ # @param pricing_id Pricing Object ID
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(DeleteEntry, Fixnum, Hash)>] DeleteEntry data, response status code and response headers
107
+ def delete_account_subaccount_pricing_with_http_info(account_id, subaccount_id, pricing_id, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: SubaccountPricingApi.delete_account_subaccount_pricing ...'
110
+ end
111
+ # verify the required parameter 'account_id' is set
112
+ if @api_client.config.client_side_validation && account_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SubaccountPricingApi.delete_account_subaccount_pricing"
114
+ end
115
+ # verify the required parameter 'subaccount_id' is set
116
+ if @api_client.config.client_side_validation && subaccount_id.nil?
117
+ fail ArgumentError, "Missing the required parameter 'subaccount_id' when calling SubaccountPricingApi.delete_account_subaccount_pricing"
118
+ end
119
+ # verify the required parameter 'pricing_id' is set
120
+ if @api_client.config.client_side_validation && pricing_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'pricing_id' when calling SubaccountPricingApi.delete_account_subaccount_pricing"
122
+ end
123
+ # resource path
124
+ local_var_path = '/accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'subaccount_id' + '}', subaccount_id.to_s).sub('{' + 'pricing_id' + '}', pricing_id.to_s)
125
+
126
+ # query parameters
127
+ query_params = {}
128
+
129
+ # header parameters
130
+ header_params = {}
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+ # HTTP header 'Content-Type'
134
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
135
+
136
+ # form parameters
137
+ form_params = {}
138
+
139
+ # http body (model)
140
+ post_body = nil
141
+ auth_names = ['apiKey']
142
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => 'DeleteEntry')
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug "API called: SubaccountPricingApi#delete_account_subaccount_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
151
+ end
152
+ return data, status_code, headers
153
+ end
154
+ # Get the details of a pricing plan for a subaccount.
155
+ # Get the details of a pricing plan for a subaccount. See Account Subaccount Pricing for more info on the properties.
156
+ # @param account_id Account ID
157
+ # @param subaccount_id Subaccount ID
158
+ # @param pricing_id Pricing Object ID
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [PricingFull]
161
+ def get_account_subaccount_pricing(account_id, subaccount_id, pricing_id, opts = {})
162
+ data, _status_code, _headers = get_account_subaccount_pricing_with_http_info(account_id, subaccount_id, pricing_id, opts)
163
+ data
164
+ end
165
+
166
+ # Get the details of a pricing plan for a subaccount.
167
+ # Get the details of a pricing plan for a subaccount. See Account Subaccount Pricing for more info on the properties.
168
+ # @param account_id Account ID
169
+ # @param subaccount_id Subaccount ID
170
+ # @param pricing_id Pricing Object ID
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(PricingFull, Fixnum, Hash)>] PricingFull data, response status code and response headers
173
+ def get_account_subaccount_pricing_with_http_info(account_id, subaccount_id, pricing_id, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: SubaccountPricingApi.get_account_subaccount_pricing ...'
176
+ end
177
+ # verify the required parameter 'account_id' is set
178
+ if @api_client.config.client_side_validation && account_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SubaccountPricingApi.get_account_subaccount_pricing"
180
+ end
181
+ # verify the required parameter 'subaccount_id' is set
182
+ if @api_client.config.client_side_validation && subaccount_id.nil?
183
+ fail ArgumentError, "Missing the required parameter 'subaccount_id' when calling SubaccountPricingApi.get_account_subaccount_pricing"
184
+ end
185
+ # verify the required parameter 'pricing_id' is set
186
+ if @api_client.config.client_side_validation && pricing_id.nil?
187
+ fail ArgumentError, "Missing the required parameter 'pricing_id' when calling SubaccountPricingApi.get_account_subaccount_pricing"
188
+ end
189
+ # resource path
190
+ local_var_path = '/accounts/{account_id}/subaccounts/{subaccount_id}/pricing/{pricing_id}'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'subaccount_id' + '}', subaccount_id.to_s).sub('{' + 'pricing_id' + '}', pricing_id.to_s)
191
+
192
+ # query parameters
193
+ query_params = {}
194
+
195
+ # header parameters
196
+ header_params = {}
197
+ # HTTP header 'Accept' (if needed)
198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
199
+ # HTTP header 'Content-Type'
200
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
201
+
202
+ # form parameters
203
+ form_params = {}
204
+
205
+ # http body (model)
206
+ post_body = nil
207
+ auth_names = ['apiKey']
208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => 'PricingFull')
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: SubaccountPricingApi#get_account_subaccount_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+ # Get a list of pricing plans for a subaccount.
221
+ # Get a list of pricing plans for a subaccount. See Account Subaccount Pricing for more info on the properties.
222
+ # @param account_id Account ID
223
+ # @param subaccount_id Subaccount ID
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [Array<String>] :filters_id ID filter
226
+ # @option opts [String] :sort_id ID sorting
227
+ # @option opts [Integer] :limit Max results
228
+ # @option opts [Integer] :offset Results to skip
229
+ # @option opts [String] :fields Field set
230
+ # @return [ListPricings]
231
+ def list_account_subaccount_pricing(account_id, subaccount_id, opts = {})
232
+ data, _status_code, _headers = list_account_subaccount_pricing_with_http_info(account_id, subaccount_id, opts)
233
+ data
234
+ end
235
+
236
+ # Get a list of pricing plans for a subaccount.
237
+ # Get a list of pricing plans for a subaccount. See Account Subaccount Pricing for more info on the properties.
238
+ # @param account_id Account ID
239
+ # @param subaccount_id Subaccount ID
240
+ # @param [Hash] opts the optional parameters
241
+ # @option opts [Array<String>] :filters_id ID filter
242
+ # @option opts [String] :sort_id ID sorting
243
+ # @option opts [Integer] :limit Max results
244
+ # @option opts [Integer] :offset Results to skip
245
+ # @option opts [String] :fields Field set
246
+ # @return [Array<(ListPricings, Fixnum, Hash)>] ListPricings data, response status code and response headers
247
+ def list_account_subaccount_pricing_with_http_info(account_id, subaccount_id, opts = {})
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug 'Calling API: SubaccountPricingApi.list_account_subaccount_pricing ...'
250
+ end
251
+ # verify the required parameter 'account_id' is set
252
+ if @api_client.config.client_side_validation && account_id.nil?
253
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling SubaccountPricingApi.list_account_subaccount_pricing"
254
+ end
255
+ # verify the required parameter 'subaccount_id' is set
256
+ if @api_client.config.client_side_validation && subaccount_id.nil?
257
+ fail ArgumentError, "Missing the required parameter 'subaccount_id' when calling SubaccountPricingApi.list_account_subaccount_pricing"
258
+ end
259
+ if @api_client.config.client_side_validation && !opts[:'sort_id'].nil? && opts[:'sort_id'] !~ Regexp.new(/asc|desc/)
260
+ fail ArgumentError, "invalid value for 'opts[:\"sort_id\"]' when calling SubaccountPricingApi.list_account_subaccount_pricing, must conform to the pattern /asc|desc/."
261
+ end
262
+
263
+ # resource path
264
+ local_var_path = '/accounts/{account_id}/subaccounts/{subaccount_id}/pricing'.sub('{' + 'account_id' + '}', account_id.to_s).sub('{' + 'subaccount_id' + '}', subaccount_id.to_s)
265
+
266
+ # query parameters
267
+ query_params = {}
268
+ query_params[:'filters[id]'] = @api_client.build_collection_param(opts[:'filters_id'], :multi) if !opts[:'filters_id'].nil?
269
+ query_params[:'sort[id]'] = opts[:'sort_id'] if !opts[:'sort_id'].nil?
270
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
271
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
272
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
273
+
274
+ # header parameters
275
+ header_params = {}
276
+ # HTTP header 'Accept' (if needed)
277
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
278
+ # HTTP header 'Content-Type'
279
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
280
+
281
+ # form parameters
282
+ form_params = {}
283
+
284
+ # http body (model)
285
+ post_body = nil
286
+ auth_names = ['apiKey']
287
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => 'ListPricings')
294
+ if @api_client.config.debugging
295
+ @api_client.config.logger.debug "API called: SubaccountPricingApi#list_account_subaccount_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
296
+ end
297
+ return data, status_code, headers
298
+ end
299
+ end
300
+ end