Skip to content

Commit cc6f767

Browse files
authored
Merge pull request #64 from pokepay/feature/account-campaign-points
GetAccountCampaignPointAmounts endpoint
2 parents 6720d81 + e91aaf3 commit cc6f767

3 files changed

Lines changed: 44 additions & 2 deletions

File tree

pokepaylib/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android {
1616
minSdkVersion 26
1717
targetSdkVersion 32
1818
versionCode 0
19-
versionName "2.0.7"
19+
versionName "2.0.8"
2020

2121
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
2222

@@ -65,7 +65,7 @@ uploadArchives {
6565
repositories {
6666
mavenDeployer {
6767
repository url: "file://${repo.absolutePath}"
68-
pom.version = '2.0.7' // version
68+
pom.version = '2.0.8' // version
6969
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
7070

7171
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package jp.pokepay.pokepaylib.BankAPI.Account;
2+
3+
import androidx.annotation.NonNull;
4+
5+
import jp.pokepay.pokepaylib.BankAPI.BankRequest;
6+
import jp.pokepay.pokepaylib.BankAPI.BankRequestError;
7+
import jp.pokepay.pokepaylib.ProcessingError;
8+
import jp.pokepay.pokepaylib.Request;
9+
import jp.pokepay.pokepaylib.Responses.AccountCampaignPointAmounts;
10+
11+
public class GetAccountCampaignPointAmounts extends BankRequest {
12+
@NonNull
13+
public String accountId;
14+
@NonNull
15+
public String campaignId;
16+
17+
public GetAccountCampaignPointAmounts(@NonNull String accountId, @NonNull String campaignId) {
18+
this.accountId = accountId;
19+
this.campaignId = campaignId;
20+
}
21+
22+
protected final String path() {
23+
return "/accounts/" + accountId + "/campaigns/" + campaignId +"/point-amounts";
24+
}
25+
26+
protected final Request.Method method() {
27+
return Request.Method.GET;
28+
}
29+
30+
public final AccountCampaignPointAmounts send(String accessToken) throws ProcessingError, BankRequestError {
31+
return super.send(AccountCampaignPointAmounts.class, accessToken);
32+
}
33+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package jp.pokepay.pokepaylib.Responses;
2+
3+
import jp.pokepay.pokepaylib.Response;
4+
5+
public class AccountCampaignPointAmounts extends Response {
6+
public double max_total_point_amount;
7+
public double total_point_amount;
8+
public double remain_point_amount;
9+
}

0 commit comments

Comments
 (0)