Skip to content

Commit

Permalink
Merge pull request #64 from pokepay/feature/account-campaign-points
Browse files Browse the repository at this point in the history
GetAccountCampaignPointAmounts endpoint
  • Loading branch information
DanRidh authored Oct 4, 2023
2 parents 6720d81 + e91aaf3 commit cc6f767
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pokepaylib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdkVersion 26
targetSdkVersion 32
versionCode 0
versionName "2.0.7"
versionName "2.0.8"

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

Expand Down Expand Up @@ -65,7 +65,7 @@ uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${repo.absolutePath}"
pom.version = '2.0.7' // version
pom.version = '2.0.8' // version
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package jp.pokepay.pokepaylib.BankAPI.Account;

import androidx.annotation.NonNull;

import jp.pokepay.pokepaylib.BankAPI.BankRequest;
import jp.pokepay.pokepaylib.BankAPI.BankRequestError;
import jp.pokepay.pokepaylib.ProcessingError;
import jp.pokepay.pokepaylib.Request;
import jp.pokepay.pokepaylib.Responses.AccountCampaignPointAmounts;

public class GetAccountCampaignPointAmounts extends BankRequest {
@NonNull
public String accountId;
@NonNull
public String campaignId;

public GetAccountCampaignPointAmounts(@NonNull String accountId, @NonNull String campaignId) {
this.accountId = accountId;
this.campaignId = campaignId;
}

protected final String path() {
return "/accounts/" + accountId + "/campaigns/" + campaignId +"/point-amounts";
}

protected final Request.Method method() {
return Request.Method.GET;
}

public final AccountCampaignPointAmounts send(String accessToken) throws ProcessingError, BankRequestError {
return super.send(AccountCampaignPointAmounts.class, accessToken);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package jp.pokepay.pokepaylib.Responses;

import jp.pokepay.pokepaylib.Response;

public class AccountCampaignPointAmounts extends Response {
public double max_total_point_amount;
public double total_point_amount;
public double remain_point_amount;
}

0 comments on commit cc6f767

Please sign in to comment.