Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,196 changes: 2,031 additions & 165 deletions android/src/main/java/jp/pokepay/pokepay_sdk/AutogenMethodHandlers.java

Large diffs are not rendered by default.

1,180 changes: 1,093 additions & 87 deletions ios/Classes/AutogenMethodHandlers.swift

Large diffs are not rendered by default.

226 changes: 222 additions & 4 deletions lib/generated/bank_api/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,230 @@ import '../../pokepay_sdk.dart';
import '../responses.dart';

extension AccountAPI on PokepayAPI {
Future<AccountDetail> getAccount({
required String accountId,
}) async {
return await invokeMethod<AccountDetail>(
(j) => AccountDetail.fromJson(j),
'autogen_getAccount',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
},
);
}

Future<AccountDetail> updateAccount({
required String accountId,
String? name,
}) async {
return await invokeMethod<AccountDetail>(
(j) => AccountDetail.fromJson(j),
'autogen_updateAccount',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'name': name,
},
);
}

Future<AccountDetail> createAccount({
String? name,
required String privateMoneyId,
String? externalId,
}) async {
return await invokeMethod<AccountDetail>(
(j) => AccountDetail.fromJson(j),
'autogen_createAccount',
{
'env': this.env.index,
'accessToken': this.accessToken,
'name': name,
'private_money_id': privateMoneyId,
'external_id': externalId,
},
);
}

Future<PaginatedAccountTransactions> getAccountTransactions({
required String accountId,
String? before,
String? after,
int? perPage,
}) async {
return await invokeMethod<PaginatedAccountTransactions>(
(j) => PaginatedAccountTransactions.fromJson(j),
'autogen_getAccountTransactions',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'before': before,
'after': after,
'per_page': perPage,
},
);
}

Future<UserTransaction> sendToAccount({
required String accountId,
String? receiverTerminalId,
String? senderAccountId,
required double amount,
String? description,
}) async {
return await invokeMethod<UserTransaction>(
(j) => UserTransaction.fromJson(j),
'autogen_sendToAccount',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'receiver_terminal_id': receiverTerminalId,
'sender_account_id': senderAccountId,
'amount': amount,
'description': description,
},
);
}

Future<PaginatedAccountTransfers> getAccountTransfers({
required String accountId,
String? before,
String? after,
int? perPage,
}) async {
return await invokeMethod<PaginatedAccountTransfers>(
(j) => PaginatedAccountTransfers.fromJson(j),
'autogen_getAccountTransfers',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'before': before,
'after': after,
'per_page': perPage,
},
);
}

Future<PaginatedAccountBalances> getAccountBalances({
required String accountId,
String? before,
String? after,
int? perPage,
String? expired,
}) async {
return await invokeMethod<PaginatedAccountBalances>(
(j) => PaginatedAccountBalances.fromJson(j),
'autogen_getAccountBalances',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'before': before,
'after': after,
'per_page': perPage,
'expired': expired,
},
);
}

Future<CpmToken> createAccountCpmToken({
required String accountId,
List<String>? scopes,
int? expiresIn,
String? metadata,
bool? keepAlive,
bool? isShortToken,
String? strategy,
String? couponId,
}) async {
return await invokeMethod<CpmToken>(
(j) => CpmToken.fromJson(j),
'autogen_createAccountCpmToken',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'scopes': scopes,
'expires_in': expiresIn,
'metadata': metadata,
'keep_alive': keepAlive,
'is_short_token': isShortToken,
'strategy': strategy,
'coupon_id': couponId,
},
);
}

Future<PaginatedAccountCoupons> getAccountCoupons({
required String accountId,
String? isAvailable,
String? before,
String? after,
int? perPage,
}) async {
return await invokeMethod<PaginatedAccountCoupons>(
(j) => PaginatedAccountCoupons.fromJson(j),
'autogen_getAccountCoupons',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'is_available': isAvailable,
'before': before,
'after': after,
'per_page': perPage,
},
);
}

Future<CouponDetail> getAccountCouponDetail({
required String accountId,
required String couponId,
}) async {
return await invokeMethod<CouponDetail>(
(j) => CouponDetail.fromJson(j),
'autogen_getAccountCouponDetail',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'coupon_id': couponId,
},
);
}

Future<CouponDetail> patchAccountCouponDetail({
required String accountId,
required String couponId,
bool? isReceived,
String? code,
}) async {
return await invokeMethod<CouponDetail>(
(j) => CouponDetail.fromJson(j),
'autogen_patchAccountCouponDetail',
{
'env': this.env.index,
'accessToken': this.accessToken,
'account_id': accountId,
'coupon_id': couponId,
'is_received': isReceived,
'code': code,
},
);
}

