/*
* Copyright 2014-2015 GameUp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.gameup.android.entity;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Data;
/**
* Represents a response from a purchase verification operation.
*/
@Data
@AllArgsConstructor(suppressConstructorProperties = true)
public class PurchaseVerification {
/** Whether or not the purchase was successfully verified. */
private final boolean success;
/** Whether or not there was an existing record of this transaction. */
private final boolean seenBefore;
/**
* If this is false, the Google Play purchase service was down or
* unreachable. In this case the client should retry the verification
* request later.
*/
private final boolean purchaseProviderReachable;
/**
* A message indicating why the transaction verification was unsuccessful
* or rejected, if applicable.
*/
private final String message;
/**
* The raw Key/Value set returned from Google when the purchase
* verification was performed.
*/
private final Map<String, String> data;
}