// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java
// public class Constants {
// 
//     public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L;
// 
//     public static final int NOT_SET = -1;
// 
//     public static final long DEFAULT_RESURVEY_DAYS = 90L;
// 
//     public static final long DEFAULT_DECLINE_RESURVEY_DAYS = 30L;
// 
//     public static final String TAG = "WOOTRIC_SDK";
// 
//     public static final String CES = "CES";
// 
//     public static final String CSAT = "CSAT";
// }
// 
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/responses/RegisteredEventsResponse.java
// public class RegisteredEventsResponse {
//     private final ArrayList<String> registeredEvents;
// 
//     public RegisteredEventsResponse(ArrayList<String> registeredEvents) {
//         this.registeredEvents = registeredEvents;
//     }
// 
//     public ArrayList<String> getRegisteredEvents() {
//         return registeredEvents;
//     }
// }
// 
// Path: androidsdk/src/main/java/com/wootric/androidsdk/objects/User.java
// public class User implements Parcelable {
//     private String clientId;
//     private String accountToken;
// 
//     public User(User user) {
//         this.clientId = user.clientId;
//         this.accountToken = user.accountToken;
//     }
// 
//     public User(String clientId, String clientSecret, String accountToken) {
//         this.clientId = clientId;
//         this.accountToken = accountToken;
//     }
// 
//     public User(String clientId, String accountToken) {
//         this.clientId = clientId;
//         this.accountToken = accountToken;
//     }
// 
//     public User(String accountToken) {
//         this.accountToken = accountToken;
//     }
// 
//     public String getClientId() {
//         return clientId;
//     }
// 
//     public String getAccountToken() {
//         return accountToken;
//     }
// 
//     public void setClientId(String clientId) {
//         this.clientId = clientId;
//     }
// 
//     public void setAccountToken(String accountToken) {
//         this.accountToken = accountToken;
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.clientId);
//         dest.writeString(this.accountToken);
//     }
// 
//     private User(Parcel in) {
//         this.clientId = in.readString();
//         this.accountToken = in.readString();
//     }
// 
//     public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
//         public User createFromParcel(Parcel source) {
//             return new User(source);
//         }
//         public User[] newArray(int size) {
//             return new User[size];
//         }
//     };
// }


import java.util.ArrayList;
import android.util.Log;
import com.wootric.androidsdk.Constants;
import com.wootric.androidsdk.network.responses.RegisteredEventsResponse;
import com.wootric.androidsdk.objects.User;
import org.json.JSONArray;
import org.json.JSONException;
/*
 * Copyright (c) 2016 Wootric (https://wootric.com)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.wootric.androidsdk.network.tasks;





public class GetRegisteredEventsTask extends WootricRemoteRequestTask {
    private final User user;
    private final GetRegisteredEventsTask.Callback surveyCallback;

    public GetRegisteredEventsTask(User user, GetRegisteredEventsTask.Callback surveyCallback) {
        super(REQUEST_TYPE_GET, null, user.getAccountToken(), null);

        this.user = user;
        this.surveyCallback = surveyCallback;
    }

    @Override
    protected void buildParams() {
        paramsMap.put("account_token", user.getAccountToken());

// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java
// public class Constants {
// 
//     public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L;
// 
//     public static final int NOT_SET = -1;
// 
//     public static final long DEFAULT_RESURVEY_DAYS = 90L;
// 
//     public static final long DEFAULT_DECLINE_RESURVEY_DAYS = 30L;
// 
//     public static final String TAG = "WOOTRIC_SDK";
// 
//     public static final String CES = "CES";
// 
//     public static final String CSAT = "CSAT";
// }
// 
// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/responses/RegisteredEventsResponse.java
// public class RegisteredEventsResponse {
//     private final ArrayList<String> registeredEvents;
// 
//     public RegisteredEventsResponse(ArrayList<String> registeredEvents) {
//         this.registeredEvents = registeredEvents;
//     }
// 
//     public ArrayList<String> getRegisteredEvents() {
//         return registeredEvents;
//     }
// }
// 
// Path: androidsdk/src/main/java/com/wootric/androidsdk/objects/User.java
// public class User implements Parcelable {
//     private String clientId;
//     private String accountToken;
// 
//     public User(User user) {
//         this.clientId = user.clientId;
//         this.accountToken = user.accountToken;
//     }
// 
//     public User(String clientId, String clientSecret, String accountToken) {
//         this.clientId = clientId;
//         this.accountToken = accountToken;
//     }
// 
//     public User(String clientId, String accountToken) {
//         this.clientId = clientId;
//         this.accountToken = accountToken;
//     }
// 
//     public User(String accountToken) {
//         this.accountToken = accountToken;
//     }
// 
//     public String getClientId() {
//         return clientId;
//     }
// 
//     public String getAccountToken() {
//         return accountToken;
//     }
// 
//     public void setClientId(String clientId) {
//         this.clientId = clientId;
//     }
// 
//     public void setAccountToken(String accountToken) {
//         this.accountToken = accountToken;
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(this.clientId);
//         dest.writeString(this.accountToken);
//     }
// 
//     private User(Parcel in) {
//         this.clientId = in.readString();
//         this.accountToken = in.readString();
//     }
// 
//     public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() {
//         public User createFromParcel(Parcel source) {
//             return new User(source);
//         }
//         public User[] newArray(int size) {
//             return new User[size];
//         }
//     };
// }


// Path: androidsdk/src/main/java/com/wootric/androidsdk/network/tasks/GetRegisteredEventsTask.java
import java.util.ArrayList;
import android.util.Log;
import com.wootric.androidsdk.Constants;
import com.wootric.androidsdk.network.responses.RegisteredEventsResponse;
import com.wootric.androidsdk.objects.User;
import org.json.JSONArray;
import org.json.JSONException;

/*
 * Copyright (c) 2016 Wootric (https://wootric.com)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.wootric.androidsdk.network.tasks;





public class GetRegisteredEventsTask extends WootricRemoteRequestTask {
    private final User user;
    private final GetRegisteredEventsTask.Callback surveyCallback;

    public GetRegisteredEventsTask(User user, GetRegisteredEventsTask.Callback surveyCallback) {
        super(REQUEST_TYPE_GET, null, user.getAccountToken(), null);

        this.user = user;
        this.surveyCallback = surveyCallback;
    }

    @Override
    protected void buildParams() {
        paramsMap.put("account_token", user.getAccountToken());

        Log.d(Constants.TAG, "parameters: " + paramsMap);