-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from pokepay/feature/account-campaign-points
GetAccountCampaignPointAmounts endpoint
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...b/src/main/java/jp/pokepay/pokepaylib/BankAPI/Account/GetAccountCampaignPointAmounts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
pokepaylib/src/main/java/jp/pokepay/pokepaylib/Responses/AccountCampaignPointAmounts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |