diff --git a/pokepaylib/build.gradle b/pokepaylib/build.gradle index 5a3f2bc..733636f 100644 --- a/pokepaylib/build.gradle +++ b/pokepaylib/build.gradle @@ -16,7 +16,7 @@ android { minSdkVersion 26 targetSdkVersion 32 versionCode 0 - versionName "2.0.7" + versionName "2.0.8" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -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/") { diff --git a/pokepaylib/src/main/java/jp/pokepay/pokepaylib/BankAPI/Account/GetAccountCampaignPointAmounts.java b/pokepaylib/src/main/java/jp/pokepay/pokepaylib/BankAPI/Account/GetAccountCampaignPointAmounts.java new file mode 100644 index 0000000..ddc3d5c --- /dev/null +++ b/pokepaylib/src/main/java/jp/pokepay/pokepaylib/BankAPI/Account/GetAccountCampaignPointAmounts.java @@ -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); + } +} \ No newline at end of file diff --git a/pokepaylib/src/main/java/jp/pokepay/pokepaylib/Responses/AccountCampaignPointAmounts.java b/pokepaylib/src/main/java/jp/pokepay/pokepaylib/Responses/AccountCampaignPointAmounts.java new file mode 100644 index 0000000..6454396 --- /dev/null +++ b/pokepaylib/src/main/java/jp/pokepay/pokepaylib/Responses/AccountCampaignPointAmounts.java @@ -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; +}