package com.plivo.api.models.call.actions;

import com.plivo.api.PlivoClient;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.base.Creator;
import java.io.IOException;

public class CallRecordCreator extends Creator<CallRecordCreateResponse> {

  private final String id;

  public CallRecordCreator(String id) {
    this.id = id;
  }

  @Override
  protected retrofit2.Call<CallRecordCreateResponse> obtainCall() {
    return client().getApiService().callRecordCreate(client().getAuthId(), id, this);
  }

  public CallRecordCreateResponse record() throws IOException, PlivoRestException {
    return create();
  }

  @Override
  public CallRecordCreator client(final PlivoClient plivoClient) {
    this.plivoClient = plivoClient;
    return this;
  }

}

@@ -165,16 +165,17 @@
 reator;%0A
+%0A
 import j
@@ -297,16 +297,79 @@
 ring id;
+%0A  private String callbackUrl;%0A  private String callbackMethod;
 %0A%0A  publ
@@ -843,10 +843,409 @@
 s;%0A  %7D%0A%0A
+  public CallRecordCreator callbackUrl(final String callbackUrl) %7B%0A    this.callbackUrl = callbackUrl;%0A    return this;%0A  %7D%0A%0A  public CallRecordCreator callbackMethod(final String callbackMethod) %7B%0A    this.callbackMethod = callbackMethod;%0A    return this;%0A  %7D%0A%0A  public String callbackUrl() %7B%0A    return this.callbackUrl;%0A  %7D%0A%0A  public String callbackMethod() %7B%0A    return this.callbackMethod;%0A  %7D%0A
 %7D%0A

add callback_url for start recording