Skip to content
Merged
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 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ dependencies {
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.11.1'
implementation 'com.fasterxml.jackson.core:jackson-core:2.11.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.1'
implementation 'jp.pocket-change.pokepay.android-sdk:pokepaylib:2.0.28'
implementation 'jp.pocket-change.pokepay.android-sdk:pokepaylib:2.2.0'
}
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.

2 changes: 1 addition & 1 deletion ios/pokepay_sdk.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pokepay flutter SDK
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'Pokepay', '2.1.0'
s.dependency 'Pokepay', '2.2.0'
s.platform = :ios, '12.0'

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
Expand Down
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,
},
);
}

}
Loading
Loading