001package com.plivo.api; 002 003import com.plivo.api.models.account.*; 004import com.plivo.api.models.address.*; 005import com.plivo.api.models.application.*; 006import com.plivo.api.models.base.BaseResponse; 007import com.plivo.api.models.base.ListResponse; 008import com.plivo.api.models.call.*; 009import com.plivo.api.models.call.actions.*; 010import com.plivo.api.models.complianceapplication.*; 011import com.plivo.api.models.compliancedocument.*; 012import com.plivo.api.models.compliancedocumenttype.*; 013import com.plivo.api.models.compliancerequirement.*; 014import com.plivo.api.models.conference.*; 015import com.plivo.api.models.endpoint.*; 016import com.plivo.api.models.enduser.*; 017import com.plivo.api.models.identity.*; 018import com.plivo.api.models.media.Media; 019import com.plivo.api.models.media.MediaResponse; 020import com.plivo.api.models.message.Message; 021import com.plivo.api.models.message.MessageCreateResponse; 022import com.plivo.api.models.message.MessageCreator; 023import com.plivo.api.models.message.MmsMedia; 024import com.plivo.api.models.multipartycall.*; 025import com.plivo.api.models.node.*; 026import com.plivo.api.models.node.MultiPartyCall; 027import com.plivo.api.models.number.*; 028import com.plivo.api.models.number.Number; 029import com.plivo.api.models.phlo.Phlo; 030import com.plivo.api.models.phlo.PhloRunGetterResponse; 031import com.plivo.api.models.phlo.PhloUpdateResponse; 032import com.plivo.api.models.powerpack.*; 033import com.plivo.api.models.pricing.Pricing; 034import com.plivo.api.models.recording.Recording; 035import com.plivo.api.models.brand.Brand; 036import com.plivo.api.models.brand.BrandCreateResponse; 037import com.plivo.api.models.brand.BrandCreator; 038import com.plivo.api.models.brand.BrandUsecase; 039import com.plivo.api.models.brand.BrandDeleteResponse; 040import com.plivo.api.models.campaign.*; 041import com.plivo.api.models.profile.*; 042import com.plivo.api.models.token.TokenCreateResponse; 043import com.plivo.api.models.token.TokenCreator; 044import com.plivo.api.models.verify_session.SessionCreateResponse; 045import com.plivo.api.models.verify_session.SessionCreator; 046import com.plivo.api.models.verify_session.ValidateSession; 047import com.plivo.api.models.verify_session.VerifySession; 048import com.plivo.api.models.verify_session.VerifySessionList; 049import com.plivo.api.models.tollfree_verification.*; 050import com.plivo.api.models.verify.*; 051import okhttp3.RequestBody; 052import okhttp3.ResponseBody; 053import retrofit2.Call; 054import retrofit2.http.*; 055 056import java.util.Map; 057 058public interface PlivoAPIService { 059 060 // Address 061 @POST("Account/{authId}/Verification/Address/") 062 Call<AddressCreateResponse> addressCreate(@Path("authId") String authId, 063 @Body AddressCreator addressCreator); 064 065 @GET("Account/{authId}/Verification/Address/") 066 Call<ListResponse<Address>> addressList(@Path("authId") String authId, 067 @QueryMap Map<String, Object> addressListRequest); 068 069 @GET("Account/{authId}/Verification/Address/{addressId}/") 070 Call<Address> addressGet(@Path("authId") String authId, @Path("addressId") String addressId); 071 072 @POST("Account/{authId}/Verification/Address/{addressId}/") 073 Call<AddressUpdateResponse> addressUpdate(@Path("authId") String authId, 074 @Path("addressId") String addressId, @Body AddressUpdater addressUpdater); 075 076 @DELETE("Account/{authId}/Verification/Address/{addressId}/") 077 Call<ResponseBody> addressDelete(@Path("authId") String authId, @Path("addressId") String addressId); 078 079 // Application 080 @POST("Account/{authId}/Application/") 081 Call<ApplicationCreateResponse> applicationCreate(@Path("authId") String authId, 082 @Body ApplicationCreator application); 083 084 @GET("Account/{authId}/Application/") 085 Call<ListResponse<Application>> applicationList(@Path("authId") String authId, 086 @QueryMap Map<String, Object> applicationListRequest); 087 088 @GET("Account/{authId}/Application/{appId}/") 089 Call<Application> applicationGet(@Path("authId") String authId, @Path("appId") String appId); 090 091 @POST("Account/{authId}/Application/{appId}/") 092 Call<ApplicationUpdateResponse> applicationUpdate(@Path("authId") String authId, 093 @Path("appId") String appId, @Body ApplicationUpdater application); 094 095 @HTTP(method = "DELETE", path = "Account/{authId}/Application/{appId}/", hasBody = true) 096 Call<ResponseBody> applicationDelete(@Path("authId") String authId, @Path("appId") String appId, @Body ApplicationDeleter application); 097 098 // Account 099 @GET("Account/{authId}/") 100 Call<Account> accountGet(@Path("authId") String authId); 101 102 @POST("Account/{authId}/") 103 Call<AccountUpdateResponse> accountModify(@Path("authId") String authId, 104 @Body AccountUpdater accountUpdater); 105 106 @POST("Account/{authId}/Subaccount/") 107 Call<SubaccountCreateResponse> subaccountCreate(@Path("authId") String authId, 108 @Body SubaccountCreator subaccountCreator); 109 110 @POST("Account/{authId}/Subaccount/{subauthId}/") 111 Call<SubaccountUpdateResponse> subaccountModify(@Path("authId") String authId, 112 @Path("subauthId") String subauthId, @Body SubaccountUpdater subaccount); 113 114 @GET("Account/{authId}/Subaccount/{subauthId}/") 115 Call<Subaccount> subaccountGet(@Path("authId") String authId, 116 @Path("subauthId") String subauthId); 117 118 @GET("Account/{authId}/Subaccount/") 119 Call<ListResponse<Subaccount>> subaccountList(@Path("authId") String authId, 120 @Query("limit") Integer limit, @Query("offset") Integer offset); 121 122 @HTTP(method = "DELETE", path = "Account/{authId}/Subaccount/{subauthId}/", hasBody = true) 123 Call<ResponseBody> subaccountDelete(@Path("authId") String authId, 124 @Path("subauthId") String subauthId, @Body SubaccountDeleter subaccount); 125 126 // Call 127 @POST("Account/{authId}/Call/") 128 Call<CallCreateResponse> callCreate(@Path("authId") String authId, 129 @Body CallCreator callCreator); 130 131 @GET("Account/{authId}/Call/") 132 Call<ListResponse<com.plivo.api.models.call.Call>> callList(@Path("authId") String authId, 133 @QueryMap Map<String, Object> callListRequest); 134 135 @GET("Account/{authId}/Call/{callId}/") 136 Call<com.plivo.api.models.call.Call> callGet(@Path("authId") String authId, 137 @Path("callId") String callId); 138 139 @POST("Account/{authId}/Call/{callId}/") 140 Call<CallUpdateResponse> callUpdate(@Path("authId") String authId, 141 @Path("callId") String callId, @Body CallUpdater callUpdater); 142 143 @DELETE("Account/{authId}/Call/{callId}/") 144 Call<ResponseBody> callDelete(@Path("authId") String authId, @Path("callId") String callId); 145 146 @GET("Account/{authId}/Call/?status=live") 147 Call<LiveCallListResponse> liveCallListGet(@Path("authId") String authId, @QueryMap Map<String, Object> callListRequest); 148 149 @GET("Account/{authId}/Call/{callId}/?status=live") 150 Call<LiveCall> liveCallGet(@Path("authId") String authId, @Path("callId") String callId); 151 152 @GET("Account/{authId}/Call/?status=queued") 153 Call<QueuedCallListResponse> queuedCallListGet(@Path("authId") String authId); 154 155 @GET("Account/{authId}/Call/{callId}/?status=queued") 156 Call<QueuedCall> queuedCallGet(@Path("authId") String authId, @Path("callId") String callId); 157 158 @POST("Account/{authId}/Call/{callId}/Record/") 159 Call<CallRecordCreateResponse> callRecordCreate(@Path("authId") String authId, 160 @Path("callId") String callId, @Body 161 CallRecordCreator callRecordCreator); 162 163 @DELETE("Account/{authId}/Call/{callId}/Record/") 164 Call<ResponseBody> callRecordDelete(@Path("authId") String authId, @Path("callId") String callId); 165 166 @POST("Account/{authId}/Call/{callId}/Play/") 167 Call<CallPlayCreateResponse> callPlayCreate(@Path("authId") String authId, 168 @Path("callId") String callId, @Body 169 CallPlayCreator callPlayCreator); 170 171 @DELETE("Account/{authId}/Call/{callId}/Play/") 172 Call<ResponseBody> callPlayDelete(@Path("authId") String authId, @Path("callId") String callId); 173 174 @POST("Account/{authId}/Call/{callId}/Speak/") 175 Call<CallSpeakCreateResponse> callSpeakCreate(@Path("authId") String authId, 176 @Path("callId") String callId, @Body 177 CallSpeakCreator callSpeakCreator); 178 179 @DELETE("Account/{authId}/Call/{callId}/Speak/") 180 Call<ResponseBody> callSpeakDelete(@Path("authId") String authId, @Path("callId") String callId); 181 182 @POST("Account/{authId}/Call/{callId}/DTMF/") 183 Call<CallDtmfCreateResponse> callDtmfCreate(@Path("authId") String authId, 184 @Path("callId") String callId, @Body 185 CallDtmfCreator callDtmfCreator); 186 187 // Identity 188 @POST("Account/{authId}/Verification/Identity/") 189 Call<IdentityCreateResponse> identityCreate(@Path("authId") String authId, 190 @Body IdentityCreator identitycreator); 191 192 @GET("Account/{authId}/Verification/Identity/") 193 Call<ListResponse<Identity>> identityList(@Path("authId") String authId, 194 @QueryMap Map<String, Object> identityListRequest); 195 196 @GET("Account/{authId}/Verification/Identity/{id}/") 197 Call<Identity> identityGet(@Path("authId") String authId, @Path("id") String id); 198 199 @DELETE("Account/{authId}/Verification/Identity/{id}/") 200 Call<ResponseBody> identityDelete(@Path("authId") String authId, @Path("id") String number); 201 202 @POST("Account/{authId}/Verification/Identity/{id}/") 203 Call<IdentityUpdateResponse> identityUpdate(@Path("authId") String authId, @Path("id") String identityId, @Body IdentityUpdater identityUpdater); 204 205 // Message 206 @POST("Account/{authId}/Message/") 207 Call<MessageCreateResponse> messageSend(@Path("authId") String authId, 208 @Body MessageCreator messageCreator); 209 210 @GET("Account/{authId}/Message/") 211 Call<ListResponse<Message>> messageList(@Path("authId") String authId, 212 @QueryMap Map<String, Object> messageListRequest); 213 214 @GET("Account/{authId}/Message/{id}/") 215 Call<Message> messageGet(@Path("authId") String authId, @Path("id") String id); 216 217 @GET("Account/{authId}/Message/{id}/Media/") 218 Call<ListResponse<MmsMedia>> mmsMediaList(@Path("authId") String authId, @Path("id") String id); 219 220 @GET("Account/{authId}/Message/{id}/Media/{media_id}/") 221 Call<MmsMedia> mmsMediaGet(@Path("authId") String authId, @Path("id") String id, @Path("media_id") String media_id); 222 223 @DELETE("Account/{authId}/Message/{id}/Media/") 224 Call<ResponseBody> mmsMediaDelete(@Path("authId") String authId, @Path("id") String id); 225 226 // Number 227 228 @GET("Account/{authId}/Number/") 229 Call<ListResponse<Number>> numberList(@Path("authId") String authId, 230 @QueryMap Map<String, Object> params); 231 232 @GET("Account/{authId}/Number/{number}/") 233 Call<Number> numberGet(@Path("authId") String authId, @Path("number") String number); 234 235 @POST("Account/{authId}/Number/") 236 Call<NumberCreateResponse> numberCreate(@Path("authId") String authId, 237 @Body NumberCreator numberCreator); 238 239 @POST("Account/{authId}/Number/{number}/") 240 Call<NumberUpdateResponse> numberUpdate(@Path("authId") String authId, 241 @Path("number") String number, @Body NumberUpdater numberUpdater); 242 243 @DELETE("Account/{authId}/Number/{number}/") 244 Call<ResponseBody> numberDelete(@Path("authId") String authId, @Path("number") String number); 245 246 @GET("Account/{authId}/PhoneNumber/") 247 Call<ListResponse<PhoneNumber>> phoneNumberList(@Path("authId") String authId, @QueryMap Map<String, Object> params); 248 249 @POST("Account/{authId}/PhoneNumber/{number}/") 250 Call<PhoneNumberCreateResponse> phoneNumberCreate(@Path("authId") String authId, 251 @Path("number") String number, @Body 252 PhoneNumberCreator creator); 253 254 //10dlc 255 @POST("Account/{authId}/10dlc/Brand/") 256 Call<BrandCreateResponse> createBrand(@Path("authId") String authId, 257 @Body BrandCreator createBrand); 258 259 @GET("Account/{authId}/10dlc/Brand/") 260 Call<ListResponse<Brand>> brandList(@Path("authId") String authId, 261 @QueryMap Map<String, Object> brandListRequest, 262 @Query("limit") Integer limit, @Query("offset") Integer offset); 263 264 @GET("Account/{authId}/10dlc/Brand/{id}/") 265 Call<Brand> brandGet(@Path("authId") String authId, @Path("id") String brandId); 266 267 @DELETE("Account/{authId}/10dlc/Brand/{id}/") 268 Call<BrandDeleteResponse> brandDelete(@Path("authId") String authId, @Path("id") String brandId); 269 270 @GET("Account/{authId}/10dlc/Brand/{id}/usecases/") 271 Call<BrandUsecase> brandUsecaseGet(@Path("authId") String authId, @Path("id") String brandId); 272 273 @POST("Account/{authId}/10dlc/Campaign/") 274 Call<CampaignCreateResponse> createCampaign(@Path("authId") String authId, 275 @Body CampaignCreator campaignCreator); 276 277 @POST("Account/{authId}/10dlc/Campaign/{id}/") 278 Call<CampaignUpdateResponse> updateCampaign(@Path("authId") String authId, @Path("id") String campaignId, 279 @Body CampaignUpdater campaignUpdater); 280 281 @POST("Account/{authId}/10dlc/Campaign/{campaign_id}/Number/") 282 Call<CampaignNumberLinkerResponse> linkCampaignNumber(@Path("authId") String authId, @Path("campaign_id") String campaignID, 283 @Body CampaignNumberLinker campaignNumberLinker); 284 285 @GET("Account/{authId}/10dlc/Campaign/{campaign_id}/Number/") 286 Call<CampaignNumbers> campaignNumbersGet(@Path("authId") String authId, @Path("campaign_id") String campaignID, 287 @Query("limit") Integer limit, @Query("offset") Integer offset); 288 289 @GET("Account/{authId}/10dlc/Campaign/{campaign_id}/Number/{number}/") 290 Call<CampaignNumbers> campaignNumberGet(@Path("authId") String authId, @Path("campaign_id") String campaignID, @Path("number") String number); 291 292 293 @DELETE("Account/{authId}/10dlc/Campaign/{campaign_id}/Number/{number}/") 294 Call<CampaignNumbers> unlinkCampaignNumber(@Path("authId") String authId, @Path("campaign_id") String campaignID, 295 @Path("number") String number, @Query("url") String url, @Query("method") String method); 296 297 @POST("Account/{authId}/Profile/") 298 Call<ProfileAddResponse> profileAdd(@Path("authId") String authId, @Body ProfileAdder profileAdder); 299 300 @POST("Account/{authId}/Profile/{profileUUID}/") 301 Call<Profile> profileUpdate(@Path("authId") String authId, @Path("profileUUID") String profileUUID, @Body ProfileUpdater profileUpdater); 302 303 @DELETE("Account/{authId}/Profile/{profileUUID}/") 304 Call<Profile> profileDelete(@Path("authId") String authId, @Path("profileUUID") String profileUUID); 305 306 307 @GET("Account/{authId}/Profile/") 308 Call<ListResponse<Profile>> profileList(@Path("authId") String authId, 309 @QueryMap Map<String, Object> profileListRequest, 310 @Query("limit") Integer limit, @Query("offset") Integer offset); 311 312 @GET("Account/{authId}/Profile/{profileUUID}/") 313 Call<Profile> profileGet(@Path("authId") String authId, @Path("profileUUID") String profileUUID); 314 315 @GET("Account/{authId}/10dlc/Campaign/") 316 Call<ListResponse<Campaign>> campaignList(@Path("authId") String authId, 317 @QueryMap Map<String, Object> campaignListRequest, 318 @Query("limit") Integer limit, @Query("offset") Integer offset, @Query("campaign_source") String campaignSource, @Query("brand_id") String brandId, @Query("usecase") String usecase, @Query("registration_status") String registrationStatus); 319 320 @GET("Account/{authId}/10dlc/Campaign/{campaignId}/") 321 Call<Campaign> campaignGet(@Path("authId") String authId, @Path("campaignId") String campaignId); 322 323 @DELETE("Account/{authId}/10dlc/Campaign/{campaignId}/") 324 Call<CampaignDeleteResponse> campaignDelete(@Path("authId") String authId, @Path("campaignId") String campaignId); 325 326 // Recording 327 328 @GET("Account/{authId}/Recording/") 329 Call<ListResponse<Recording>> recordingList(@Path("authId") String authId, 330 @QueryMap Map<String, Object> params); 331 332 @GET("Account/{authId}/Recording/{recordingId}/") 333 Call<Recording> recordingGet(@Path("authId") String authId, 334 @Path("recordingId") String recordingId); 335 336 @DELETE("Account/{authId}/Recording/{recordingId}/") 337 Call<ResponseBody> recordingDelete(@Path("authId") String authId, 338 @Path("recordingId") String recordingId); 339 340 // Endpoint 341 342 @POST("Account/{authId}/Endpoint/") 343 Call<EndpointCreateResponse> endpointCreate(@Path("authId") String authId, 344 @Body EndpointCreator endpointCreator); 345 346 @POST("Account/{authId}/JWT/Token/") 347 Call<TokenCreateResponse> tokenCreate(@Path("authId") String authId, 348 @Body TokenCreator tokenCreator); 349 @GET("Account/{authId}/Endpoint/") 350 Call<ListResponse<Endpoint>> endpointList(@Path("authId") String authId, 351 @QueryMap Map<String, Object> params); 352 353 @GET("Account/{authId}/Endpoint/{endpointId}/") 354 Call<Endpoint> endpointGet(@Path("authId") String authId, @Path("endpointId") String endpointId); 355 356 @POST("Account/{authId}/Endpoint/{endpointId}/") 357 Call<EndpointUpdateResponse> endpointUpdate(@Path("authId") String authId, 358 @Path("endpointId") String endpointId, @Body 359 EndpointUpdater endpointUpdater); 360 361 @DELETE("Account/{authId}/Endpoint/{endpointId}/") 362 Call<ResponseBody> endpointDelete(@Path("authId") String authId, 363 @Path("endpointId") String endpointId); 364 365 // Conference 366 367 @GET("Account/{authId}/Conference/") 368 Call<ConferenceList> conferenceListGet(@Path("authId") String authId); 369 370 @GET("Account/{authId}/Conference/{conferenceName}/") 371 Call<Conference> conferenceGet(@Path("authId") String authId, 372 @Path("conferenceName") String conferenceName); 373 374 @DELETE("Account/{authId}/Conference/") 375 Call<ResponseBody> conferenceDeleteAll(@Path("authId") String authId); 376 377 @DELETE("Account/{authId}/Conference/{conferenceName}/") 378 Call<ResponseBody> conferenceDelete(@Path("authId") String authId, 379 @Path("conferenceName") String conferenceName); 380 381 @DELETE("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/") 382 Call<ConferenceMemberActionResponse> conferenceMemberDelete(@Path("authId") String authId, 383 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 384 385 // Required as there is no body 386 @Headers("Content-Type: application/json") 387 @POST("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Kick/") 388 Call<ConferenceMemberActionResponse> conferenceMemberKickCreate(@Path("authId") String authId, 389 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 390 391 // Required as there is no body 392 @Headers("Content-Type: application/json") 393 @POST("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Mute/") 394 Call<ConferenceMemberActionResponse> conferenceMemberMuteCreate(@Path("authId") String authId, 395 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 396 397 @DELETE("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Mute/") 398 Call<ResponseBody> conferenceMemberMuteDelete(@Path("authId") String authId, 399 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 400 401 @POST("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Play/") 402 Call<ConferenceMemberActionResponse> conferenceMemberPlayCreate(@Path("authId") String authId, 403 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId, 404 @Body ConferenceMemberPlayCreator conferenceMemberPlayCreator); 405 406 @DELETE("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Play/") 407 Call<ResponseBody> conferenceMemberPlayDelete(@Path("authId") String authId, 408 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 409 410 @POST("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Speak/") 411 Call<ConferenceMemberActionResponse> conferenceMemberSpeakCreate(@Path("authId") String authId, 412 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId, 413 @Body ConferenceMemberSpeakCreator conferenceMemberSpeakCreator); 414 415 @DELETE("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Speak/") 416 Call<ResponseBody> conferenceMemberSpeakDelete(@Path("authId") String authId, 417 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 418 419 // Required as there is no body 420 @Headers("Content-Type: application/json") 421 @POST("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Deaf/") 422 Call<ConferenceMemberActionResponse> conferenceMemberDeafCreate(@Path("authId") String authId, 423 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 424 425 @DELETE("Account/{authId}/Conference/{conferenceName}/Member/{memberId}/Deaf/") 426 Call<ResponseBody> conferenceMemberDeafDelete(@Path("authId") String authId, 427 @Path("conferenceName") String conferenceName, @Path("memberId") String memberId); 428 429 // Required as there is no body 430 @Headers("Content-Type: application/json") 431 @POST("Account/{authId}/Conference/{conferenceName}/Record/") 432 Call<ConferenceRecordCreateResponse> conferenceRecordCreate(@Path("authId") String authId, 433 @Path("conferenceName") String conferenceName); 434 435 @DELETE("Account/{authId}/Conference/{conferenceName}/Record/") 436 Call<ResponseBody> conferenceRecordDelete(@Path("authId") String authId, 437 @Path("conferenceName") String conferenceName); 438 439 // Pricing 440 441 @GET("Account/{authId}/Pricing/") 442 Call<Pricing> pricingGet(@Path("authId") String authId, @Query("country_iso") String countryIso); 443 444 @DELETE("Account/{authId}/Request/{requestUuid}/") 445 Call<ResponseBody> requestDelete(@Path("authId") String authId, @Path("requestUuid") String requestUuid); 446 447 // PHLO - server is different from plivo server. Need content-type setting for POST 448 @GET("phlo/{phloId}") 449 Call<Phlo> phloGet(@Path("phloId") String phloId); 450 451 @GET("phlo/{phloId}/runs/{runId}") 452 Call<PhloRunGetterResponse> phloRunGet(@Path("phloId") String phloId, @Path("runId") String runId); 453 454 @Headers("Content-Type: application/json") 455 @POST("phlo/{phloId}/{nodeType}/{nodeId}") 456 Call<MultiPartyCallUpdateResponse> nodeAction(@Path("phloId") String phloId, 457 @Path("nodeType") NodeType nodeType, 458 @Path("nodeId") String nodeId, 459 @Body MultiPartyCallUpdatePayload payload); 460 461 @Headers("Content-Type: application/json") 462 @POST("phlo/{phloId}/{nodeType}/{nodeId}/members/{memberId}") 463 Call<MultiPartyCallUpdateResponse> memberAction(@Path("phloId") String phloId, 464 @Path("nodeType") NodeType nodeType, 465 @Path("nodeId") String nodeId, 466 @Path("memberId") String memberId, 467 @Body MultiPartyCallUpdatePayload payload); 468 469 @GET("phlo/{phloId}/{nodeType}/{nodeId}") 470 Call<MultiPartyCall> multiPartyCallGet(@Path("phloId") String phloId, 471 @Path("nodeType") NodeType nodeType, 472 @Path("nodeId") final String nodeId); 473 474 @Headers("Content-Type: application/json") 475 @POST("account/{authId}/phlo/{phloId}") 476 Call<PhloUpdateResponse> runPhlo(@Path("authId") String authId, 477 @Path("phloId") String phloId, 478 @Body Map<String, Object> payload); 479 480 //Powerpack 481 @POST("Account/{authId}/Powerpack/") 482 Call<PowerpackResponse> createPowerpack(@Path("authId") String authId, @Body PowerpackCreator powerpackCreator); 483 484 @GET("Account/{authId}/Powerpack/{uuid}/") 485 Call<Powerpack> powerpackGet(@Path("authId") String authId, @Path("uuid") String uuid); 486 487 @GET("Account/{authId}/Powerpack/") 488 Call<ListResponse<Powerpack>> powerpackList(@Path("authId") String authId, 489 @QueryMap Map<String, Object> powerpackListRequest); 490 491 // 492 @POST("Account/{authId}/Powerpack/{uuid}/") 493 Call<PowerpackUpdateResponse> powerpackUpdate(@Path("authId") String authId, 494 @Path("uuid") String uuid, @Body PowerpackUpdater powerpackUpdater); 495 496 // 497 @HTTP(method = "DELETE", path = "Account/{authId}/Powerpack/{id}/", hasBody = true) 498 Call<ResponseBody> powerpackDeleter(@Path("authId") String authId, @Path("id") String id, @Body PowerpackDeleter powerpackDelete); 499 500 @GET("Account/{authId}/NumberPool/{uuid}/Number/") 501 Call<ListResponse<Numbers>> powerpackNumberList(@Path("authId") String authId, @Path("uuid") String uuid, 502 @QueryMap Map<String, Object> powerpackNumberListRequest); 503 504 @GET("Account/{authId}/NumberPool/{uuid}/Shortcode/") 505 Call<ListResponse<Shortcode>> powerpackShortcodeList(@Path("authId") String authId, @Path("uuid") String uuid, 506 @QueryMap Map<String, Object> powerpackShortcodeListRequest); 507 508 // 509 @GET("Account/{authId}/NumberPool/{uuid}/Tollfree/") 510 Call<ListResponse<Tollfree>> powerpackTollfreeList(@Path("authId") String authId, @Path("uuid") String uuid, 511 @QueryMap Map<String, Object> powerpackTollfreeListRequest); 512 513 @GET("Account/{authId}/NumberPool/{uuid}/Number/{number}/") 514 Call<Numbers> powerpackFindNumberGet(@Path("authId") String authId, @Path("uuid") String uuid, @Path("number") String number); 515 516 @GET("Account/{authId}/NumberPool/{uuid}/Shortcode/{shortcode}/") 517 Call<Shortcode> powerpackFindShortcodeGet(@Path("authId") String authId, @Path("uuid") String uuid, @Path("shortcode") String shortcode); 518 519 @GET("Account/{authId}/NumberPool/{uuid}/Tollfree/{tollfree}/") 520 Call<Tollfree> powerpackFindTollfreeGet(@Path("authId") String authId, @Path("uuid") String uuid, @Path("tollfree") String tollfree); 521 522 @POST("Account/{authId}/NumberPool/{uuid}/Number/{number}/") 523 Call<Numbers> powerpackAddNumberCreate(@Path("authId") String authId, @Path("uuid") String uuid, @Path("number") String number, @Body PowerpackAddNumber addnumber); 524 525 @POST("Account/{authId}/NumberPool/{uuid}/Tollfree/{tollfree}/") 526 Call<Tollfree> powerpackAddTollfreeCreate(@Path("authId") String authId, @Path("uuid") String uuid, @Path("tollfree") String tollfree, @Body PowerpackAddTollfree addtollfree); 527 528 @HTTP(method = "DELETE", path = "Account/{authId}/NumberPool/{uuid}/Number/{number}/", hasBody = true) 529 Call<ResponseBody> powerpackNumberDelete(@Path("authId") String authId, @Path("uuid") String uuid, @Path("number") String number, @Body RemoveNumber numberDeleter); 530 531 @HTTP(method = "DELETE", path = "Account/{authId}/NumberPool/{uuid}/Tollfree/{tollfree}/", hasBody = true) 532 Call<ResponseBody> powerpackTollfreeDelete(@Path("authId") String authId, @Path("uuid") String uuid, @Path("tollfree") String tollfree, @Body RemoveTollfree tollfreeDeleter); 533 534 @HTTP(method = "DELETE", path = "Account/{authId}/NumberPool/{uuid}/Shortcode/{shortcode}/", hasBody = true) 535 Call<ResponseBody> powerpackShortcodeDelete(@Path("authId") String authId, @Path("uuid") String uuid, @Path("shortcode") String shortcode, @Body RemoveShortcode shortcodeDeleter); 536 537 @POST("Account/{authId}/NumberPool/{uuid}/Number/{number}/") 538 Call<Numbers> powerpackBuyAddNumberCreate(@Path("authId") String authId, @Path("uuid") String uuid, @Path("number") String number, @Body BuyAddNumbers numbers); 539 540 @GET("Account/{authId}/Media/") 541 Call<ListResponse<Media>> mediaList(@Path("authId") String authId, @QueryMap Map<String, Object> mediaListRequest); 542 543 @GET("Account/{authId}/Media/{id}/") 544 Call<Media> mediaGet(@Path("authId") String authId, @Path("id") String id); 545 546 @POST("Account/{authId}/Media/") 547 Call<MediaResponse> uploadMedia(@Path("authId") String authId, @Body RequestBody mediaUploads); 548 549 550 // Enduser 551 // Get 552 @GET("Account/{authId}/EndUser/{id}/") 553 Call<EndUser> endUserGet(@Path("authId") String authId, @Path("id") String id); 554 555 // Create 556 @POST("Account/{authId}/EndUser/") 557 Call<EndUserCreateResponse> endUserCreate(@Path("authId") String authId, 558 @Body EndUserCreator endUserCreator); 559 560 // Update 561 @POST("Account/{authId}/EndUser/{id}/") 562 Call<EndUserUpdateResponse> endUserUpdate(@Path("authId") String authId, @Path("id") String id, 563 @Body EndUserUpdater endUserUpdater); 564 565 // List all end user 566 @GET("Account/{authId}/EndUser/") 567 Call<ListResponse<EndUser>> endUserList(@Path("authId") String authId, 568 @QueryMap Map<String, Object> endUserListRequest); 569 570 @DELETE("Account/{authId}/EndUser/{id}/") 571 Call<ResponseBody> endUserDelete(@Path("authId") String authId, @Path("id") String endUserId); 572 573 // Compliance Document Type 574 // Get 575 @GET("Account/{authId}/ComplianceDocumentType/{id}/") 576 Call<ComplianceDocumentType> complianceDocumentTypeGet(@Path("authId") String authId, @Path("id") String id); 577 578 // List 579 @GET("Account/{authId}/ComplianceDocumentType/") 580 Call<ListResponse<ComplianceDocumentType>> complianceDocumentTypeList(@Path("authId") String authId, 581 @QueryMap Map<String, Object> complianceDocumentListRequest); 582 583 584 // Compliance Requirement 585 // Get 586 @GET("Account/{authId}/ComplianceRequirement/{id}/") 587 Call<ComplianceRequirement> complianceRequirementGet(@Path("authId") String authId, @Path("id") String id); 588 589 // List 590 @GET("Account/{authId}/ComplianceRequirement/") 591 Call<ComplianceRequirement> complianceRequirementList(@Path("authId") String authId, 592 @QueryMap Map<String, Object> complianceDocumentListRequest); 593 594 595 // Compliance Application 596 // Get 597 @GET("Account/{authId}/ComplianceApplication/{id}/") 598 Call<ComplianceApplication> complianceApplicationGet(@Path("authId") String authId, @Path("id") String id); 599 600 // Create 601 @POST("Account/{authId}/ComplianceApplication/") 602 Call<ComplianceApplicationCreateResponse> complianceApplicationCreate(@Path("authId") String authId, 603 @Body ComplianceApplicationCreator complianceApplicationCreator); 604 605 // Update 606 @POST("Account/{authId}/ComplianceApplication/{id}/") 607 Call<ComplianceApplicationUpdateResponse> complianceApplicationUpdate(@Path("authId") String authId, @Path("id") String id, 608 @Body ComplianceApplicationUpdater complianceApplicationUpdater); 609 610 // List 611 @GET("Account/{authId}/ComplianceApplication/") 612 Call<ListResponse<ComplianceApplication>> complianceApplicationList(@Path("authId") String authId, 613 @QueryMap Map<String, Object> complianceApplicationLister); 614 615 616 // Delete 617 @DELETE("Account/{authId}/ComplianceApplication/{id}/") 618 Call<ResponseBody> complianceApplicationDelete(@Path("authId") String authId, @Path("id") String complianceApplicationId); 619 620 // Submit 621 @POST("Account/{authId}/ComplianceApplication/{id}/Submit/") 622 Call<ComplianceApplicationCreateResponse> complianceApplicationSubmit(@Path("authId") String authId, @Path("id") String id, 623 @Body ComplianceApplicationSubmitter complianceDocumentCreator); 624 625 626 // Compliance Document 627 // Get 628 @GET("Account/{authId}/ComplianceDocument/{id}/") 629 Call<ComplianceDocument> complianceDocumentGet(@Path("authId") String authId, @Path("id") String id); 630 631 // Create 632 @POST("Account/{authId}/ComplianceDocument/") 633 Call<ComplianceDocumentCreateResponse> complianceDocumentCreate(@Path("authId") String authId, 634 @Body RequestBody complianceDocumentCreator); 635 636 // Update 637 @POST("Account/{authId}/ComplianceDocument/{id}/") 638 Call<ComplianceDocumentUpdateResponse> complianceDocumentUpdate(@Path("authId") String authId, @Path("id") String id, 639 @Body RequestBody complianceDocumentUpdater); 640 641 // List 642 @GET("Account/{authId}/ComplianceDocument/") 643 Call<ListResponse<ComplianceDocument>> complianceDocumentList(@Path("authId") String authId, 644 @QueryMap Map<String, Object> complianceDocumentLister); 645 646 647 // Delete 648 @DELETE("Account/{authId}/ComplianceDocument/{id}/") 649 Call<ResponseBody> complianceDocumentDelete(@Path("authId") String authId, @Path("id") String complianceDocumentId); 650 651 // List multiparty calls 652 @GET("Account/{authId}/MultiPartyCall/") 653 Call<ListResponse<com.plivo.api.models.multipartycall.MultiPartyCall>> mpcList(@Path("authId") String authId, @QueryMap Map<String, Object> params); 654 655 // Get multiparty call 656 @GET("Account/{authId}/MultiPartyCall/{mpcId}/") 657 Call<com.plivo.api.models.multipartycall.MultiPartyCall> mpcGet(@Path("authId") String authId, @Path("mpcId") String mpcId); 658 659 // Start multiparty call 660 @POST("Account/{authId}/MultiPartyCall/{mpcId}/") 661 Call<BaseResponse> mpcStart(@Path("authId") String authId, @Path("mpcId") String mpcId, @Body Map<String, Object> body); 662 663 // End multiparty call 664 @DELETE("Account/{authId}/MultiPartyCall/{mpcId}/") 665 Call<ResponseBody> mpcStop(@Path("authId") String authId, @Path("mpcId") String mpcId); 666 667 // Add new participant to multiparty call 668 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Participant/") 669 Call<MultiPartyCallParticipantAddResponse> mpcAddParticipant(@Path("authId") String authId, @Path("mpcId") String mpcId, @Body MultiPartyCallParticipantAdd addParticipant); 670 671 // List participants of multiparty call 672 @GET("Account/{authId}/MultiPartyCall/{mpcId}/Participant/") 673 Call<ListResponse<MultiPartyCallParticipant>> mpcListParticipants(@Path("authId") String authId, @Path("mpcId") String mpcId, @QueryMap Map<String, Object> params); 674 675 // Start recording multiparty call 676 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Record/") 677 Call<MultiPartyCallRecordingStartResponse> mpcStartRecording(@Path("authId") String authId, @Path("mpcId") String mpcId, @Body MultiPartyCallRecordingStart startRecording); 678 679 // Stop recording multiparty call 680 @DELETE("Account/{authId}/MultiPartyCall/{mpcId}/Record/") 681 Call<ResponseBody> mpcRecordStop(@Path("authId") String authId, @Path("mpcId") String mpcId); 682 683 // Pause recording multiparty call 684 @Headers("Content-Type: application/json") 685 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Record/Pause/") 686 Call<BaseResponse> mpcPauseRecording(@Path("authId") String authId, @Path("mpcId") String mpcId); 687 688 // Resume recording multiparty call 689 @Headers("Content-Type: application/json") 690 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Record/Resume/") 691 Call<BaseResponse> mpcResumeRecording(@Path("authId") String authId, @Path("mpcId") String mpcId); 692 693 // Get participant of multiparty call 694 @GET("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/") 695 Call<MultiPartyCallParticipant> mpcMemberGet(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 696 697 // Update participant of multiparty call 698 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/") 699 Call<MultiPartyCallParticipantUpdateResponse> mpcMemberUpdate(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId, @Body MultiPartyCallParticipantUpdate updateParticipant); 700 701 // Kick participant of multiparty call 702 @DELETE("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/") 703 Call<ResponseBody> mpcMemberKick(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 704 705 // Start participant recording multiparty call 706 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/Record/") 707 Call<MultiPartyCallRecordingStartResponse> mpcParticipantStartRecording(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId, @Body MultiPartyCallParticipantRecordingStart startParticipantRecording); 708 709 // Stop participant recording multiparty call 710 @DELETE("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/Record/") 711 Call<ResponseBody> mpcParticipantRecordStop(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 712 713 // Pause participant recording multiparty call 714 @Headers("Content-Type: application/json") 715 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/Record/Pause/") 716 Call<BaseResponse> mpcParticipantPauseRecording(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 717 718 // Resume participant recording multiparty call 719 @Headers("Content-Type: application/json") 720 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Participant/{participantId}/Record/Resume/") 721 Call<BaseResponse> mpcParticipantResumeRecording(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 722 723 @POST("Account/{authId}/MultiPartyCall/{mpcId}/Member/{participantId}/Play/") 724 Call<MultiPartyCallStartPlayAudioResponse> mpcStartPlayAudio(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId, @Body MultiPartyCallStartPlayAudio multiPartyCallStartPlayAudio); 725 726 @DELETE("Account/{authId}/MultiPartyCall/{mpcId}/Member/{participantId}/Play/") 727 Call<ResponseBody> mpcStopPlayAudio(@Path("authId") String authId, @Path("mpcId") String mpcId, @Path("participantId") String participantId); 728 729 // Streaming 730 @POST("Account/{authId}/Call/{callId}/Stream/") 731 Call<CallStreamCreateResponse> callStreamCreate(@Path("authId") String authId, 732 @Path("callId") String callId, @Body 733 CallStreamCreator callStreamCreator); 734 735 @DELETE("Account/{authId}/Call/{callId}/Stream/") 736 Call<ResponseBody> callStreamDelete(@Path("authId") String authId, @Path("callId") String callId); 737 738 @DELETE("Account/{authId}/Call/{callId}/Stream/{streamId}") 739 Call<ResponseBody> callStreamDeleteSpecific(@Path("authId") String authId, @Path("callId") String callId, 740 @Path("streamId") String streamId); 741 742 @GET("Account/{authId}/Call/{callId}/Stream/") 743 Call<ListResponse<CallStreamGetSpecificResponse>> callStreamGetAll(@Path("authId") String authId, @Path("callId") String callId); 744 745 @GET("Account/{authId}/Call/{callId}/Stream/{streamId}") 746 Call<CallStreamGetSpecificResponse> callStreamGetSpecific(@Path("authId") String authId, @Path("callId") String callId, 747 @Path("streamId") String streamId); 748 749 @POST("Account/{authId}/Verify/Session/") 750 Call<SessionCreateResponse> sessionSend(@Path("authId") String authId, 751 @Body SessionCreator sessionCreator); 752 753 @POST("Account/{authId}/Verify/Session/{id}/") 754 Call<SessionCreateResponse> validateSession(@Path("authId") String authId, @Path("id") String id, 755 @Body ValidateSession validateSession); 756 @GET("Account/{authId}/Verify/Session/{id}/") 757 Call<VerifySession> sessionGet(@Path("authId") String authId, @Path("id") String id); 758 759 @GET("Account/{authId}/Verify/Session/") 760 Call<ListResponse<VerifySessionList>> sessionList(@Path("authId") String authId, 761 @QueryMap Map<String, Object> sessionListRequest); 762 //Verify 763 @POST("Account/{authId}/VerifiedCallerId/") 764 Call<InitiateVerifyResponse> initiateVerify(@Path("authId") String authId, @Body InitiateVerify initiateVerify); 765 766 @POST("Account/{authId}/VerifiedCallerId/Verification/{verificationUuid}/") 767 Call<VerifyCallerIdResponse> verifyCallerID(@Path("authId") String authId, @Path("verificationUuid") String verificationUuid, @Body VerifyCallerId verifyCallerId); 768 769 @POST("Account/{authId}/VerifiedCallerId/{phoneNumber}") 770 Call<UpdateVerifiedCallerIdResponse> updateVerifiedCallerID(@Path("authId") String authId, @Path("phoneNumber") String phoneNumber, @Body UpdateVerifiedCallerID updateVerifiedCallerID); 771 772 @GET("Account/{authId}/VerifiedCallerId/{phoneNumber}") 773 Call<GetVerifiedCallerIdResponse> getVerifiedCallerID(@Path("authId") String authId, @Path("phoneNumber") String phoneNumber); 774 775 @GET("Account/{authId}/VerifiedCallerId/") 776 Call<ListVerifiedCallerIdResponse> listVerifiedCallerID(@Path("authId") String authId, @QueryMap Map<String, Object> listVerifiedCallerId); 777 778 @DELETE("Account/{authId}/VerifiedCallerId/{phoneNumber}") 779 Call<ResponseBody> deleteVerifiedCallerID(@Path("authId") String authId, @Path("phoneNumber") String phoneNumber); 780 781 // TollfreeVerification Request 782 // Get 783 @GET("Account/{authId}/TollfreeVerification/{uuid}/") 784 Call<TollfreeVerification> tollfreeVerificationGet(@Path("authId") String authId, @Path("uuid") String uuid); 785 786 // Create 787 @POST("Account/{authId}/TollfreeVerification/") 788 Call<TollfreeVerificationCreateResponse> tollfreeVerificationCreate(@Path("authId") String authId, 789 @Body TollfreeVerificationCreator tollfreeVerificationCreator); 790 791 // Update 792 @POST("Account/{authId}/TollfreeVerification/{uuid}/") 793 Call<TollfreeVerificationUpdateResponse> tollfreeVerificationUpdate(@Path("authId") String authId, @Path("uuid") String uuid, 794 @Body TollfreeVerificationUpdater tollfreeVerificationUpdater); 795 796 // List 797 @GET("Account/{authId}/TollfreeVerification/") 798 Call<ListResponse<TollfreeVerification>> tollfreeVerificationList(@Path("authId") String authId, 799 @QueryMap Map<String, Object> tollfreeVerificationLister); 800 801 // Delete 802 @DELETE("Account/{authId}/TollfreeVerification/{uuid}/") 803 Call<ResponseBody> tollfreeVerificationDelete(@Path("authId") String authId, @Path("uuid") String uuid); 804}