// Path: src/main/java/com/lookfirst/wepay/api/Call.java
// @Data
// public class Call implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	/** The name of the API call you want to make (ie. /checkout/find). */
// 	private String call;
// 
// 	/** The access token of the user that is making the API call. */
// 	private String authorization;
// 
// 	/** A unique id that you can attach to an API call so that you can specifically identify that call. */
// 	private String referenceId;
// 
// 	/** The parameters required by the API call that you specified in the "call" parameter. */
// 	private Map<String, String> parameters;
// }
// 
// Path: src/main/java/com/lookfirst/wepay/api/Calls.java
// @Data
// public class Calls implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	@JsonProperty
// 	private List<Call> calls;
// }
// 
// Path: src/main/java/com/lookfirst/wepay/api/req/BatchCreateRequest.java
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class BatchCreateRequest extends WePayRequest<Calls> {
// 
// 	/** The integer client ID issued to the app by WePay - see your client ID on your app screen. */
// 	private Long clientId;
// 
// 	/** The string client secret issued to the app by WePay - see your client secret on your app screen. */
// 	private String clientSecret;
// 
// 	/** An array of the API calls that you would like to make. Each API call should have a "call" parameter,
// 	 * an "authorization" parameter -- access token for the user that is making the API call, a unique
// 	 * "reference_id", and an array of the "parameters" for the API call.  */
// 	private List<Call> calls;
// 
// 	/** */
// 	@Override
// 	public String getEndpoint() {
// 		return "/batch/create";
// 	}
// }
// 
// Path: src/test/java/com/lookfirst/wepay/util/FakeDataProvider.java
// @AllArgsConstructor
// public class FakeDataProvider implements DataProvider {
// 	@NonNull
// 	final String data;
// 
// 	@Override
// 	public InputStream getData(String uri, String postJson, String token) throws IOException {
// 		return new ByteArrayInputStream(data.getBytes());
// 	}
// }


import com.lookfirst.wepay.api.Call;
import com.lookfirst.wepay.api.Calls;
import com.lookfirst.wepay.api.req.BatchCreateRequest;
import com.lookfirst.wepay.util.FakeDataProvider;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.List;
		key = new WePayKey(false, 123L, "secret");
	}

	public void testBatch() throws Exception {
		String response = "{\n" +
				"   \"calls\": [\n" +
				"       {\n" +
				"         \"call\":\"/user\",\n" +
				"         \"reference_id\":\"1341351\",\n" +
				"         \"response\":{\n" +
				"            \"user_id\":54312,\n" +
				"            \"email\":\"test@example.com\",\n" +
				"            \"first_name\":\"bob\",\n" +
				"            \"last_name\":\"smith\"\n" +
				"         }\n" +
				"      },\n" +
				"      {\n" +
				"         \"call\":\"/checkout/create\",\n" +
				"         \"reference_id\":\"23535111\",\n" +
				"         \"response\":{\n" +
				"            \"error\":\"access_denied\",\n" +
				"            \"error_description\":\"this account can no longer transact\",\n" +
				"            \"error_code\":3004\n" +
				"         }\n" +
				"      }\n" +
				"   ]\n" +
				"}";

		WePayApi api = new WePayApi(key, new FakeDataProvider(response));
		BatchCreateRequest batch = new BatchCreateRequest();
// Path: src/main/java/com/lookfirst/wepay/api/Call.java
// @Data
// public class Call implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	/** The name of the API call you want to make (ie. /checkout/find). */
// 	private String call;
// 
// 	/** The access token of the user that is making the API call. */
// 	private String authorization;
// 
// 	/** A unique id that you can attach to an API call so that you can specifically identify that call. */
// 	private String referenceId;
// 
// 	/** The parameters required by the API call that you specified in the "call" parameter. */
// 	private Map<String, String> parameters;
// }
// 
// Path: src/main/java/com/lookfirst/wepay/api/Calls.java
// @Data
// public class Calls implements Serializable {
// 	private static final long serialVersionUID = 1L;
// 
// 	@JsonProperty
// 	private List<Call> calls;
// }
// 
// Path: src/main/java/com/lookfirst/wepay/api/req/BatchCreateRequest.java
// @Data
// @EqualsAndHashCode(callSuper=false)
// public class BatchCreateRequest extends WePayRequest<Calls> {
// 
// 	/** The integer client ID issued to the app by WePay - see your client ID on your app screen. */
// 	private Long clientId;
// 
// 	/** The string client secret issued to the app by WePay - see your client secret on your app screen. */
// 	private String clientSecret;
// 
// 	/** An array of the API calls that you would like to make. Each API call should have a "call" parameter,
// 	 * an "authorization" parameter -- access token for the user that is making the API call, a unique
// 	 * "reference_id", and an array of the "parameters" for the API call.  */
// 	private List<Call> calls;
// 
// 	/** */
// 	@Override
// 	public String getEndpoint() {
// 		return "/batch/create";
// 	}
// }
// 
// Path: src/test/java/com/lookfirst/wepay/util/FakeDataProvider.java
// @AllArgsConstructor
// public class FakeDataProvider implements DataProvider {
// 	@NonNull
// 	final String data;
// 
// 	@Override
// 	public InputStream getData(String uri, String postJson, String token) throws IOException {
// 		return new ByteArrayInputStream(data.getBytes());
// 	}
// }


// Path: src/test/java/com/lookfirst/wepay/BatchTest.java
import com.lookfirst.wepay.api.Call;
import com.lookfirst.wepay.api.Calls;
import com.lookfirst.wepay.api.req.BatchCreateRequest;
import com.lookfirst.wepay.util.FakeDataProvider;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.util.List;

		key = new WePayKey(false, 123L, "secret");
	}

	public void testBatch() throws Exception {
		String response = "{\n" +
				"   \"calls\": [\n" +
				"       {\n" +
				"         \"call\":\"/user\",\n" +
				"         \"reference_id\":\"1341351\",\n" +
				"         \"response\":{\n" +
				"            \"user_id\":54312,\n" +
				"            \"email\":\"test@example.com\",\n" +
				"            \"first_name\":\"bob\",\n" +
				"            \"last_name\":\"smith\"\n" +
				"         }\n" +
				"      },\n" +
				"      {\n" +
				"         \"call\":\"/checkout/create\",\n" +
				"         \"reference_id\":\"23535111\",\n" +
				"         \"response\":{\n" +
				"            \"error\":\"access_denied\",\n" +
				"            \"error_description\":\"this account can no longer transact\",\n" +
				"            \"error_code\":3004\n" +
				"         }\n" +
				"      }\n" +
				"   ]\n" +
				"}";

		WePayApi api = new WePayApi(key, new FakeDataProvider(response));
		BatchCreateRequest batch = new BatchCreateRequest();
		Calls calls = api.execute("token", batch);