com.backendless.Commerce Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-common Show documentation
Show all versions of java-sdk-common Show documentation
Provides access to Backendless API
The newest version!
/*
* ********************************************************************************************************************
*
* BACKENDLESS.COM CONFIDENTIAL
*
* ********************************************************************************************************************
*
* Copyright 2012 BACKENDLESS.COM. All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains the property of Backendless.com and its suppliers,
* if any. The intellectual and technical concepts contained herein are proprietary to Backendless.com and its
* suppliers and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret
* or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden
* unless prior written permission is obtained from Backendless.com.
*
* ********************************************************************************************************************
*/
package com.backendless;
import com.backendless.async.callback.AsyncCallback;
import com.backendless.commerce.GooglePlayPurchaseStatus;
import com.backendless.commerce.GooglePlaySubscriptionStatus;
import weborb.types.Types;
/**
* Created by scadge on 6/24/14.
*/
public final class Commerce
{
private static final String COMMERCE_MANAGER_SERVER_ALIAS = "com.backendless.services.commerce.CommerceService";
private static final Commerce instance = new Commerce();
static Commerce getInstance()
{
return instance;
}
private Commerce()
{
Types.addClientClassMapping( "com.backendless.management.commerce.GooglePlayPurchaseStatus", GooglePlayPurchaseStatus.class );
Types.addClientClassMapping( "com.backendless.management.commerce.GooglePlaySubscriptionStatus", GooglePlaySubscriptionStatus.class );
}
public GooglePlayPurchaseStatus validatePlayPurchase( String packageName, String productId, String token )
{
return Invoker.invokeSync( COMMERCE_MANAGER_SERVER_ALIAS, "validatePlayPurchase", new Object[] { packageName, productId, token } );
}
public void validatePlayPurchase( String packageName, String productId, String token,
AsyncCallback callback )
{
Invoker.invokeAsync( COMMERCE_MANAGER_SERVER_ALIAS, "validatePlayPurchase", new Object[] { packageName, productId, token }, callback );
}
public GooglePlaySubscriptionStatus getPlaySubscriptionsStatus( String packageName, String subscriptionId, String token )
{
return Invoker.invokeSync( COMMERCE_MANAGER_SERVER_ALIAS, "getPlaySubscriptionsStatus", new Object[] { packageName, subscriptionId, token } );
}
public void getPlaySubscriptionsStatus( String packageName, String subscriptionId, String token,
AsyncCallback callback )
{
Invoker.invokeAsync( COMMERCE_MANAGER_SERVER_ALIAS, "getPlaySubscriptionsStatus", new Object[] { packageName, subscriptionId, token }, callback );
}
public void cancelPlaySubscription( String packageName, String subscriptionId, String token )
{
Invoker.invokeSync( COMMERCE_MANAGER_SERVER_ALIAS, "cancelPlaySubscription", new Object[] { packageName, subscriptionId, token } );
}
public void cancelPlaySubscription( String packageName, String subscriptionId, String token,
AsyncCallback callback )
{
Invoker.invokeAsync( COMMERCE_MANAGER_SERVER_ALIAS, "cancelPlaySubscription", new Object[] { packageName, subscriptionId, token }, callback );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy