diff --git a/android/src/main/java/jp/pokepay/pokepay_sdk/AutogenMethodHandlers.java b/android/src/main/java/jp/pokepay/pokepay_sdk/AutogenMethodHandlers.java index a7b0db2..9e5e959 100644 --- a/android/src/main/java/jp/pokepay/pokepay_sdk/AutogenMethodHandlers.java +++ b/android/src/main/java/jp/pokepay/pokepay_sdk/AutogenMethodHandlers.java @@ -8,7 +8,6 @@ import jp.pokepay.pokepaylib.BankAPI.autogen.requests.*; import jp.pokepay.pokepaylib.BankAPI.autogen.responses.*; import jp.pokepay.pokepaylib.Responses.NoContent; -import jp.pokepay.pokepaylib.Responses.IdentificationResult; class AutogenMethodHandlers { private static Env flutterEnvToSDKEnv(int env) { @@ -26,8 +25,105 @@ private static Env flutterEnvToSDKEnv(int env) { } // 自動生成 API のメソッド呼び出しを処理する。対応しないメソッド名なら null を返す。 + // 生成 Dart (lib/generated/bank_api/*.dart) は "autogen_xxx" を送る。 + // 接頭辞なしの "xxx" は旧手書き Dart (lib/bank_api/*.dart) 互換の別名で、 + // 手書き switch に同名 case があればそちらが先に処理するためここへは来ない。 static String handle(MethodCall call) throws Exception { switch (call.method) { + case "getTerminalById": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String terminalId = call.argument("terminal_id"); + if (terminalId == null) terminalId = call.argument("terminalId"); + GetTerminalById req = new GetTerminalById(terminalId); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "autogen_getTerminalById": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String terminalId = call.argument("terminal_id"); + if (terminalId == null) terminalId = call.argument("terminalId"); + GetTerminalById req = new GetTerminalById(terminalId); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "getTerminal": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + GetTerminal req = new GetTerminal(); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "autogen_getTerminal": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + GetTerminal req = new GetTerminal(); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "updateTerminal": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String name = call.argument("name"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String pushService = call.argument("push_service"); + if (pushService == null) pushService = call.argument("pushService"); + String pushToken = call.argument("push_token"); + if (pushToken == null) pushToken = call.argument("pushToken"); + UpdateTerminal req = new UpdateTerminal(); + req = req.name(name); + req = req.accountId(accountId); + req = req.pushService(pushService); + req = req.pushToken(pushToken); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "autogen_updateTerminal": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String name = call.argument("name"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String pushService = call.argument("push_service"); + if (pushService == null) pushService = call.argument("pushService"); + String pushToken = call.argument("push_token"); + if (pushToken == null) pushToken = call.argument("pushToken"); + UpdateTerminal req = new UpdateTerminal(); + req = req.name(name); + req = req.accountId(accountId); + req = req.pushService(pushService); + req = req.pushToken(pushToken); + Pokepay.setEnv(env); + Terminal res = req.send(accessToken); + return res.toString(); + } + case "getTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + GetTransaction req = new GetTransaction(transactionId); + Pokepay.setEnv(env); + UserTransactionWithTransfers res = req.send(accessToken); + return res.toString(); + } + case "autogen_getTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + GetTransaction req = new GetTransaction(transactionId); + Pokepay.setEnv(env); + UserTransactionWithTransfers res = req.send(accessToken); + return res.toString(); + } case "getTransactionByRequestId": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); @@ -38,7 +134,64 @@ static String handle(MethodCall call) throws Exception { UserTransactionWithTransfers res = req.send(accessToken); return res.toString(); } - case "createCashtrayTransaction": { + case "autogen_getTransactionByRequestId": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + GetTransactionByRequestId req = new GetTransactionByRequestId(requestId); + Pokepay.setEnv(env); + UserTransactionWithTransfers res = req.send(accessToken); + return res.toString(); + } + case "refundTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + Double amount = call.argument("amount"); + RefundTransaction req = new RefundTransaction(transactionId); + req = req.amount(amount); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "autogen_refundTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + Double amount = call.argument("amount"); + RefundTransaction req = new RefundTransaction(transactionId); + req = req.amount(amount); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "createTransactionWithCashtray": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + String strategy = call.argument("strategy"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + CreateTransactionWithCashtray req = new CreateTransactionWithCashtray(requestId, cashtrayId); + req = req.accountId(accountId); + req = req.couponId(couponId); + req = req.strategy(strategy); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + UserTransactionWithFallback res = req.send(accessToken); + return res.toString(); + } + case "autogen_createTransactionWithCashtray": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); String requestId = call.argument("request_id"); @@ -52,7 +205,7 @@ static String handle(MethodCall call) throws Exception { String strategy = call.argument("strategy"); Integer topupQuotaId = call.argument("topup_quota_id"); if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); - CreateCashtrayTransaction req = new CreateCashtrayTransaction(requestId, cashtrayId); + CreateTransactionWithCashtray req = new CreateTransactionWithCashtray(requestId, cashtrayId); req = req.accountId(accountId); req = req.couponId(couponId); req = req.strategy(strategy); @@ -61,7 +214,7 @@ static String handle(MethodCall call) throws Exception { UserTransactionWithFallback res = req.send(accessToken); return res.toString(); } - case "createBillTransaction": { + case "createTransactionWithBill": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); String requestId = call.argument("request_id"); @@ -74,7 +227,7 @@ static String handle(MethodCall call) throws Exception { String couponId = call.argument("coupon_id"); if (couponId == null) couponId = call.argument("couponId"); String strategy = call.argument("strategy"); - CreateBillTransaction req = new CreateBillTransaction(requestId, billId); + CreateTransactionWithBill req = new CreateTransactionWithBill(requestId, billId); req = req.accountId(accountId); req = req.amount(amount); req = req.couponId(couponId); @@ -83,7 +236,29 @@ static String handle(MethodCall call) throws Exception { UserTransactionWithFallback res = req.send(accessToken); return res.toString(); } - case "createCheckTransaction": { + case "autogen_createTransactionWithBill": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Double amount = call.argument("amount"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + String strategy = call.argument("strategy"); + CreateTransactionWithBill req = new CreateTransactionWithBill(requestId, billId); + req = req.accountId(accountId); + req = req.amount(amount); + req = req.couponId(couponId); + req = req.strategy(strategy); + Pokepay.setEnv(env); + UserTransactionWithFallback res = req.send(accessToken); + return res.toString(); + } + case "createTransactionWithCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); String checkId = call.argument("check_id"); @@ -94,7 +269,7 @@ static String handle(MethodCall call) throws Exception { if (accountId == null) accountId = call.argument("accountId"); Integer topupQuotaId = call.argument("topup_quota_id"); if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); - CreateCheckTransaction req = new CreateCheckTransaction(checkId); + CreateTransactionWithCheck req = new CreateTransactionWithCheck(checkId); req = req.requestId(requestId); req = req.accountId(accountId); req = req.topupQuotaId(topupQuotaId); @@ -102,243 +277,1817 @@ static String handle(MethodCall call) throws Exception { UserTransactionWithFallback res = req.send(accessToken); return res.toString(); } - case "getCreditCards": { + case "autogen_createTransactionWithCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String userId = call.argument("user_id"); - if (userId == null) userId = call.argument("userId"); - String organizationCode = call.argument("organization_code"); - if (organizationCode == null) organizationCode = call.argument("organizationCode"); - String before = call.argument("before"); - String after = call.argument("after"); - Integer perPage = call.argument("per_page"); - if (perPage == null) perPage = call.argument("perPage"); - GetCreditCards req = new GetCreditCards(userId, organizationCode); - req = req.before(before); - req = req.after(after); - req = req.perPage(perPage); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + CreateTransactionWithCheck req = new CreateTransactionWithCheck(checkId); + req = req.requestId(requestId); + req = req.accountId(accountId); + req = req.topupQuotaId(topupQuotaId); Pokepay.setEnv(env); - PaginatedCreditCards res = req.send(accessToken); + UserTransactionWithFallback res = req.send(accessToken); return res.toString(); } - case "createCreditCard": { + case "deleteCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String userId = call.argument("user_id"); - if (userId == null) userId = call.argument("userId"); - String token = call.argument("token"); - String organizationCode = call.argument("organization_code"); - if (organizationCode == null) organizationCode = call.argument("organizationCode"); - Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); - if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); - CreateCreditCard req = new CreateCreditCard(userId, token, organizationCode); - req = req.isCardholderNameSpecified(isCardholderNameSpecified); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + DeleteCheck req = new DeleteCheck(checkId); Pokepay.setEnv(env); - CreditCard res = req.send(accessToken); + NoContent res = req.send(accessToken); return res.toString(); } - case "deleteCreditCard": { + case "autogen_deleteCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String userId = call.argument("user_id"); - if (userId == null) userId = call.argument("userId"); - String organizationCode = call.argument("organization_code"); - if (organizationCode == null) organizationCode = call.argument("organizationCode"); - String cardRegisteredAt = call.argument("card_registered_at"); - if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); - String cardUuid = call.argument("card_uuid"); - if (cardUuid == null) cardUuid = call.argument("cardUuid"); - DeleteCreditCard req = new DeleteCreditCard(userId, organizationCode); - req = req.cardRegisteredAt(cardRegisteredAt); - req = req.cardUuid(cardUuid); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + DeleteCheck req = new DeleteCheck(checkId); Pokepay.setEnv(env); NoContent res = req.send(accessToken); return res.toString(); } - case "topupWithCreditCardMembership": { + case "getCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String userId = call.argument("user_id"); - if (userId == null) userId = call.argument("userId"); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + GetCheck req = new GetCheck(checkId); + Pokepay.setEnv(env); + Check res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCheck": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + GetCheck req = new GetCheck(checkId); + Pokepay.setEnv(env); + Check res = req.send(accessToken); + return res.toString(); + } + case "updateCheck": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + Double amount = call.argument("amount"); + String description = call.argument("description"); + String expiresAt = call.argument("expires_at"); + if (expiresAt == null) expiresAt = call.argument("expiresAt"); + String pointExpiresAt = call.argument("point_expires_at"); + if (pointExpiresAt == null) pointExpiresAt = call.argument("pointExpiresAt"); + Integer pointExpiresInDays = call.argument("point_expires_in_days"); + if (pointExpiresInDays == null) pointExpiresInDays = call.argument("pointExpiresInDays"); + UpdateCheck req = new UpdateCheck(checkId); + req = req.amount(amount); + req = req.description(description); + req = req.expiresAt(expiresAt); + req = req.pointExpiresAt(pointExpiresAt); + req = req.pointExpiresInDays(pointExpiresInDays); + Pokepay.setEnv(env); + Check res = req.send(accessToken); + return res.toString(); + } + case "autogen_updateCheck": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String checkId = call.argument("check_id"); + if (checkId == null) checkId = call.argument("checkId"); + Double amount = call.argument("amount"); + String description = call.argument("description"); + String expiresAt = call.argument("expires_at"); + if (expiresAt == null) expiresAt = call.argument("expiresAt"); + String pointExpiresAt = call.argument("point_expires_at"); + if (pointExpiresAt == null) pointExpiresAt = call.argument("pointExpiresAt"); + Integer pointExpiresInDays = call.argument("point_expires_in_days"); + if (pointExpiresInDays == null) pointExpiresInDays = call.argument("pointExpiresInDays"); + UpdateCheck req = new UpdateCheck(checkId); + req = req.amount(amount); + req = req.description(description); + req = req.expiresAt(expiresAt); + req = req.pointExpiresAt(pointExpiresAt); + req = req.pointExpiresInDays(pointExpiresInDays); + Pokepay.setEnv(env); + Check res = req.send(accessToken); + return res.toString(); + } + case "createCheck": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + Double amount = call.argument("amount"); + Double moneyAmount = call.argument("money_amount"); + if (moneyAmount == null) moneyAmount = call.argument("moneyAmount"); + Double pointAmount = call.argument("point_amount"); + if (pointAmount == null) pointAmount = call.argument("pointAmount"); String accountId = call.argument("account_id"); if (accountId == null) accountId = call.argument("accountId"); - Integer amount = call.argument("amount"); - String organizationCode = call.argument("organization_code"); - if (organizationCode == null) organizationCode = call.argument("organizationCode"); - String cardRegisteredAt = call.argument("card_registered_at"); - if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); - String cardUuid = call.argument("card_uuid"); - if (cardUuid == null) cardUuid = call.argument("cardUuid"); - Boolean deleteCardIfAuthFail = call.argument("delete_card_if_auth_fail"); - if (deleteCardIfAuthFail == null) deleteCardIfAuthFail = call.argument("deleteCardIfAuthFail"); - String requestId = call.argument("request_id"); - if (requestId == null) requestId = call.argument("requestId"); - Integer topupQuotaId = call.argument("topup_quota_id"); - if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); - TopupWithCreditCardMembership req = new TopupWithCreditCardMembership(userId, accountId, amount, organizationCode); - req = req.cardRegisteredAt(cardRegisteredAt); - req = req.cardUuid(cardUuid); - req = req.deleteCardIfAuthFail(deleteCardIfAuthFail); - req = req.requestId(requestId); - req = req.topupQuotaId(topupQuotaId); + String description = call.argument("description"); + Boolean isOnetime = call.argument("is_onetime"); + if (isOnetime == null) isOnetime = call.argument("isOnetime"); + Integer usageLimit = call.argument("usage_limit"); + if (usageLimit == null) usageLimit = call.argument("usageLimit"); + String expiresAt = call.argument("expires_at"); + if (expiresAt == null) expiresAt = call.argument("expiresAt"); + String pointExpiresAt = call.argument("point_expires_at"); + if (pointExpiresAt == null) pointExpiresAt = call.argument("pointExpiresAt"); + Integer pointExpiresInDays = call.argument("point_expires_in_days"); + if (pointExpiresInDays == null) pointExpiresInDays = call.argument("pointExpiresInDays"); + String metadata = call.argument("metadata"); + CreateCheck req = new CreateCheck(); + req = req.amount(amount); + req = req.moneyAmount(moneyAmount); + req = req.pointAmount(pointAmount); + req = req.accountId(accountId); + req = req.description(description); + req = req.isOnetime(isOnetime); + req = req.usageLimit(usageLimit); + req = req.expiresAt(expiresAt); + req = req.pointExpiresAt(pointExpiresAt); + req = req.pointExpiresInDays(pointExpiresInDays); + req = req.metadata(metadata); Pokepay.setEnv(env); - String res = req.send(accessToken); - return res; + Check res = req.send(accessToken); + return res.toString(); } - case "topupWithCreditCardMdkToken": { + case "autogen_createCheck": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String userId = call.argument("user_id"); - if (userId == null) userId = call.argument("userId"); - String token = call.argument("token"); + Double amount = call.argument("amount"); + Double moneyAmount = call.argument("money_amount"); + if (moneyAmount == null) moneyAmount = call.argument("moneyAmount"); + Double pointAmount = call.argument("point_amount"); + if (pointAmount == null) pointAmount = call.argument("pointAmount"); String accountId = call.argument("account_id"); if (accountId == null) accountId = call.argument("accountId"); - Integer amount = call.argument("amount"); - String organizationCode = call.argument("organization_code"); - if (organizationCode == null) organizationCode = call.argument("organizationCode"); - Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); - if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); - String requestId = call.argument("request_id"); - if (requestId == null) requestId = call.argument("requestId"); - Integer topupQuotaId = call.argument("topup_quota_id"); - if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); - TopupWithCreditCardMdkToken req = new TopupWithCreditCardMdkToken(userId, token, accountId, amount, organizationCode); - req = req.isCardholderNameSpecified(isCardholderNameSpecified); - req = req.requestId(requestId); - req = req.topupQuotaId(topupQuotaId); + String description = call.argument("description"); + Boolean isOnetime = call.argument("is_onetime"); + if (isOnetime == null) isOnetime = call.argument("isOnetime"); + Integer usageLimit = call.argument("usage_limit"); + if (usageLimit == null) usageLimit = call.argument("usageLimit"); + String expiresAt = call.argument("expires_at"); + if (expiresAt == null) expiresAt = call.argument("expiresAt"); + String pointExpiresAt = call.argument("point_expires_at"); + if (pointExpiresAt == null) pointExpiresAt = call.argument("pointExpiresAt"); + Integer pointExpiresInDays = call.argument("point_expires_in_days"); + if (pointExpiresInDays == null) pointExpiresInDays = call.argument("pointExpiresInDays"); + String metadata = call.argument("metadata"); + CreateCheck req = new CreateCheck(); + req = req.amount(amount); + req = req.moneyAmount(moneyAmount); + req = req.pointAmount(pointAmount); + req = req.accountId(accountId); + req = req.description(description); + req = req.isOnetime(isOnetime); + req = req.usageLimit(usageLimit); + req = req.expiresAt(expiresAt); + req = req.pointExpiresAt(pointExpiresAt); + req = req.pointExpiresInDays(pointExpiresInDays); + req = req.metadata(metadata); + Pokepay.setEnv(env); + Check res = req.send(accessToken); + return res.toString(); + } + case "deleteBill": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + DeleteBill req = new DeleteBill(billId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_deleteBill": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + DeleteBill req = new DeleteBill(billId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "getBill": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetBill req = new GetBill(billId); + req = req.privateMoneyId(privateMoneyId); + Pokepay.setEnv(env); + BillWithAdditionalPrivateMoneys res = req.send(accessToken); + return res.toString(); + } + case "autogen_getBill": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetBill req = new GetBill(billId); + req = req.privateMoneyId(privateMoneyId); + Pokepay.setEnv(env); + BillWithAdditionalPrivateMoneys res = req.send(accessToken); + return res.toString(); + } + case "getBillTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetBillTransactions req = new GetBillTransactions(billId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedBillTransactions res = req.send(accessToken); + return res.toString(); + } + case "autogen_getBillTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String billId = call.argument("bill_id"); + if (billId == null) billId = call.argument("billId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetBillTransactions req = new GetBillTransactions(billId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedBillTransactions res = req.send(accessToken); + return res.toString(); + } + case "deleteCashtray": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + DeleteCashtray req = new DeleteCashtray(cashtrayId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_deleteCashtray": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + DeleteCashtray req = new DeleteCashtray(cashtrayId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "getCashtray": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + GetCashtray req = new GetCashtray(cashtrayId); + Pokepay.setEnv(env); + CashtrayWithAttemptAndTransaction res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCashtray": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + GetCashtray req = new GetCashtray(cashtrayId); + Pokepay.setEnv(env); + CashtrayWithAttemptAndTransaction res = req.send(accessToken); + return res.toString(); + } + case "getCashtrayAttempts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + GetCashtrayAttempts req = new GetCashtrayAttempts(cashtrayId); + Pokepay.setEnv(env); + CashtrayAttempts res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCashtrayAttempts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cashtrayId = call.argument("cashtray_id"); + if (cashtrayId == null) cashtrayId = call.argument("cashtrayId"); + GetCashtrayAttempts req = new GetCashtrayAttempts(cashtrayId); + Pokepay.setEnv(env); + CashtrayAttempts res = req.send(accessToken); + return res.toString(); + } + case "deleteUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + DeleteUser req = new DeleteUser(userId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_deleteUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + DeleteUser req = new DeleteUser(userId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "getUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + GetUser req = new GetUser(userId); + Pokepay.setEnv(env); + UserWithDetails res = req.send(accessToken); + return res.toString(); + } + case "autogen_getUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + GetUser req = new GetUser(userId); + Pokepay.setEnv(env); + UserWithDetails res = req.send(accessToken); + return res.toString(); + } + case "updateUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String name = call.argument("name"); + UpdateUser req = new UpdateUser(userId); + req = req.name(name); + Pokepay.setEnv(env); + UserWithDetails res = req.send(accessToken); + return res.toString(); + } + case "autogen_updateUser": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String name = call.argument("name"); + UpdateUser req = new UpdateUser(userId); + req = req.name(name); + Pokepay.setEnv(env); + UserWithDetails res = req.send(accessToken); + return res.toString(); + } + case "getUserWithAuthFactors": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + GetUserWithAuthFactors req = new GetUserWithAuthFactors(userId); + Pokepay.setEnv(env); + UserWithAuthFactors res = req.send(accessToken); + return res.toString(); + } + case "autogen_getUserWithAuthFactors": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + GetUserWithAuthFactors req = new GetUserWithAuthFactors(userId); + Pokepay.setEnv(env); + UserWithAuthFactors res = req.send(accessToken); + return res.toString(); + } + case "getUserTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserTransactions req = new GetUserTransactions(userId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserTransactions res = req.send(accessToken); + return res.toString(); + } + case "autogen_getUserTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserTransactions req = new GetUserTransactions(userId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserTransactions res = req.send(accessToken); + return res.toString(); + } + case "getUserAccounts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserAccounts req = new GetUserAccounts(userId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserAccounts res = req.send(accessToken); + return res.toString(); + } + case "autogen_getUserAccounts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserAccounts req = new GetUserAccounts(userId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserAccounts res = req.send(accessToken); + return res.toString(); + } + case "getCreditCards": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetCreditCards req = new GetCreditCards(userId, organizationCode); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedCreditCards res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCreditCards": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetCreditCards req = new GetCreditCards(userId, organizationCode); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedCreditCards res = req.send(accessToken); + return res.toString(); + } + case "createCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String token = call.argument("token"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); + if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); + CreateCreditCard req = new CreateCreditCard(userId, token, organizationCode); + req = req.isCardholderNameSpecified(isCardholderNameSpecified); + Pokepay.setEnv(env); + CreditCard res = req.send(accessToken); + return res.toString(); + } + case "autogen_createCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String token = call.argument("token"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); + if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); + CreateCreditCard req = new CreateCreditCard(userId, token, organizationCode); + req = req.isCardholderNameSpecified(isCardholderNameSpecified); + Pokepay.setEnv(env); + CreditCard res = req.send(accessToken); + return res.toString(); + } + case "deleteCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + DeleteCreditCard req = new DeleteCreditCard(userId, organizationCode); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_deleteCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + DeleteCreditCard req = new DeleteCreditCard(userId, organizationCode); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "topupWithCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + TopupWithCreditCard req = new TopupWithCreditCard(userId, accountId, amount); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "autogen_topupWithCreditCard": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + TopupWithCreditCard req = new TopupWithCreditCard(userId, accountId, amount); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "deleteBankPay": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String bankId = call.argument("bank_id"); + if (bankId == null) bankId = call.argument("bankId"); + DeleteBankPay req = new DeleteBankPay(userId, bankId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_deleteBankPay": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String bankId = call.argument("bank_id"); + if (bankId == null) bankId = call.argument("bankId"); + DeleteBankPay req = new DeleteBankPay(userId, bankId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "createBankPay": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String callbackUrl = call.argument("callback_url"); + if (callbackUrl == null) callbackUrl = call.argument("callbackUrl"); + String kana = call.argument("kana"); + CreateBankPay req = new CreateBankPay(userId, privateMoneyId, callbackUrl); + req = req.kana(kana); + Pokepay.setEnv(env); + BankPaySession res = req.send(accessToken); + return res.toString(); + } + case "autogen_createBankPay": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String callbackUrl = call.argument("callback_url"); + if (callbackUrl == null) callbackUrl = call.argument("callbackUrl"); + String kana = call.argument("kana"); + CreateBankPay req = new CreateBankPay(userId, privateMoneyId, callbackUrl); + req = req.kana(kana); + Pokepay.setEnv(env); + BankPaySession res = req.send(accessToken); + return res.toString(); + } + case "bankPayTopUp": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String bankId = call.argument("bank_id"); + if (bankId == null) bankId = call.argument("bankId"); + Integer amount = call.argument("amount"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + BankPayTopUp req = new BankPayTopUp(userId, accountId, bankId, amount); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "autogen_bankPayTopUp": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String bankId = call.argument("bank_id"); + if (bankId == null) bankId = call.argument("bankId"); + Integer amount = call.argument("amount"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + BankPayTopUp req = new BankPayTopUp(userId, accountId, bankId, amount); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "getUserSettingUrl": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + GetUserSettingUrl req = new GetUserSettingUrl(); + Pokepay.setEnv(env); + OauthFullAccessUrl res = req.send(accessToken); + return res.toString(); + } + case "autogen_getUserSettingUrl": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + GetUserSettingUrl req = new GetUserSettingUrl(); + Pokepay.setEnv(env); + OauthFullAccessUrl res = req.send(accessToken); + return res.toString(); + } + case "getMerchantTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + GetMerchantTransaction req = new GetMerchantTransaction(transactionId); + Pokepay.setEnv(env); + UserTransactionWithCustomerBalance res = req.send(accessToken); + return res.toString(); + } + case "autogen_getMerchantTransaction": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String transactionId = call.argument("transaction_id"); + if (transactionId == null) transactionId = call.argument("transactionId"); + GetMerchantTransaction req = new GetMerchantTransaction(transactionId); + Pokepay.setEnv(env); + UserTransactionWithCustomerBalance res = req.send(accessToken); + return res.toString(); + } + case "creditWithCreditCardMembership": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + CreditWithCreditCardMembership req = new CreditWithCreditCardMembership(userId); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "autogen_creditWithCreditCardMembership": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + CreditWithCreditCardMembership req = new CreditWithCreditCardMembership(userId); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "topupWithCreditCardMembership": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + Boolean deleteCardIfAuthFail = call.argument("delete_card_if_auth_fail"); + if (deleteCardIfAuthFail == null) deleteCardIfAuthFail = call.argument("deleteCardIfAuthFail"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + TopupWithCreditCardMembership req = new TopupWithCreditCardMembership(userId, accountId, amount, organizationCode); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.deleteCardIfAuthFail(deleteCardIfAuthFail); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "autogen_topupWithCreditCardMembership": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String cardRegisteredAt = call.argument("card_registered_at"); + if (cardRegisteredAt == null) cardRegisteredAt = call.argument("cardRegisteredAt"); + String cardUuid = call.argument("card_uuid"); + if (cardUuid == null) cardUuid = call.argument("cardUuid"); + Boolean deleteCardIfAuthFail = call.argument("delete_card_if_auth_fail"); + if (deleteCardIfAuthFail == null) deleteCardIfAuthFail = call.argument("deleteCardIfAuthFail"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + TopupWithCreditCardMembership req = new TopupWithCreditCardMembership(userId, accountId, amount, organizationCode); + req = req.cardRegisteredAt(cardRegisteredAt); + req = req.cardUuid(cardUuid); + req = req.deleteCardIfAuthFail(deleteCardIfAuthFail); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "topupWithCreditCardMdkToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String token = call.argument("token"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); + if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + TopupWithCreditCardMdkToken req = new TopupWithCreditCardMdkToken(userId, token, accountId, amount, organizationCode); + req = req.isCardholderNameSpecified(isCardholderNameSpecified); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "autogen_topupWithCreditCardMdkToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String userId = call.argument("user_id"); + if (userId == null) userId = call.argument("userId"); + String token = call.argument("token"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Integer amount = call.argument("amount"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + Boolean isCardholderNameSpecified = call.argument("is_cardholder_name_specified"); + if (isCardholderNameSpecified == null) isCardholderNameSpecified = call.argument("isCardholderNameSpecified"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + TopupWithCreditCardMdkToken req = new TopupWithCreditCardMdkToken(userId, token, accountId, amount, organizationCode); + req = req.isCardholderNameSpecified(isCardholderNameSpecified); + req = req.requestId(requestId); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + String res = req.send(accessToken); + return res; + } + case "getVeritransMdkTokenApiKey": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + GetVeritransMdkTokenApiKey req = new GetVeritransMdkTokenApiKey(); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + VeritransMdkTokenApiKey res = req.send(accessToken); + return res.toString(); + } + case "autogen_getVeritransMdkTokenApiKey": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + GetVeritransMdkTokenApiKey req = new GetVeritransMdkTokenApiKey(); + req = req.organizationCode(organizationCode); + Pokepay.setEnv(env); + VeritransMdkTokenApiKey res = req.send(accessToken); + return res.toString(); + } + case "getCvsAuthorizations": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetCvsAuthorizations req = new GetCvsAuthorizations(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedCvsAuthorizations res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCvsAuthorizations": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetCvsAuthorizations req = new GetCvsAuthorizations(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedCvsAuthorizations res = req.send(accessToken); + return res.toString(); + } + case "cvsAuthorizeRequest": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String serviceOptionType = call.argument("service_option_type"); + if (serviceOptionType == null) serviceOptionType = call.argument("serviceOptionType"); + Integer amount = call.argument("amount"); + String name1 = call.argument("name1"); + String name2 = call.argument("name2"); + String tel = call.argument("tel"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + CvsAuthorizeRequest req = new CvsAuthorizeRequest(accountId, serviceOptionType, amount, name1, name2, tel); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + CvsAuthorization res = req.send(accessToken); + return res.toString(); + } + case "autogen_cvsAuthorizeRequest": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String serviceOptionType = call.argument("service_option_type"); + if (serviceOptionType == null) serviceOptionType = call.argument("serviceOptionType"); + Integer amount = call.argument("amount"); + String name1 = call.argument("name1"); + String name2 = call.argument("name2"); + String tel = call.argument("tel"); + Integer topupQuotaId = call.argument("topup_quota_id"); + if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); + CvsAuthorizeRequest req = new CvsAuthorizeRequest(accountId, serviceOptionType, amount, name1, name2, tel); + req = req.topupQuotaId(topupQuotaId); + Pokepay.setEnv(env); + CvsAuthorization res = req.send(accessToken); + return res.toString(); + } + case "cancelCvsAuthorization": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String orderId = call.argument("order_id"); + if (orderId == null) orderId = call.argument("orderId"); + CancelCvsAuthorization req = new CancelCvsAuthorization(accountId, orderId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "autogen_cancelCvsAuthorization": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String orderId = call.argument("order_id"); + if (orderId == null) orderId = call.argument("orderId"); + CancelCvsAuthorization req = new CancelCvsAuthorization(accountId, orderId); + Pokepay.setEnv(env); + NoContent res = req.send(accessToken); + return res.toString(); + } + case "getCvsAuthorization": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String orderId = call.argument("order_id"); + if (orderId == null) orderId = call.argument("orderId"); + GetCvsAuthorization req = new GetCvsAuthorization(accountId, orderId); + Pokepay.setEnv(env); + CvsAuthorization res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCvsAuthorization": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String orderId = call.argument("order_id"); + if (orderId == null) orderId = call.argument("orderId"); + GetCvsAuthorization req = new GetCvsAuthorization(accountId, orderId); + Pokepay.setEnv(env); + CvsAuthorization res = req.send(accessToken); + return res.toString(); + } + case "getAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccount req = new GetAccount(accountId); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccount req = new GetAccount(accountId); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "updateAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String name = call.argument("name"); + UpdateAccount req = new UpdateAccount(accountId); + req = req.name(name); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_updateAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String name = call.argument("name"); + UpdateAccount req = new UpdateAccount(accountId); + req = req.name(name); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "createAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String name = call.argument("name"); + String externalId = call.argument("external_id"); + if (externalId == null) externalId = call.argument("externalId"); + CreateAccount req = new CreateAccount(privateMoneyId); + req = req.name(name); + req = req.externalId(externalId); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_createAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String name = call.argument("name"); + String externalId = call.argument("external_id"); + if (externalId == null) externalId = call.argument("externalId"); + CreateAccount req = new CreateAccount(privateMoneyId); + req = req.name(name); + req = req.externalId(externalId); + Pokepay.setEnv(env); + AccountDetail res = req.send(accessToken); + return res.toString(); + } + case "getAccountTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountTransactions req = new GetAccountTransactions(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountTransactions res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountTransactions": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountTransactions req = new GetAccountTransactions(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountTransactions res = req.send(accessToken); + return res.toString(); + } + case "sendToAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Double amount = call.argument("amount"); + String receiverTerminalId = call.argument("receiver_terminal_id"); + if (receiverTerminalId == null) receiverTerminalId = call.argument("receiverTerminalId"); + String senderAccountId = call.argument("sender_account_id"); + if (senderAccountId == null) senderAccountId = call.argument("senderAccountId"); + String description = call.argument("description"); + SendToAccount req = new SendToAccount(accountId, amount); + req = req.receiverTerminalId(receiverTerminalId); + req = req.senderAccountId(senderAccountId); + req = req.description(description); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "autogen_sendToAccount": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + Double amount = call.argument("amount"); + String receiverTerminalId = call.argument("receiver_terminal_id"); + if (receiverTerminalId == null) receiverTerminalId = call.argument("receiverTerminalId"); + String senderAccountId = call.argument("sender_account_id"); + if (senderAccountId == null) senderAccountId = call.argument("senderAccountId"); + String description = call.argument("description"); + SendToAccount req = new SendToAccount(accountId, amount); + req = req.receiverTerminalId(receiverTerminalId); + req = req.senderAccountId(senderAccountId); + req = req.description(description); + Pokepay.setEnv(env); + UserTransaction res = req.send(accessToken); + return res.toString(); + } + case "getAccountTransfers": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountTransfers req = new GetAccountTransfers(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountTransfers res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountTransfers": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountTransfers req = new GetAccountTransfers(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountTransfers res = req.send(accessToken); + return res.toString(); + } + case "getAccountBalances": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + String expired = call.argument("expired"); + GetAccountBalances req = new GetAccountBalances(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + req = req.expired(expired); + Pokepay.setEnv(env); + PaginatedAccountBalances res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountBalances": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + String expired = call.argument("expired"); + GetAccountBalances req = new GetAccountBalances(accountId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + req = req.expired(expired); + Pokepay.setEnv(env); + PaginatedAccountBalances res = req.send(accessToken); + return res.toString(); + } + case "createAccountCpmToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String[] scopes = call.argument("scopes"); + Integer expiresIn = call.argument("expires_in"); + if (expiresIn == null) expiresIn = call.argument("expiresIn"); + String metadata = call.argument("metadata"); + Boolean keepAlive = call.argument("keep_alive"); + if (keepAlive == null) keepAlive = call.argument("keepAlive"); + Boolean isShortToken = call.argument("is_short_token"); + if (isShortToken == null) isShortToken = call.argument("isShortToken"); + String strategy = call.argument("strategy"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + CreateAccountCpmToken req = new CreateAccountCpmToken(accountId); + req = req.scopes(scopes); + req = req.expiresIn(expiresIn); + req = req.metadata(metadata); + req = req.keepAlive(keepAlive); + req = req.isShortToken(isShortToken); + req = req.strategy(strategy); + req = req.couponId(couponId); + Pokepay.setEnv(env); + CpmToken res = req.send(accessToken); + return res.toString(); + } + case "autogen_createAccountCpmToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String[] scopes = call.argument("scopes"); + Integer expiresIn = call.argument("expires_in"); + if (expiresIn == null) expiresIn = call.argument("expiresIn"); + String metadata = call.argument("metadata"); + Boolean keepAlive = call.argument("keep_alive"); + if (keepAlive == null) keepAlive = call.argument("keepAlive"); + Boolean isShortToken = call.argument("is_short_token"); + if (isShortToken == null) isShortToken = call.argument("isShortToken"); + String strategy = call.argument("strategy"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + CreateAccountCpmToken req = new CreateAccountCpmToken(accountId); + req = req.scopes(scopes); + req = req.expiresIn(expiresIn); + req = req.metadata(metadata); + req = req.keepAlive(keepAlive); + req = req.isShortToken(isShortToken); + req = req.strategy(strategy); + req = req.couponId(couponId); + Pokepay.setEnv(env); + CpmToken res = req.send(accessToken); + return res.toString(); + } + case "getAccountCoupons": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String isAvailable = call.argument("is_available"); + if (isAvailable == null) isAvailable = call.argument("isAvailable"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountCoupons req = new GetAccountCoupons(accountId); + req = req.isAvailable(isAvailable); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountCoupons res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountCoupons": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String isAvailable = call.argument("is_available"); + if (isAvailable == null) isAvailable = call.argument("isAvailable"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetAccountCoupons req = new GetAccountCoupons(accountId); + req = req.isAvailable(isAvailable); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedAccountCoupons res = req.send(accessToken); + return res.toString(); + } + case "getAccountCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + GetAccountCouponDetail req = new GetAccountCouponDetail(accountId, couponId); + Pokepay.setEnv(env); + CouponDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + GetAccountCouponDetail req = new GetAccountCouponDetail(accountId, couponId); + Pokepay.setEnv(env); + CouponDetail res = req.send(accessToken); + return res.toString(); + } + case "patchAccountCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + Boolean isReceived = call.argument("is_received"); + if (isReceived == null) isReceived = call.argument("isReceived"); + String code = call.argument("code"); + PatchAccountCouponDetail req = new PatchAccountCouponDetail(accountId, couponId); + req = req.isReceived(isReceived); + req = req.code(code); + Pokepay.setEnv(env); + CouponDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_patchAccountCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + Boolean isReceived = call.argument("is_received"); + if (isReceived == null) isReceived = call.argument("isReceived"); + String code = call.argument("code"); + PatchAccountCouponDetail req = new PatchAccountCouponDetail(accountId, couponId); + req = req.isReceived(isReceived); + req = req.code(code); + Pokepay.setEnv(env); + CouponDetail res = req.send(accessToken); + return res.toString(); + } + case "getCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + GetCouponDetail req = new GetCouponDetail(couponId); + Pokepay.setEnv(env); + CouponInfo res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCouponDetail": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String couponId = call.argument("coupon_id"); + if (couponId == null) couponId = call.argument("couponId"); + GetCouponDetail req = new GetCouponDetail(couponId); + Pokepay.setEnv(env); + CouponInfo res = req.send(accessToken); + return res.toString(); + } + case "getAccountIndividualNumberIdentification": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccountIndividualNumberIdentification req = new GetAccountIndividualNumberIdentification(accountId); + Pokepay.setEnv(env); + IndividualNumberIdentificationStatus res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountIndividualNumberIdentification": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccountIndividualNumberIdentification req = new GetAccountIndividualNumberIdentification(accountId); + Pokepay.setEnv(env); + IndividualNumberIdentificationStatus res = req.send(accessToken); + return res.toString(); + } + case "identifyIndividual": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String signature = call.argument("signature"); + String signingCert = call.argument("signing_cert"); + if (signingCert == null) signingCert = call.argument("signingCert"); + String expectedHash = call.argument("expected_hash"); + if (expectedHash == null) expectedHash = call.argument("expectedHash"); + String name = call.argument("name"); + String gender = call.argument("gender"); + String address = call.argument("address"); + String dateOfBirth = call.argument("date_of_birth"); + if (dateOfBirth == null) dateOfBirth = call.argument("dateOfBirth"); + IdentifyIndividual req = new IdentifyIndividual(accountId, signature, signingCert, expectedHash); + req = req.name(name); + req = req.gender(gender); + req = req.address(address); + req = req.dateOfBirth(dateOfBirth); + Pokepay.setEnv(env); + IdentificationResult res = req.send(accessToken); + return res.toString(); + } + case "autogen_identifyIndividual": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String signature = call.argument("signature"); + String signingCert = call.argument("signing_cert"); + if (signingCert == null) signingCert = call.argument("signingCert"); + String expectedHash = call.argument("expected_hash"); + if (expectedHash == null) expectedHash = call.argument("expectedHash"); + String name = call.argument("name"); + String gender = call.argument("gender"); + String address = call.argument("address"); + String dateOfBirth = call.argument("date_of_birth"); + if (dateOfBirth == null) dateOfBirth = call.argument("dateOfBirth"); + IdentifyIndividual req = new IdentifyIndividual(accountId, signature, signingCert, expectedHash); + req = req.name(name); + req = req.gender(gender); + req = req.address(address); + req = req.dateOfBirth(dateOfBirth); + Pokepay.setEnv(env); + IdentificationResult res = req.send(accessToken); + return res.toString(); + } + case "getAccountCampaignPointAmounts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String campaignId = call.argument("campaign_id"); + if (campaignId == null) campaignId = call.argument("campaignId"); + GetAccountCampaignPointAmounts req = new GetAccountCampaignPointAmounts(accountId, campaignId); + Pokepay.setEnv(env); + AccountCampaignPointAmounts res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountCampaignPointAmounts": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String campaignId = call.argument("campaign_id"); + if (campaignId == null) campaignId = call.argument("campaignId"); + GetAccountCampaignPointAmounts req = new GetAccountCampaignPointAmounts(accountId, campaignId); + Pokepay.setEnv(env); + AccountCampaignPointAmounts res = req.send(accessToken); + return res.toString(); + } + case "getAccountTopupQuotas": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String status = call.argument("status"); + Boolean showExpiredForFixedPeriod = call.argument("show_expired_for_fixed_period"); + if (showExpiredForFixedPeriod == null) showExpiredForFixedPeriod = call.argument("showExpiredForFixedPeriod"); + Boolean showStartedQuotas = call.argument("show_started_quotas"); + if (showStartedQuotas == null) showStartedQuotas = call.argument("showStartedQuotas"); + Boolean isWithinApplicablePeriod = call.argument("is_within_applicable_period"); + if (isWithinApplicablePeriod == null) isWithinApplicablePeriod = call.argument("isWithinApplicablePeriod"); + Boolean isUsableAmountLeft = call.argument("is_usable_amount_left"); + if (isUsableAmountLeft == null) isUsableAmountLeft = call.argument("isUsableAmountLeft"); + GetAccountTopupQuotas req = new GetAccountTopupQuotas(accountId); + req = req.status(status); + req = req.showExpiredForFixedPeriod(showExpiredForFixedPeriod); + req = req.showStartedQuotas(showStartedQuotas); + req = req.isWithinApplicablePeriod(isWithinApplicablePeriod); + req = req.isUsableAmountLeft(isUsableAmountLeft); + Pokepay.setEnv(env); + AccountTopupQuotas res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountTopupQuotas": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + String status = call.argument("status"); + Boolean showExpiredForFixedPeriod = call.argument("show_expired_for_fixed_period"); + if (showExpiredForFixedPeriod == null) showExpiredForFixedPeriod = call.argument("showExpiredForFixedPeriod"); + Boolean showStartedQuotas = call.argument("show_started_quotas"); + if (showStartedQuotas == null) showStartedQuotas = call.argument("showStartedQuotas"); + Boolean isWithinApplicablePeriod = call.argument("is_within_applicable_period"); + if (isWithinApplicablePeriod == null) isWithinApplicablePeriod = call.argument("isWithinApplicablePeriod"); + Boolean isUsableAmountLeft = call.argument("is_usable_amount_left"); + if (isUsableAmountLeft == null) isUsableAmountLeft = call.argument("isUsableAmountLeft"); + GetAccountTopupQuotas req = new GetAccountTopupQuotas(accountId); + req = req.status(status); + req = req.showExpiredForFixedPeriod(showExpiredForFixedPeriod); + req = req.showStartedQuotas(showStartedQuotas); + req = req.isWithinApplicablePeriod(isWithinApplicablePeriod); + req = req.isUsableAmountLeft(isUsableAmountLeft); + Pokepay.setEnv(env); + AccountTopupQuotas res = req.send(accessToken); + return res.toString(); + } + case "getAccountTopupStats": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccountTopupStats req = new GetAccountTopupStats(accountId); + Pokepay.setEnv(env); + AccountTopupStats res = req.send(accessToken); + return res.toString(); + } + case "autogen_getAccountTopupStats": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String accountId = call.argument("account_id"); + if (accountId == null) accountId = call.argument("accountId"); + GetAccountTopupStats req = new GetAccountTopupStats(accountId); + Pokepay.setEnv(env); + AccountTopupStats res = req.send(accessToken); + return res.toString(); + } + case "getCpmToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cpmToken = call.argument("cpm_token"); + if (cpmToken == null) cpmToken = call.argument("cpmToken"); + GetCpmToken req = new GetCpmToken(cpmToken); + Pokepay.setEnv(env); + CpmToken res = req.send(accessToken); + return res.toString(); + } + case "autogen_getCpmToken": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String cpmToken = call.argument("cpm_token"); + if (cpmToken == null) cpmToken = call.argument("cpmToken"); + GetCpmToken req = new GetCpmToken(cpmToken); + Pokepay.setEnv(env); + CpmToken res = req.send(accessToken); + return res.toString(); + } + case "getPrivateMoney": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoney req = new GetPrivateMoney(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyDetail res = req.send(accessToken); + return res.toString(); + } + case "autogen_getPrivateMoney": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoney req = new GetPrivateMoney(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyDetail res = req.send(accessToken); + return res.toString(); + } + case "getPrivateMoneyCoupons": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetPrivateMoneyCoupons req = new GetPrivateMoneyCoupons(privateMoneyId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); Pokepay.setEnv(env); - String res = req.send(accessToken); - return res; + PaginatedPrivateMoneyCoupons res = req.send(accessToken); + return res.toString(); } - case "getCvsAuthorizations": { + case "autogen_getPrivateMoneyCoupons": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); String before = call.argument("before"); String after = call.argument("after"); Integer perPage = call.argument("per_page"); if (perPage == null) perPage = call.argument("perPage"); - GetCvsAuthorizations req = new GetCvsAuthorizations(accountId); + GetPrivateMoneyCoupons req = new GetPrivateMoneyCoupons(privateMoneyId); req = req.before(before); req = req.after(after); req = req.perPage(perPage); Pokepay.setEnv(env); - PaginatedCvsAuthorizations res = req.send(accessToken); + PaginatedPrivateMoneyCoupons res = req.send(accessToken); return res.toString(); } - case "cvsAuthorizeRequest": { + case "getPrivateMoneyTerms": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - String serviceOptionType = call.argument("service_option_type"); - if (serviceOptionType == null) serviceOptionType = call.argument("serviceOptionType"); - Integer amount = call.argument("amount"); - String name1 = call.argument("name1"); - String name2 = call.argument("name2"); - String tel = call.argument("tel"); - Integer topupQuotaId = call.argument("topup_quota_id"); - if (topupQuotaId == null) topupQuotaId = call.argument("topupQuotaId"); - CvsAuthorizeRequest req = new CvsAuthorizeRequest(accountId, serviceOptionType, amount, name1, name2, tel); - req = req.topupQuotaId(topupQuotaId); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyTerms req = new GetPrivateMoneyTerms(privateMoneyId); Pokepay.setEnv(env); - CvsAuthorization res = req.send(accessToken); + PrivateMoneyLegalText res = req.send(accessToken); return res.toString(); } - case "cancelCvsAuthorization": { + case "autogen_getPrivateMoneyTerms": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - String orderId = call.argument("order_id"); - if (orderId == null) orderId = call.argument("orderId"); - CancelCvsAuthorization req = new CancelCvsAuthorization(accountId, orderId); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyTerms req = new GetPrivateMoneyTerms(privateMoneyId); Pokepay.setEnv(env); - NoContent res = req.send(accessToken); + PrivateMoneyLegalText res = req.send(accessToken); return res.toString(); } - case "getCvsAuthorization": { + case "getPrivateMoneyPrivacyPolicy": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - String orderId = call.argument("order_id"); - if (orderId == null) orderId = call.argument("orderId"); - GetCvsAuthorization req = new GetCvsAuthorization(accountId, orderId); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyPrivacyPolicy req = new GetPrivateMoneyPrivacyPolicy(privateMoneyId); Pokepay.setEnv(env); - CvsAuthorization res = req.send(accessToken); + PrivateMoneyLegalText res = req.send(accessToken); return res.toString(); } - case "getAccountIndividualNumberIdentification": { + case "autogen_getPrivateMoneyPrivacyPolicy": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - GetAccountIndividualNumberIdentification req = new GetAccountIndividualNumberIdentification(accountId); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyPrivacyPolicy req = new GetPrivateMoneyPrivacyPolicy(privateMoneyId); Pokepay.setEnv(env); - IndividualNumberIdentificationStatus res = req.send(accessToken); + PrivateMoneyLegalText res = req.send(accessToken); return res.toString(); } - case "identifyIndividual": { + case "getPrivateMoneyPaymentAct": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyPaymentAct req = new GetPrivateMoneyPaymentAct(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyLegalText res = req.send(accessToken); + return res.toString(); + } + case "autogen_getPrivateMoneyPaymentAct": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyPaymentAct req = new GetPrivateMoneyPaymentAct(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyLegalText res = req.send(accessToken); + return res.toString(); + } + case "getPrivateMoneyCommercialAct": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyCommercialAct req = new GetPrivateMoneyCommercialAct(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyLegalText res = req.send(accessToken); + return res.toString(); + } + case "autogen_getPrivateMoneyCommercialAct": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + GetPrivateMoneyCommercialAct req = new GetPrivateMoneyCommercialAct(privateMoneyId); + Pokepay.setEnv(env); + PrivateMoneyLegalText res = req.send(accessToken); + return res.toString(); + } + case "searchPrivateMoneys": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - String signature = call.argument("signature"); - String signingCert = call.argument("signing_cert"); - if (signingCert == null) signingCert = call.argument("signingCert"); - String expectedHash = call.argument("expected_hash"); - if (expectedHash == null) expectedHash = call.argument("expectedHash"); String name = call.argument("name"); - String gender = call.argument("gender"); - String address = call.argument("address"); - String dateOfBirth = call.argument("date_of_birth"); - if (dateOfBirth == null) dateOfBirth = call.argument("dateOfBirth"); - IdentifyIndividual req = new IdentifyIndividual(accountId, signature, signingCert, expectedHash); + Boolean includeExclusive = call.argument("include_exclusive"); + if (includeExclusive == null) includeExclusive = call.argument("includeExclusive"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + SearchPrivateMoneys req = new SearchPrivateMoneys(); req = req.name(name); - req = req.gender(gender); - req = req.address(address); - req = req.dateOfBirth(dateOfBirth); + req = req.includeExclusive(includeExclusive); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); Pokepay.setEnv(env); - IdentificationResult res = req.send(accessToken); + PaginatedPrivateMoneys res = req.send(accessToken); return res.toString(); } - case "getAccountTopupQuotas": { + case "autogen_searchPrivateMoneys": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); - String accountId = call.argument("account_id"); - if (accountId == null) accountId = call.argument("accountId"); - String status = call.argument("status"); - Boolean showExpiredForFixedPeriod = call.argument("show_expired_for_fixed_period"); - if (showExpiredForFixedPeriod == null) showExpiredForFixedPeriod = call.argument("showExpiredForFixedPeriod"); - Boolean showStartedQuotas = call.argument("show_started_quotas"); - if (showStartedQuotas == null) showStartedQuotas = call.argument("showStartedQuotas"); - Boolean isWithinApplicablePeriod = call.argument("is_within_applicable_period"); - if (isWithinApplicablePeriod == null) isWithinApplicablePeriod = call.argument("isWithinApplicablePeriod"); - Boolean isUsableAmountLeft = call.argument("is_usable_amount_left"); - if (isUsableAmountLeft == null) isUsableAmountLeft = call.argument("isUsableAmountLeft"); - GetAccountTopupQuotas req = new GetAccountTopupQuotas(accountId); - req = req.status(status); - req = req.showExpiredForFixedPeriod(showExpiredForFixedPeriod); - req = req.showStartedQuotas(showStartedQuotas); - req = req.isWithinApplicablePeriod(isWithinApplicablePeriod); - req = req.isUsableAmountLeft(isUsableAmountLeft); + String name = call.argument("name"); + Boolean includeExclusive = call.argument("include_exclusive"); + if (includeExclusive == null) includeExclusive = call.argument("includeExclusive"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + SearchPrivateMoneys req = new SearchPrivateMoneys(); + req = req.name(name); + req = req.includeExclusive(includeExclusive); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); Pokepay.setEnv(env); - AccountTopupQuotas res = req.send(accessToken); + PaginatedPrivateMoneys res = req.send(accessToken); return res.toString(); } - case "getAccountTopupStats": { + case "createJihanpiTransaction": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); + String nfcTagId = call.argument("nfc_tag_id"); + if (nfcTagId == null) nfcTagId = call.argument("nfcTagId"); String accountId = call.argument("account_id"); if (accountId == null) accountId = call.argument("accountId"); - GetAccountTopupStats req = new GetAccountTopupStats(accountId); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + String strategy = call.argument("strategy"); + CreateJihanpiTransaction req = new CreateJihanpiTransaction(nfcTagId, accountId); + req = req.requestId(requestId); + req = req.strategy(strategy); Pokepay.setEnv(env); - AccountTopupStats res = req.send(accessToken); + JihanpiTransaction res = req.send(accessToken); return res.toString(); } - case "createJihanpiTransaction": { + case "autogen_createJihanpiTransaction": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); String nfcTagId = call.argument("nfc_tag_id"); @@ -365,6 +2114,16 @@ static String handle(MethodCall call) throws Exception { JihanpiTransaction res = req.send(accessToken); return res.toString(); } + case "autogen_getJihanpiTransactionByOrderId": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String orderId = call.argument("order_id"); + if (orderId == null) orderId = call.argument("orderId"); + GetJihanpiTransactionByOrderId req = new GetJihanpiTransactionByOrderId(orderId); + Pokepay.setEnv(env); + JihanpiTransaction res = req.send(accessToken); + return res.toString(); + } case "getJihanpiTransactionByRequestId": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); @@ -375,6 +2134,16 @@ static String handle(MethodCall call) throws Exception { JihanpiTransaction res = req.send(accessToken); return res.toString(); } + case "autogen_getJihanpiTransactionByRequestId": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String requestId = call.argument("request_id"); + if (requestId == null) requestId = call.argument("requestId"); + GetJihanpiTransactionByRequestId req = new GetJihanpiTransactionByRequestId(requestId); + Pokepay.setEnv(env); + JihanpiTransaction res = req.send(accessToken); + return res.toString(); + } case "getDetailedShopInformation": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); @@ -385,11 +2154,47 @@ static String handle(MethodCall call) throws Exception { DetailedShopInformation res = req.send(accessToken); return res.toString(); } + case "autogen_getDetailedShopInformation": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String shopId = call.argument("shop_id"); + if (shopId == null) shopId = call.argument("shopId"); + GetDetailedShopInformation req = new GetDetailedShopInformation(shopId); + Pokepay.setEnv(env); + DetailedShopInformation res = req.send(accessToken); + return res.toString(); + } case "getListOfShops": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); String privateMoneyId = call.argument("private_money_id"); if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String name = call.argument("name"); + String userTagGroupItemId = call.argument("user_tag_group_item_id"); + if (userTagGroupItemId == null) userTagGroupItemId = call.argument("userTagGroupItemId"); + String userTagSubgroupId = call.argument("user_tag_subgroup_id"); + if (userTagSubgroupId == null) userTagSubgroupId = call.argument("userTagSubgroupId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetListOfShops req = new GetListOfShops(privateMoneyId); + req = req.name(name); + req = req.userTagGroupItemId(userTagGroupItemId); + req = req.userTagSubgroupId(userTagSubgroupId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedShops res = req.send(accessToken); + return res.toString(); + } + case "autogen_getListOfShops": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String name = call.argument("name"); String userTagGroupItemId = call.argument("user_tag_group_item_id"); if (userTagGroupItemId == null) userTagGroupItemId = call.argument("userTagGroupItemId"); String userTagSubgroupId = call.argument("user_tag_subgroup_id"); @@ -399,6 +2204,7 @@ static String handle(MethodCall call) throws Exception { Integer perPage = call.argument("per_page"); if (perPage == null) perPage = call.argument("perPage"); GetListOfShops req = new GetListOfShops(privateMoneyId); + req = req.name(name); req = req.userTagGroupItemId(userTagGroupItemId); req = req.userTagSubgroupId(userTagSubgroupId); req = req.before(before); @@ -425,6 +2231,23 @@ static String handle(MethodCall call) throws Exception { PaginatedUserTagGroups res = req.send(accessToken); return res.toString(); } + case "autogen_getUserTagGroups": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String privateMoneyId = call.argument("private_money_id"); + if (privateMoneyId == null) privateMoneyId = call.argument("privateMoneyId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserTagGroups req = new GetUserTagGroups(privateMoneyId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserTagGroups res = req.send(accessToken); + return res.toString(); + } case "getUserTagGroupItems": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); @@ -447,6 +2270,28 @@ static String handle(MethodCall call) throws Exception { PaginatedUserTagGroupItems res = req.send(accessToken); return res.toString(); } + case "autogen_getUserTagGroupItems": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String tagGroupId = call.argument("tag_group_id"); + if (tagGroupId == null) tagGroupId = call.argument("tagGroupId"); + String subgroupId = call.argument("subgroup_id"); + if (subgroupId == null) subgroupId = call.argument("subgroupId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserTagGroupItems req = new GetUserTagGroupItems(organizationCode, tagGroupId); + req = req.subgroupId(subgroupId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserTagGroupItems res = req.send(accessToken); + return res.toString(); + } case "getUserTagSubgroups": { Env env = flutterEnvToSDKEnv((int) call.argument("env")); String accessToken = call.argument("accessToken"); @@ -466,6 +2311,25 @@ static String handle(MethodCall call) throws Exception { PaginatedUserTagSubgroups res = req.send(accessToken); return res.toString(); } + case "autogen_getUserTagSubgroups": { + Env env = flutterEnvToSDKEnv((int) call.argument("env")); + String accessToken = call.argument("accessToken"); + String organizationCode = call.argument("organization_code"); + if (organizationCode == null) organizationCode = call.argument("organizationCode"); + String tagGroupId = call.argument("tag_group_id"); + if (tagGroupId == null) tagGroupId = call.argument("tagGroupId"); + String before = call.argument("before"); + String after = call.argument("after"); + Integer perPage = call.argument("per_page"); + if (perPage == null) perPage = call.argument("perPage"); + GetUserTagSubgroups req = new GetUserTagSubgroups(organizationCode, tagGroupId); + req = req.before(before); + req = req.after(after); + req = req.perPage(perPage); + Pokepay.setEnv(env); + PaginatedUserTagSubgroups res = req.send(accessToken); + return res.toString(); + } default: return null; } diff --git a/ios/Classes/AutogenMethodHandlers.swift b/ios/Classes/AutogenMethodHandlers.swift index 38c9737..d1d7d7a 100644 --- a/ios/Classes/AutogenMethodHandlers.swift +++ b/ios/Classes/AutogenMethodHandlers.swift @@ -5,142 +5,937 @@ import Pokepay extension MethodCallTask { // 自動生成 API のメソッド呼び出しを処理する。対応しないメソッド名なら false を返す。 + // 生成 Dart (lib/generated/bank_api/*.dart) は "autogen_xxx" を送る。 + // 接頭辞なしの "xxx" は旧手書き Dart (lib/bank_api/*.dart) 互換の別名で、 + // 手書き switch に同名 case があればそちらが先に処理するためここへは来ない。 func handleAutogen(method: String, args: [String : Any]) -> Bool { switch method { + case "getTerminalById": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let terminalId = (args["terminal_id"] ?? args["terminalId"]) as! String + client.send(BankAPI.Terminal.GetTerminalById(terminalId: terminalId), handler: self.after) + case "autogen_getTerminalById": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let terminalId = (args["terminal_id"] ?? args["terminalId"]) as! String + client.send(BankAPI.Terminal.GetTerminalById(terminalId: terminalId), handler: self.after) + case "getTerminal": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + client.send(BankAPI.Terminal.GetTerminal(), handler: self.after) + case "autogen_getTerminal": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + client.send(BankAPI.Terminal.GetTerminal(), handler: self.after) + case "updateTerminal": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let pushService = (args["push_service"] ?? args["pushService"]) as? String + let pushToken = (args["push_token"] ?? args["pushToken"]) as? String + client.send(BankAPI.Terminal.UpdateTerminal(name: name, accountId: accountId, pushService: pushService, pushToken: pushToken), handler: self.after) + case "autogen_updateTerminal": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let pushService = (args["push_service"] ?? args["pushService"]) as? String + let pushToken = (args["push_token"] ?? args["pushToken"]) as? String + client.send(BankAPI.Terminal.UpdateTerminal(name: name, accountId: accountId, pushService: pushService, pushToken: pushToken), handler: self.after) + case "getTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Transaction.GetTransaction(transactionId: transactionId), handler: self.after) + case "autogen_getTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Transaction.GetTransaction(transactionId: transactionId), handler: self.after) case "getTransactionByRequestId": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let requestId = (args["request_id"] ?? args["requestId"]) as! String client.send(BankAPI.Transaction.GetTransactionByRequestId(requestId: requestId), handler: self.after) - case "createCashtrayTransaction": + case "autogen_getTransactionByRequestId": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + client.send(BankAPI.Transaction.GetTransactionByRequestId(requestId: requestId), handler: self.after) + case "refundTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Transaction.RefundTransaction(amount: amount, transactionId: transactionId), handler: self.after) + case "autogen_refundTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Transaction.RefundTransaction(amount: amount, transactionId: transactionId), handler: self.after) + case "createTransactionWithCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let strategy = args["strategy"] as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.Transaction.CreateTransactionWithCashtray(requestId: requestId, cashtrayId: cashtrayId, accountId: accountId, couponId: couponId, strategy: strategy, topupQuotaId: topupQuotaId), handler: self.after) + case "autogen_createTransactionWithCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let strategy = args["strategy"] as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.Transaction.CreateTransactionWithCashtray(requestId: requestId, cashtrayId: cashtrayId, accountId: accountId, couponId: couponId, strategy: strategy, topupQuotaId: topupQuotaId), handler: self.after) + case "createTransactionWithBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + let billId = (args["bill_id"] ?? args["billId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let amount = args["amount"] as? Double + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let strategy = args["strategy"] as? String + client.send(BankAPI.Transaction.CreateTransactionWithBill(requestId: requestId, billId: billId, accountId: accountId, amount: amount, couponId: couponId, strategy: strategy), handler: self.after) + case "autogen_createTransactionWithBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + let billId = (args["bill_id"] ?? args["billId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let amount = args["amount"] as? Double + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let strategy = args["strategy"] as? String + client.send(BankAPI.Transaction.CreateTransactionWithBill(requestId: requestId, billId: billId, accountId: accountId, amount: amount, couponId: couponId, strategy: strategy), handler: self.after) + case "createTransactionWithCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let checkId = (args["check_id"] ?? args["checkId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.Transaction.CreateTransactionWithCheck(requestId: requestId, checkId: checkId, accountId: accountId, topupQuotaId: topupQuotaId), handler: self.after) + case "autogen_createTransactionWithCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let checkId = (args["check_id"] ?? args["checkId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.Transaction.CreateTransactionWithCheck(requestId: requestId, checkId: checkId, accountId: accountId, topupQuotaId: topupQuotaId), handler: self.after) + case "deleteCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.DeleteCheck(checkId: checkId), handler: self.after) + case "autogen_deleteCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.DeleteCheck(checkId: checkId), handler: self.after) + case "getCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.GetCheck(checkId: checkId), handler: self.after) + case "autogen_getCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.GetCheck(checkId: checkId), handler: self.after) + case "updateCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let description = args["description"] as? String + let expiresAt = (args["expires_at"] ?? args["expiresAt"]) as? String + let pointExpiresAt = (args["point_expires_at"] ?? args["pointExpiresAt"]) as? String + let pointExpiresInDays = (args["point_expires_in_days"] ?? args["pointExpiresInDays"]) as? Int + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.UpdateCheck(amount: amount, description: description, expiresAt: expiresAt, pointExpiresAt: pointExpiresAt, pointExpiresInDays: pointExpiresInDays, checkId: checkId), handler: self.after) + case "autogen_updateCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let description = args["description"] as? String + let expiresAt = (args["expires_at"] ?? args["expiresAt"]) as? String + let pointExpiresAt = (args["point_expires_at"] ?? args["pointExpiresAt"]) as? String + let pointExpiresInDays = (args["point_expires_in_days"] ?? args["pointExpiresInDays"]) as? Int + let checkId = (args["check_id"] ?? args["checkId"]) as! String + client.send(BankAPI.Check.UpdateCheck(amount: amount, description: description, expiresAt: expiresAt, pointExpiresAt: pointExpiresAt, pointExpiresInDays: pointExpiresInDays, checkId: checkId), handler: self.after) + case "createCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let moneyAmount = (args["money_amount"] ?? args["moneyAmount"]) as? Double + let pointAmount = (args["point_amount"] ?? args["pointAmount"]) as? Double + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let description = args["description"] as? String + let isOnetime = (args["is_onetime"] ?? args["isOnetime"]) as? Bool + let usageLimit = (args["usage_limit"] ?? args["usageLimit"]) as? Int + let expiresAt = (args["expires_at"] ?? args["expiresAt"]) as? String + let pointExpiresAt = (args["point_expires_at"] ?? args["pointExpiresAt"]) as? String + let pointExpiresInDays = (args["point_expires_in_days"] ?? args["pointExpiresInDays"]) as? Int + let metadata = args["metadata"] as? String + client.send(BankAPI.Check.CreateCheck(amount: amount, moneyAmount: moneyAmount, pointAmount: pointAmount, accountId: accountId, description: description, isOnetime: isOnetime, usageLimit: usageLimit, expiresAt: expiresAt, pointExpiresAt: pointExpiresAt, pointExpiresInDays: pointExpiresInDays, metadata: metadata), handler: self.after) + case "autogen_createCheck": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let amount = args["amount"] as? Double + let moneyAmount = (args["money_amount"] ?? args["moneyAmount"]) as? Double + let pointAmount = (args["point_amount"] ?? args["pointAmount"]) as? Double + let accountId = (args["account_id"] ?? args["accountId"]) as? String + let description = args["description"] as? String + let isOnetime = (args["is_onetime"] ?? args["isOnetime"]) as? Bool + let usageLimit = (args["usage_limit"] ?? args["usageLimit"]) as? Int + let expiresAt = (args["expires_at"] ?? args["expiresAt"]) as? String + let pointExpiresAt = (args["point_expires_at"] ?? args["pointExpiresAt"]) as? String + let pointExpiresInDays = (args["point_expires_in_days"] ?? args["pointExpiresInDays"]) as? Int + let metadata = args["metadata"] as? String + client.send(BankAPI.Check.CreateCheck(amount: amount, moneyAmount: moneyAmount, pointAmount: pointAmount, accountId: accountId, description: description, isOnetime: isOnetime, usageLimit: usageLimit, expiresAt: expiresAt, pointExpiresAt: pointExpiresAt, pointExpiresInDays: pointExpiresInDays, metadata: metadata), handler: self.after) + case "deleteBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + client.send(BankAPI.Bill.DeleteBill(billId: billId), handler: self.after) + case "autogen_deleteBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + client.send(BankAPI.Bill.DeleteBill(billId: billId), handler: self.after) + case "getBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as? String + client.send(BankAPI.Bill.GetBill(billId: billId, privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getBill": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as? String + client.send(BankAPI.Bill.GetBill(billId: billId, privateMoneyId: privateMoneyId), handler: self.after) + case "getBillTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Bill.GetBillTransactions(billId: billId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getBillTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let billId = (args["bill_id"] ?? args["billId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Bill.GetBillTransactions(billId: billId, before: before, after: after, perPage: perPage), handler: self.after) + case "deleteCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.DeleteCashtray(cashtrayId: cashtrayId), handler: self.after) + case "autogen_deleteCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.DeleteCashtray(cashtrayId: cashtrayId), handler: self.after) + case "getCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.GetCashtray(cashtrayId: cashtrayId), handler: self.after) + case "autogen_getCashtray": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.GetCashtray(cashtrayId: cashtrayId), handler: self.after) + case "getCashtrayAttempts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.GetCashtrayAttempts(cashtrayId: cashtrayId), handler: self.after) + case "autogen_getCashtrayAttempts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String + client.send(BankAPI.Cashtray.GetCashtrayAttempts(cashtrayId: cashtrayId), handler: self.after) + case "deleteUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.DeleteUser(userId: userId), handler: self.after) + case "autogen_deleteUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.DeleteUser(userId: userId), handler: self.after) + case "getUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.GetUser(userId: userId), handler: self.after) + case "autogen_getUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.GetUser(userId: userId), handler: self.after) + case "updateUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.UpdateUser(name: name, userId: userId), handler: self.after) + case "autogen_updateUser": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.UpdateUser(name: name, userId: userId), handler: self.after) + case "getUserWithAuthFactors": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.GetUserWithAuthFactors(userId: userId), handler: self.after) + case "autogen_getUserWithAuthFactors": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.User.GetUserWithAuthFactors(userId: userId), handler: self.after) + case "getUserTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.User.GetUserTransactions(userId: userId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getUserTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.User.GetUserTransactions(userId: userId, before: before, after: after, perPage: perPage), handler: self.after) + case "getUserAccounts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.User.GetUserAccounts(userId: userId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getUserAccounts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.User.GetUserAccounts(userId: userId, before: before, after: after, perPage: perPage), handler: self.after) + case "getCreditCards": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + client.send(BankAPI.CreditCard.GetCreditCards(userId: userId, before: before, after: after, perPage: perPage, organizationCode: organizationCode), handler: self.after) + case "autogen_getCreditCards": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + client.send(BankAPI.CreditCard.GetCreditCards(userId: userId, before: before, after: after, perPage: perPage, organizationCode: organizationCode), handler: self.after) + case "createCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let token = args["token"] as! String + let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.CreateCreditCard(token: token, isCardholderNameSpecified: isCardholderNameSpecified, organizationCode: organizationCode, userId: userId), handler: self.after) + case "autogen_createCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let token = args["token"] as! String + let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.CreateCreditCard(token: token, isCardholderNameSpecified: isCardholderNameSpecified, organizationCode: organizationCode, userId: userId), handler: self.after) + case "deleteCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.DeleteCreditCard(cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode, userId: userId), handler: self.after) + case "autogen_deleteCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.DeleteCreditCard(cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode, userId: userId), handler: self.after) + case "topupWithCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.TopupWithCreditCard(accountId: accountId, amount: amount, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode, userId: userId), handler: self.after) + case "autogen_topupWithCreditCard": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.CreditCard.TopupWithCreditCard(accountId: accountId, amount: amount, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode, userId: userId), handler: self.after) + case "deleteBankPay": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let bankId = (args["bank_id"] ?? args["bankId"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.DeleteBankPay(bankId: bankId, userId: userId), handler: self.after) + case "autogen_deleteBankPay": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let bankId = (args["bank_id"] ?? args["bankId"]) as! String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.DeleteBankPay(bankId: bankId, userId: userId), handler: self.after) + case "createBankPay": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let callbackUrl = (args["callback_url"] ?? args["callbackUrl"]) as! String + let kana = args["kana"] as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.CreateBankPay(privateMoneyId: privateMoneyId, callbackUrl: callbackUrl, kana: kana, userId: userId), handler: self.after) + case "autogen_createBankPay": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let callbackUrl = (args["callback_url"] ?? args["callbackUrl"]) as! String + let kana = args["kana"] as? String + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.CreateBankPay(privateMoneyId: privateMoneyId, callbackUrl: callbackUrl, kana: kana, userId: userId), handler: self.after) + case "bankPayTopUp": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let bankId = (args["bank_id"] ?? args["bankId"]) as! String + let amount = args["amount"] as! Int + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.BankPayTopUp(accountId: accountId, bankId: bankId, amount: amount, requestId: requestId, topupQuotaId: topupQuotaId, userId: userId), handler: self.after) + case "autogen_bankPayTopUp": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let bankId = (args["bank_id"] ?? args["bankId"]) as! String + let amount = args["amount"] as! Int + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + let userId = (args["user_id"] ?? args["userId"]) as! String + client.send(BankAPI.Bank.BankPayTopUp(accountId: accountId, bankId: bankId, amount: amount, requestId: requestId, topupQuotaId: topupQuotaId, userId: userId), handler: self.after) + case "getUserSettingUrl": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + client.send(BankAPI.User.GetUserSettingUrl(), handler: self.after) + case "autogen_getUserSettingUrl": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + client.send(BankAPI.User.GetUserSettingUrl(), handler: self.after) + case "getMerchantTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Merchants.GetMerchantTransaction(transactionId: transactionId), handler: self.after) + case "autogen_getMerchantTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let transactionId = (args["transaction_id"] ?? args["transactionId"]) as! String + client.send(BankAPI.Merchants.GetMerchantTransaction(transactionId: transactionId), handler: self.after) + case "creditWithCreditCardMembership": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + client.send(BankAPI.CreditCard.CreditWithCreditCardMembership(userId: userId, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode), handler: self.after) + case "autogen_creditWithCreditCardMembership": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + client.send(BankAPI.CreditCard.CreditWithCreditCardMembership(userId: userId, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode), handler: self.after) + case "topupWithCreditCardMembership": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let deleteCardIfAuthFail = (args["delete_card_if_auth_fail"] ?? args["deleteCardIfAuthFail"]) as? Bool + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.CreditCard.TopupWithCreditCardMembership(userId: userId, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, accountId: accountId, amount: amount, deleteCardIfAuthFail: deleteCardIfAuthFail, organizationCode: organizationCode, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) + case "autogen_topupWithCreditCardMembership": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String + let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let deleteCardIfAuthFail = (args["delete_card_if_auth_fail"] ?? args["deleteCardIfAuthFail"]) as? Bool + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.CreditCard.TopupWithCreditCardMembership(userId: userId, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, accountId: accountId, amount: amount, deleteCardIfAuthFail: deleteCardIfAuthFail, organizationCode: organizationCode, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) + case "topupWithCreditCardMdkToken": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let token = args["token"] as! String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.CreditCard.TopupWithCreditCardMdkToken(userId: userId, token: token, accountId: accountId, amount: amount, organizationCode: organizationCode, isCardholderNameSpecified: isCardholderNameSpecified, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) + case "autogen_topupWithCreditCardMdkToken": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let userId = (args["user_id"] ?? args["userId"]) as! String + let token = args["token"] as! String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let amount = args["amount"] as! Int + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + client.send(BankAPI.CreditCard.TopupWithCreditCardMdkToken(userId: userId, token: token, accountId: accountId, amount: amount, organizationCode: organizationCode, isCardholderNameSpecified: isCardholderNameSpecified, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) + case "getVeritransMdkTokenApiKey": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + client.send(BankAPI.CreditCard.GetVeritransMdkTokenApiKey(organizationCode: organizationCode), handler: self.after) + case "autogen_getVeritransMdkTokenApiKey": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as? String + client.send(BankAPI.CreditCard.GetVeritransMdkTokenApiKey(organizationCode: organizationCode), handler: self.after) + case "getCvsAuthorizations": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Cvs.GetCvsAuthorizations(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getCvsAuthorizations": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Cvs.GetCvsAuthorizations(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "cvsAuthorizeRequest": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let serviceOptionType = (args["service_option_type"] ?? args["serviceOptionType"]) as! String + let amount = args["amount"] as! Int + let name1 = args["name1"] as! String + let name2 = args["name2"] as! String + let tel = args["tel"] as! String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Cvs.CvsAuthorizeRequest(serviceOptionType: serviceOptionType, amount: amount, name1: name1, name2: name2, tel: tel, topupQuotaId: topupQuotaId, accountId: accountId), handler: self.after) + case "autogen_cvsAuthorizeRequest": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let serviceOptionType = (args["service_option_type"] ?? args["serviceOptionType"]) as! String + let amount = args["amount"] as! Int + let name1 = args["name1"] as! String + let name2 = args["name2"] as! String + let tel = args["tel"] as! String + let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Cvs.CvsAuthorizeRequest(serviceOptionType: serviceOptionType, amount: amount, name1: name1, name2: name2, tel: tel, topupQuotaId: topupQuotaId, accountId: accountId), handler: self.after) + case "cancelCvsAuthorization": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let orderId = (args["order_id"] ?? args["orderId"]) as! String + client.send(BankAPI.Cvs.CancelCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) + case "autogen_cancelCvsAuthorization": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let orderId = (args["order_id"] ?? args["orderId"]) as! String + client.send(BankAPI.Cvs.CancelCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) + case "getCvsAuthorization": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let orderId = (args["order_id"] ?? args["orderId"]) as! String + client.send(BankAPI.Cvs.GetCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) + case "autogen_getCvsAuthorization": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let orderId = (args["order_id"] ?? args["orderId"]) as! String + client.send(BankAPI.Cvs.GetCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) + case "getAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.GetAccount(accountId: accountId), handler: self.after) + case "autogen_getAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.GetAccount(accountId: accountId), handler: self.after) + case "updateAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.UpdateAccount(name: name, accountId: accountId), handler: self.after) + case "autogen_updateAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.UpdateAccount(name: name, accountId: accountId), handler: self.after) + case "createAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let externalId = (args["external_id"] ?? args["externalId"]) as? String + client.send(BankAPI.Account.CreateAccount(name: name, privateMoneyId: privateMoneyId, externalId: externalId), handler: self.after) + case "autogen_createAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let externalId = (args["external_id"] ?? args["externalId"]) as? String + client.send(BankAPI.Account.CreateAccount(name: name, privateMoneyId: privateMoneyId, externalId: externalId), handler: self.after) + case "getAccountTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Account.GetAccountTransactions(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getAccountTransactions": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Account.GetAccountTransactions(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "sendToAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let receiverTerminalId = (args["receiver_terminal_id"] ?? args["receiverTerminalId"]) as? String + let senderAccountId = (args["sender_account_id"] ?? args["senderAccountId"]) as? String + let amount = args["amount"] as! Double + let description = args["description"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.SendToAccount(receiverTerminalId: receiverTerminalId, senderAccountId: senderAccountId, amount: amount, description: description, accountId: accountId), handler: self.after) + case "autogen_sendToAccount": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let receiverTerminalId = (args["receiver_terminal_id"] ?? args["receiverTerminalId"]) as? String + let senderAccountId = (args["sender_account_id"] ?? args["senderAccountId"]) as? String + let amount = args["amount"] as! Double + let description = args["description"] as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.SendToAccount(receiverTerminalId: receiverTerminalId, senderAccountId: senderAccountId, amount: amount, description: description, accountId: accountId), handler: self.after) + case "getAccountTransfers": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Account.GetAccountTransfers(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getAccountTransfers": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Account.GetAccountTransfers(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) + case "getAccountBalances": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + let expired = args["expired"] as? String + client.send(BankAPI.Account.GetAccountBalances(accountId: accountId, before: before, after: after, perPage: perPage, expired: expired), handler: self.after) + case "autogen_getAccountBalances": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + let expired = args["expired"] as? String + client.send(BankAPI.Account.GetAccountBalances(accountId: accountId, before: before, after: after, perPage: perPage, expired: expired), handler: self.after) + case "createAccountCpmToken": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let requestId = (args["request_id"] ?? args["requestId"]) as! String - let cashtrayId = (args["cashtray_id"] ?? args["cashtrayId"]) as! String - let accountId = (args["account_id"] ?? args["accountId"]) as? String - let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let scopes = args["scopes"] as? String + let expiresIn = (args["expires_in"] ?? args["expiresIn"]) as? Int + let metadata = args["metadata"] as? String + let keepAlive = (args["keep_alive"] ?? args["keepAlive"]) as? Bool + let isShortToken = (args["is_short_token"] ?? args["isShortToken"]) as? Bool let strategy = args["strategy"] as? String - let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int - client.send(BankAPI.Transaction.CreateCashtrayTransaction(requestId: requestId, cashtrayId: cashtrayId, accountId: accountId, couponId: couponId, strategy: strategy, topupQuotaId: topupQuotaId), handler: self.after) - case "createBillTransaction": + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.CreateAccountCpmToken(scopes: scopes, expiresIn: expiresIn, metadata: metadata, keepAlive: keepAlive, isShortToken: isShortToken, strategy: strategy, couponId: couponId, accountId: accountId), handler: self.after) + case "autogen_createAccountCpmToken": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let requestId = (args["request_id"] ?? args["requestId"]) as! String - let billId = (args["bill_id"] ?? args["billId"]) as! String - let accountId = (args["account_id"] ?? args["accountId"]) as? String - let amount = args["amount"] as? Double - let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let scopes = args["scopes"] as? String + let expiresIn = (args["expires_in"] ?? args["expiresIn"]) as? Int + let metadata = args["metadata"] as? String + let keepAlive = (args["keep_alive"] ?? args["keepAlive"]) as? Bool + let isShortToken = (args["is_short_token"] ?? args["isShortToken"]) as? Bool let strategy = args["strategy"] as? String - client.send(BankAPI.Transaction.CreateBillTransaction(requestId: requestId, billId: billId, accountId: accountId, amount: amount, couponId: couponId, strategy: strategy), handler: self.after) - case "createCheckTransaction": + let couponId = (args["coupon_id"] ?? args["couponId"]) as? String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.CreateAccountCpmToken(scopes: scopes, expiresIn: expiresIn, metadata: metadata, keepAlive: keepAlive, isShortToken: isShortToken, strategy: strategy, couponId: couponId, accountId: accountId), handler: self.after) + case "getAccountCoupons": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let requestId = (args["request_id"] ?? args["requestId"]) as? String - let checkId = (args["check_id"] ?? args["checkId"]) as! String - let accountId = (args["account_id"] ?? args["accountId"]) as? String - let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int - client.send(BankAPI.Transaction.CreateCheckTransaction(requestId: requestId, checkId: checkId, accountId: accountId, topupQuotaId: topupQuotaId), handler: self.after) - case "getCreditCards": + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let isAvailable = (args["is_available"] ?? args["isAvailable"]) as? String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Account.GetAccountCoupons(accountId: accountId, isAvailable: isAvailable, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getAccountCoupons": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let userId = (args["user_id"] ?? args["userId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let isAvailable = (args["is_available"] ?? args["isAvailable"]) as? String let before = args["before"] as? String let after = args["after"] as? String let perPage = (args["per_page"] ?? args["perPage"]) as? Int - let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String - client.send(BankAPI.CreditCard.GetCreditCards(userId: userId, before: before, after: after, perPage: perPage, organizationCode: organizationCode), handler: self.after) - case "createCreditCard": + client.send(BankAPI.Account.GetAccountCoupons(accountId: accountId, isAvailable: isAvailable, before: before, after: after, perPage: perPage), handler: self.after) + case "getAccountCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let token = args["token"] as! String - let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool - let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String - let userId = (args["user_id"] ?? args["userId"]) as! String - client.send(BankAPI.CreditCard.CreateCreditCard(token: token, isCardholderNameSpecified: isCardholderNameSpecified, organizationCode: organizationCode, userId: userId), handler: self.after) - case "deleteCreditCard": + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Account.GetAccountCouponDetail(accountId: accountId, couponId: couponId), handler: self.after) + case "autogen_getAccountCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String - let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String - let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String - let userId = (args["user_id"] ?? args["userId"]) as! String - client.send(BankAPI.CreditCard.DeleteCreditCard(cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, organizationCode: organizationCode, userId: userId), handler: self.after) - case "topupWithCreditCardMembership": + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Account.GetAccountCouponDetail(accountId: accountId, couponId: couponId), handler: self.after) + case "patchAccountCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let userId = (args["user_id"] ?? args["userId"]) as! String - let cardRegisteredAt = (args["card_registered_at"] ?? args["cardRegisteredAt"]) as? String - let cardUuid = (args["card_uuid"] ?? args["cardUuid"]) as? String + let isReceived = (args["is_received"] ?? args["isReceived"]) as? Bool + let code = args["code"] as? String let accountId = (args["account_id"] ?? args["accountId"]) as! String - let amount = args["amount"] as! Int - let deleteCardIfAuthFail = (args["delete_card_if_auth_fail"] ?? args["deleteCardIfAuthFail"]) as? Bool - let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String - let requestId = (args["request_id"] ?? args["requestId"]) as? String - let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int - client.send(BankAPI.CreditCard.TopupWithCreditCardMembership(userId: userId, cardRegisteredAt: cardRegisteredAt, cardUuid: cardUuid, accountId: accountId, amount: amount, deleteCardIfAuthFail: deleteCardIfAuthFail, organizationCode: organizationCode, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) - case "topupWithCreditCardMdkToken": + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Account.PatchAccountCouponDetail(isReceived: isReceived, code: code, accountId: accountId, couponId: couponId), handler: self.after) + case "autogen_patchAccountCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let userId = (args["user_id"] ?? args["userId"]) as! String - let token = args["token"] as! String + let isReceived = (args["is_received"] ?? args["isReceived"]) as? Bool + let code = args["code"] as? String let accountId = (args["account_id"] ?? args["accountId"]) as! String - let amount = args["amount"] as! Int - let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String - let isCardholderNameSpecified = (args["is_cardholder_name_specified"] ?? args["isCardholderNameSpecified"]) as? Bool - let requestId = (args["request_id"] ?? args["requestId"]) as? String - let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int - client.send(BankAPI.CreditCard.TopupWithCreditCardMdkToken(userId: userId, token: token, accountId: accountId, amount: amount, organizationCode: organizationCode, isCardholderNameSpecified: isCardholderNameSpecified, requestId: requestId, topupQuotaId: topupQuotaId), handler: self.after) - case "getCvsAuthorizations": + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Account.PatchAccountCouponDetail(isReceived: isReceived, code: code, accountId: accountId, couponId: couponId), handler: self.after) + case "getCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let accountId = (args["account_id"] ?? args["accountId"]) as! String - let before = args["before"] as? String - let after = args["after"] as? String - let perPage = (args["per_page"] ?? args["perPage"]) as? Int - client.send(BankAPI.Cvs.GetCvsAuthorizations(accountId: accountId, before: before, after: after, perPage: perPage), handler: self.after) - case "cvsAuthorizeRequest": + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Coupon.GetCouponDetail(couponId: couponId), handler: self.after) + case "autogen_getCouponDetail": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) - let serviceOptionType = (args["service_option_type"] ?? args["serviceOptionType"]) as! String - let amount = args["amount"] as! Int - let name1 = args["name1"] as! String - let name2 = args["name2"] as! String - let tel = args["tel"] as! String - let topupQuotaId = (args["topup_quota_id"] ?? args["topupQuotaId"]) as? Int - let accountId = (args["account_id"] ?? args["accountId"]) as! String - client.send(BankAPI.Cvs.CvsAuthorizeRequest(serviceOptionType: serviceOptionType, amount: amount, name1: name1, name2: name2, tel: tel, topupQuotaId: topupQuotaId, accountId: accountId), handler: self.after) - case "cancelCvsAuthorization": + let couponId = (args["coupon_id"] ?? args["couponId"]) as! String + client.send(BankAPI.Coupon.GetCouponDetail(couponId: couponId), handler: self.after) + case "getAccountIndividualNumberIdentification": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let accountId = (args["account_id"] ?? args["accountId"]) as! String - let orderId = (args["order_id"] ?? args["orderId"]) as! String - client.send(BankAPI.Cvs.CancelCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) - case "getCvsAuthorization": + client.send(BankAPI.Account.GetAccountIndividualNumberIdentification(accountId: accountId), handler: self.after) + case "autogen_getAccountIndividualNumberIdentification": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let accountId = (args["account_id"] ?? args["accountId"]) as! String - let orderId = (args["order_id"] ?? args["orderId"]) as! String - client.send(BankAPI.Cvs.GetCvsAuthorization(accountId: accountId, orderId: orderId), handler: self.after) - case "getAccountIndividualNumberIdentification": + client.send(BankAPI.Account.GetAccountIndividualNumberIdentification(accountId: accountId), handler: self.after) + case "identifyIndividual": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) + let signature = args["signature"] as! String + let signingCert = (args["signing_cert"] ?? args["signingCert"]) as! String + let expectedHash = (args["expected_hash"] ?? args["expectedHash"]) as! String + let name = args["name"] as? String + let gender = args["gender"] as? String + let address = args["address"] as? String + let dateOfBirth = (args["date_of_birth"] ?? args["dateOfBirth"]) as? String let accountId = (args["account_id"] ?? args["accountId"]) as! String - client.send(BankAPI.Account.GetAccountIndividualNumberIdentification(accountId: accountId), handler: self.after) - case "identifyIndividual": + client.send(BankAPI.Account.IdentifyIndividual(signature: signature, signingCert: signingCert, expectedHash: expectedHash, name: name, gender: gender, address: address, dateOfBirth: dateOfBirth, accountId: accountId), handler: self.after) + case "autogen_identifyIndividual": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) @@ -153,6 +948,20 @@ extension MethodCallTask { let dateOfBirth = (args["date_of_birth"] ?? args["dateOfBirth"]) as? String let accountId = (args["account_id"] ?? args["accountId"]) as! String client.send(BankAPI.Account.IdentifyIndividual(signature: signature, signingCert: signingCert, expectedHash: expectedHash, name: name, gender: gender, address: address, dateOfBirth: dateOfBirth, accountId: accountId), handler: self.after) + case "getAccountCampaignPointAmounts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let campaignId = (args["campaign_id"] ?? args["campaignId"]) as! String + client.send(BankAPI.Campaign.GetAccountCampaignPointAmounts(accountId: accountId, campaignId: campaignId), handler: self.after) + case "autogen_getAccountCampaignPointAmounts": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let campaignId = (args["campaign_id"] ?? args["campaignId"]) as! String + client.send(BankAPI.Campaign.GetAccountCampaignPointAmounts(accountId: accountId, campaignId: campaignId), handler: self.after) case "getAccountTopupQuotas": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String @@ -164,12 +973,139 @@ extension MethodCallTask { let isWithinApplicablePeriod = (args["is_within_applicable_period"] ?? args["isWithinApplicablePeriod"]) as? Bool let isUsableAmountLeft = (args["is_usable_amount_left"] ?? args["isUsableAmountLeft"]) as? Bool client.send(BankAPI.Account.GetAccountTopupQuotas(accountId: accountId, status: status, showExpiredForFixedPeriod: showExpiredForFixedPeriod, showStartedQuotas: showStartedQuotas, isWithinApplicablePeriod: isWithinApplicablePeriod, isUsableAmountLeft: isUsableAmountLeft), handler: self.after) + case "autogen_getAccountTopupQuotas": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let status = args["status"] as? String + let showExpiredForFixedPeriod = (args["show_expired_for_fixed_period"] ?? args["showExpiredForFixedPeriod"]) as? Bool + let showStartedQuotas = (args["show_started_quotas"] ?? args["showStartedQuotas"]) as? Bool + let isWithinApplicablePeriod = (args["is_within_applicable_period"] ?? args["isWithinApplicablePeriod"]) as? Bool + let isUsableAmountLeft = (args["is_usable_amount_left"] ?? args["isUsableAmountLeft"]) as? Bool + client.send(BankAPI.Account.GetAccountTopupQuotas(accountId: accountId, status: status, showExpiredForFixedPeriod: showExpiredForFixedPeriod, showStartedQuotas: showStartedQuotas, isWithinApplicablePeriod: isWithinApplicablePeriod, isUsableAmountLeft: isUsableAmountLeft), handler: self.after) case "getAccountTopupStats": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let accountId = (args["account_id"] ?? args["accountId"]) as! String client.send(BankAPI.Account.GetAccountTopupStats(accountId: accountId), handler: self.after) + case "autogen_getAccountTopupStats": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let accountId = (args["account_id"] ?? args["accountId"]) as! String + client.send(BankAPI.Account.GetAccountTopupStats(accountId: accountId), handler: self.after) + case "getCpmToken": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cpmToken = (args["cpm_token"] ?? args["cpmToken"]) as! String + client.send(BankAPI.Cpm.GetCpmToken(cpmToken: cpmToken), handler: self.after) + case "autogen_getCpmToken": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let cpmToken = (args["cpm_token"] ?? args["cpmToken"]) as! String + client.send(BankAPI.Cpm.GetCpmToken(cpmToken: cpmToken), handler: self.after) + case "getPrivateMoney": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoney(privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getPrivateMoney": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoney(privateMoneyId: privateMoneyId), handler: self.after) + case "getPrivateMoneyCoupons": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Coupon.GetPrivateMoneyCoupons(privateMoneyId: privateMoneyId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getPrivateMoneyCoupons": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Coupon.GetPrivateMoneyCoupons(privateMoneyId: privateMoneyId, before: before, after: after, perPage: perPage), handler: self.after) + case "getPrivateMoneyTerms": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyTerms(privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getPrivateMoneyTerms": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyTerms(privateMoneyId: privateMoneyId), handler: self.after) + case "getPrivateMoneyPrivacyPolicy": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyPrivacyPolicy(privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getPrivateMoneyPrivacyPolicy": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyPrivacyPolicy(privateMoneyId: privateMoneyId), handler: self.after) + case "getPrivateMoneyPaymentAct": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyPaymentAct(privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getPrivateMoneyPaymentAct": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyPaymentAct(privateMoneyId: privateMoneyId), handler: self.after) + case "getPrivateMoneyCommercialAct": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyCommercialAct(privateMoneyId: privateMoneyId), handler: self.after) + case "autogen_getPrivateMoneyCommercialAct": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + client.send(BankAPI.PrivateMoney.GetPrivateMoneyCommercialAct(privateMoneyId: privateMoneyId), handler: self.after) + case "searchPrivateMoneys": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let includeExclusive = (args["include_exclusive"] ?? args["includeExclusive"]) as? Bool + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.PrivateMoney.SearchPrivateMoneys(name: name, includeExclusive: includeExclusive, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_searchPrivateMoneys": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let name = args["name"] as? String + let includeExclusive = (args["include_exclusive"] ?? args["includeExclusive"]) as? Bool + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.PrivateMoney.SearchPrivateMoneys(name: name, includeExclusive: includeExclusive, before: before, after: after, perPage: perPage), handler: self.after) case "createJihanpiTransaction": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String @@ -179,35 +1115,75 @@ extension MethodCallTask { let requestId = (args["request_id"] ?? args["requestId"]) as? String let strategy = args["strategy"] as? String client.send(BankAPI.Jihanpi.CreateJihanpiTransaction(nfcTagId: nfcTagId, accountId: accountId, requestId: requestId, strategy: strategy), handler: self.after) + case "autogen_createJihanpiTransaction": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let nfcTagId = (args["nfc_tag_id"] ?? args["nfcTagId"]) as! String + let accountId = (args["account_id"] ?? args["accountId"]) as! String + let requestId = (args["request_id"] ?? args["requestId"]) as? String + let strategy = args["strategy"] as? String + client.send(BankAPI.Jihanpi.CreateJihanpiTransaction(nfcTagId: nfcTagId, accountId: accountId, requestId: requestId, strategy: strategy), handler: self.after) case "getJihanpiTransactionByOrderId": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let orderId = (args["order_id"] ?? args["orderId"]) as! String client.send(BankAPI.Jihanpi.GetJihanpiTransactionByOrderId(orderId: orderId), handler: self.after) + case "autogen_getJihanpiTransactionByOrderId": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let orderId = (args["order_id"] ?? args["orderId"]) as! String + client.send(BankAPI.Jihanpi.GetJihanpiTransactionByOrderId(orderId: orderId), handler: self.after) case "getJihanpiTransactionByRequestId": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let requestId = (args["request_id"] ?? args["requestId"]) as! String client.send(BankAPI.Jihanpi.GetJihanpiTransactionByRequestId(requestId: requestId), handler: self.after) + case "autogen_getJihanpiTransactionByRequestId": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let requestId = (args["request_id"] ?? args["requestId"]) as! String + client.send(BankAPI.Jihanpi.GetJihanpiTransactionByRequestId(requestId: requestId), handler: self.after) case "getDetailedShopInformation": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let shopId = (args["shop_id"] ?? args["shopId"]) as! String client.send(BankAPI.Shop.GetDetailedShopInformation(shopId: shopId), handler: self.after) + case "autogen_getDetailedShopInformation": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let shopId = (args["shop_id"] ?? args["shopId"]) as! String + client.send(BankAPI.Shop.GetDetailedShopInformation(shopId: shopId), handler: self.after) case "getListOfShops": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String let client = Pokepay.Client(accessToken: accessToken, env: env) let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let name = args["name"] as? String + let userTagGroupItemId = (args["user_tag_group_item_id"] ?? args["userTagGroupItemId"]) as? String + let userTagSubgroupId = (args["user_tag_subgroup_id"] ?? args["userTagSubgroupId"]) as? String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.Shop.GetListOfShops(privateMoneyId: privateMoneyId, name: name, userTagGroupItemId: userTagGroupItemId, userTagSubgroupId: userTagSubgroupId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getListOfShops": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let name = args["name"] as? String let userTagGroupItemId = (args["user_tag_group_item_id"] ?? args["userTagGroupItemId"]) as? String let userTagSubgroupId = (args["user_tag_subgroup_id"] ?? args["userTagSubgroupId"]) as? String let before = args["before"] as? String let after = args["after"] as? String let perPage = (args["per_page"] ?? args["perPage"]) as? Int - client.send(BankAPI.Shop.GetListOfShops(privateMoneyId: privateMoneyId, userTagGroupItemId: userTagGroupItemId, userTagSubgroupId: userTagSubgroupId, before: before, after: after, perPage: perPage), handler: self.after) + client.send(BankAPI.Shop.GetListOfShops(privateMoneyId: privateMoneyId, name: name, userTagGroupItemId: userTagGroupItemId, userTagSubgroupId: userTagSubgroupId, before: before, after: after, perPage: perPage), handler: self.after) case "getUserTagGroups": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String @@ -217,6 +1193,15 @@ extension MethodCallTask { let after = args["after"] as? String let perPage = (args["per_page"] ?? args["perPage"]) as? Int client.send(BankAPI.UserTag.GetUserTagGroups(privateMoneyId: privateMoneyId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getUserTagGroups": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let privateMoneyId = (args["private_money_id"] ?? args["privateMoneyId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.UserTag.GetUserTagGroups(privateMoneyId: privateMoneyId, before: before, after: after, perPage: perPage), handler: self.after) case "getUserTagGroupItems": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String @@ -228,6 +1213,17 @@ extension MethodCallTask { let after = args["after"] as? String let perPage = (args["per_page"] ?? args["perPage"]) as? Int client.send(BankAPI.UserTag.GetUserTagGroupItems(organizationCode: organizationCode, tagGroupId: tagGroupId, subgroupId: subgroupId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getUserTagGroupItems": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let tagGroupId = (args["tag_group_id"] ?? args["tagGroupId"]) as! String + let subgroupId = (args["subgroup_id"] ?? args["subgroupId"]) as? String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.UserTag.GetUserTagGroupItems(organizationCode: organizationCode, tagGroupId: tagGroupId, subgroupId: subgroupId, before: before, after: after, perPage: perPage), handler: self.after) case "getUserTagSubgroups": let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) let accessToken = args["accessToken"] as! String @@ -238,6 +1234,16 @@ extension MethodCallTask { let after = args["after"] as? String let perPage = (args["per_page"] ?? args["perPage"]) as? Int client.send(BankAPI.UserTag.GetUserTagSubgroups(organizationCode: organizationCode, tagGroupId: tagGroupId, before: before, after: after, perPage: perPage), handler: self.after) + case "autogen_getUserTagSubgroups": + let env = flutterEnvToSDKEnv(ienv: args["env"] as! Int32) + let accessToken = args["accessToken"] as! String + let client = Pokepay.Client(accessToken: accessToken, env: env) + let organizationCode = (args["organization_code"] ?? args["organizationCode"]) as! String + let tagGroupId = (args["tag_group_id"] ?? args["tagGroupId"]) as! String + let before = args["before"] as? String + let after = args["after"] as? String + let perPage = (args["per_page"] ?? args["perPage"]) as? Int + client.send(BankAPI.UserTag.GetUserTagSubgroups(organizationCode: organizationCode, tagGroupId: tagGroupId, before: before, after: after, perPage: perPage), handler: self.after) default: return false } diff --git a/lib/generated/bank_api/account.dart b/lib/generated/bank_api/account.dart index 90db244..8209860 100644 --- a/lib/generated/bank_api/account.dart +++ b/lib/generated/bank_api/account.dart @@ -3,12 +3,230 @@ import '../../pokepay_sdk.dart'; import '../responses.dart'; extension AccountAPI on PokepayAPI { + Future getAccount({ + required String accountId, + }) async { + return await invokeMethod( + (j) => AccountDetail.fromJson(j), + 'autogen_getAccount', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + }, + ); + } + + Future updateAccount({ + required String accountId, + String? name, + }) async { + return await invokeMethod( + (j) => AccountDetail.fromJson(j), + 'autogen_updateAccount', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + 'name': name, + }, + ); + } + + Future createAccount({ + String? name, + required String privateMoneyId, + String? externalId, + }) async { + return await invokeMethod( + (j) => AccountDetail.fromJson(j), + 'autogen_createAccount', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'name': name, + 'private_money_id': privateMoneyId, + 'external_id': externalId, + }, + ); + } + + Future getAccountTransactions({ + required String accountId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedAccountTransactions.fromJson(j), + 'autogen_getAccountTransactions', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + + Future sendToAccount({ + required String accountId, + String? receiverTerminalId, + String? senderAccountId, + required double amount, + String? description, + }) async { + return await invokeMethod( + (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 getAccountTransfers({ + required String accountId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedAccountTransfers.fromJson(j), + 'autogen_getAccountTransfers', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + + Future getAccountBalances({ + required String accountId, + String? before, + String? after, + int? perPage, + String? expired, + }) async { + return await invokeMethod( + (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 createAccountCpmToken({ + required String accountId, + List? scopes, + int? expiresIn, + String? metadata, + bool? keepAlive, + bool? isShortToken, + String? strategy, + String? couponId, + }) async { + return await invokeMethod( + (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 getAccountCoupons({ + required String accountId, + String? isAvailable, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (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 getAccountCouponDetail({ + required String accountId, + required String couponId, + }) async { + return await invokeMethod( + (j) => CouponDetail.fromJson(j), + 'autogen_getAccountCouponDetail', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + 'coupon_id': couponId, + }, + ); + } + + Future patchAccountCouponDetail({ + required String accountId, + required String couponId, + bool? isReceived, + String? code, + }) async { + return await invokeMethod( + (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 getAccountIndividualNumberIdentification({ required String accountId, }) async { return await invokeMethod( (j) => IndividualNumberIdentificationStatus.fromJson(j), - 'getAccountIndividualNumberIdentification', + 'autogen_getAccountIndividualNumberIdentification', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -29,7 +247,7 @@ extension AccountAPI on PokepayAPI { }) async { return await invokeMethod( (j) => IdentificationResult.fromJson(j), - 'identifyIndividual', + 'autogen_identifyIndividual', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -55,7 +273,7 @@ extension AccountAPI on PokepayAPI { }) async { return await invokeMethod( (j) => AccountTopupQuotas.fromJson(j), - 'getAccountTopupQuotas', + 'autogen_getAccountTopupQuotas', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -74,7 +292,7 @@ extension AccountAPI on PokepayAPI { }) async { return await invokeMethod( (j) => AccountTopupStats.fromJson(j), - 'getAccountTopupStats', + 'autogen_getAccountTopupStats', { 'env': this.env.index, 'accessToken': this.accessToken, diff --git a/lib/generated/bank_api/bank.dart b/lib/generated/bank_api/bank.dart new file mode 100644 index 0000000..973ec72 --- /dev/null +++ b/lib/generated/bank_api/bank.dart @@ -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 deleteBankPay({ + required String userId, + required String bankId, + }) async { + return await invokeMethod( + (j) => NoContent.fromJson(j), + 'autogen_deleteBankPay', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'bank_id': bankId, + }, + ); + } + + Future createBankPay({ + required String userId, + required String privateMoneyId, + required String callbackUrl, + String? kana, + }) async { + return await invokeMethod( + (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 bankPayTopUp({ + required String userId, + required String accountId, + required String bankId, + required int amount, + String? requestId, + int? topupQuotaId, + }) async { + return await invokeMethod( + (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, + }, + ); + } + +} diff --git a/lib/generated/bank_api/bill.dart b/lib/generated/bank_api/bill.dart new file mode 100644 index 0000000..36b7acb --- /dev/null +++ b/lib/generated/bank_api/bill.dart @@ -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 deleteBill({ + required String billId, + }) async { + return await invokeMethod( + (j) => NoContent.fromJson(j), + 'autogen_deleteBill', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'bill_id': billId, + }, + ); + } + + Future getBill({ + required String billId, + String? privateMoneyId, + }) async { + return await invokeMethod( + (j) => BillWithAdditionalPrivateMoneys.fromJson(j), + 'autogen_getBill', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'bill_id': billId, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future getBillTransactions({ + required String billId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedBillTransactions.fromJson(j), + 'autogen_getBillTransactions', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'bill_id': billId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + +} diff --git a/lib/generated/bank_api/campaign.dart b/lib/generated/bank_api/campaign.dart new file mode 100644 index 0000000..5a702e2 --- /dev/null +++ b/lib/generated/bank_api/campaign.dart @@ -0,0 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension CampaignAPI on PokepayAPI { + Future getAccountCampaignPointAmounts({ + required String accountId, + required String campaignId, + }) async { + return await invokeMethod( + (j) => AccountCampaignPointAmounts.fromJson(j), + 'autogen_getAccountCampaignPointAmounts', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'account_id': accountId, + 'campaign_id': campaignId, + }, + ); + } + +} diff --git a/lib/generated/bank_api/cashtray.dart b/lib/generated/bank_api/cashtray.dart new file mode 100644 index 0000000..20d3ef0 --- /dev/null +++ b/lib/generated/bank_api/cashtray.dart @@ -0,0 +1,49 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../../responses.dart' show NoContent; +import '../responses.dart'; + +extension CashtrayAPI on PokepayAPI { + Future deleteCashtray({ + required String cashtrayId, + }) async { + return await invokeMethod( + (j) => NoContent.fromJson(j), + 'autogen_deleteCashtray', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'cashtray_id': cashtrayId, + }, + ); + } + + Future getCashtray({ + required String cashtrayId, + }) async { + return await invokeMethod( + (j) => CashtrayWithAttemptAndTransaction.fromJson(j), + 'autogen_getCashtray', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'cashtray_id': cashtrayId, + }, + ); + } + + Future getCashtrayAttempts({ + required String cashtrayId, + }) async { + return await invokeMethod( + (j) => CashtrayAttempts.fromJson(j), + 'autogen_getCashtrayAttempts', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'cashtray_id': cashtrayId, + }, + ); + } + +} diff --git a/lib/generated/bank_api/check.dart b/lib/generated/bank_api/check.dart new file mode 100644 index 0000000..c23d3d2 --- /dev/null +++ b/lib/generated/bank_api/check.dart @@ -0,0 +1,93 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../../responses.dart' show NoContent; +import '../responses.dart'; + +extension CheckAPI on PokepayAPI { + Future deleteCheck({ + required String checkId, + }) async { + return await invokeMethod( + (j) => NoContent.fromJson(j), + 'autogen_deleteCheck', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'check_id': checkId, + }, + ); + } + + Future getCheck({ + required String checkId, + }) async { + return await invokeMethod( + (j) => Check.fromJson(j), + 'autogen_getCheck', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'check_id': checkId, + }, + ); + } + + Future updateCheck({ + required String checkId, + double? amount, + String? description, + String? expiresAt, + String? pointExpiresAt, + int? pointExpiresInDays, + }) async { + return await invokeMethod( + (j) => Check.fromJson(j), + 'autogen_updateCheck', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'check_id': checkId, + 'amount': amount, + 'description': description, + 'expires_at': expiresAt, + 'point_expires_at': pointExpiresAt, + 'point_expires_in_days': pointExpiresInDays, + }, + ); + } + + Future createCheck({ + double? amount, + double? moneyAmount, + double? pointAmount, + String? accountId, + String? description, + bool? isOnetime, + int? usageLimit, + String? expiresAt, + String? pointExpiresAt, + int? pointExpiresInDays, + String? metadata, + }) async { + return await invokeMethod( + (j) => Check.fromJson(j), + 'autogen_createCheck', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'amount': amount, + 'money_amount': moneyAmount, + 'point_amount': pointAmount, + 'account_id': accountId, + 'description': description, + 'is_onetime': isOnetime, + 'usage_limit': usageLimit, + 'expires_at': expiresAt, + 'point_expires_at': pointExpiresAt, + 'point_expires_in_days': pointExpiresInDays, + 'metadata': metadata, + }, + ); + } + +} diff --git a/lib/generated/bank_api/coupon.dart b/lib/generated/bank_api/coupon.dart new file mode 100644 index 0000000..cda3fee --- /dev/null +++ b/lib/generated/bank_api/coupon.dart @@ -0,0 +1,40 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension CouponAPI on PokepayAPI { + Future getCouponDetail({ + required String couponId, + }) async { + return await invokeMethod( + (j) => CouponInfo.fromJson(j), + 'autogen_getCouponDetail', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'coupon_id': couponId, + }, + ); + } + + Future getPrivateMoneyCoupons({ + required String privateMoneyId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedPrivateMoneyCoupons.fromJson(j), + 'autogen_getPrivateMoneyCoupons', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + +} diff --git a/lib/generated/bank_api/cpm.dart b/lib/generated/bank_api/cpm.dart new file mode 100644 index 0000000..1a67319 --- /dev/null +++ b/lib/generated/bank_api/cpm.dart @@ -0,0 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension CpmAPI on PokepayAPI { + Future getCpmToken({ + required String cpmToken, + }) async { + return await invokeMethod( + (j) => CpmToken.fromJson(j), + 'autogen_getCpmToken', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'cpm_token': cpmToken, + }, + ); + } + +} diff --git a/lib/generated/bank_api/credit_card.dart b/lib/generated/bank_api/credit_card.dart index a207677..a68ec63 100644 --- a/lib/generated/bank_api/credit_card.dart +++ b/lib/generated/bank_api/credit_card.dart @@ -13,7 +13,7 @@ extension CreditCardAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedCreditCards.fromJson(j), - 'getCreditCards', + 'autogen_getCreditCards', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -34,7 +34,7 @@ extension CreditCardAPI on PokepayAPI { }) async { return await invokeMethod( (j) => CreditCard.fromJson(j), - 'createCreditCard', + 'autogen_createCreditCard', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -54,7 +54,51 @@ extension CreditCardAPI on PokepayAPI { }) async { return await invokeMethod( (j) => NoContent.fromJson(j), - 'deleteCreditCard', + 'autogen_deleteCreditCard', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'card_registered_at': cardRegisteredAt, + 'card_uuid': cardUuid, + 'organization_code': organizationCode, + }, + ); + } + + Future topupWithCreditCard({ + required String userId, + required String accountId, + required int amount, + String? cardRegisteredAt, + String? cardUuid, + String? organizationCode, + }) async { + return await invokeMethod( + (j) => UserTransaction.fromJson(j), + 'autogen_topupWithCreditCard', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'account_id': accountId, + 'amount': amount, + 'card_registered_at': cardRegisteredAt, + 'card_uuid': cardUuid, + 'organization_code': organizationCode, + }, + ); + } + + Future creditWithCreditCardMembership({ + required String userId, + String? cardRegisteredAt, + String? cardUuid, + String? organizationCode, + }) async { + return await invokeMethod( + (j) => j as String, + 'autogen_creditWithCreditCardMembership', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -79,7 +123,7 @@ extension CreditCardAPI on PokepayAPI { }) async { return await invokeMethod( (j) => j as String, - 'topupWithCreditCardMembership', + 'autogen_topupWithCreditCardMembership', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -108,7 +152,7 @@ extension CreditCardAPI on PokepayAPI { }) async { return await invokeMethod( (j) => j as String, - 'topupWithCreditCardMdkToken', + 'autogen_topupWithCreditCardMdkToken', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -124,4 +168,18 @@ extension CreditCardAPI on PokepayAPI { ); } + Future getVeritransMdkTokenApiKey({ + String? organizationCode, + }) async { + return await invokeMethod( + (j) => VeritransMdkTokenApiKey.fromJson(j), + 'autogen_getVeritransMdkTokenApiKey', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'organization_code': organizationCode, + }, + ); + } + } diff --git a/lib/generated/bank_api/cvs.dart b/lib/generated/bank_api/cvs.dart index 5e8e10d..1f44f84 100644 --- a/lib/generated/bank_api/cvs.dart +++ b/lib/generated/bank_api/cvs.dart @@ -12,7 +12,7 @@ extension CvsAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedCvsAuthorizations.fromJson(j), - 'getCvsAuthorizations', + 'autogen_getCvsAuthorizations', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -35,7 +35,7 @@ extension CvsAPI on PokepayAPI { }) async { return await invokeMethod( (j) => CvsAuthorization.fromJson(j), - 'cvsAuthorizeRequest', + 'autogen_cvsAuthorizeRequest', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -56,7 +56,7 @@ extension CvsAPI on PokepayAPI { }) async { return await invokeMethod( (j) => NoContent.fromJson(j), - 'cancelCvsAuthorization', + 'autogen_cancelCvsAuthorization', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -72,7 +72,7 @@ extension CvsAPI on PokepayAPI { }) async { return await invokeMethod( (j) => CvsAuthorization.fromJson(j), - 'getCvsAuthorization', + 'autogen_getCvsAuthorization', { 'env': this.env.index, 'accessToken': this.accessToken, diff --git a/lib/generated/bank_api/jihanpi.dart b/lib/generated/bank_api/jihanpi.dart index edc6193..8bca38d 100644 --- a/lib/generated/bank_api/jihanpi.dart +++ b/lib/generated/bank_api/jihanpi.dart @@ -11,7 +11,7 @@ extension JihanpiAPI on PokepayAPI { }) async { return await invokeMethod( (j) => JihanpiTransaction.fromJson(j), - 'createJihanpiTransaction', + 'autogen_createJihanpiTransaction', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -28,7 +28,7 @@ extension JihanpiAPI on PokepayAPI { }) async { return await invokeMethod( (j) => JihanpiTransaction.fromJson(j), - 'getJihanpiTransactionByOrderId', + 'autogen_getJihanpiTransactionByOrderId', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -42,7 +42,7 @@ extension JihanpiAPI on PokepayAPI { }) async { return await invokeMethod( (j) => JihanpiTransaction.fromJson(j), - 'getJihanpiTransactionByRequestId', + 'autogen_getJihanpiTransactionByRequestId', { 'env': this.env.index, 'accessToken': this.accessToken, diff --git a/lib/generated/bank_api/merchants.dart b/lib/generated/bank_api/merchants.dart new file mode 100644 index 0000000..d3aa6fd --- /dev/null +++ b/lib/generated/bank_api/merchants.dart @@ -0,0 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension MerchantsAPI on PokepayAPI { + Future getMerchantTransaction({ + required String transactionId, + }) async { + return await invokeMethod( + (j) => UserTransactionWithCustomerBalance.fromJson(j), + 'autogen_getMerchantTransaction', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'transaction_id': transactionId, + }, + ); + } + +} diff --git a/lib/generated/bank_api/private_money.dart b/lib/generated/bank_api/private_money.dart new file mode 100644 index 0000000..f0b9c2e --- /dev/null +++ b/lib/generated/bank_api/private_money.dart @@ -0,0 +1,98 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension PrivateMoneyAPI on PokepayAPI { + Future getPrivateMoney({ + required String privateMoneyId, + }) async { + return await invokeMethod( + (j) => PrivateMoneyDetail.fromJson(j), + 'autogen_getPrivateMoney', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future getPrivateMoneyTerms({ + required String privateMoneyId, + }) async { + return await invokeMethod( + (j) => PrivateMoneyLegalText.fromJson(j), + 'autogen_getPrivateMoneyTerms', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future getPrivateMoneyPrivacyPolicy({ + required String privateMoneyId, + }) async { + return await invokeMethod( + (j) => PrivateMoneyLegalText.fromJson(j), + 'autogen_getPrivateMoneyPrivacyPolicy', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future getPrivateMoneyPaymentAct({ + required String privateMoneyId, + }) async { + return await invokeMethod( + (j) => PrivateMoneyLegalText.fromJson(j), + 'autogen_getPrivateMoneyPaymentAct', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future getPrivateMoneyCommercialAct({ + required String privateMoneyId, + }) async { + return await invokeMethod( + (j) => PrivateMoneyLegalText.fromJson(j), + 'autogen_getPrivateMoneyCommercialAct', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'private_money_id': privateMoneyId, + }, + ); + } + + Future searchPrivateMoneys({ + String? name, + bool? includeExclusive, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedPrivateMoneys.fromJson(j), + 'autogen_searchPrivateMoneys', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'name': name, + 'include_exclusive': includeExclusive, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + +} diff --git a/lib/generated/bank_api/shop.dart b/lib/generated/bank_api/shop.dart index cf67703..f5f0270 100644 --- a/lib/generated/bank_api/shop.dart +++ b/lib/generated/bank_api/shop.dart @@ -8,7 +8,7 @@ extension ShopAPI on PokepayAPI { }) async { return await invokeMethod( (j) => DetailedShopInformation.fromJson(j), - 'getDetailedShopInformation', + 'autogen_getDetailedShopInformation', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -19,6 +19,7 @@ extension ShopAPI on PokepayAPI { Future getListOfShops({ required String privateMoneyId, + String? name, String? userTagGroupItemId, String? userTagSubgroupId, String? before, @@ -27,11 +28,12 @@ extension ShopAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedShops.fromJson(j), - 'getListOfShops', + 'autogen_getListOfShops', { 'env': this.env.index, 'accessToken': this.accessToken, 'private_money_id': privateMoneyId, + 'name': name, 'user_tag_group_item_id': userTagGroupItemId, 'user_tag_subgroup_id': userTagSubgroupId, 'before': before, diff --git a/lib/generated/bank_api/terminal.dart b/lib/generated/bank_api/terminal.dart new file mode 100644 index 0000000..b982b1e --- /dev/null +++ b/lib/generated/bank_api/terminal.dart @@ -0,0 +1,51 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../responses.dart'; + +extension TerminalAPI on PokepayAPI { + Future getTerminalById({ + required String terminalId, + }) async { + return await invokeMethod( + (j) => Terminal.fromJson(j), + 'autogen_getTerminalById', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'terminal_id': terminalId, + }, + ); + } + + Future getTerminal() async { + return await invokeMethod( + (j) => Terminal.fromJson(j), + 'autogen_getTerminal', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + }, + ); + } + + Future updateTerminal({ + String? name, + String? accountId, + String? pushService, + String? pushToken, + }) async { + return await invokeMethod( + (j) => Terminal.fromJson(j), + 'autogen_updateTerminal', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'name': name, + 'account_id': accountId, + 'push_service': pushService, + 'push_token': pushToken, + }, + ); + } + +} diff --git a/lib/generated/bank_api/transaction.dart b/lib/generated/bank_api/transaction.dart index 7d0f6b8..62e1d79 100644 --- a/lib/generated/bank_api/transaction.dart +++ b/lib/generated/bank_api/transaction.dart @@ -3,12 +3,26 @@ import '../../pokepay_sdk.dart'; import '../responses.dart'; extension TransactionAPI on PokepayAPI { + Future getTransaction({ + required String transactionId, + }) async { + return await invokeMethod( + (j) => UserTransactionWithTransfers.fromJson(j), + 'autogen_getTransaction', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'transaction_id': transactionId, + }, + ); + } + Future getTransactionByRequestId({ required String requestId, }) async { return await invokeMethod( (j) => UserTransactionWithTransfers.fromJson(j), - 'getTransactionByRequestId', + 'autogen_getTransactionByRequestId', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -17,7 +31,23 @@ extension TransactionAPI on PokepayAPI { ); } - Future createCashtrayTransaction({ + Future refundTransaction({ + required String transactionId, + double? amount, + }) async { + return await invokeMethod( + (j) => UserTransaction.fromJson(j), + 'autogen_refundTransaction', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'transaction_id': transactionId, + 'amount': amount, + }, + ); + } + + Future createTransactionWithCashtray({ required String requestId, required String cashtrayId, String? accountId, @@ -27,7 +57,7 @@ extension TransactionAPI on PokepayAPI { }) async { return await invokeMethod( (j) => UserTransactionWithFallback.fromJson(j), - 'createCashtrayTransaction', + 'autogen_createTransactionWithCashtray', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -41,7 +71,7 @@ extension TransactionAPI on PokepayAPI { ); } - Future createBillTransaction({ + Future createTransactionWithBill({ required String requestId, required String billId, String? accountId, @@ -51,7 +81,7 @@ extension TransactionAPI on PokepayAPI { }) async { return await invokeMethod( (j) => UserTransactionWithFallback.fromJson(j), - 'createBillTransaction', + 'autogen_createTransactionWithBill', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -65,7 +95,7 @@ extension TransactionAPI on PokepayAPI { ); } - Future createCheckTransaction({ + Future createTransactionWithCheck({ String? requestId, required String checkId, String? accountId, @@ -73,7 +103,7 @@ extension TransactionAPI on PokepayAPI { }) async { return await invokeMethod( (j) => UserTransactionWithFallback.fromJson(j), - 'createCheckTransaction', + 'autogen_createTransactionWithCheck', { 'env': this.env.index, 'accessToken': this.accessToken, diff --git a/lib/generated/bank_api/user.dart b/lib/generated/bank_api/user.dart new file mode 100644 index 0000000..c036496 --- /dev/null +++ b/lib/generated/bank_api/user.dart @@ -0,0 +1,116 @@ +// DO NOT EDIT: File is generated by code generator. +import '../../pokepay_sdk.dart'; +import '../../responses.dart' show NoContent; +import '../responses.dart'; + +extension UserAPI on PokepayAPI { + Future deleteUser({ + required String userId, + }) async { + return await invokeMethod( + (j) => NoContent.fromJson(j), + 'autogen_deleteUser', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + }, + ); + } + + Future getUser({ + required String userId, + }) async { + return await invokeMethod( + (j) => UserWithDetails.fromJson(j), + 'autogen_getUser', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + }, + ); + } + + Future updateUser({ + required String userId, + String? name, + }) async { + return await invokeMethod( + (j) => UserWithDetails.fromJson(j), + 'autogen_updateUser', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'name': name, + }, + ); + } + + Future getUserWithAuthFactors({ + required String userId, + }) async { + return await invokeMethod( + (j) => UserWithAuthFactors.fromJson(j), + 'autogen_getUserWithAuthFactors', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + }, + ); + } + + Future getUserTransactions({ + required String userId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedUserTransactions.fromJson(j), + 'autogen_getUserTransactions', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + + Future getUserAccounts({ + required String userId, + String? before, + String? after, + int? perPage, + }) async { + return await invokeMethod( + (j) => PaginatedUserAccounts.fromJson(j), + 'autogen_getUserAccounts', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + 'user_id': userId, + 'before': before, + 'after': after, + 'per_page': perPage, + }, + ); + } + + Future getUserSettingUrl() async { + return await invokeMethod( + (j) => OauthFullAccessUrl.fromJson(j), + 'autogen_getUserSettingUrl', + { + 'env': this.env.index, + 'accessToken': this.accessToken, + }, + ); + } + +} diff --git a/lib/generated/bank_api/user_tag.dart b/lib/generated/bank_api/user_tag.dart index c89f2bb..264acb6 100644 --- a/lib/generated/bank_api/user_tag.dart +++ b/lib/generated/bank_api/user_tag.dart @@ -11,7 +11,7 @@ extension UserTagAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedUserTagGroups.fromJson(j), - 'getUserTagGroups', + 'autogen_getUserTagGroups', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -33,7 +33,7 @@ extension UserTagAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedUserTagGroupItems.fromJson(j), - 'getUserTagGroupItems', + 'autogen_getUserTagGroupItems', { 'env': this.env.index, 'accessToken': this.accessToken, @@ -56,7 +56,7 @@ extension UserTagAPI on PokepayAPI { }) async { return await invokeMethod( (j) => PaginatedUserTagSubgroups.fromJson(j), - 'getUserTagSubgroups', + 'autogen_getUserTagSubgroups', { 'env': this.env.index, 'accessToken': this.accessToken, diff --git a/lib/generated/responses.dart b/lib/generated/responses.dart index d58760c..00a7ba9 100644 --- a/lib/generated/responses.dart +++ b/lib/generated/responses.dart @@ -1,37 +1,90 @@ // DO NOT EDIT: File is generated by code generator. export 'responses/account.dart'; +export 'responses/account_balance.dart'; +export 'responses/account_campaign_point_amounts.dart'; +export 'responses/account_detail.dart'; export 'responses/account_topup_quota.dart'; export 'responses/account_topup_quotas.dart'; export 'responses/account_topup_stats.dart'; +export 'responses/bank_pay_session.dart'; +export 'responses/bill.dart'; +export 'responses/bill_with_additional_private_moneys.dart'; +export 'responses/cashtray.dart'; +export 'responses/cashtray_attempt.dart'; +export 'responses/cashtray_attempts.dart'; +export 'responses/cashtray_with_attempt_and_transaction.dart'; +export 'responses/check.dart'; +export 'responses/coupon.dart'; +export 'responses/coupon_detail.dart'; +export 'responses/coupon_info.dart'; +export 'responses/cpm_token.dart'; export 'responses/credit_card.dart'; export 'responses/cvs_authorization.dart'; export 'responses/detailed_shop_information.dart'; +export 'responses/fallback_private_money.dart'; +export 'responses/identification_match.dart'; export 'responses/identification_result.dart'; +export 'responses/individual_number_identification_error.dart'; export 'responses/individual_number_identification_status.dart'; export 'responses/jihanpi_transaction.dart'; export 'responses/jihanpi_vending_machine.dart'; +export 'responses/oauth_full_access_url.dart'; export 'responses/organization.dart'; +export 'responses/paginated_account_balances.dart'; +export 'responses/paginated_account_coupons.dart'; +export 'responses/paginated_account_transactions.dart'; +export 'responses/paginated_account_transfers.dart'; +export 'responses/paginated_bill_transactions.dart'; export 'responses/paginated_credit_cards.dart'; export 'responses/paginated_cvs_authorizations.dart'; +export 'responses/paginated_private_money_coupons.dart'; +export 'responses/paginated_private_moneys.dart'; export 'responses/paginated_shops.dart'; +export 'responses/paginated_user_accounts.dart'; export 'responses/paginated_user_tag_group_items.dart'; export 'responses/paginated_user_tag_groups.dart'; export 'responses/paginated_user_tag_subgroups.dart'; +export 'responses/paginated_user_transactions.dart'; export 'responses/private_money.dart'; +export 'responses/private_money_detail.dart'; export 'responses/private_money_images.dart'; +export 'responses/private_money_legal_text.dart'; +export 'responses/private_money_sounds.dart'; +export 'responses/private_money_topup_method.dart'; export 'responses/shop_information.dart'; +export 'responses/terminal.dart'; export 'responses/user.dart'; +export 'responses/user_bank.dart'; export 'responses/user_tag_group.dart'; export 'responses/user_tag_group_item.dart'; export 'responses/user_tag_information.dart'; export 'responses/user_tag_subgroup.dart'; +export 'responses/user_transaction.dart'; +export 'responses/user_transaction_with_customer_balance.dart'; export 'responses/user_transaction_with_fallback.dart'; +export 'responses/user_transaction_with_fallback_and_customer_balance.dart'; export 'responses/user_transaction_with_transfers.dart'; +export 'responses/user_transaction_with_transfers_and_customer_balance.dart'; +export 'responses/user_transfer.dart'; export 'responses/user_transfer_without_account.dart'; +export 'responses/user_with_auth_factors.dart'; +export 'responses/user_with_details.dart'; +export 'responses/veritrans_mdk_token_api_key.dart'; export 'bank_api/account.dart'; +export 'bank_api/bank.dart'; +export 'bank_api/bill.dart'; +export 'bank_api/campaign.dart'; +export 'bank_api/cashtray.dart'; +export 'bank_api/check.dart'; +export 'bank_api/coupon.dart'; +export 'bank_api/cpm.dart'; export 'bank_api/credit_card.dart'; export 'bank_api/cvs.dart'; export 'bank_api/jihanpi.dart'; +export 'bank_api/merchants.dart'; +export 'bank_api/private_money.dart'; export 'bank_api/shop.dart'; +export 'bank_api/terminal.dart'; export 'bank_api/transaction.dart'; +export 'bank_api/user.dart'; export 'bank_api/user_tag.dart'; diff --git a/lib/generated/responses/account.dart b/lib/generated/responses/account.dart index 5d2a878..642f7f1 100644 --- a/lib/generated/responses/account.dart +++ b/lib/generated/responses/account.dart @@ -12,6 +12,7 @@ class Account { final double pointBalance; final double pointDebt; final bool isSuspended; + final String status; final PrivateMoney privateMoney; Account({ required this.id, @@ -21,6 +22,7 @@ class Account { required this.pointBalance, required this.pointDebt, required this.isSuspended, + required this.status, required this.privateMoney, }); diff --git a/lib/generated/responses/account.g.dart b/lib/generated/responses/account.g.dart index 0b3c4c8..6811e44 100644 --- a/lib/generated/responses/account.g.dart +++ b/lib/generated/responses/account.g.dart @@ -14,6 +14,7 @@ Account _$AccountFromJson(Map json) => Account( pointBalance: (json['point_balance'] as num).toDouble(), pointDebt: (json['point_debt'] as num).toDouble(), isSuspended: json['is_suspended'] as bool, + status: json['status'] as String, privateMoney: PrivateMoney.fromJson(json['private_money'] as Map), ); @@ -26,5 +27,6 @@ Map _$AccountToJson(Account instance) => { 'point_balance': instance.pointBalance, 'point_debt': instance.pointDebt, 'is_suspended': instance.isSuspended, + 'status': instance.status, 'private_money': instance.privateMoney, }; diff --git a/lib/generated/responses/account_balance.dart b/lib/generated/responses/account_balance.dart new file mode 100644 index 0000000..714a063 --- /dev/null +++ b/lib/generated/responses/account_balance.dart @@ -0,0 +1,23 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'account_balance.g.dart'; + +@JsonSerializable() +class AccountBalance { + final DateTime expiresAt; + final double moneyAmount; + final double pointAmount; + AccountBalance({ + required this.expiresAt, + required this.moneyAmount, + required this.pointAmount, + }); + + factory AccountBalance.fromJson(Map json) => + _$AccountBalanceFromJson(json); + + Map toJson() => _$AccountBalanceToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/account_balance.g.dart b/lib/generated/responses/account_balance.g.dart new file mode 100644 index 0000000..f4f92a3 --- /dev/null +++ b/lib/generated/responses/account_balance.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'account_balance.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AccountBalance _$AccountBalanceFromJson(Map json) => + AccountBalance( + expiresAt: DateTime.parse(json['expires_at'] as String), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + ); + +Map _$AccountBalanceToJson(AccountBalance instance) => + { + 'expires_at': instance.expiresAt.toIso8601String(), + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + }; diff --git a/lib/generated/responses/account_campaign_point_amounts.dart b/lib/generated/responses/account_campaign_point_amounts.dart new file mode 100644 index 0000000..5f018b4 --- /dev/null +++ b/lib/generated/responses/account_campaign_point_amounts.dart @@ -0,0 +1,23 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'account_campaign_point_amounts.g.dart'; + +@JsonSerializable() +class AccountCampaignPointAmounts { + final double? maxTotalPointAmount; + final double? totalPointAmount; + final double? remainPointAmount; + AccountCampaignPointAmounts({ + this.maxTotalPointAmount, + this.totalPointAmount, + this.remainPointAmount, + }); + + factory AccountCampaignPointAmounts.fromJson(Map json) => + _$AccountCampaignPointAmountsFromJson(json); + + Map toJson() => _$AccountCampaignPointAmountsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/account_campaign_point_amounts.g.dart b/lib/generated/responses/account_campaign_point_amounts.g.dart new file mode 100644 index 0000000..84a1af3 --- /dev/null +++ b/lib/generated/responses/account_campaign_point_amounts.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'account_campaign_point_amounts.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AccountCampaignPointAmounts _$AccountCampaignPointAmountsFromJson( + Map json) => + AccountCampaignPointAmounts( + maxTotalPointAmount: (json['max_total_point_amount'] as num?)?.toDouble(), + totalPointAmount: (json['total_point_amount'] as num?)?.toDouble(), + remainPointAmount: (json['remain_point_amount'] as num?)?.toDouble(), + ); + +Map _$AccountCampaignPointAmountsToJson( + AccountCampaignPointAmounts instance) => + { + 'max_total_point_amount': instance.maxTotalPointAmount, + 'total_point_amount': instance.totalPointAmount, + 'remain_point_amount': instance.remainPointAmount, + }; diff --git a/lib/generated/responses/account_detail.dart b/lib/generated/responses/account_detail.dart new file mode 100644 index 0000000..b2d8d3f --- /dev/null +++ b/lib/generated/responses/account_detail.dart @@ -0,0 +1,38 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money_detail.dart'; +part 'account_detail.g.dart'; + +@JsonSerializable() +class AccountDetail { + final String id; + final String name; + final double balance; + final double moneyBalance; + final double pointBalance; + final double pointDebt; + final bool isSuspended; + final String status; + final PrivateMoneyDetail privateMoney; + final DateTime? nearestExpiresAt; + AccountDetail({ + required this.id, + required this.name, + required this.balance, + required this.moneyBalance, + required this.pointBalance, + required this.pointDebt, + required this.isSuspended, + required this.status, + required this.privateMoney, + this.nearestExpiresAt, + }); + + factory AccountDetail.fromJson(Map json) => + _$AccountDetailFromJson(json); + + Map toJson() => _$AccountDetailToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/account_detail.g.dart b/lib/generated/responses/account_detail.g.dart new file mode 100644 index 0000000..cb9754f --- /dev/null +++ b/lib/generated/responses/account_detail.g.dart @@ -0,0 +1,38 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'account_detail.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +AccountDetail _$AccountDetailFromJson(Map json) => + AccountDetail( + id: json['id'] as String, + name: json['name'] as String, + balance: (json['balance'] as num).toDouble(), + moneyBalance: (json['money_balance'] as num).toDouble(), + pointBalance: (json['point_balance'] as num).toDouble(), + pointDebt: (json['point_debt'] as num).toDouble(), + isSuspended: json['is_suspended'] as bool, + status: json['status'] as String, + privateMoney: PrivateMoneyDetail.fromJson( + json['private_money'] as Map), + nearestExpiresAt: json['nearest_expires_at'] == null + ? null + : DateTime.parse(json['nearest_expires_at'] as String), + ); + +Map _$AccountDetailToJson(AccountDetail instance) => + { + 'id': instance.id, + 'name': instance.name, + 'balance': instance.balance, + 'money_balance': instance.moneyBalance, + 'point_balance': instance.pointBalance, + 'point_debt': instance.pointDebt, + 'is_suspended': instance.isSuspended, + 'status': instance.status, + 'private_money': instance.privateMoney, + 'nearest_expires_at': instance.nearestExpiresAt?.toIso8601String(), + }; diff --git a/lib/generated/responses/bank_pay_session.dart b/lib/generated/responses/bank_pay_session.dart new file mode 100644 index 0000000..1cf75c6 --- /dev/null +++ b/lib/generated/responses/bank_pay_session.dart @@ -0,0 +1,21 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'bank_pay_session.g.dart'; + +@JsonSerializable() +class BankPaySession { + final String redirectUrl; + final String paytreeCustomerNumber; + BankPaySession({ + required this.redirectUrl, + required this.paytreeCustomerNumber, + }); + + factory BankPaySession.fromJson(Map json) => + _$BankPaySessionFromJson(json); + + Map toJson() => _$BankPaySessionToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/bank_pay_session.g.dart b/lib/generated/responses/bank_pay_session.g.dart new file mode 100644 index 0000000..c38132c --- /dev/null +++ b/lib/generated/responses/bank_pay_session.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bank_pay_session.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BankPaySession _$BankPaySessionFromJson(Map json) => + BankPaySession( + redirectUrl: json['redirect_url'] as String, + paytreeCustomerNumber: json['paytree_customer_number'] as String, + ); + +Map _$BankPaySessionToJson(BankPaySession instance) => + { + 'redirect_url': instance.redirectUrl, + 'paytree_customer_number': instance.paytreeCustomerNumber, + }; diff --git a/lib/generated/responses/bill.dart b/lib/generated/responses/bill.dart new file mode 100644 index 0000000..1b2ceac --- /dev/null +++ b/lib/generated/responses/bill.dart @@ -0,0 +1,39 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +import 'user.dart'; +part 'bill.g.dart'; + +@JsonSerializable() +class Bill { + final String id; + final double? amount; + final String description; + final User user; + final bool isOnetime; + final bool isDisabled; + final PrivateMoney privateMoney; + final String token; + final double? maxAmount; + final double? minAmount; + Bill({ + required this.id, + this.amount, + required this.description, + required this.user, + required this.isOnetime, + required this.isDisabled, + required this.privateMoney, + required this.token, + this.maxAmount, + this.minAmount, + }); + + factory Bill.fromJson(Map json) => + _$BillFromJson(json); + + Map toJson() => _$BillToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/bill.g.dart b/lib/generated/responses/bill.g.dart new file mode 100644 index 0000000..3ec661e --- /dev/null +++ b/lib/generated/responses/bill.g.dart @@ -0,0 +1,34 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bill.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Bill _$BillFromJson(Map json) => Bill( + id: json['id'] as String, + amount: (json['amount'] as num?)?.toDouble(), + description: json['description'] as String, + user: User.fromJson(json['user'] as Map), + isOnetime: json['is_onetime'] as bool, + isDisabled: json['is_disabled'] as bool, + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + token: json['token'] as String, + maxAmount: (json['max_amount'] as num?)?.toDouble(), + minAmount: (json['min_amount'] as num?)?.toDouble(), + ); + +Map _$BillToJson(Bill instance) => { + 'id': instance.id, + 'amount': instance.amount, + 'description': instance.description, + 'user': instance.user, + 'is_onetime': instance.isOnetime, + 'is_disabled': instance.isDisabled, + 'private_money': instance.privateMoney, + 'token': instance.token, + 'max_amount': instance.maxAmount, + 'min_amount': instance.minAmount, + }; diff --git a/lib/generated/responses/bill_with_additional_private_moneys.dart b/lib/generated/responses/bill_with_additional_private_moneys.dart new file mode 100644 index 0000000..7261a03 --- /dev/null +++ b/lib/generated/responses/bill_with_additional_private_moneys.dart @@ -0,0 +1,41 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +import 'user.dart'; +part 'bill_with_additional_private_moneys.g.dart'; + +@JsonSerializable() +class BillWithAdditionalPrivateMoneys { + final String id; + final double? amount; + final String description; + final User user; + final bool isOnetime; + final bool isDisabled; + final PrivateMoney privateMoney; + final String token; + final double? maxAmount; + final double? minAmount; + final List additionalPrivateMoneys; + BillWithAdditionalPrivateMoneys({ + required this.id, + this.amount, + required this.description, + required this.user, + required this.isOnetime, + required this.isDisabled, + required this.privateMoney, + required this.token, + this.maxAmount, + this.minAmount, + required this.additionalPrivateMoneys, + }); + + factory BillWithAdditionalPrivateMoneys.fromJson(Map json) => + _$BillWithAdditionalPrivateMoneysFromJson(json); + + Map toJson() => _$BillWithAdditionalPrivateMoneysToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/bill_with_additional_private_moneys.g.dart b/lib/generated/responses/bill_with_additional_private_moneys.g.dart new file mode 100644 index 0000000..22e9a27 --- /dev/null +++ b/lib/generated/responses/bill_with_additional_private_moneys.g.dart @@ -0,0 +1,43 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bill_with_additional_private_moneys.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BillWithAdditionalPrivateMoneys _$BillWithAdditionalPrivateMoneysFromJson( + Map json) => + BillWithAdditionalPrivateMoneys( + id: json['id'] as String, + amount: (json['amount'] as num?)?.toDouble(), + description: json['description'] as String, + user: User.fromJson(json['user'] as Map), + isOnetime: json['is_onetime'] as bool, + isDisabled: json['is_disabled'] as bool, + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + token: json['token'] as String, + maxAmount: (json['max_amount'] as num?)?.toDouble(), + minAmount: (json['min_amount'] as num?)?.toDouble(), + additionalPrivateMoneys: + (json['additional_private_moneys'] as List) + .map((e) => PrivateMoney.fromJson(e as Map)) + .toList(), + ); + +Map _$BillWithAdditionalPrivateMoneysToJson( + BillWithAdditionalPrivateMoneys instance) => + { + 'id': instance.id, + 'amount': instance.amount, + 'description': instance.description, + 'user': instance.user, + 'is_onetime': instance.isOnetime, + 'is_disabled': instance.isDisabled, + 'private_money': instance.privateMoney, + 'token': instance.token, + 'max_amount': instance.maxAmount, + 'min_amount': instance.minAmount, + 'additional_private_moneys': instance.additionalPrivateMoneys, + }; diff --git a/lib/generated/responses/cashtray.dart b/lib/generated/responses/cashtray.dart new file mode 100644 index 0000000..c9ecba8 --- /dev/null +++ b/lib/generated/responses/cashtray.dart @@ -0,0 +1,35 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +import 'user.dart'; +part 'cashtray.g.dart'; + +@JsonSerializable() +class Cashtray { + final String id; + final double amount; + final String description; + final User user; + final PrivateMoney privateMoney; + final DateTime expiresAt; + final DateTime? canceledAt; + final String token; + Cashtray({ + required this.id, + required this.amount, + required this.description, + required this.user, + required this.privateMoney, + required this.expiresAt, + this.canceledAt, + required this.token, + }); + + factory Cashtray.fromJson(Map json) => + _$CashtrayFromJson(json); + + Map toJson() => _$CashtrayToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/cashtray.g.dart b/lib/generated/responses/cashtray.g.dart new file mode 100644 index 0000000..5c5373b --- /dev/null +++ b/lib/generated/responses/cashtray.g.dart @@ -0,0 +1,32 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cashtray.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Cashtray _$CashtrayFromJson(Map json) => Cashtray( + id: json['id'] as String, + amount: (json['amount'] as num).toDouble(), + description: json['description'] as String, + user: User.fromJson(json['user'] as Map), + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + expiresAt: DateTime.parse(json['expires_at'] as String), + canceledAt: json['canceled_at'] == null + ? null + : DateTime.parse(json['canceled_at'] as String), + token: json['token'] as String, + ); + +Map _$CashtrayToJson(Cashtray instance) => { + 'id': instance.id, + 'amount': instance.amount, + 'description': instance.description, + 'user': instance.user, + 'private_money': instance.privateMoney, + 'expires_at': instance.expiresAt.toIso8601String(), + 'canceled_at': instance.canceledAt?.toIso8601String(), + 'token': instance.token, + }; diff --git a/lib/generated/responses/cashtray_attempt.dart b/lib/generated/responses/cashtray_attempt.dart new file mode 100644 index 0000000..5eee4d6 --- /dev/null +++ b/lib/generated/responses/cashtray_attempt.dart @@ -0,0 +1,33 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +import 'user.dart'; +part 'cashtray_attempt.g.dart'; + +@JsonSerializable() +class CashtrayAttempt { + final User? user; + final Account? account; + final double statusCode; + final String errorType; + final String errorMessage; + final DateTime createdAt; + final String? strategy; + CashtrayAttempt({ + this.user, + this.account, + required this.statusCode, + required this.errorType, + required this.errorMessage, + required this.createdAt, + this.strategy, + }); + + factory CashtrayAttempt.fromJson(Map json) => + _$CashtrayAttemptFromJson(json); + + Map toJson() => _$CashtrayAttemptToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/cashtray_attempt.g.dart b/lib/generated/responses/cashtray_attempt.g.dart new file mode 100644 index 0000000..8ac3019 --- /dev/null +++ b/lib/generated/responses/cashtray_attempt.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cashtray_attempt.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CashtrayAttempt _$CashtrayAttemptFromJson(Map json) => + CashtrayAttempt( + user: json['user'] == null + ? null + : User.fromJson(json['user'] as Map), + account: json['account'] == null + ? null + : Account.fromJson(json['account'] as Map), + statusCode: (json['status_code'] as num).toDouble(), + errorType: json['error_type'] as String, + errorMessage: json['error_message'] as String, + createdAt: DateTime.parse(json['created_at'] as String), + strategy: json['strategy'] as String?, + ); + +Map _$CashtrayAttemptToJson(CashtrayAttempt instance) => + { + 'user': instance.user, + 'account': instance.account, + 'status_code': instance.statusCode, + 'error_type': instance.errorType, + 'error_message': instance.errorMessage, + 'created_at': instance.createdAt.toIso8601String(), + 'strategy': instance.strategy, + }; diff --git a/lib/generated/responses/cashtray_attempts.dart b/lib/generated/responses/cashtray_attempts.dart new file mode 100644 index 0000000..187f6a4 --- /dev/null +++ b/lib/generated/responses/cashtray_attempts.dart @@ -0,0 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'cashtray_attempt.dart'; +part 'cashtray_attempts.g.dart'; + +@JsonSerializable() +class CashtrayAttempts { + final List rows; + CashtrayAttempts({ + required this.rows, + }); + + factory CashtrayAttempts.fromJson(Map json) => + _$CashtrayAttemptsFromJson(json); + + Map toJson() => _$CashtrayAttemptsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/cashtray_attempts.g.dart b/lib/generated/responses/cashtray_attempts.g.dart new file mode 100644 index 0000000..3ee6f8d --- /dev/null +++ b/lib/generated/responses/cashtray_attempts.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cashtray_attempts.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CashtrayAttempts _$CashtrayAttemptsFromJson(Map json) => + CashtrayAttempts( + rows: (json['rows'] as List) + .map((e) => CashtrayAttempt.fromJson(e as Map)) + .toList(), + ); + +Map _$CashtrayAttemptsToJson(CashtrayAttempts instance) => + { + 'rows': instance.rows, + }; diff --git a/lib/generated/responses/cashtray_with_attempt_and_transaction.dart b/lib/generated/responses/cashtray_with_attempt_and_transaction.dart new file mode 100644 index 0000000..968e15c --- /dev/null +++ b/lib/generated/responses/cashtray_with_attempt_and_transaction.dart @@ -0,0 +1,41 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction.dart'; +import 'cashtray_attempt.dart'; +import 'private_money.dart'; +import 'user.dart'; +part 'cashtray_with_attempt_and_transaction.g.dart'; + +@JsonSerializable() +class CashtrayWithAttemptAndTransaction { + final String id; + final double amount; + final String description; + final User user; + final PrivateMoney privateMoney; + final DateTime expiresAt; + final DateTime? canceledAt; + final String token; + final CashtrayAttempt attempt; + final UserTransaction transaction; + CashtrayWithAttemptAndTransaction({ + required this.id, + required this.amount, + required this.description, + required this.user, + required this.privateMoney, + required this.expiresAt, + this.canceledAt, + required this.token, + required this.attempt, + required this.transaction, + }); + + factory CashtrayWithAttemptAndTransaction.fromJson(Map json) => + _$CashtrayWithAttemptAndTransactionFromJson(json); + + Map toJson() => _$CashtrayWithAttemptAndTransactionToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/cashtray_with_attempt_and_transaction.g.dart b/lib/generated/responses/cashtray_with_attempt_and_transaction.g.dart new file mode 100644 index 0000000..a3c30dd --- /dev/null +++ b/lib/generated/responses/cashtray_with_attempt_and_transaction.g.dart @@ -0,0 +1,42 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cashtray_with_attempt_and_transaction.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CashtrayWithAttemptAndTransaction _$CashtrayWithAttemptAndTransactionFromJson( + Map json) => + CashtrayWithAttemptAndTransaction( + id: json['id'] as String, + amount: (json['amount'] as num).toDouble(), + description: json['description'] as String, + user: User.fromJson(json['user'] as Map), + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + expiresAt: DateTime.parse(json['expires_at'] as String), + canceledAt: json['canceled_at'] == null + ? null + : DateTime.parse(json['canceled_at'] as String), + token: json['token'] as String, + attempt: + CashtrayAttempt.fromJson(json['attempt'] as Map), + transaction: + UserTransaction.fromJson(json['transaction'] as Map), + ); + +Map _$CashtrayWithAttemptAndTransactionToJson( + CashtrayWithAttemptAndTransaction instance) => + { + 'id': instance.id, + 'amount': instance.amount, + 'description': instance.description, + 'user': instance.user, + 'private_money': instance.privateMoney, + 'expires_at': instance.expiresAt.toIso8601String(), + 'canceled_at': instance.canceledAt?.toIso8601String(), + 'token': instance.token, + 'attempt': instance.attempt, + 'transaction': instance.transaction, + }; diff --git a/lib/generated/responses/check.dart b/lib/generated/responses/check.dart new file mode 100644 index 0000000..0975ebe --- /dev/null +++ b/lib/generated/responses/check.dart @@ -0,0 +1,45 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +import 'user.dart'; +part 'check.g.dart'; + +@JsonSerializable() +class Check { + final String id; + final double amount; + final double moneyAmount; + final double pointAmount; + final String description; + final User user; + final bool isOnetime; + final bool isDisabled; + final DateTime expiresAt; + final DateTime? pointExpiresAt; + final int? pointExpiresInDays; + final PrivateMoney privateMoney; + final String token; + Check({ + required this.id, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + required this.description, + required this.user, + required this.isOnetime, + required this.isDisabled, + required this.expiresAt, + this.pointExpiresAt, + this.pointExpiresInDays, + required this.privateMoney, + required this.token, + }); + + factory Check.fromJson(Map json) => + _$CheckFromJson(json); + + Map toJson() => _$CheckToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/check.g.dart b/lib/generated/responses/check.g.dart new file mode 100644 index 0000000..dd442c1 --- /dev/null +++ b/lib/generated/responses/check.g.dart @@ -0,0 +1,42 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'check.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Check _$CheckFromJson(Map json) => Check( + id: json['id'] as String, + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + description: json['description'] as String, + user: User.fromJson(json['user'] as Map), + isOnetime: json['is_onetime'] as bool, + isDisabled: json['is_disabled'] as bool, + expiresAt: DateTime.parse(json['expires_at'] as String), + pointExpiresAt: json['point_expires_at'] == null + ? null + : DateTime.parse(json['point_expires_at'] as String), + pointExpiresInDays: (json['point_expires_in_days'] as num?)?.toInt(), + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + token: json['token'] as String, + ); + +Map _$CheckToJson(Check instance) => { + 'id': instance.id, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'description': instance.description, + 'user': instance.user, + 'is_onetime': instance.isOnetime, + 'is_disabled': instance.isDisabled, + 'expires_at': instance.expiresAt.toIso8601String(), + 'point_expires_at': instance.pointExpiresAt?.toIso8601String(), + 'point_expires_in_days': instance.pointExpiresInDays, + 'private_money': instance.privateMoney, + 'token': instance.token, + }; diff --git a/lib/generated/responses/coupon.dart b/lib/generated/responses/coupon.dart new file mode 100644 index 0000000..cce579a --- /dev/null +++ b/lib/generated/responses/coupon.dart @@ -0,0 +1,47 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'coupon.g.dart'; + +@JsonSerializable() +class Coupon { + final String id; + final String name; + final String description; + final double? discountAmount; + final double? discountPercentage; + final DateTime startsAt; + final DateTime endsAt; + final DateTime displayStartsAt; + final DateTime displayEndsAt; + final double? usageLimit; + final double? minAmount; + final bool isShopSpecified; + final bool isDisabled; + final bool isHidden; + final String? couponImage; + Coupon({ + required this.id, + required this.name, + required this.description, + this.discountAmount, + this.discountPercentage, + required this.startsAt, + required this.endsAt, + required this.displayStartsAt, + required this.displayEndsAt, + this.usageLimit, + this.minAmount, + required this.isShopSpecified, + required this.isDisabled, + required this.isHidden, + this.couponImage, + }); + + factory Coupon.fromJson(Map json) => + _$CouponFromJson(json); + + Map toJson() => _$CouponToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/coupon.g.dart b/lib/generated/responses/coupon.g.dart new file mode 100644 index 0000000..2ee64a2 --- /dev/null +++ b/lib/generated/responses/coupon.g.dart @@ -0,0 +1,43 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'coupon.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Coupon _$CouponFromJson(Map json) => Coupon( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String, + discountAmount: (json['discount_amount'] as num?)?.toDouble(), + discountPercentage: (json['discount_percentage'] as num?)?.toDouble(), + startsAt: DateTime.parse(json['starts_at'] as String), + endsAt: DateTime.parse(json['ends_at'] as String), + displayStartsAt: DateTime.parse(json['display_starts_at'] as String), + displayEndsAt: DateTime.parse(json['display_ends_at'] as String), + usageLimit: (json['usage_limit'] as num?)?.toDouble(), + minAmount: (json['min_amount'] as num?)?.toDouble(), + isShopSpecified: json['is_shop_specified'] as bool, + isDisabled: json['is_disabled'] as bool, + isHidden: json['is_hidden'] as bool, + couponImage: json['coupon_image'] as String?, + ); + +Map _$CouponToJson(Coupon instance) => { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'discount_amount': instance.discountAmount, + 'discount_percentage': instance.discountPercentage, + 'starts_at': instance.startsAt.toIso8601String(), + 'ends_at': instance.endsAt.toIso8601String(), + 'display_starts_at': instance.displayStartsAt.toIso8601String(), + 'display_ends_at': instance.displayEndsAt.toIso8601String(), + 'usage_limit': instance.usageLimit, + 'min_amount': instance.minAmount, + 'is_shop_specified': instance.isShopSpecified, + 'is_disabled': instance.isDisabled, + 'is_hidden': instance.isHidden, + 'coupon_image': instance.couponImage, + }; diff --git a/lib/generated/responses/coupon_detail.dart b/lib/generated/responses/coupon_detail.dart new file mode 100644 index 0000000..02d8f1f --- /dev/null +++ b/lib/generated/responses/coupon_detail.dart @@ -0,0 +1,54 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user.dart'; +part 'coupon_detail.g.dart'; + +@JsonSerializable() +class CouponDetail { + final String id; + final String name; + final String description; + final double? discountAmount; + final double? discountPercentage; + final DateTime startsAt; + final DateTime endsAt; + final DateTime displayStartsAt; + final DateTime displayEndsAt; + final double? usageLimit; + final double? minAmount; + final bool isShopSpecified; + final bool isDisabled; + final bool isHidden; + final String? couponImage; + final DateTime? receivedAt; + final double usageCount; + final List availableShops; + CouponDetail({ + required this.id, + required this.name, + required this.description, + this.discountAmount, + this.discountPercentage, + required this.startsAt, + required this.endsAt, + required this.displayStartsAt, + required this.displayEndsAt, + this.usageLimit, + this.minAmount, + required this.isShopSpecified, + required this.isDisabled, + required this.isHidden, + this.couponImage, + this.receivedAt, + required this.usageCount, + required this.availableShops, + }); + + factory CouponDetail.fromJson(Map json) => + _$CouponDetailFromJson(json); + + Map toJson() => _$CouponDetailToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/coupon_detail.g.dart b/lib/generated/responses/coupon_detail.g.dart new file mode 100644 index 0000000..6a76489 --- /dev/null +++ b/lib/generated/responses/coupon_detail.g.dart @@ -0,0 +1,54 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'coupon_detail.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CouponDetail _$CouponDetailFromJson(Map json) => CouponDetail( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String, + discountAmount: (json['discount_amount'] as num?)?.toDouble(), + discountPercentage: (json['discount_percentage'] as num?)?.toDouble(), + startsAt: DateTime.parse(json['starts_at'] as String), + endsAt: DateTime.parse(json['ends_at'] as String), + displayStartsAt: DateTime.parse(json['display_starts_at'] as String), + displayEndsAt: DateTime.parse(json['display_ends_at'] as String), + usageLimit: (json['usage_limit'] as num?)?.toDouble(), + minAmount: (json['min_amount'] as num?)?.toDouble(), + isShopSpecified: json['is_shop_specified'] as bool, + isDisabled: json['is_disabled'] as bool, + isHidden: json['is_hidden'] as bool, + couponImage: json['coupon_image'] as String?, + receivedAt: json['received_at'] == null + ? null + : DateTime.parse(json['received_at'] as String), + usageCount: (json['usage_count'] as num).toDouble(), + availableShops: (json['available_shops'] as List) + .map((e) => User.fromJson(e as Map)) + .toList(), + ); + +Map _$CouponDetailToJson(CouponDetail instance) => + { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'discount_amount': instance.discountAmount, + 'discount_percentage': instance.discountPercentage, + 'starts_at': instance.startsAt.toIso8601String(), + 'ends_at': instance.endsAt.toIso8601String(), + 'display_starts_at': instance.displayStartsAt.toIso8601String(), + 'display_ends_at': instance.displayEndsAt.toIso8601String(), + 'usage_limit': instance.usageLimit, + 'min_amount': instance.minAmount, + 'is_shop_specified': instance.isShopSpecified, + 'is_disabled': instance.isDisabled, + 'is_hidden': instance.isHidden, + 'coupon_image': instance.couponImage, + 'received_at': instance.receivedAt?.toIso8601String(), + 'usage_count': instance.usageCount, + 'available_shops': instance.availableShops, + }; diff --git a/lib/generated/responses/coupon_info.dart b/lib/generated/responses/coupon_info.dart new file mode 100644 index 0000000..768e4a4 --- /dev/null +++ b/lib/generated/responses/coupon_info.dart @@ -0,0 +1,54 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user.dart'; +part 'coupon_info.g.dart'; + +@JsonSerializable() +class CouponInfo { + final String id; + final String name; + final String description; + final double? discountAmount; + final double? discountPercentage; + final DateTime startsAt; + final DateTime endsAt; + final DateTime displayStartsAt; + final DateTime displayEndsAt; + final double? usageLimit; + final double? minAmount; + final bool isShopSpecified; + final bool isPublic; + final bool isDisabled; + final bool isHidden; + final String? couponImage; + final String privateMoneyId; + final List availableShops; + CouponInfo({ + required this.id, + required this.name, + required this.description, + this.discountAmount, + this.discountPercentage, + required this.startsAt, + required this.endsAt, + required this.displayStartsAt, + required this.displayEndsAt, + this.usageLimit, + this.minAmount, + required this.isShopSpecified, + required this.isPublic, + required this.isDisabled, + required this.isHidden, + this.couponImage, + required this.privateMoneyId, + required this.availableShops, + }); + + factory CouponInfo.fromJson(Map json) => + _$CouponInfoFromJson(json); + + Map toJson() => _$CouponInfoToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/coupon_info.g.dart b/lib/generated/responses/coupon_info.g.dart new file mode 100644 index 0000000..9acc7d8 --- /dev/null +++ b/lib/generated/responses/coupon_info.g.dart @@ -0,0 +1,52 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'coupon_info.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CouponInfo _$CouponInfoFromJson(Map json) => CouponInfo( + id: json['id'] as String, + name: json['name'] as String, + description: json['description'] as String, + discountAmount: (json['discount_amount'] as num?)?.toDouble(), + discountPercentage: (json['discount_percentage'] as num?)?.toDouble(), + startsAt: DateTime.parse(json['starts_at'] as String), + endsAt: DateTime.parse(json['ends_at'] as String), + displayStartsAt: DateTime.parse(json['display_starts_at'] as String), + displayEndsAt: DateTime.parse(json['display_ends_at'] as String), + usageLimit: (json['usage_limit'] as num?)?.toDouble(), + minAmount: (json['min_amount'] as num?)?.toDouble(), + isShopSpecified: json['is_shop_specified'] as bool, + isPublic: json['is_public'] as bool, + isDisabled: json['is_disabled'] as bool, + isHidden: json['is_hidden'] as bool, + couponImage: json['coupon_image'] as String?, + privateMoneyId: json['private_money_id'] as String, + availableShops: (json['available_shops'] as List) + .map((e) => User.fromJson(e as Map)) + .toList(), + ); + +Map _$CouponInfoToJson(CouponInfo instance) => + { + 'id': instance.id, + 'name': instance.name, + 'description': instance.description, + 'discount_amount': instance.discountAmount, + 'discount_percentage': instance.discountPercentage, + 'starts_at': instance.startsAt.toIso8601String(), + 'ends_at': instance.endsAt.toIso8601String(), + 'display_starts_at': instance.displayStartsAt.toIso8601String(), + 'display_ends_at': instance.displayEndsAt.toIso8601String(), + 'usage_limit': instance.usageLimit, + 'min_amount': instance.minAmount, + 'is_shop_specified': instance.isShopSpecified, + 'is_public': instance.isPublic, + 'is_disabled': instance.isDisabled, + 'is_hidden': instance.isHidden, + 'coupon_image': instance.couponImage, + 'private_money_id': instance.privateMoneyId, + 'available_shops': instance.availableShops, + }; diff --git a/lib/generated/responses/cpm_token.dart b/lib/generated/responses/cpm_token.dart new file mode 100644 index 0000000..082b75e --- /dev/null +++ b/lib/generated/responses/cpm_token.dart @@ -0,0 +1,35 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction_with_transfers.dart'; +import 'account.dart'; +part 'cpm_token.g.dart'; + +@JsonSerializable() +class CpmToken { + final String cpmToken; + final Account account; + final UserTransactionWithTransfers? transaction; + final List scopes; + final DateTime expiresAt; + final Map metadata; + final String? strategy; + final String? couponId; + CpmToken({ + required this.cpmToken, + required this.account, + this.transaction, + required this.scopes, + required this.expiresAt, + required this.metadata, + this.strategy, + this.couponId, + }); + + factory CpmToken.fromJson(Map json) => + _$CpmTokenFromJson(json); + + Map toJson() => _$CpmTokenToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/cpm_token.g.dart b/lib/generated/responses/cpm_token.g.dart new file mode 100644 index 0000000..8e0fc7e --- /dev/null +++ b/lib/generated/responses/cpm_token.g.dart @@ -0,0 +1,33 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'cpm_token.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +CpmToken _$CpmTokenFromJson(Map json) => CpmToken( + cpmToken: json['cpm_token'] as String, + account: Account.fromJson(json['account'] as Map), + transaction: json['transaction'] == null + ? null + : UserTransactionWithTransfers.fromJson( + json['transaction'] as Map), + scopes: + (json['scopes'] as List).map((e) => e as String).toList(), + expiresAt: DateTime.parse(json['expires_at'] as String), + metadata: json['metadata'] as Map, + strategy: json['strategy'] as String?, + couponId: json['coupon_id'] as String?, + ); + +Map _$CpmTokenToJson(CpmToken instance) => { + 'cpm_token': instance.cpmToken, + 'account': instance.account, + 'transaction': instance.transaction, + 'scopes': instance.scopes, + 'expires_at': instance.expiresAt.toIso8601String(), + 'metadata': instance.metadata, + 'strategy': instance.strategy, + 'coupon_id': instance.couponId, + }; diff --git a/lib/generated/responses/fallback_private_money.dart b/lib/generated/responses/fallback_private_money.dart new file mode 100644 index 0000000..b8ffd73 --- /dev/null +++ b/lib/generated/responses/fallback_private_money.dart @@ -0,0 +1,21 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'fallback_private_money.g.dart'; + +@JsonSerializable() +class FallbackPrivateMoney { + final String name; + final String id; + FallbackPrivateMoney({ + required this.name, + required this.id, + }); + + factory FallbackPrivateMoney.fromJson(Map json) => + _$FallbackPrivateMoneyFromJson(json); + + Map toJson() => _$FallbackPrivateMoneyToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/fallback_private_money.g.dart b/lib/generated/responses/fallback_private_money.g.dart new file mode 100644 index 0000000..7fa661a --- /dev/null +++ b/lib/generated/responses/fallback_private_money.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'fallback_private_money.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +FallbackPrivateMoney _$FallbackPrivateMoneyFromJson( + Map json) => + FallbackPrivateMoney( + name: json['name'] as String, + id: json['id'] as String, + ); + +Map _$FallbackPrivateMoneyToJson( + FallbackPrivateMoney instance) => + { + 'name': instance.name, + 'id': instance.id, + }; diff --git a/lib/generated/responses/identification_match.dart b/lib/generated/responses/identification_match.dart new file mode 100644 index 0000000..49ed95e --- /dev/null +++ b/lib/generated/responses/identification_match.dart @@ -0,0 +1,25 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'identification_match.g.dart'; + +@JsonSerializable() +class IdentificationMatch { + final bool name; + final bool gender; + final bool address; + final bool dateOfBirth; + IdentificationMatch({ + required this.name, + required this.gender, + required this.address, + required this.dateOfBirth, + }); + + factory IdentificationMatch.fromJson(Map json) => + _$IdentificationMatchFromJson(json); + + Map toJson() => _$IdentificationMatchToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/identification_match.g.dart b/lib/generated/responses/identification_match.g.dart new file mode 100644 index 0000000..b270786 --- /dev/null +++ b/lib/generated/responses/identification_match.g.dart @@ -0,0 +1,24 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'identification_match.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IdentificationMatch _$IdentificationMatchFromJson(Map json) => + IdentificationMatch( + name: json['name'] as bool, + gender: json['gender'] as bool, + address: json['address'] as bool, + dateOfBirth: json['date_of_birth'] as bool, + ); + +Map _$IdentificationMatchToJson( + IdentificationMatch instance) => + { + 'name': instance.name, + 'gender': instance.gender, + 'address': instance.address, + 'date_of_birth': instance.dateOfBirth, + }; diff --git a/lib/generated/responses/identification_result.dart b/lib/generated/responses/identification_result.dart index 7b6f9f9..243297f 100644 --- a/lib/generated/responses/identification_result.dart +++ b/lib/generated/responses/identification_result.dart @@ -1,16 +1,19 @@ // DO NOT EDIT: File is generated by code generator. import 'package:json_annotation/json_annotation.dart'; +import 'identification_match.dart'; part 'identification_result.g.dart'; @JsonSerializable() class IdentificationResult { final bool isValid; final DateTime? identifiedAt; - final Map match; + final IdentificationMatch match; + final bool isResident; IdentificationResult({ required this.isValid, this.identifiedAt, required this.match, + required this.isResident, }); factory IdentificationResult.fromJson(Map json) => diff --git a/lib/generated/responses/identification_result.g.dart b/lib/generated/responses/identification_result.g.dart index 8da527a..a775692 100644 --- a/lib/generated/responses/identification_result.g.dart +++ b/lib/generated/responses/identification_result.g.dart @@ -13,7 +13,9 @@ IdentificationResult _$IdentificationResultFromJson( identifiedAt: json['identified_at'] == null ? null : DateTime.parse(json['identified_at'] as String), - match: json['match'] as Map, + match: + IdentificationMatch.fromJson(json['match'] as Map), + isResident: json['is_resident'] as bool, ); Map _$IdentificationResultToJson( @@ -22,4 +24,5 @@ Map _$IdentificationResultToJson( 'is_valid': instance.isValid, 'identified_at': instance.identifiedAt?.toIso8601String(), 'match': instance.match, + 'is_resident': instance.isResident, }; diff --git a/lib/generated/responses/individual_number_identification_error.dart b/lib/generated/responses/individual_number_identification_error.dart new file mode 100644 index 0000000..86827cb --- /dev/null +++ b/lib/generated/responses/individual_number_identification_error.dart @@ -0,0 +1,25 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'individual_number_identification_error.g.dart'; + +@JsonSerializable() +class IndividualNumberIdentificationError { + final String type; + final String message; + final int errorCode; + final String errorMessage; + IndividualNumberIdentificationError({ + required this.type, + required this.message, + required this.errorCode, + required this.errorMessage, + }); + + factory IndividualNumberIdentificationError.fromJson(Map json) => + _$IndividualNumberIdentificationErrorFromJson(json); + + Map toJson() => _$IndividualNumberIdentificationErrorToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/individual_number_identification_error.g.dart b/lib/generated/responses/individual_number_identification_error.g.dart new file mode 100644 index 0000000..09579de --- /dev/null +++ b/lib/generated/responses/individual_number_identification_error.g.dart @@ -0,0 +1,25 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'individual_number_identification_error.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IndividualNumberIdentificationError + _$IndividualNumberIdentificationErrorFromJson(Map json) => + IndividualNumberIdentificationError( + type: json['type'] as String, + message: json['message'] as String, + errorCode: (json['error_code'] as num).toInt(), + errorMessage: json['error_message'] as String, + ); + +Map _$IndividualNumberIdentificationErrorToJson( + IndividualNumberIdentificationError instance) => + { + 'type': instance.type, + 'message': instance.message, + 'error_code': instance.errorCode, + 'error_message': instance.errorMessage, + }; diff --git a/lib/generated/responses/oauth_full_access_url.dart b/lib/generated/responses/oauth_full_access_url.dart new file mode 100644 index 0000000..b9aa816 --- /dev/null +++ b/lib/generated/responses/oauth_full_access_url.dart @@ -0,0 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'oauth_full_access_url.g.dart'; + +@JsonSerializable() +class OauthFullAccessUrl { + final String url; + OauthFullAccessUrl({ + required this.url, + }); + + factory OauthFullAccessUrl.fromJson(Map json) => + _$OauthFullAccessUrlFromJson(json); + + Map toJson() => _$OauthFullAccessUrlToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/oauth_full_access_url.g.dart b/lib/generated/responses/oauth_full_access_url.g.dart new file mode 100644 index 0000000..ec539fc --- /dev/null +++ b/lib/generated/responses/oauth_full_access_url.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'oauth_full_access_url.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +OauthFullAccessUrl _$OauthFullAccessUrlFromJson(Map json) => + OauthFullAccessUrl( + url: json['url'] as String, + ); + +Map _$OauthFullAccessUrlToJson(OauthFullAccessUrl instance) => + { + 'url': instance.url, + }; diff --git a/lib/generated/responses/paginated_account_balances.dart b/lib/generated/responses/paginated_account_balances.dart new file mode 100644 index 0000000..0dd1bb6 --- /dev/null +++ b/lib/generated/responses/paginated_account_balances.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account_balance.dart'; +part 'paginated_account_balances.g.dart'; + +@JsonSerializable() +class PaginatedAccountBalances { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedAccountBalances({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedAccountBalances.fromJson(Map json) => + _$PaginatedAccountBalancesFromJson(json); + + Map toJson() => _$PaginatedAccountBalancesToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_account_balances.g.dart b/lib/generated/responses/paginated_account_balances.g.dart new file mode 100644 index 0000000..164630b --- /dev/null +++ b/lib/generated/responses/paginated_account_balances.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_account_balances.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedAccountBalances _$PaginatedAccountBalancesFromJson( + Map json) => + PaginatedAccountBalances( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => AccountBalance.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedAccountBalancesToJson( + PaginatedAccountBalances instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_account_coupons.dart b/lib/generated/responses/paginated_account_coupons.dart new file mode 100644 index 0000000..77b8767 --- /dev/null +++ b/lib/generated/responses/paginated_account_coupons.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'coupon.dart'; +part 'paginated_account_coupons.g.dart'; + +@JsonSerializable() +class PaginatedAccountCoupons { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedAccountCoupons({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedAccountCoupons.fromJson(Map json) => + _$PaginatedAccountCouponsFromJson(json); + + Map toJson() => _$PaginatedAccountCouponsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_account_coupons.g.dart b/lib/generated/responses/paginated_account_coupons.g.dart new file mode 100644 index 0000000..12fbaf4 --- /dev/null +++ b/lib/generated/responses/paginated_account_coupons.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_account_coupons.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedAccountCoupons _$PaginatedAccountCouponsFromJson( + Map json) => + PaginatedAccountCoupons( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => Coupon.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedAccountCouponsToJson( + PaginatedAccountCoupons instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_account_transactions.dart b/lib/generated/responses/paginated_account_transactions.dart new file mode 100644 index 0000000..5cfce7b --- /dev/null +++ b/lib/generated/responses/paginated_account_transactions.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction.dart'; +part 'paginated_account_transactions.g.dart'; + +@JsonSerializable() +class PaginatedAccountTransactions { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedAccountTransactions({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedAccountTransactions.fromJson(Map json) => + _$PaginatedAccountTransactionsFromJson(json); + + Map toJson() => _$PaginatedAccountTransactionsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_account_transactions.g.dart b/lib/generated/responses/paginated_account_transactions.g.dart new file mode 100644 index 0000000..8e0c50d --- /dev/null +++ b/lib/generated/responses/paginated_account_transactions.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_account_transactions.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedAccountTransactions _$PaginatedAccountTransactionsFromJson( + Map json) => + PaginatedAccountTransactions( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => UserTransaction.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedAccountTransactionsToJson( + PaginatedAccountTransactions instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_account_transfers.dart b/lib/generated/responses/paginated_account_transfers.dart new file mode 100644 index 0000000..d8b6fe3 --- /dev/null +++ b/lib/generated/responses/paginated_account_transfers.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transfer.dart'; +part 'paginated_account_transfers.g.dart'; + +@JsonSerializable() +class PaginatedAccountTransfers { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedAccountTransfers({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedAccountTransfers.fromJson(Map json) => + _$PaginatedAccountTransfersFromJson(json); + + Map toJson() => _$PaginatedAccountTransfersToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_account_transfers.g.dart b/lib/generated/responses/paginated_account_transfers.g.dart new file mode 100644 index 0000000..e3595b8 --- /dev/null +++ b/lib/generated/responses/paginated_account_transfers.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_account_transfers.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedAccountTransfers _$PaginatedAccountTransfersFromJson( + Map json) => + PaginatedAccountTransfers( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => UserTransfer.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedAccountTransfersToJson( + PaginatedAccountTransfers instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_bill_transactions.dart b/lib/generated/responses/paginated_bill_transactions.dart new file mode 100644 index 0000000..693d05e --- /dev/null +++ b/lib/generated/responses/paginated_bill_transactions.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction.dart'; +part 'paginated_bill_transactions.g.dart'; + +@JsonSerializable() +class PaginatedBillTransactions { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedBillTransactions({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedBillTransactions.fromJson(Map json) => + _$PaginatedBillTransactionsFromJson(json); + + Map toJson() => _$PaginatedBillTransactionsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_bill_transactions.g.dart b/lib/generated/responses/paginated_bill_transactions.g.dart new file mode 100644 index 0000000..4f533f2 --- /dev/null +++ b/lib/generated/responses/paginated_bill_transactions.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_bill_transactions.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedBillTransactions _$PaginatedBillTransactionsFromJson( + Map json) => + PaginatedBillTransactions( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => UserTransaction.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedBillTransactionsToJson( + PaginatedBillTransactions instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_private_money_coupons.dart b/lib/generated/responses/paginated_private_money_coupons.dart new file mode 100644 index 0000000..f0adb9c --- /dev/null +++ b/lib/generated/responses/paginated_private_money_coupons.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'coupon.dart'; +part 'paginated_private_money_coupons.g.dart'; + +@JsonSerializable() +class PaginatedPrivateMoneyCoupons { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedPrivateMoneyCoupons({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedPrivateMoneyCoupons.fromJson(Map json) => + _$PaginatedPrivateMoneyCouponsFromJson(json); + + Map toJson() => _$PaginatedPrivateMoneyCouponsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_private_money_coupons.g.dart b/lib/generated/responses/paginated_private_money_coupons.g.dart new file mode 100644 index 0000000..cce93d6 --- /dev/null +++ b/lib/generated/responses/paginated_private_money_coupons.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_private_money_coupons.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedPrivateMoneyCoupons _$PaginatedPrivateMoneyCouponsFromJson( + Map json) => + PaginatedPrivateMoneyCoupons( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => Coupon.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedPrivateMoneyCouponsToJson( + PaginatedPrivateMoneyCoupons instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_private_moneys.dart b/lib/generated/responses/paginated_private_moneys.dart new file mode 100644 index 0000000..bb2e2f6 --- /dev/null +++ b/lib/generated/responses/paginated_private_moneys.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +part 'paginated_private_moneys.g.dart'; + +@JsonSerializable() +class PaginatedPrivateMoneys { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedPrivateMoneys({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedPrivateMoneys.fromJson(Map json) => + _$PaginatedPrivateMoneysFromJson(json); + + Map toJson() => _$PaginatedPrivateMoneysToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_private_moneys.g.dart b/lib/generated/responses/paginated_private_moneys.g.dart new file mode 100644 index 0000000..5c5194f --- /dev/null +++ b/lib/generated/responses/paginated_private_moneys.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_private_moneys.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedPrivateMoneys _$PaginatedPrivateMoneysFromJson( + Map json) => + PaginatedPrivateMoneys( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => PrivateMoney.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedPrivateMoneysToJson( + PaginatedPrivateMoneys instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_user_accounts.dart b/lib/generated/responses/paginated_user_accounts.dart new file mode 100644 index 0000000..a83a59b --- /dev/null +++ b/lib/generated/responses/paginated_user_accounts.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +part 'paginated_user_accounts.g.dart'; + +@JsonSerializable() +class PaginatedUserAccounts { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedUserAccounts({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedUserAccounts.fromJson(Map json) => + _$PaginatedUserAccountsFromJson(json); + + Map toJson() => _$PaginatedUserAccountsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_user_accounts.g.dart b/lib/generated/responses/paginated_user_accounts.g.dart new file mode 100644 index 0000000..3160b0a --- /dev/null +++ b/lib/generated/responses/paginated_user_accounts.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_user_accounts.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedUserAccounts _$PaginatedUserAccountsFromJson( + Map json) => + PaginatedUserAccounts( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => Account.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedUserAccountsToJson( + PaginatedUserAccounts instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/paginated_user_transactions.dart b/lib/generated/responses/paginated_user_transactions.dart new file mode 100644 index 0000000..ed27388 --- /dev/null +++ b/lib/generated/responses/paginated_user_transactions.dart @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction.dart'; +part 'paginated_user_transactions.g.dart'; + +@JsonSerializable() +class PaginatedUserTransactions { + final int perPage; + final int count; + final String? next; + final String? prev; + final List items; + PaginatedUserTransactions({ + required this.perPage, + required this.count, + this.next, + this.prev, + required this.items, + }); + + factory PaginatedUserTransactions.fromJson(Map json) => + _$PaginatedUserTransactionsFromJson(json); + + Map toJson() => _$PaginatedUserTransactionsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/paginated_user_transactions.g.dart b/lib/generated/responses/paginated_user_transactions.g.dart new file mode 100644 index 0000000..992e4c6 --- /dev/null +++ b/lib/generated/responses/paginated_user_transactions.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'paginated_user_transactions.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PaginatedUserTransactions _$PaginatedUserTransactionsFromJson( + Map json) => + PaginatedUserTransactions( + perPage: (json['per_page'] as num).toInt(), + count: (json['count'] as num).toInt(), + next: json['next'] as String?, + prev: json['prev'] as String?, + items: (json['items'] as List) + .map((e) => UserTransaction.fromJson(e as Map)) + .toList(), + ); + +Map _$PaginatedUserTransactionsToJson( + PaginatedUserTransactions instance) => + { + 'per_page': instance.perPage, + 'count': instance.count, + 'next': instance.next, + 'prev': instance.prev, + 'items': instance.items, + }; diff --git a/lib/generated/responses/private_money.dart b/lib/generated/responses/private_money.dart index 9d43e3e..8ca97cf 100644 --- a/lib/generated/responses/private_money.dart +++ b/lib/generated/responses/private_money.dart @@ -1,6 +1,7 @@ // DO NOT EDIT: File is generated by code generator. import 'package:json_annotation/json_annotation.dart'; import 'organization.dart'; +import 'private_money_sounds.dart'; import 'private_money_images.dart'; part 'private_money.g.dart'; @@ -13,11 +14,15 @@ class PrivateMoney { final String description; final String onelineMessage; final String displayMoneyAndPoint; - final String accountImage; + final String? customDomainName; + final bool canUseC2cTransfer; + final String? accountImage; final PrivateMoneyImages images; + final PrivateMoneySounds sounds; final Organization organization; final double maxBalance; final double transferLimit; + final double moneyTopupTransferLimit; final String expirationType; final bool isExclusive; final String? termsUrl; @@ -26,6 +31,7 @@ class PrivateMoney { final String? commercialActUrl; final bool isTopupQuotaAvailable; final bool isItrustAuthenticationEnabled; + final bool canUseCreditCard; PrivateMoney({ required this.id, required this.name, @@ -34,11 +40,15 @@ class PrivateMoney { required this.description, required this.onelineMessage, required this.displayMoneyAndPoint, - required this.accountImage, + this.customDomainName, + required this.canUseC2cTransfer, + this.accountImage, required this.images, + required this.sounds, required this.organization, required this.maxBalance, required this.transferLimit, + required this.moneyTopupTransferLimit, required this.expirationType, required this.isExclusive, this.termsUrl, @@ -47,6 +57,7 @@ class PrivateMoney { this.commercialActUrl, required this.isTopupQuotaAvailable, required this.isItrustAuthenticationEnabled, + required this.canUseCreditCard, }); factory PrivateMoney.fromJson(Map json) => diff --git a/lib/generated/responses/private_money.g.dart b/lib/generated/responses/private_money.g.dart index 6108355..aa824ea 100644 --- a/lib/generated/responses/private_money.g.dart +++ b/lib/generated/responses/private_money.g.dart @@ -14,13 +14,19 @@ PrivateMoney _$PrivateMoneyFromJson(Map json) => PrivateMoney( description: json['description'] as String, onelineMessage: json['oneline_message'] as String, displayMoneyAndPoint: json['display_money_and_point'] as String, - accountImage: json['account_image'] as String, + customDomainName: json['custom_domain_name'] as String?, + canUseC2cTransfer: json['can_use_c2c_transfer'] as bool, + accountImage: json['account_image'] as String?, images: PrivateMoneyImages.fromJson(json['images'] as Map), + sounds: + PrivateMoneySounds.fromJson(json['sounds'] as Map), organization: Organization.fromJson(json['organization'] as Map), maxBalance: (json['max_balance'] as num).toDouble(), transferLimit: (json['transfer_limit'] as num).toDouble(), + moneyTopupTransferLimit: + (json['money_topup_transfer_limit'] as num).toDouble(), expirationType: json['expiration_type'] as String, isExclusive: json['is_exclusive'] as bool, termsUrl: json['terms_url'] as String?, @@ -30,6 +36,7 @@ PrivateMoney _$PrivateMoneyFromJson(Map json) => PrivateMoney( isTopupQuotaAvailable: json['is_topup_quota_available'] as bool, isItrustAuthenticationEnabled: json['is_itrust_authentication_enabled'] as bool, + canUseCreditCard: json['can_use_credit_card'] as bool, ); Map _$PrivateMoneyToJson(PrivateMoney instance) => @@ -41,11 +48,15 @@ Map _$PrivateMoneyToJson(PrivateMoney instance) => 'description': instance.description, 'oneline_message': instance.onelineMessage, 'display_money_and_point': instance.displayMoneyAndPoint, + 'custom_domain_name': instance.customDomainName, + 'can_use_c2c_transfer': instance.canUseC2cTransfer, 'account_image': instance.accountImage, 'images': instance.images, + 'sounds': instance.sounds, 'organization': instance.organization, 'max_balance': instance.maxBalance, 'transfer_limit': instance.transferLimit, + 'money_topup_transfer_limit': instance.moneyTopupTransferLimit, 'expiration_type': instance.expirationType, 'is_exclusive': instance.isExclusive, 'terms_url': instance.termsUrl, @@ -55,4 +66,5 @@ Map _$PrivateMoneyToJson(PrivateMoney instance) => 'is_topup_quota_available': instance.isTopupQuotaAvailable, 'is_itrust_authentication_enabled': instance.isItrustAuthenticationEnabled, + 'can_use_credit_card': instance.canUseCreditCard, }; diff --git a/lib/generated/responses/private_money_detail.dart b/lib/generated/responses/private_money_detail.dart new file mode 100644 index 0000000..954c59c --- /dev/null +++ b/lib/generated/responses/private_money_detail.dart @@ -0,0 +1,76 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'fallback_private_money.dart'; +import 'private_money_topup_method.dart'; +import 'organization.dart'; +import 'private_money_sounds.dart'; +import 'private_money_images.dart'; +part 'private_money_detail.g.dart'; + +@JsonSerializable() +class PrivateMoneyDetail { + final String id; + final String name; + final String type; + final String unit; + final String description; + final String onelineMessage; + final String displayMoneyAndPoint; + final String? customDomainName; + final bool canUseC2cTransfer; + final String? accountImage; + final PrivateMoneyImages images; + final PrivateMoneySounds sounds; + final Organization organization; + final double maxBalance; + final double transferLimit; + final double moneyTopupTransferLimit; + final String expirationType; + final bool isExclusive; + final String? termsUrl; + final String? privacyPolicyUrl; + final String? paymentActUrl; + final String? commercialActUrl; + final bool isTopupQuotaAvailable; + final bool isItrustAuthenticationEnabled; + final bool canUseCreditCard; + final List topupMethods; + final List fallbackMoneys; + PrivateMoneyDetail({ + required this.id, + required this.name, + required this.type, + required this.unit, + required this.description, + required this.onelineMessage, + required this.displayMoneyAndPoint, + this.customDomainName, + required this.canUseC2cTransfer, + this.accountImage, + required this.images, + required this.sounds, + required this.organization, + required this.maxBalance, + required this.transferLimit, + required this.moneyTopupTransferLimit, + required this.expirationType, + required this.isExclusive, + this.termsUrl, + this.privacyPolicyUrl, + this.paymentActUrl, + this.commercialActUrl, + required this.isTopupQuotaAvailable, + required this.isItrustAuthenticationEnabled, + required this.canUseCreditCard, + required this.topupMethods, + required this.fallbackMoneys, + }); + + factory PrivateMoneyDetail.fromJson(Map json) => + _$PrivateMoneyDetailFromJson(json); + + Map toJson() => _$PrivateMoneyDetailToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/private_money_detail.g.dart b/lib/generated/responses/private_money_detail.g.dart new file mode 100644 index 0000000..d0d15ec --- /dev/null +++ b/lib/generated/responses/private_money_detail.g.dart @@ -0,0 +1,80 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_money_detail.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PrivateMoneyDetail _$PrivateMoneyDetailFromJson(Map json) => + PrivateMoneyDetail( + id: json['id'] as String, + name: json['name'] as String, + type: json['type'] as String, + unit: json['unit'] as String, + description: json['description'] as String, + onelineMessage: json['oneline_message'] as String, + displayMoneyAndPoint: json['display_money_and_point'] as String, + customDomainName: json['custom_domain_name'] as String?, + canUseC2cTransfer: json['can_use_c2c_transfer'] as bool, + accountImage: json['account_image'] as String?, + images: + PrivateMoneyImages.fromJson(json['images'] as Map), + sounds: + PrivateMoneySounds.fromJson(json['sounds'] as Map), + organization: + Organization.fromJson(json['organization'] as Map), + maxBalance: (json['max_balance'] as num).toDouble(), + transferLimit: (json['transfer_limit'] as num).toDouble(), + moneyTopupTransferLimit: + (json['money_topup_transfer_limit'] as num).toDouble(), + expirationType: json['expiration_type'] as String, + isExclusive: json['is_exclusive'] as bool, + termsUrl: json['terms_url'] as String?, + privacyPolicyUrl: json['privacy_policy_url'] as String?, + paymentActUrl: json['payment_act_url'] as String?, + commercialActUrl: json['commercial_act_url'] as String?, + isTopupQuotaAvailable: json['is_topup_quota_available'] as bool, + isItrustAuthenticationEnabled: + json['is_itrust_authentication_enabled'] as bool, + canUseCreditCard: json['can_use_credit_card'] as bool, + topupMethods: (json['topup_methods'] as List) + .map((e) => + PrivateMoneyTopupMethod.fromJson(e as Map)) + .toList(), + fallbackMoneys: (json['fallback_moneys'] as List) + .map((e) => FallbackPrivateMoney.fromJson(e as Map)) + .toList(), + ); + +Map _$PrivateMoneyDetailToJson(PrivateMoneyDetail instance) => + { + 'id': instance.id, + 'name': instance.name, + 'type': instance.type, + 'unit': instance.unit, + 'description': instance.description, + 'oneline_message': instance.onelineMessage, + 'display_money_and_point': instance.displayMoneyAndPoint, + 'custom_domain_name': instance.customDomainName, + 'can_use_c2c_transfer': instance.canUseC2cTransfer, + 'account_image': instance.accountImage, + 'images': instance.images, + 'sounds': instance.sounds, + 'organization': instance.organization, + 'max_balance': instance.maxBalance, + 'transfer_limit': instance.transferLimit, + 'money_topup_transfer_limit': instance.moneyTopupTransferLimit, + 'expiration_type': instance.expirationType, + 'is_exclusive': instance.isExclusive, + 'terms_url': instance.termsUrl, + 'privacy_policy_url': instance.privacyPolicyUrl, + 'payment_act_url': instance.paymentActUrl, + 'commercial_act_url': instance.commercialActUrl, + 'is_topup_quota_available': instance.isTopupQuotaAvailable, + 'is_itrust_authentication_enabled': + instance.isItrustAuthenticationEnabled, + 'can_use_credit_card': instance.canUseCreditCard, + 'topup_methods': instance.topupMethods, + 'fallback_moneys': instance.fallbackMoneys, + }; diff --git a/lib/generated/responses/private_money_images.dart b/lib/generated/responses/private_money_images.dart index a0bd930..0292e55 100644 --- a/lib/generated/responses/private_money_images.dart +++ b/lib/generated/responses/private_money_images.dart @@ -4,15 +4,15 @@ part 'private_money_images.g.dart'; @JsonSerializable() class PrivateMoneyImages { - final String card; + final String? card; @JsonKey(name: '300x300') - final String n300x300; + final String? n300x300; @JsonKey(name: '600x600') - final String n600x600; + final String? n600x600; PrivateMoneyImages({ - required this.card, - required this.n300x300, - required this.n600x600, + this.card, + this.n300x300, + this.n600x600, }); factory PrivateMoneyImages.fromJson(Map json) => diff --git a/lib/generated/responses/private_money_images.g.dart b/lib/generated/responses/private_money_images.g.dart index 3a9910f..e349993 100644 --- a/lib/generated/responses/private_money_images.g.dart +++ b/lib/generated/responses/private_money_images.g.dart @@ -8,9 +8,9 @@ part of 'private_money_images.dart'; PrivateMoneyImages _$PrivateMoneyImagesFromJson(Map json) => PrivateMoneyImages( - card: json['card'] as String, - n300x300: json['300x300'] as String, - n600x600: json['600x600'] as String, + card: json['card'] as String?, + n300x300: json['300x300'] as String?, + n600x600: json['600x600'] as String?, ); Map _$PrivateMoneyImagesToJson(PrivateMoneyImages instance) => diff --git a/lib/generated/responses/private_money_legal_text.dart b/lib/generated/responses/private_money_legal_text.dart new file mode 100644 index 0000000..4c48b65 --- /dev/null +++ b/lib/generated/responses/private_money_legal_text.dart @@ -0,0 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'private_money_legal_text.g.dart'; + +@JsonSerializable() +class PrivateMoneyLegalText { + final String text; + PrivateMoneyLegalText({ + required this.text, + }); + + factory PrivateMoneyLegalText.fromJson(Map json) => + _$PrivateMoneyLegalTextFromJson(json); + + Map toJson() => _$PrivateMoneyLegalTextToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/private_money_legal_text.g.dart b/lib/generated/responses/private_money_legal_text.g.dart new file mode 100644 index 0000000..2c60731 --- /dev/null +++ b/lib/generated/responses/private_money_legal_text.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_money_legal_text.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PrivateMoneyLegalText _$PrivateMoneyLegalTextFromJson( + Map json) => + PrivateMoneyLegalText( + text: json['text'] as String, + ); + +Map _$PrivateMoneyLegalTextToJson( + PrivateMoneyLegalText instance) => + { + 'text': instance.text, + }; diff --git a/lib/generated/responses/private_money_sounds.dart b/lib/generated/responses/private_money_sounds.dart new file mode 100644 index 0000000..a2e8c3d --- /dev/null +++ b/lib/generated/responses/private_money_sounds.dart @@ -0,0 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'private_money_sounds.g.dart'; + +@JsonSerializable() +class PrivateMoneySounds { + final String? payment; + PrivateMoneySounds({ + this.payment, + }); + + factory PrivateMoneySounds.fromJson(Map json) => + _$PrivateMoneySoundsFromJson(json); + + Map toJson() => _$PrivateMoneySoundsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/private_money_sounds.g.dart b/lib/generated/responses/private_money_sounds.g.dart new file mode 100644 index 0000000..eae8cca --- /dev/null +++ b/lib/generated/responses/private_money_sounds.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_money_sounds.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PrivateMoneySounds _$PrivateMoneySoundsFromJson(Map json) => + PrivateMoneySounds( + payment: json['payment'] as String?, + ); + +Map _$PrivateMoneySoundsToJson(PrivateMoneySounds instance) => + { + 'payment': instance.payment, + }; diff --git a/lib/generated/responses/private_money_topup_method.dart b/lib/generated/responses/private_money_topup_method.dart new file mode 100644 index 0000000..1e8baf9 --- /dev/null +++ b/lib/generated/responses/private_money_topup_method.dart @@ -0,0 +1,25 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'private_money_topup_method.g.dart'; + +@JsonSerializable() +class PrivateMoneyTopupMethod { + final String type; + final String name; + final List? amounts; + final List? range; + PrivateMoneyTopupMethod({ + required this.type, + required this.name, + this.amounts, + this.range, + }); + + factory PrivateMoneyTopupMethod.fromJson(Map json) => + _$PrivateMoneyTopupMethodFromJson(json); + + Map toJson() => _$PrivateMoneyTopupMethodToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/private_money_topup_method.g.dart b/lib/generated/responses/private_money_topup_method.g.dart new file mode 100644 index 0000000..19527ae --- /dev/null +++ b/lib/generated/responses/private_money_topup_method.g.dart @@ -0,0 +1,29 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'private_money_topup_method.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +PrivateMoneyTopupMethod _$PrivateMoneyTopupMethodFromJson( + Map json) => + PrivateMoneyTopupMethod( + type: json['type'] as String, + name: json['name'] as String, + amounts: (json['amounts'] as List?) + ?.map((e) => (e as num).toDouble()) + .toList(), + range: (json['range'] as List?) + ?.map((e) => (e as num).toDouble()) + .toList(), + ); + +Map _$PrivateMoneyTopupMethodToJson( + PrivateMoneyTopupMethod instance) => + { + 'type': instance.type, + 'name': instance.name, + 'amounts': instance.amounts, + 'range': instance.range, + }; diff --git a/lib/generated/responses/terminal.dart b/lib/generated/responses/terminal.dart new file mode 100644 index 0000000..39decfb --- /dev/null +++ b/lib/generated/responses/terminal.dart @@ -0,0 +1,33 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +import 'user_with_auth_factors.dart'; +part 'terminal.g.dart'; + +@JsonSerializable() +class Terminal { + final String id; + final String name; + final String hardwareId; + final String? pushService; + final String? pushToken; + final UserWithAuthFactors user; + final Account account; + Terminal({ + required this.id, + required this.name, + required this.hardwareId, + this.pushService, + this.pushToken, + required this.user, + required this.account, + }); + + factory Terminal.fromJson(Map json) => + _$TerminalFromJson(json); + + Map toJson() => _$TerminalToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/terminal.g.dart b/lib/generated/responses/terminal.g.dart new file mode 100644 index 0000000..c30122c --- /dev/null +++ b/lib/generated/responses/terminal.g.dart @@ -0,0 +1,27 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'terminal.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Terminal _$TerminalFromJson(Map json) => Terminal( + id: json['id'] as String, + name: json['name'] as String, + hardwareId: json['hardware_id'] as String, + pushService: json['push_service'] as String?, + pushToken: json['push_token'] as String?, + user: UserWithAuthFactors.fromJson(json['user'] as Map), + account: Account.fromJson(json['account'] as Map), + ); + +Map _$TerminalToJson(Terminal instance) => { + 'id': instance.id, + 'name': instance.name, + 'hardware_id': instance.hardwareId, + 'push_service': instance.pushService, + 'push_token': instance.pushToken, + 'user': instance.user, + 'account': instance.account, + }; diff --git a/lib/generated/responses/user_bank.dart b/lib/generated/responses/user_bank.dart new file mode 100644 index 0000000..cfa1a22 --- /dev/null +++ b/lib/generated/responses/user_bank.dart @@ -0,0 +1,36 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'private_money.dart'; +part 'user_bank.g.dart'; + +@JsonSerializable() +class UserBank { + final String id; + final PrivateMoney privateMoney; + final String bankName; + final String bankCode; + final String branchNumber; + final String branchName; + final String depositType; + final String maskedAccountNumber; + final String accountName; + UserBank({ + required this.id, + required this.privateMoney, + required this.bankName, + required this.bankCode, + required this.branchNumber, + required this.branchName, + required this.depositType, + required this.maskedAccountNumber, + required this.accountName, + }); + + factory UserBank.fromJson(Map json) => + _$UserBankFromJson(json); + + Map toJson() => _$UserBankToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_bank.g.dart b/lib/generated/responses/user_bank.g.dart new file mode 100644 index 0000000..447539e --- /dev/null +++ b/lib/generated/responses/user_bank.g.dart @@ -0,0 +1,32 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_bank.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserBank _$UserBankFromJson(Map json) => UserBank( + id: json['id'] as String, + privateMoney: + PrivateMoney.fromJson(json['private_money'] as Map), + bankName: json['bank_name'] as String, + bankCode: json['bank_code'] as String, + branchNumber: json['branch_number'] as String, + branchName: json['branch_name'] as String, + depositType: json['deposit_type'] as String, + maskedAccountNumber: json['masked_account_number'] as String, + accountName: json['account_name'] as String, + ); + +Map _$UserBankToJson(UserBank instance) => { + 'id': instance.id, + 'private_money': instance.privateMoney, + 'bank_name': instance.bankName, + 'bank_code': instance.bankCode, + 'branch_number': instance.branchNumber, + 'branch_name': instance.branchName, + 'deposit_type': instance.depositType, + 'masked_account_number': instance.maskedAccountNumber, + 'account_name': instance.accountName, + }; diff --git a/lib/generated/responses/user_transaction.dart b/lib/generated/responses/user_transaction.dart new file mode 100644 index 0000000..97edd6b --- /dev/null +++ b/lib/generated/responses/user_transaction.dart @@ -0,0 +1,45 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +import 'user.dart'; +part 'user_transaction.g.dart'; + +@JsonSerializable() +class UserTransaction { + final String id; + final User user; + final double balance; + final double amount; + final double moneyAmount; + final double pointAmount; + final double? rawPointAmount; + final double? campaignPointAmount; + final Account account; + final String description; + final DateTime doneAt; + final String type; + final bool isModified; + UserTransaction({ + required this.id, + required this.user, + required this.balance, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + this.rawPointAmount, + this.campaignPointAmount, + required this.account, + required this.description, + required this.doneAt, + required this.type, + required this.isModified, + }); + + factory UserTransaction.fromJson(Map json) => + _$UserTransactionFromJson(json); + + Map toJson() => _$UserTransactionToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_transaction.g.dart b/lib/generated/responses/user_transaction.g.dart new file mode 100644 index 0000000..9ff955e --- /dev/null +++ b/lib/generated/responses/user_transaction.g.dart @@ -0,0 +1,41 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_transaction.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserTransaction _$UserTransactionFromJson(Map json) => + UserTransaction( + id: json['id'] as String, + user: User.fromJson(json['user'] as Map), + balance: (json['balance'] as num).toDouble(), + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + rawPointAmount: (json['raw_point_amount'] as num?)?.toDouble(), + campaignPointAmount: (json['campaign_point_amount'] as num?)?.toDouble(), + account: Account.fromJson(json['account'] as Map), + description: json['description'] as String, + doneAt: DateTime.parse(json['done_at'] as String), + type: json['type'] as String, + isModified: json['is_modified'] as bool, + ); + +Map _$UserTransactionToJson(UserTransaction instance) => + { + 'id': instance.id, + 'user': instance.user, + 'balance': instance.balance, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'raw_point_amount': instance.rawPointAmount, + 'campaign_point_amount': instance.campaignPointAmount, + 'account': instance.account, + 'description': instance.description, + 'done_at': instance.doneAt.toIso8601String(), + 'type': instance.type, + 'is_modified': instance.isModified, + }; diff --git a/lib/generated/responses/user_transaction_with_customer_balance.dart b/lib/generated/responses/user_transaction_with_customer_balance.dart new file mode 100644 index 0000000..1f17377 --- /dev/null +++ b/lib/generated/responses/user_transaction_with_customer_balance.dart @@ -0,0 +1,47 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +import 'user.dart'; +part 'user_transaction_with_customer_balance.g.dart'; + +@JsonSerializable() +class UserTransactionWithCustomerBalance { + final String id; + final User user; + final double balance; + final double customerBalance; + final double amount; + final double moneyAmount; + final double pointAmount; + final double? rawPointAmount; + final double? campaignPointAmount; + final Account account; + final String description; + final DateTime doneAt; + final String type; + final bool isModified; + UserTransactionWithCustomerBalance({ + required this.id, + required this.user, + required this.balance, + required this.customerBalance, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + this.rawPointAmount, + this.campaignPointAmount, + required this.account, + required this.description, + required this.doneAt, + required this.type, + required this.isModified, + }); + + factory UserTransactionWithCustomerBalance.fromJson(Map json) => + _$UserTransactionWithCustomerBalanceFromJson(json); + + Map toJson() => _$UserTransactionWithCustomerBalanceToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_transaction_with_customer_balance.g.dart b/lib/generated/responses/user_transaction_with_customer_balance.g.dart new file mode 100644 index 0000000..19d28cf --- /dev/null +++ b/lib/generated/responses/user_transaction_with_customer_balance.g.dart @@ -0,0 +1,45 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_transaction_with_customer_balance.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserTransactionWithCustomerBalance _$UserTransactionWithCustomerBalanceFromJson( + Map json) => + UserTransactionWithCustomerBalance( + id: json['id'] as String, + user: User.fromJson(json['user'] as Map), + balance: (json['balance'] as num).toDouble(), + customerBalance: (json['customer_balance'] as num).toDouble(), + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + rawPointAmount: (json['raw_point_amount'] as num?)?.toDouble(), + campaignPointAmount: (json['campaign_point_amount'] as num?)?.toDouble(), + account: Account.fromJson(json['account'] as Map), + description: json['description'] as String, + doneAt: DateTime.parse(json['done_at'] as String), + type: json['type'] as String, + isModified: json['is_modified'] as bool, + ); + +Map _$UserTransactionWithCustomerBalanceToJson( + UserTransactionWithCustomerBalance instance) => + { + 'id': instance.id, + 'user': instance.user, + 'balance': instance.balance, + 'customer_balance': instance.customerBalance, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'raw_point_amount': instance.rawPointAmount, + 'campaign_point_amount': instance.campaignPointAmount, + 'account': instance.account, + 'description': instance.description, + 'done_at': instance.doneAt.toIso8601String(), + 'type': instance.type, + 'is_modified': instance.isModified, + }; diff --git a/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.dart b/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.dart new file mode 100644 index 0000000..c1bc3d7 --- /dev/null +++ b/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.dart @@ -0,0 +1,53 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transaction_with_transfers_and_customer_balance.dart'; +import 'user_transfer_without_account.dart'; +import 'account.dart'; +import 'user.dart'; +part 'user_transaction_with_fallback_and_customer_balance.g.dart'; + +@JsonSerializable() +class UserTransactionWithFallbackAndCustomerBalance { + final String id; + final User user; + final double balance; + final double customerBalance; + final double amount; + final double moneyAmount; + final double pointAmount; + final double? rawPointAmount; + final double? campaignPointAmount; + final Account account; + final String description; + final DateTime doneAt; + final String type; + final bool isModified; + final List transfers; + final List? fallbackTransactions; + UserTransactionWithFallbackAndCustomerBalance({ + required this.id, + required this.user, + required this.balance, + required this.customerBalance, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + this.rawPointAmount, + this.campaignPointAmount, + required this.account, + required this.description, + required this.doneAt, + required this.type, + required this.isModified, + required this.transfers, + this.fallbackTransactions, + }); + + factory UserTransactionWithFallbackAndCustomerBalance.fromJson(Map json) => + _$UserTransactionWithFallbackAndCustomerBalanceFromJson(json); + + Map toJson() => _$UserTransactionWithFallbackAndCustomerBalanceToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.g.dart b/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.g.dart new file mode 100644 index 0000000..bd0a14d --- /dev/null +++ b/lib/generated/responses/user_transaction_with_fallback_and_customer_balance.g.dart @@ -0,0 +1,59 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_transaction_with_fallback_and_customer_balance.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserTransactionWithFallbackAndCustomerBalance + _$UserTransactionWithFallbackAndCustomerBalanceFromJson( + Map json) => + UserTransactionWithFallbackAndCustomerBalance( + id: json['id'] as String, + user: User.fromJson(json['user'] as Map), + balance: (json['balance'] as num).toDouble(), + customerBalance: (json['customer_balance'] as num).toDouble(), + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + rawPointAmount: (json['raw_point_amount'] as num?)?.toDouble(), + campaignPointAmount: + (json['campaign_point_amount'] as num?)?.toDouble(), + account: Account.fromJson(json['account'] as Map), + description: json['description'] as String, + doneAt: DateTime.parse(json['done_at'] as String), + type: json['type'] as String, + isModified: json['is_modified'] as bool, + transfers: (json['transfers'] as List) + .map((e) => UserTransferWithoutAccount.fromJson( + e as Map)) + .toList(), + fallbackTransactions: + (json['fallback_transactions'] as List?) + ?.map((e) => + UserTransactionWithTransfersAndCustomerBalance.fromJson( + e as Map)) + .toList(), + ); + +Map _$UserTransactionWithFallbackAndCustomerBalanceToJson( + UserTransactionWithFallbackAndCustomerBalance instance) => + { + 'id': instance.id, + 'user': instance.user, + 'balance': instance.balance, + 'customer_balance': instance.customerBalance, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'raw_point_amount': instance.rawPointAmount, + 'campaign_point_amount': instance.campaignPointAmount, + 'account': instance.account, + 'description': instance.description, + 'done_at': instance.doneAt.toIso8601String(), + 'type': instance.type, + 'is_modified': instance.isModified, + 'transfers': instance.transfers, + 'fallback_transactions': instance.fallbackTransactions, + }; diff --git a/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.dart b/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.dart new file mode 100644 index 0000000..616de7c --- /dev/null +++ b/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.dart @@ -0,0 +1,50 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'user_transfer_without_account.dart'; +import 'account.dart'; +import 'user.dart'; +part 'user_transaction_with_transfers_and_customer_balance.g.dart'; + +@JsonSerializable() +class UserTransactionWithTransfersAndCustomerBalance { + final String id; + final User user; + final double balance; + final double customerBalance; + final double amount; + final double moneyAmount; + final double pointAmount; + final double? rawPointAmount; + final double? campaignPointAmount; + final Account account; + final String description; + final DateTime doneAt; + final String type; + final bool isModified; + final List transfers; + UserTransactionWithTransfersAndCustomerBalance({ + required this.id, + required this.user, + required this.balance, + required this.customerBalance, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + this.rawPointAmount, + this.campaignPointAmount, + required this.account, + required this.description, + required this.doneAt, + required this.type, + required this.isModified, + required this.transfers, + }); + + factory UserTransactionWithTransfersAndCustomerBalance.fromJson(Map json) => + _$UserTransactionWithTransfersAndCustomerBalanceFromJson(json); + + Map toJson() => _$UserTransactionWithTransfersAndCustomerBalanceToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.g.dart b/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.g.dart new file mode 100644 index 0000000..14af57a --- /dev/null +++ b/lib/generated/responses/user_transaction_with_transfers_and_customer_balance.g.dart @@ -0,0 +1,52 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_transaction_with_transfers_and_customer_balance.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserTransactionWithTransfersAndCustomerBalance + _$UserTransactionWithTransfersAndCustomerBalanceFromJson( + Map json) => + UserTransactionWithTransfersAndCustomerBalance( + id: json['id'] as String, + user: User.fromJson(json['user'] as Map), + balance: (json['balance'] as num).toDouble(), + customerBalance: (json['customer_balance'] as num).toDouble(), + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + rawPointAmount: (json['raw_point_amount'] as num?)?.toDouble(), + campaignPointAmount: + (json['campaign_point_amount'] as num?)?.toDouble(), + account: Account.fromJson(json['account'] as Map), + description: json['description'] as String, + doneAt: DateTime.parse(json['done_at'] as String), + type: json['type'] as String, + isModified: json['is_modified'] as bool, + transfers: (json['transfers'] as List) + .map((e) => UserTransferWithoutAccount.fromJson( + e as Map)) + .toList(), + ); + +Map _$UserTransactionWithTransfersAndCustomerBalanceToJson( + UserTransactionWithTransfersAndCustomerBalance instance) => + { + 'id': instance.id, + 'user': instance.user, + 'balance': instance.balance, + 'customer_balance': instance.customerBalance, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'raw_point_amount': instance.rawPointAmount, + 'campaign_point_amount': instance.campaignPointAmount, + 'account': instance.account, + 'description': instance.description, + 'done_at': instance.doneAt.toIso8601String(), + 'type': instance.type, + 'is_modified': instance.isModified, + 'transfers': instance.transfers, + }; diff --git a/lib/generated/responses/user_transfer.dart b/lib/generated/responses/user_transfer.dart new file mode 100644 index 0000000..09a4423 --- /dev/null +++ b/lib/generated/responses/user_transfer.dart @@ -0,0 +1,41 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +import 'account.dart'; +import 'user.dart'; +part 'user_transfer.g.dart'; + +@JsonSerializable() +class UserTransfer { + final String id; + final String transactionId; + final User user; + final double balance; + final double amount; + final double moneyAmount; + final double pointAmount; + final Account account; + final String description; + final DateTime doneAt; + final String type; + UserTransfer({ + required this.id, + required this.transactionId, + required this.user, + required this.balance, + required this.amount, + required this.moneyAmount, + required this.pointAmount, + required this.account, + required this.description, + required this.doneAt, + required this.type, + }); + + factory UserTransfer.fromJson(Map json) => + _$UserTransferFromJson(json); + + Map toJson() => _$UserTransferToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_transfer.g.dart b/lib/generated/responses/user_transfer.g.dart new file mode 100644 index 0000000..7d36614 --- /dev/null +++ b/lib/generated/responses/user_transfer.g.dart @@ -0,0 +1,36 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_transfer.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserTransfer _$UserTransferFromJson(Map json) => UserTransfer( + id: json['id'] as String, + transactionId: json['transaction_id'] as String, + user: User.fromJson(json['user'] as Map), + balance: (json['balance'] as num).toDouble(), + amount: (json['amount'] as num).toDouble(), + moneyAmount: (json['money_amount'] as num).toDouble(), + pointAmount: (json['point_amount'] as num).toDouble(), + account: Account.fromJson(json['account'] as Map), + description: json['description'] as String, + doneAt: DateTime.parse(json['done_at'] as String), + type: json['type'] as String, + ); + +Map _$UserTransferToJson(UserTransfer instance) => + { + 'id': instance.id, + 'transaction_id': instance.transactionId, + 'user': instance.user, + 'balance': instance.balance, + 'amount': instance.amount, + 'money_amount': instance.moneyAmount, + 'point_amount': instance.pointAmount, + 'account': instance.account, + 'description': instance.description, + 'done_at': instance.doneAt.toIso8601String(), + 'type': instance.type, + }; diff --git a/lib/generated/responses/user_with_auth_factors.dart b/lib/generated/responses/user_with_auth_factors.dart new file mode 100644 index 0000000..3e8e691 --- /dev/null +++ b/lib/generated/responses/user_with_auth_factors.dart @@ -0,0 +1,31 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'user_with_auth_factors.g.dart'; + +@JsonSerializable() +class UserWithAuthFactors { + final String id; + final String name; + final bool isMerchant; + final String? tel; + final String? countryCode; + final String? email; + final bool isPasswordRegistered; + UserWithAuthFactors({ + required this.id, + required this.name, + required this.isMerchant, + this.tel, + this.countryCode, + this.email, + required this.isPasswordRegistered, + }); + + factory UserWithAuthFactors.fromJson(Map json) => + _$UserWithAuthFactorsFromJson(json); + + Map toJson() => _$UserWithAuthFactorsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_with_auth_factors.g.dart b/lib/generated/responses/user_with_auth_factors.g.dart new file mode 100644 index 0000000..3a5818d --- /dev/null +++ b/lib/generated/responses/user_with_auth_factors.g.dart @@ -0,0 +1,30 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_with_auth_factors.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserWithAuthFactors _$UserWithAuthFactorsFromJson(Map json) => + UserWithAuthFactors( + id: json['id'] as String, + name: json['name'] as String, + isMerchant: json['is_merchant'] as bool, + tel: json['tel'] as String?, + countryCode: json['country_code'] as String?, + email: json['email'] as String?, + isPasswordRegistered: json['is_password_registered'] as bool, + ); + +Map _$UserWithAuthFactorsToJson( + UserWithAuthFactors instance) => + { + 'id': instance.id, + 'name': instance.name, + 'is_merchant': instance.isMerchant, + 'tel': instance.tel, + 'country_code': instance.countryCode, + 'email': instance.email, + 'is_password_registered': instance.isPasswordRegistered, + }; diff --git a/lib/generated/responses/user_with_details.dart b/lib/generated/responses/user_with_details.dart new file mode 100644 index 0000000..273a2b2 --- /dev/null +++ b/lib/generated/responses/user_with_details.dart @@ -0,0 +1,29 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'user_with_details.g.dart'; + +@JsonSerializable() +class UserWithDetails { + final String id; + final String name; + final bool isMerchant; + final String? tel; + final String? countryCode; + final String? email; + UserWithDetails({ + required this.id, + required this.name, + required this.isMerchant, + this.tel, + this.countryCode, + this.email, + }); + + factory UserWithDetails.fromJson(Map json) => + _$UserWithDetailsFromJson(json); + + Map toJson() => _$UserWithDetailsToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/user_with_details.g.dart b/lib/generated/responses/user_with_details.g.dart new file mode 100644 index 0000000..8397782 --- /dev/null +++ b/lib/generated/responses/user_with_details.g.dart @@ -0,0 +1,27 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_with_details.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserWithDetails _$UserWithDetailsFromJson(Map json) => + UserWithDetails( + id: json['id'] as String, + name: json['name'] as String, + isMerchant: json['is_merchant'] as bool, + tel: json['tel'] as String?, + countryCode: json['country_code'] as String?, + email: json['email'] as String?, + ); + +Map _$UserWithDetailsToJson(UserWithDetails instance) => + { + 'id': instance.id, + 'name': instance.name, + 'is_merchant': instance.isMerchant, + 'tel': instance.tel, + 'country_code': instance.countryCode, + 'email': instance.email, + }; diff --git a/lib/generated/responses/veritrans_mdk_token_api_key.dart b/lib/generated/responses/veritrans_mdk_token_api_key.dart new file mode 100644 index 0000000..95a8c45 --- /dev/null +++ b/lib/generated/responses/veritrans_mdk_token_api_key.dart @@ -0,0 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. +import 'package:json_annotation/json_annotation.dart'; +part 'veritrans_mdk_token_api_key.g.dart'; + +@JsonSerializable() +class VeritransMdkTokenApiKey { + final String? tokenApiKey; + VeritransMdkTokenApiKey({ + this.tokenApiKey, + }); + + factory VeritransMdkTokenApiKey.fromJson(Map json) => + _$VeritransMdkTokenApiKeyFromJson(json); + + Map toJson() => _$VeritransMdkTokenApiKeyToJson(this); + + @override + String toString() => this.toJson().toString(); +} diff --git a/lib/generated/responses/veritrans_mdk_token_api_key.g.dart b/lib/generated/responses/veritrans_mdk_token_api_key.g.dart new file mode 100644 index 0000000..4f6fd80 --- /dev/null +++ b/lib/generated/responses/veritrans_mdk_token_api_key.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'veritrans_mdk_token_api_key.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +VeritransMdkTokenApiKey _$VeritransMdkTokenApiKeyFromJson( + Map json) => + VeritransMdkTokenApiKey( + tokenApiKey: json['token_api_key'] as String?, + ); + +Map _$VeritransMdkTokenApiKeyToJson( + VeritransMdkTokenApiKey instance) => + { + 'token_api_key': instance.tokenApiKey, + };