Skip to content

Commit

Permalink
refac: rename AdjustPurchase to AdjustPlayStorePurchase
Browse files Browse the repository at this point in the history
  • Loading branch information
uerceg committed May 30, 2024
1 parent c93925e commit 1d0730b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ public void run() {
}

@Override
public void verifyPlayStorePurchase(final AdjustPurchase purchase, final OnPurchaseVerificationFinishedListener callback) {
public void verifyPlayStorePurchase(final AdjustPlayStorePurchase purchase, final OnPurchaseVerificationFinishedListener callback) {
executor.submit(new Runnable() {
@Override
public void run() {
Expand Down Expand Up @@ -2504,7 +2504,7 @@ private void trackPlayStoreSubscriptionI(final AdjustPlayStoreSubscription subsc
packageHandler.sendFirstPackage();
}

private void verifyPlayStorePurchaseI(final AdjustPurchase purchase,
private void verifyPlayStorePurchaseI(final AdjustPlayStorePurchase purchase,
final OnPurchaseVerificationFinishedListener callback) {
if (callback == null) {
logger.warn("Purchase verification aborted because verification callback is null");
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public static void getSdkVersion(final OnSdkVersionReadListener onSdkVersionRead
* @param purchase AdjustPurchase object to be tracked
* @param callback Callback to obtain verification results
*/
public static void verifyPlayStorePurchase(final AdjustPurchase purchase,
public static void verifyPlayStorePurchase(final AdjustPlayStorePurchase purchase,
final OnPurchaseVerificationFinishedListener callback) {
if (callback == null) {
AdjustFactory.getLogger().error("Purchase verification aborted because verification callback is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ private boolean isInstanceEnabled() {
* @param purchase AdjustPurchase object to be verified
* @param callback Callback to be pinged with the verification results
*/
public void verifyPlayStorePurchase(final AdjustPurchase purchase,
public void verifyPlayStorePurchase(final AdjustPlayStorePurchase purchase,
final OnPurchaseVerificationFinishedListener callback) {
if (!checkActivityHandler("verifyPurchase")) {
AdjustPurchaseVerificationResult result = new AdjustPurchaseVerificationResult(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.adjust.sdk;

public class AdjustPurchase {
public class AdjustPlayStorePurchase {
private final String productId;
private final String purchaseToken;

public AdjustPurchase(final String productId, final String purchaseToken) {
public AdjustPlayStorePurchase(final String productId, final String purchaseToken) {
this.productId = productId;
this.purchaseToken = purchaseToken;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public interface IActivityHandler {

void trackPlayStoreSubscription(AdjustPlayStoreSubscription subscription);

void verifyPlayStorePurchase(AdjustPurchase purchase, OnPurchaseVerificationFinishedListener callback);
void verifyPlayStorePurchase(AdjustPlayStorePurchase purchase, OnPurchaseVerificationFinishedListener callback);

void verifyAndTrackPlayStorePurchase(AdjustEvent event, OnPurchaseVerificationFinishedListener callback);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ ActivityPackage buildSubscriptionPackage(AdjustPlayStoreSubscription subscriptio
return subscriptionPackage;
}

ActivityPackage buildVerificationPackage(AdjustPurchase purchase, OnPurchaseVerificationFinishedListener callback) {
ActivityPackage buildVerificationPackage(AdjustPlayStorePurchase purchase, OnPurchaseVerificationFinishedListener callback) {
Map<String, String> parameters = getVerificationParameters(purchase);
ActivityPackage purchaseVerificationPackage = getDefaultActivityPackage(ActivityKind.PURCHASE_VERIFICATION);
purchaseVerificationPackage.setPath("/verify");
Expand Down Expand Up @@ -1061,7 +1061,7 @@ private Map<String, String> getSubscriptionParameters(AdjustPlayStoreSubscriptio
return parameters;
}

private Map<String, String> getVerificationParameters(AdjustPurchase purchase) {
private Map<String, String> getVerificationParameters(AdjustPlayStorePurchase purchase) {
Map<String, String> parameters = new HashMap<String, String>();

deviceInfo.reloadOtherDeviceInfoParams(adjustConfig, coppaEnabled, logger);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import com.adjust.sdk.AdjustEventFailure;
import com.adjust.sdk.AdjustEventSuccess;
import com.adjust.sdk.AdjustPlayStoreSubscription;
import com.adjust.sdk.AdjustPurchase;
import com.adjust.sdk.AdjustPlayStorePurchase;
import com.adjust.sdk.AdjustPurchaseVerificationResult;
import com.adjust.sdk.AdjustSessionFailure;
import com.adjust.sdk.AdjustSessionSuccess;
Expand Down Expand Up @@ -793,7 +793,7 @@ private void verifyPurchase() {
String purchaseToken = command.getFirstParameterValue("purchaseToken");

final String localBasePath = basePath;
AdjustPurchase purchase = new AdjustPurchase(sku, purchaseToken);
AdjustPlayStorePurchase purchase = new AdjustPlayStorePurchase(sku, purchaseToken);
Adjust.verifyPlayStorePurchase(purchase, new OnPurchaseVerificationFinishedListener() {
@Override
public void onVerificationFinished(AdjustPurchaseVerificationResult result) {
Expand Down

0 comments on commit 1d0730b

Please sign in to comment.