Future<IndividualNumberIdentificationStatus> getAccountIndividualNumberIdentification({
required String accountId,
}) async {
return await invokeMethod<IndividualNumberIdentificationStatus>(
(j) => IndividualNumberIdentificationStatus.fromJson(j),
'getAccountIndividualNumberIdentification',
'autogen_getAccountIndividualNumberIdentification',
{
'env': this.env.index,
'accessToken': this.accessToken,
Expand All @@ -29,7 +247,7 @@ extension AccountAPI on PokepayAPI {
}) async {
return await invokeMethod<IdentificationResult>(
(j) => IdentificationResult.fromJson(j),
'identifyIndividual',
'autogen_identifyIndividual',
{
'env': this.env.index,
'accessToken': this.accessToken,
Expand All @@ -55,7 +273,7 @@ extension AccountAPI on PokepayAPI {
}) async {
return await invokeMethod<AccountTopupQuotas>(
(j) => AccountTopupQuotas.fromJson(j),
'getAccountTopupQuotas',
'autogen_getAccountTopupQuotas',
{
'env': this.env.index,
'accessToken': this.accessToken,
Expand All @@ -74,7 +292,7 @@ extension AccountAPI on PokepayAPI {
}) async {
return await invokeMethod<AccountTopupStats>(
(j) => AccountTopupStats.fromJson(j),
'getAccountTopupStats',
'autogen_getAccountTopupStats',
{
'env': this.env.index,
'accessToken': this.accessToken,
Expand Down
67 changes: 67 additions & 0 deletions lib/generated/bank_api/bank.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// DO NOT EDIT: File is generated by code generator.
import '../../pokepay_sdk.dart';
import '../../responses.dart' show NoContent;
import '../responses.dart';

extension BankAPI on PokepayAPI {
Future<NoContent> deleteBankPay({
required String userId,
required String bankId,
}) async {
return await invokeMethod<NoContent>(
(j) => NoContent.fromJson(j),
'autogen_deleteBankPay',
{
'env': this.env.index,
'accessToken': this.accessToken,
'user_id': userId,
'bank_id': bankId,
},
);
}

Future<BankPaySession> createBankPay({
required String userId,
required String privateMoneyId,
required String callbackUrl,
String? kana,
}) async {
return await invokeMethod<BankPaySession>(
(j) => BankPaySession.fromJson(j),
'autogen_createBankPay',
{
'env': this.env.index,
'accessToken': this.accessToken,
'user_id': userId,
'private_money_id': privateMoneyId,
'callback_url': callbackUrl,
'kana': kana,
},
);
}

Future<UserTransaction> bankPayTopUp({
required String userId,
required String accountId,
required String bankId,
required int amount,
String? requestId,
int? topupQuotaId,
}) async {
return await invokeMethod<UserTransaction>(
(j) => UserTransaction.fromJson(j),
'autogen_bankPayTopUp',
{
'env': this.env.index,
'accessToken': this.accessToken,
'user_id': userId,
'account_id': accountId,
'bank_id': bankId,
'amount': amount,
'request_id': requestId,
'topup_quota_id': topupQuotaId,
},
);
}

}
57 changes: 57 additions & 0 deletions lib/generated/bank_api/bill.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// DO NOT EDIT: File is generated by code generator.
import '../../pokepay_sdk.dart';
import '../../responses.dart' show NoContent;
import '../responses.dart';

extension BillAPI on PokepayAPI {
Future<NoContent> deleteBill({
required String billId,
}) async {
return await invokeMethod<NoContent>(
(j) => NoContent.fromJson(j),
'autogen_deleteBill',
{
'env': this.env.index,
'accessToken': this.accessToken,
'bill_id': billId,
},
);
}

Future<BillWithAdditionalPrivateMoneys> getBill({
required String billId,
String? privateMoneyId,
}) async {
return await invokeMethod<BillWithAdditionalPrivateMoneys>(
(j) => BillWithAdditionalPrivateMoneys.fromJson(j),
'autogen_getBill',
{
'env': this.env.index,
'accessToken': this.accessToken,
'bill_id': billId,
'private_money_id': privateMoneyId,
},
);
}

Future<PaginatedBillTransactions> getBillTransactions({
required String billId,
String? before,
String? after,
int? perPage,
}) async {
return await invokeMethod<PaginatedBillTransactions>(
(j) => PaginatedBillTransactions.fromJson(j),
'autogen_getBillTransactions',
{
'env': this.env.index,
'accessToken': this.accessToken,
'bill_id': billId,
'before': before,
'after': after,
'per_page': perPage,
},
);
}

}
Loading
Loading