queryParams, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ if (authNames == null)
+ authNames = new String[] { };
updateParamsForAuth(authNames, queryParams, headerParams);
final String url = buildUrl(path, queryParams, collectionQueryParams);
diff --git a/src/main/java/mobi/appcent/medusa/store/Pair.java b/src/main/java/mobi/appcent/medusa/store/Pair.java
index 8f62470..5111fff 100644
--- a/src/main/java/mobi/appcent/medusa/store/Pair.java
+++ b/src/main/java/mobi/appcent/medusa/store/Pair.java
@@ -12,7 +12,8 @@
package mobi.appcent.medusa.store;
-@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-02-24T12:45:51.835798768Z[GMT]")public class Pair {
+@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-02-24T12:45:51.835798768Z[GMT]")
+public class Pair {
private String name = "";
private String value = "";
diff --git a/src/main/java/mobi/appcent/medusa/store/api/AuthApi.java b/src/main/java/mobi/appcent/medusa/store/api/AuthApi.java
index 64a7523..23b1dc5 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/AuthApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/AuthApi.java
@@ -12,23 +12,22 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.StoreAuthRes;
-import mobi.appcent.medusa.store.model.StoreGetAuthEmailRes;
-import mobi.appcent.medusa.store.model.StorePostAuthReq;
+import mobi.appcent.medusa.store.common.UrlConstant;
+import mobi.appcent.medusa.store.model.request.auth.DeleteAuthRequest;
+import mobi.appcent.medusa.store.model.request.auth.GetAuthEmailRequest;
+import mobi.appcent.medusa.store.model.request.auth.GetAuthRequest;
+import mobi.appcent.medusa.store.model.request.auth.PostAuthRequest;
+import mobi.appcent.medusa.store.model.response.StoreAuthRes;
+import mobi.appcent.medusa.store.model.response.StoreGetAuthEmailRes;
+import mobi.appcent.medusa.store.model.response.StorePostAuthReq;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -36,83 +35,19 @@
import java.util.List;
import java.util.Map;
-public class AuthApi {
- private ApiClient apiClient;
+public class AuthApi extends BaseApi {
+ private MedusaSdkClient medusaSdkClient;
- public AuthApi() {
- this(Configuration.getDefaultApiClient());
+ public static AuthApi getInstance() {
+ return new AuthApi();
}
- public AuthApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
- }
-
- /**
- * Build call for deleteAuth
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- */
- public com.squareup.okhttp.Call deleteAuthCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/auth";
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json", "text/plain"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call deleteAuthValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
- com.squareup.okhttp.Call call = deleteAuthCall(progressListener, progressRequestListener);
- return call;
-
-
-
-
-
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -120,412 +55,37 @@ private com.squareup.okhttp.Call deleteAuthValidateBeforeCall(final ProgressResp
* Destroys a Customer's authenticated session.
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public void deleteAuth() throws ApiException {
- deleteAuthWithHttpInfo();
- }
-
- /**
- * Customer Log out
- * Destroys a Customer's authenticated session.
- * @return ApiResponse<Void>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse deleteAuthWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = deleteAuthValidateBeforeCall(null, null);
- return apiClient.execute(call);
- }
-
- /**
- * Customer Log out (asynchronously)
- * Destroys a Customer's authenticated session.
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call deleteAuthAsync(final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = deleteAuthValidateBeforeCall(progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
- return call;
- }
- /**
- * Build call for getAuth
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- */
- public com.squareup.okhttp.Call getAuthCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/auth";
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json", "text/plain"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getAuthValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
- com.squareup.okhttp.Call call = getAuthCall(progressListener, progressRequestListener);
- return call;
-
-
-
-
-
- }
-
- /**
- * Get Current Customer
- * Gets the currently logged in Customer.
- * @return StoreAuthRes
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public StoreAuthRes getAuth() throws ApiException {
- ApiResponse resp = getAuthWithHttpInfo();
- return resp.getData();
+ public DeleteAuthRequest deleteAuth() throws ApiException {
+ return new DeleteAuthRequest(medusaSdkClient);
}
/**
* Get Current Customer
* Gets the currently logged in Customer.
- * @return ApiResponse<StoreAuthRes>
+ * @return GetAuthRequest
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public ApiResponse getAuthWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = getAuthValidateBeforeCall(null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Get Current Customer (asynchronously)
- * Gets the currently logged in Customer.
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call getAuthAsync(final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = getAuthValidateBeforeCall(progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /**
- * Build call for getAuthEmail
- * @param email The email to check if exists. (required)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- */
- public com.squareup.okhttp.Call getAuthEmailCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = null;
-
- // create path and map variables
- String localVarPath = "/auth/{email}"
- .replaceAll("\\{" + "email" + "\\}", apiClient.escapeString(email.toString()));
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
-
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call getAuthEmailValidateBeforeCall(String email, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- // verify the required parameter 'email' is set
- if (email == null) {
- throw new ApiException("Missing the required parameter 'email' when calling getAuthEmail(Async)");
- }
-
- com.squareup.okhttp.Call call = getAuthEmailCall(email, progressListener, progressRequestListener);
- return call;
-
-
-
-
-
+ public GetAuthRequest getAuth() throws ApiException {
+ return new GetAuthRequest(medusaSdkClient);
}
/**
* Check if email exists
* Checks if a Customer with the given email has signed up.
- * @param email The email to check if exists. (required)
- * @return StoreGetAuthEmailRes
+ * @return GetAuthEmailRequest
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public StoreGetAuthEmailRes getAuthEmail(String email) throws ApiException {
- ApiResponse resp = getAuthEmailWithHttpInfo(email);
- return resp.getData();
- }
-
- /**
- * Check if email exists
- * Checks if a Customer with the given email has signed up.
- * @param email The email to check if exists. (required)
- * @return ApiResponse<StoreGetAuthEmailRes>
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public ApiResponse getAuthEmailWithHttpInfo(String email) throws ApiException {
- com.squareup.okhttp.Call call = getAuthEmailValidateBeforeCall(email, null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Check if email exists (asynchronously)
- * Checks if a Customer with the given email has signed up.
- * @param email The email to check if exists. (required)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call getAuthEmailAsync(String email, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = getAuthEmailValidateBeforeCall(email, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
- }
- /**
- * Build call for postAuth
- * @param body (optional)
- * @param progressListener Progress listener
- * @param progressRequestListener Progress request listener
- * @return Call to execute
- * @throws ApiException If fail to serialize the request body object
- */
- public com.squareup.okhttp.Call postAuthCall(StorePostAuthReq body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- Object localVarPostBody = body;
-
- // create path and map variables
- String localVarPath = "/auth";
-
- List localVarQueryParams = new ArrayList();
- List localVarCollectionQueryParams = new ArrayList();
-
- Map localVarHeaderParams = new HashMap();
-
- Map localVarFormParams = new HashMap();
-
- final String[] localVarAccepts = {
- "application/json", "text/plain"
- };
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
- if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
-
- final String[] localVarContentTypes = {
- "application/json"
- };
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
- localVarHeaderParams.put("Content-Type", localVarContentType);
-
- if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
- @Override
- public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
- com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
- return originalResponse.newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), progressListener))
- .build();
- }
- });
- }
-
- String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
- }
-
- @SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call postAuthValidateBeforeCall(StorePostAuthReq body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
-
- com.squareup.okhttp.Call call = postAuthCall(body, progressListener, progressRequestListener);
- return call;
-
-
-
-
-
- }
-
- /**
- * Customer Login
- * Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.
- * @param body (optional)
- * @return StoreAuthRes
- * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
- */
- public StoreAuthRes postAuth(StorePostAuthReq body) throws ApiException {
- ApiResponse resp = postAuthWithHttpInfo(body);
- return resp.getData();
+ public GetAuthEmailRequest getAuthEmail() throws ApiException {
+ return new GetAuthEmailRequest(medusaSdkClient);
}
/**
* Customer Login
* Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.
- * @param body (optional)
- * @return ApiResponse<StoreAuthRes>
+ * @return PostAuthRequest
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public ApiResponse postAuthWithHttpInfo(StorePostAuthReq body) throws ApiException {
- com.squareup.okhttp.Call call = postAuthValidateBeforeCall(body, null, null);
- Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
- }
-
- /**
- * Customer Login (asynchronously)
- * Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.
- * @param body (optional)
- * @param callback The callback to be executed when the API call finishes
- * @return The request call
- * @throws ApiException If fail to process the API call, e.g. serializing the request body object
- */
- public com.squareup.okhttp.Call postAuthAsync(StorePostAuthReq body, final ApiCallback callback) throws ApiException {
-
- ProgressResponseBody.ProgressListener progressListener = null;
- ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
-
- if (callback != null) {
- progressListener = new ProgressResponseBody.ProgressListener() {
- @Override
- public void update(long bytesRead, long contentLength, boolean done) {
- callback.onDownloadProgress(bytesRead, contentLength, done);
- }
- };
-
- progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
- @Override
- public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
- callback.onUploadProgress(bytesWritten, contentLength, done);
- }
- };
- }
-
- com.squareup.okhttp.Call call = postAuthValidateBeforeCall(body, progressListener, progressRequestListener);
- Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
- return call;
+ public PostAuthRequest postAuth() throws ApiException {
+ return new PostAuthRequest(medusaSdkClient);
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/BaseApi.java b/src/main/java/mobi/appcent/medusa/store/api/BaseApi.java
new file mode 100644
index 0000000..220ed4d
--- /dev/null
+++ b/src/main/java/mobi/appcent/medusa/store/api/BaseApi.java
@@ -0,0 +1,14 @@
+package mobi.appcent.medusa.store.api;
+
+import mobi.appcent.medusa.store.MedusaSdkClient;
+
+/**
+ * Created by erenalpaslan on 2.03.2023
+ */
+abstract class BaseApi {
+ protected MedusaSdkClient sdkClient;
+
+ protected void setSdkClient(MedusaSdkClient sdkClient) {
+ this.sdkClient = sdkClient;
+ }
+}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/CartApi.java b/src/main/java/mobi/appcent/medusa/store/api/CartApi.java
index 2182998..f63de4a 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/CartApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/CartApi.java
@@ -12,29 +12,23 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.StoreCartsRes;
-import mobi.appcent.medusa.store.model.StoreCompleteCartRes;
-import mobi.appcent.medusa.store.model.StorePostCartReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartLineItemsItemReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartLineItemsReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartPaymentSessionReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartPaymentSessionUpdateReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartReq;
-import mobi.appcent.medusa.store.model.StorePostCartsCartShippingMethodReq;
+import mobi.appcent.medusa.store.model.response.StoreCartsRes;
+import mobi.appcent.medusa.store.model.response.StoreCompleteCartRes;
+import mobi.appcent.medusa.store.model.response.StorePostCartReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartLineItemsItemReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartLineItemsReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartPaymentSessionReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartPaymentSessionUpdateReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartReq;
+import mobi.appcent.medusa.store.model.response.StorePostCartsCartShippingMethodReq;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -42,23 +36,19 @@
import java.util.List;
import java.util.Map;
-public class CartApi {
- private ApiClient apiClient;
+public class CartApi extends BaseApi {
+ private MedusaSdkClient medusaSdkClient;
- public CartApi() {
- this(Configuration.getDefaultApiClient());
+ public static CartApi getInstance() {
+ return new CartApi();
}
- public CartApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -75,8 +65,8 @@ public com.squareup.okhttp.Call deleteCartsCartDiscountsDiscountCall(String id,
// create path and map variables
String localVarPath = "/carts/{id}/discounts/{code}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "code" + "\\}", apiClient.escapeString(code.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "code" + "\\}", medusaSdkClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -88,17 +78,17 @@ public com.squareup.okhttp.Call deleteCartsCartDiscountsDiscountCall(String id,
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -110,7 +100,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -157,7 +147,7 @@ public StoreCartsRes deleteCartsCartDiscountsDiscount(String id, String code) th
public ApiResponse deleteCartsCartDiscountsDiscountWithHttpInfo(String id, String code) throws ApiException {
com.squareup.okhttp.Call call = deleteCartsCartDiscountsDiscountValidateBeforeCall(id, code, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -192,7 +182,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = deleteCartsCartDiscountsDiscountValidateBeforeCall(id, code, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -209,8 +199,8 @@ public com.squareup.okhttp.Call deleteCartsCartLineItemsItemCall(String id, Stri
// create path and map variables
String localVarPath = "/carts/{id}/line-items/{line_id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "line_id" + "\\}", apiClient.escapeString(lineId.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "line_id" + "\\}", medusaSdkClient.escapeString(lineId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -222,17 +212,17 @@ public com.squareup.okhttp.Call deleteCartsCartLineItemsItemCall(String id, Stri
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -244,7 +234,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -291,7 +281,7 @@ public StoreCartsRes deleteCartsCartLineItemsItem(String id, String lineId) thro
public ApiResponse deleteCartsCartLineItemsItemWithHttpInfo(String id, String lineId) throws ApiException {
com.squareup.okhttp.Call call = deleteCartsCartLineItemsItemValidateBeforeCall(id, lineId, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -326,7 +316,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = deleteCartsCartLineItemsItemValidateBeforeCall(id, lineId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -343,8 +333,8 @@ public com.squareup.okhttp.Call deleteCartsCartPaymentSessionsSessionCall(String
// create path and map variables
String localVarPath = "/carts/{id}/payment-sessions/{provider_id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "provider_id" + "\\}", medusaSdkClient.escapeString(providerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -356,17 +346,17 @@ public com.squareup.okhttp.Call deleteCartsCartPaymentSessionsSessionCall(String
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -378,7 +368,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -425,7 +415,7 @@ public StoreCartsRes deleteCartsCartPaymentSessionsSession(String id, String pro
public ApiResponse deleteCartsCartPaymentSessionsSessionWithHttpInfo(String id, String providerId) throws ApiException {
com.squareup.okhttp.Call call = deleteCartsCartPaymentSessionsSessionValidateBeforeCall(id, providerId, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -460,7 +450,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = deleteCartsCartPaymentSessionsSessionValidateBeforeCall(id, providerId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -476,7 +466,7 @@ public com.squareup.okhttp.Call getCartsCartCall(String id, final ProgressRespon
// create path and map variables
String localVarPath = "/carts/{id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -488,17 +478,17 @@ public com.squareup.okhttp.Call getCartsCartCall(String id, final ProgressRespon
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -510,7 +500,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -551,7 +541,7 @@ public StoreCartsRes getCartsCart(String id) throws ApiException {
public ApiResponse getCartsCartWithHttpInfo(String id) throws ApiException {
com.squareup.okhttp.Call call = getCartsCartValidateBeforeCall(id, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -585,7 +575,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCartsCartValidateBeforeCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -612,17 +602,17 @@ public com.squareup.okhttp.Call postCartCall(StorePostCartReq body, final Progre
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -634,7 +624,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -671,7 +661,7 @@ public StoreCartsRes postCart(StorePostCartReq body) throws ApiException {
public ApiResponse postCartWithHttpInfo(StorePostCartReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -705,7 +695,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -722,7 +712,7 @@ public com.squareup.okhttp.Call postCartsCartCall(String id, StorePostCartsCartR
// create path and map variables
String localVarPath = "/carts/{id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -734,17 +724,17 @@ public com.squareup.okhttp.Call postCartsCartCall(String id, StorePostCartsCartR
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -756,7 +746,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -799,7 +789,7 @@ public StoreCartsRes postCartsCart(String id, StorePostCartsCartReq body) throws
public ApiResponse postCartsCartWithHttpInfo(String id, StorePostCartsCartReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartValidateBeforeCall(id, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -834,7 +824,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartValidateBeforeCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -850,7 +840,7 @@ public com.squareup.okhttp.Call postCartsCartCompleteCall(String id, final Progr
// create path and map variables
String localVarPath = "/carts/{id}/complete"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -862,17 +852,17 @@ public com.squareup.okhttp.Call postCartsCartCompleteCall(String id, final Progr
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -884,7 +874,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -925,7 +915,7 @@ public StoreCompleteCartRes postCartsCartComplete(String id) throws ApiException
public ApiResponse postCartsCartCompleteWithHttpInfo(String id) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartCompleteValidateBeforeCall(id, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -959,7 +949,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartCompleteValidateBeforeCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -976,7 +966,7 @@ public com.squareup.okhttp.Call postCartsCartLineItemsCall(String id, StorePostC
// create path and map variables
String localVarPath = "/carts/{id}/line-items"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -988,17 +978,17 @@ public com.squareup.okhttp.Call postCartsCartLineItemsCall(String id, StorePostC
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1010,7 +1000,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1053,7 +1043,7 @@ public StoreCartsRes postCartsCartLineItems(String id, StorePostCartsCartLineIte
public ApiResponse postCartsCartLineItemsWithHttpInfo(String id, StorePostCartsCartLineItemsReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartLineItemsValidateBeforeCall(id, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1088,7 +1078,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartLineItemsValidateBeforeCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1106,8 +1096,8 @@ public com.squareup.okhttp.Call postCartsCartLineItemsItemCall(String id, String
// create path and map variables
String localVarPath = "/carts/{id}/line-items/{line_id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "line_id" + "\\}", apiClient.escapeString(lineId.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "line_id" + "\\}", medusaSdkClient.escapeString(lineId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1119,17 +1109,17 @@ public com.squareup.okhttp.Call postCartsCartLineItemsItemCall(String id, String
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1141,7 +1131,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1190,7 +1180,7 @@ public StoreCartsRes postCartsCartLineItemsItem(String id, String lineId, StoreP
public ApiResponse postCartsCartLineItemsItemWithHttpInfo(String id, String lineId, StorePostCartsCartLineItemsItemReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartLineItemsItemValidateBeforeCall(id, lineId, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1226,7 +1216,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartLineItemsItemValidateBeforeCall(id, lineId, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1243,7 +1233,7 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionCall(String id, Store
// create path and map variables
String localVarPath = "/carts/{id}/payment-session"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1255,17 +1245,17 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionCall(String id, Store
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1277,7 +1267,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1320,7 +1310,7 @@ public StoreCartsRes postCartsCartPaymentSession(String id, StorePostCartsCartPa
public ApiResponse postCartsCartPaymentSessionWithHttpInfo(String id, StorePostCartsCartPaymentSessionReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartPaymentSessionValidateBeforeCall(id, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1355,7 +1345,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartPaymentSessionValidateBeforeCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1373,8 +1363,8 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionUpdateCall(String id,
// create path and map variables
String localVarPath = "/carts/{id}/payment-sessions/{provider_id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "provider_id" + "\\}", medusaSdkClient.escapeString(providerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1386,17 +1376,17 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionUpdateCall(String id,
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1408,7 +1398,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1457,7 +1447,7 @@ public StoreCartsRes postCartsCartPaymentSessionUpdate(String id, String provide
public ApiResponse postCartsCartPaymentSessionUpdateWithHttpInfo(String id, String providerId, StorePostCartsCartPaymentSessionUpdateReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartPaymentSessionUpdateValidateBeforeCall(id, providerId, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1493,7 +1483,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartPaymentSessionUpdateValidateBeforeCall(id, providerId, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1509,7 +1499,7 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionsCall(String id, fina
// create path and map variables
String localVarPath = "/carts/{id}/payment-sessions"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1521,17 +1511,17 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionsCall(String id, fina
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1543,7 +1533,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1584,7 +1574,7 @@ public StoreCartsRes postCartsCartPaymentSessions(String id) throws ApiException
public ApiResponse postCartsCartPaymentSessionsWithHttpInfo(String id) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartPaymentSessionsValidateBeforeCall(id, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1618,7 +1608,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartPaymentSessionsValidateBeforeCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1635,8 +1625,8 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionsSessionCall(String i
// create path and map variables
String localVarPath = "/carts/{id}/payment-sessions/{provider_id}/refresh"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
- .replaceAll("\\{" + "provider_id" + "\\}", apiClient.escapeString(providerId.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()))
+ .replaceAll("\\{" + "provider_id" + "\\}", medusaSdkClient.escapeString(providerId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1648,17 +1638,17 @@ public com.squareup.okhttp.Call postCartsCartPaymentSessionsSessionCall(String i
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1670,7 +1660,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1717,7 +1707,7 @@ public StoreCartsRes postCartsCartPaymentSessionsSession(String id, String provi
public ApiResponse postCartsCartPaymentSessionsSessionWithHttpInfo(String id, String providerId) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartPaymentSessionsSessionValidateBeforeCall(id, providerId, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1752,7 +1742,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartPaymentSessionsSessionValidateBeforeCall(id, providerId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1769,7 +1759,7 @@ public com.squareup.okhttp.Call postCartsCartShippingMethodCall(String id, Store
// create path and map variables
String localVarPath = "/carts/{id}/shipping-methods"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1781,17 +1771,17 @@ public com.squareup.okhttp.Call postCartsCartShippingMethodCall(String id, Store
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1803,7 +1793,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1846,7 +1836,7 @@ public StoreCartsRes postCartsCartShippingMethod(String id, StorePostCartsCartSh
public ApiResponse postCartsCartShippingMethodWithHttpInfo(String id, StorePostCartsCartShippingMethodReq body) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartShippingMethodValidateBeforeCall(id, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1881,7 +1871,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartShippingMethodValidateBeforeCall(id, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1897,7 +1887,7 @@ public com.squareup.okhttp.Call postCartsCartTaxesCall(String id, final Progress
// create path and map variables
String localVarPath = "/carts/{id}/taxes"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1909,17 +1899,17 @@ public com.squareup.okhttp.Call postCartsCartTaxesCall(String id, final Progress
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1931,7 +1921,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1972,7 +1962,7 @@ public StoreCartsRes postCartsCartTaxes(String id) throws ApiException {
public ApiResponse postCartsCartTaxesWithHttpInfo(String id) throws ApiException {
com.squareup.okhttp.Call call = postCartsCartTaxesValidateBeforeCall(id, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -2006,7 +1996,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCartsCartTaxesValidateBeforeCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/CollectionApi.java b/src/main/java/mobi/appcent/medusa/store/api/CollectionApi.java
index 7c77137..98b11ff 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/CollectionApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/CollectionApi.java
@@ -12,24 +12,18 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.CreatedAt;
-import mobi.appcent.medusa.store.model.StoreCollectionsListRes;
-import mobi.appcent.medusa.store.model.StoreCollectionsRes;
-import mobi.appcent.medusa.store.model.UpdatedAt;
+import mobi.appcent.medusa.store.model.response.CreatedAt;
+import mobi.appcent.medusa.store.model.response.StoreCollectionsListRes;
+import mobi.appcent.medusa.store.model.response.StoreCollectionsRes;
+import mobi.appcent.medusa.store.model.response.UpdatedAt;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -38,22 +32,18 @@
import java.util.Map;
public class CollectionApi {
- private ApiClient apiClient;
+ private MedusaSdkClient medusaSdkClient;
- public CollectionApi() {
- this(Configuration.getDefaultApiClient());
+ public static CollectionApi getInstance() {
+ return new CollectionApi();
}
- public CollectionApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -76,13 +66,13 @@ public com.squareup.okhttp.Call getCollectionsCall(Integer offset, Integer limit
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (offset != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("offset", offset));
if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("limit", limit));
if (createdAt != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("created_at", createdAt));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("created_at", createdAt));
if (updatedAt != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("updated_at", updatedAt));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("updated_at", updatedAt));
Map localVarHeaderParams = new HashMap();
@@ -91,17 +81,17 @@ public com.squareup.okhttp.Call getCollectionsCall(Integer offset, Integer limit
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -113,7 +103,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -156,7 +146,7 @@ public StoreCollectionsListRes getCollections(Integer offset, Integer limit, Cre
public ApiResponse getCollectionsWithHttpInfo(Integer offset, Integer limit, CreatedAt createdAt, UpdatedAt updatedAt) throws ApiException {
com.squareup.okhttp.Call call = getCollectionsValidateBeforeCall(offset, limit, createdAt, updatedAt, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -193,7 +183,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCollectionsValidateBeforeCall(offset, limit, createdAt, updatedAt, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -209,7 +199,7 @@ public com.squareup.okhttp.Call getCollectionsCollectionCall(String id, final Pr
// create path and map variables
String localVarPath = "/collections/{id}"
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "id" + "\\}", medusaSdkClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -221,17 +211,17 @@ public com.squareup.okhttp.Call getCollectionsCollectionCall(String id, final Pr
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -243,7 +233,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -284,7 +274,7 @@ public StoreCollectionsRes getCollectionsCollection(String id) throws ApiExcepti
public ApiResponse getCollectionsCollectionWithHttpInfo(String id) throws ApiException {
com.squareup.okhttp.Call call = getCollectionsCollectionValidateBeforeCall(id, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -318,7 +308,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCollectionsCollectionValidateBeforeCall(id, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/CustomerApi.java b/src/main/java/mobi/appcent/medusa/store/api/CustomerApi.java
index ebf1f20..7c5004c 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/CustomerApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/CustomerApi.java
@@ -12,32 +12,26 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.CanceledAt;
-import mobi.appcent.medusa.store.model.CreatedAt1;
-import mobi.appcent.medusa.store.model.StoreCustomersListOrdersRes;
-import mobi.appcent.medusa.store.model.StoreCustomersListPaymentMethodsRes;
-import mobi.appcent.medusa.store.model.StoreCustomersRes;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerAddressesAddressReq;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerAddressesReq;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerPasswordTokenReq;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerReq;
-import mobi.appcent.medusa.store.model.StorePostCustomersReq;
-import mobi.appcent.medusa.store.model.StorePostCustomersResetPasswordReq;
-import mobi.appcent.medusa.store.model.UpdatedAt1;
+import mobi.appcent.medusa.store.model.response.CanceledAt;
+import mobi.appcent.medusa.store.model.response.CreatedAt1;
+import mobi.appcent.medusa.store.model.response.StoreCustomersListOrdersRes;
+import mobi.appcent.medusa.store.model.response.StoreCustomersListPaymentMethodsRes;
+import mobi.appcent.medusa.store.model.response.StoreCustomersRes;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerAddressesAddressReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerAddressesReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerPasswordTokenReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersResetPasswordReq;
+import mobi.appcent.medusa.store.model.response.UpdatedAt1;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -46,22 +40,18 @@
import java.util.Map;
public class CustomerApi {
- private ApiClient apiClient;
+ private MedusaSdkClient medusaSdkClient;
- public CustomerApi() {
- this(Configuration.getDefaultApiClient());
+ public static CustomerApi getInstance() {
+ return new CustomerApi();
}
- public CustomerApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -77,7 +67,7 @@ public com.squareup.okhttp.Call deleteCustomersCustomerAddressesAddressCall(Stri
// create path and map variables
String localVarPath = "/customers/me/addresses/{address_id}"
- .replaceAll("\\{" + "address_id" + "\\}", apiClient.escapeString(addressId.toString()));
+ .replaceAll("\\{" + "address_id" + "\\}", medusaSdkClient.escapeString(addressId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -89,17 +79,17 @@ public com.squareup.okhttp.Call deleteCustomersCustomerAddressesAddressCall(Stri
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -111,7 +101,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -152,7 +142,7 @@ public StoreCustomersRes deleteCustomersCustomerAddressesAddress(String addressI
public ApiResponse deleteCustomersCustomerAddressesAddressWithHttpInfo(String addressId) throws ApiException {
com.squareup.okhttp.Call call = deleteCustomersCustomerAddressesAddressValidateBeforeCall(addressId, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -186,7 +176,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = deleteCustomersCustomerAddressesAddressValidateBeforeCall(addressId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -212,17 +202,17 @@ public com.squareup.okhttp.Call getCustomersCustomerCall(final ProgressResponseB
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -234,7 +224,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -269,7 +259,7 @@ public StoreCustomersRes getCustomersCustomer() throws ApiException {
public ApiResponse getCustomersCustomerWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = getCustomersCustomerValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -302,7 +292,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCustomersCustomerValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -339,41 +329,41 @@ public com.squareup.okhttp.Call getCustomersCustomerOrdersCall(String q, String
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (q != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("q", q));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("q", q));
if (id != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("id", id));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("id", id));
if (status != null)
- localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
+ localVarCollectionQueryParams.addAll(medusaSdkClient.parameterToPairs("csv", "status", status));
if (fulfillmentStatus != null)
- localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "fulfillment_status", fulfillmentStatus));
+ localVarCollectionQueryParams.addAll(medusaSdkClient.parameterToPairs("csv", "fulfillment_status", fulfillmentStatus));
if (paymentStatus != null)
- localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "payment_status", paymentStatus));
+ localVarCollectionQueryParams.addAll(medusaSdkClient.parameterToPairs("csv", "payment_status", paymentStatus));
if (displayId != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("display_id", displayId));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("display_id", displayId));
if (cartId != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("cart_id", cartId));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("cart_id", cartId));
if (email != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("email", email));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("email", email));
if (regionId != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("region_id", regionId));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("region_id", regionId));
if (currencyCode != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("currency_code", currencyCode));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("currency_code", currencyCode));
if (taxRate != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("tax_rate", taxRate));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("tax_rate", taxRate));
if (createdAt != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("created_at", createdAt));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("created_at", createdAt));
if (updatedAt != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("updated_at", updatedAt));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("updated_at", updatedAt));
if (canceledAt != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("canceled_at", canceledAt));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("canceled_at", canceledAt));
if (limit != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("limit", limit));
if (offset != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("offset", offset));
if (fields != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("fields", fields));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("fields", fields));
if (expand != null)
- localVarQueryParams.addAll(apiClient.parameterToPair("expand", expand));
+ localVarQueryParams.addAll(medusaSdkClient.parameterToPair("expand", expand));
Map localVarHeaderParams = new HashMap();
@@ -382,17 +372,17 @@ public com.squareup.okhttp.Call getCustomersCustomerOrdersCall(String q, String
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -404,7 +394,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -475,7 +465,7 @@ public StoreCustomersListOrdersRes getCustomersCustomerOrders(String q, String i
public ApiResponse getCustomersCustomerOrdersWithHttpInfo(String q, String id, List status, List fulfillmentStatus, List paymentStatus, String displayId, String cartId, String email, String regionId, String currencyCode, String taxRate, CreatedAt1 createdAt, UpdatedAt1 updatedAt, CanceledAt canceledAt, Integer limit, Integer offset, String fields, String expand) throws ApiException {
com.squareup.okhttp.Call call = getCustomersCustomerOrdersValidateBeforeCall(q, id, status, fulfillmentStatus, paymentStatus, displayId, cartId, email, regionId, currencyCode, taxRate, createdAt, updatedAt, canceledAt, limit, offset, fields, expand, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -526,7 +516,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCustomersCustomerOrdersValidateBeforeCall(q, id, status, fulfillmentStatus, paymentStatus, displayId, cartId, email, regionId, currencyCode, taxRate, createdAt, updatedAt, canceledAt, limit, offset, fields, expand, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -552,17 +542,17 @@ public com.squareup.okhttp.Call getCustomersCustomerPaymentMethodsCall(final Pro
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -574,7 +564,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -609,7 +599,7 @@ public StoreCustomersListPaymentMethodsRes getCustomersCustomerPaymentMethods()
public ApiResponse getCustomersCustomerPaymentMethodsWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = getCustomersCustomerPaymentMethodsValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -642,7 +632,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getCustomersCustomerPaymentMethodsValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -669,17 +659,17 @@ public com.squareup.okhttp.Call postCustomersCall(StorePostCustomersReq body, fi
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -691,7 +681,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -728,7 +718,7 @@ public StoreCustomersRes postCustomers(StorePostCustomersReq body) throws ApiExc
public ApiResponse postCustomersWithHttpInfo(StorePostCustomersReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -762,7 +752,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCustomersValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -789,17 +779,17 @@ public com.squareup.okhttp.Call postCustomersCustomerCall(StorePostCustomersCust
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -811,7 +801,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -848,7 +838,7 @@ public StoreCustomersRes postCustomersCustomer(StorePostCustomersCustomerReq bod
public ApiResponse postCustomersCustomerWithHttpInfo(StorePostCustomersCustomerReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersCustomerValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -882,7 +872,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCustomersCustomerValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -909,17 +899,17 @@ public com.squareup.okhttp.Call postCustomersCustomerAddressesCall(StorePostCust
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -931,7 +921,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -968,7 +958,7 @@ public StoreCustomersRes postCustomersCustomerAddresses(StorePostCustomersCustom
public ApiResponse postCustomersCustomerAddressesWithHttpInfo(StorePostCustomersCustomerAddressesReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersCustomerAddressesValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1002,7 +992,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCustomersCustomerAddressesValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1019,7 +1009,7 @@ public com.squareup.okhttp.Call postCustomersCustomerAddressesAddressCall(String
// create path and map variables
String localVarPath = "/customers/me/addresses/{address_id}"
- .replaceAll("\\{" + "address_id" + "\\}", apiClient.escapeString(addressId.toString()));
+ .replaceAll("\\{" + "address_id" + "\\}", medusaSdkClient.escapeString(addressId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -1031,17 +1021,17 @@ public com.squareup.okhttp.Call postCustomersCustomerAddressesAddressCall(String
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1053,7 +1043,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1096,7 +1086,7 @@ public StoreCustomersRes postCustomersCustomerAddressesAddress(String addressId,
public ApiResponse postCustomersCustomerAddressesAddressWithHttpInfo(String addressId, StorePostCustomersCustomerAddressesAddressReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersCustomerAddressesAddressValidateBeforeCall(addressId, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1131,7 +1121,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCustomersCustomerAddressesAddressValidateBeforeCall(addressId, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
@@ -1158,17 +1148,17 @@ public com.squareup.okhttp.Call postCustomersCustomerPasswordTokenCall(StorePost
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1180,7 +1170,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1214,7 +1204,7 @@ public void postCustomersCustomerPasswordToken(StorePostCustomersCustomerPasswor
*/
public ApiResponse postCustomersCustomerPasswordTokenWithHttpInfo(StorePostCustomersCustomerPasswordTokenReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersCustomerPasswordTokenValidateBeforeCall(body, null, null);
- return apiClient.execute(call);
+ return medusaSdkClient.execute(call);
}
/**
@@ -1247,7 +1237,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
}
com.squareup.okhttp.Call call = postCustomersCustomerPasswordTokenValidateBeforeCall(body, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
+ medusaSdkClient.executeAsync(call, callback);
return call;
}
/**
@@ -1274,17 +1264,17 @@ public com.squareup.okhttp.Call postCustomersResetPasswordCall(StorePostCustomer
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -1296,7 +1286,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -1333,7 +1323,7 @@ public StoreCustomersRes postCustomersResetPassword(StorePostCustomersResetPassw
public ApiResponse postCustomersResetPasswordWithHttpInfo(StorePostCustomersResetPasswordReq body) throws ApiException {
com.squareup.okhttp.Call call = postCustomersResetPasswordValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -1367,7 +1357,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = postCustomersResetPasswordValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/GiftCardApi.java b/src/main/java/mobi/appcent/medusa/store/api/GiftCardApi.java
index 3f4c37d..e402fa8 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/GiftCardApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/GiftCardApi.java
@@ -12,21 +12,15 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.StoreGiftCardsRes;
+import mobi.appcent.medusa.store.model.response.StoreGiftCardsRes;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -35,22 +29,18 @@
import java.util.Map;
public class GiftCardApi {
- private ApiClient apiClient;
+ private MedusaSdkClient medusaSdkClient;
- public GiftCardApi() {
- this(Configuration.getDefaultApiClient());
+ public static GiftCardApi getInstance() {
+ return new GiftCardApi();
}
- public GiftCardApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -66,7 +56,7 @@ public com.squareup.okhttp.Call getGiftCardsCodeCall(String code, final Progress
// create path and map variables
String localVarPath = "/gift-cards/{code}"
- .replaceAll("\\{" + "code" + "\\}", apiClient.escapeString(code.toString()));
+ .replaceAll("\\{" + "code" + "\\}", medusaSdkClient.escapeString(code.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -78,17 +68,17 @@ public com.squareup.okhttp.Call getGiftCardsCodeCall(String code, final Progress
final String[] localVarAccepts = {
"application/json"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -100,7 +90,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { };
- return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -141,7 +131,7 @@ public StoreGiftCardsRes getGiftCardsCode(String code) throws ApiException {
public ApiResponse getGiftCardsCodeWithHttpInfo(String code) throws ApiException {
com.squareup.okhttp.Call call = getGiftCardsCodeValidateBeforeCall(code, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
- return apiClient.execute(call, localVarReturnType);
+ return medusaSdkClient.execute(call, localVarReturnType);
}
/**
@@ -175,7 +165,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
com.squareup.okhttp.Call call = getGiftCardsCodeValidateBeforeCall(code, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
- apiClient.executeAsync(call, localVarReturnType, callback);
+ medusaSdkClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/InviteApi.java b/src/main/java/mobi/appcent/medusa/store/api/InviteApi.java
index fe0568d..c04e33c 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/InviteApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/InviteApi.java
@@ -12,19 +12,13 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
+import mobi.appcent.medusa.store.MedusaSdkClient;
import java.io.IOException;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerOrderClaimReq;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerOrderClaimReq;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,22 +26,18 @@
import java.util.Map;
public class InviteApi {
- private ApiClient apiClient;
+ private MedusaSdkClient medusaSdkClient;
- public InviteApi() {
- this(Configuration.getDefaultApiClient());
+ public static InviteApi getInstance() {
+ return new InviteApi();
}
- public InviteApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -74,17 +64,17 @@ public com.squareup.okhttp.Call postOrdersCustomerOrderClaimCall(StorePostCustom
final String[] localVarAccepts = {
"application/json", "text/plain"
};
- final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String localVarAccept = medusaSdkClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json"
};
- final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ final String localVarContentType = medusaSdkClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
- apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ medusaSdkClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
@@ -96,7 +86,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}
String[] localVarAuthNames = new String[] { "cookie_auth" };
- return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ return medusaSdkClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
@@ -130,7 +120,7 @@ public void postOrdersCustomerOrderClaim(StorePostCustomersCustomerOrderClaimReq
*/
public ApiResponse postOrdersCustomerOrderClaimWithHttpInfo(StorePostCustomersCustomerOrderClaimReq body) throws ApiException {
com.squareup.okhttp.Call call = postOrdersCustomerOrderClaimValidateBeforeCall(body, null, null);
- return apiClient.execute(call);
+ return medusaSdkClient.execute(call);
}
/**
@@ -163,7 +153,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
}
com.squareup.okhttp.Call call = postOrdersCustomerOrderClaimValidateBeforeCall(body, progressListener, progressRequestListener);
- apiClient.executeAsync(call, callback);
+ medusaSdkClient.executeAsync(call, callback);
return call;
}
}
diff --git a/src/main/java/mobi/appcent/medusa/store/api/OrderApi.java b/src/main/java/mobi/appcent/medusa/store/api/OrderApi.java
index 63ad80e..ef8889c 100644
--- a/src/main/java/mobi/appcent/medusa/store/api/OrderApi.java
+++ b/src/main/java/mobi/appcent/medusa/store/api/OrderApi.java
@@ -12,14 +12,7 @@
package mobi.appcent.medusa.store.api;
-import mobi.appcent.medusa.store.ApiCallback;
-import mobi.appcent.medusa.store.ApiClient;
-import mobi.appcent.medusa.store.ApiException;
-import mobi.appcent.medusa.store.ApiResponse;
-import mobi.appcent.medusa.store.Configuration;
-import mobi.appcent.medusa.store.Pair;
-import mobi.appcent.medusa.store.ProgressRequestBody;
-import mobi.appcent.medusa.store.ProgressResponseBody;
+import mobi.appcent.medusa.store.*;
import com.google.gson.reflect.TypeToken;
@@ -28,9 +21,9 @@
import java.math.BigDecimal;
-import mobi.appcent.medusa.store.model.ShippingAddress;
-import mobi.appcent.medusa.store.model.StoreOrdersRes;
-import mobi.appcent.medusa.store.model.StorePostCustomersCustomerAcceptClaimReq;
+import mobi.appcent.medusa.store.model.response.ShippingAddress;
+import mobi.appcent.medusa.store.model.response.StoreOrdersRes;
+import mobi.appcent.medusa.store.model.response.StorePostCustomersCustomerAcceptClaimReq;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -39,22 +32,18 @@
import java.util.Map;
public class OrderApi {
- private ApiClient apiClient;
+ private MedusaSdkClient medusaSdkClient;
- public OrderApi() {
- this(Configuration.getDefaultApiClient());
+ public static OrderApi getInstance() {
+ return new OrderApi();
}
- public OrderApi(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public MedusaSdkClient getApiClient() {
+ return medusaSdkClient;
}
- public ApiClient getApiClient() {
- return apiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.apiClient = apiClient;
+ public void setApiClient(MedusaSdkClient medusaSdkClient) {
+ this.medusaSdkClient = medusaSdkClient;
}
/**
@@ -78,15 +67,15 @@ public com.squareup.okhttp.Call getOrdersCall(BigDecimal displayId, String email
List