From f130960014654dab87117831fefe2dc5194f8e77 Mon Sep 17 00:00:00 2001 From: Satoshi Imai Date: Fri, 30 May 2025 13:50:16 +0900 Subject: [PATCH] autogen20250530 --- Sources/Pokepay/BankAPI.swift | 5 + .../BankAPI/Account/CreateAccount.swift | 11 +- .../Account/CreateAccountCpmToken.swift | 70 +- .../Pokepay/BankAPI/Account/GetAccount.swift | 19 +- .../BankAPI/Account/GetAccountBalances.swift | 50 + .../Account/GetAccountCouponDetail.swift | 13 +- .../BankAPI/Account/GetAccountCoupons.swift | 20 +- .../Account/GetAccountTransactions.swift | 19 +- .../BankAPI/Account/GetAccountTransfers.swift | 22 +- .../BankAPI/Account/IdentifyIndividual.swift | 16 +- .../Account/PatchAccountCouponDetail.swift | 25 +- .../BankAPI/Account/UpdateAccount.swift | 34 + Sources/Pokepay/BankAPI/Bank/BankTopUp.swift | 46 + Sources/Pokepay/BankAPI/Bank/DeleteBank.swift | 32 + Sources/Pokepay/BankAPI/Bank/ListBanks.swift | 34 + Sources/Pokepay/BankAPI/Bill/CreateBill.swift | 49 +- Sources/Pokepay/BankAPI/Bill/DeleteBill.swift | 17 +- Sources/Pokepay/BankAPI/Bill/GetBill.swift | 25 +- .../BankAPI/Bill/GetBillLastTransaction.swift | 28 + .../BankAPI/Bill/ListBillTransactions.swift | 46 + Sources/Pokepay/BankAPI/Bill/UpdateBill.swift | 28 +- .../GetAccountCampaignPointAmounts.swift | 30 + .../BankAPI/Cashtray/CreateCashtray.swift | 21 +- .../BankAPI/Cashtray/DeleteCashtray.swift | 17 +- .../BankAPI/Cashtray/GetCashtray.swift | 19 +- .../Cashtray/GetCashtrayAttempts.swift | 17 +- .../BankAPI/Cashtray/UpdateCashtray.swift | 25 +- .../Pokepay/BankAPI/Check/CreateCheck.swift | 61 +- .../Pokepay/BankAPI/Check/DeleteCheck.swift | 17 +- Sources/Pokepay/BankAPI/Check/GetCheck.swift | 17 +- .../Pokepay/BankAPI/Check/UpdateCheck.swift | 34 +- .../Coupon/GetPrivateMoneyCoupons.swift | 42 + Sources/Pokepay/BankAPI/Cpm/GetCpmToken.swift | 28 + .../BankAPI/CreditCard/CreateCreditCard.swift | 8 +- .../BankAPI/CreditCard/DeleteCreditCard.swift | 8 +- .../BankAPI/CreditCard/GetCreditCards.swift | 8 +- .../TopupWithCreditCardMdkToken.swift | 20 +- .../TopupWithCreditCardMembership.swift | 18 +- .../Merchants/ListMerchantTransactions.swift | 28 + .../PrivateMoney/GetPrivateMoney.swift | 14 +- .../GetPrivateMoneyCommercialAct.swift | 28 + .../GetPrivateMoneyPaymentAct.swift | 28 + .../GetPrivateMoneyPrivacyPolicy.swift | 28 + .../PrivateMoney/GetPrivateMoneyTerms.swift | 28 + .../PrivateMoney/ListPrivateMoneys.swift | 52 + .../Terminal/AddTerminalPublicKey.swift | 13 +- .../BankAPI/Terminal/GetTerminal.swift | 13 +- .../BankAPI/Terminal/UpdateTerminal.swift | 37 +- .../BankAPI/Transaction/GetTransaction.swift | 17 +- .../Transaction/RefundTransaction.swift | 34 + Sources/Pokepay/BankAPI/User/GetUser.swift | 28 + .../BankAPI/User/GetUserAccounts.swift | 19 +- .../BankAPI/User/GetUserSettingUrl.swift | 14 +- .../BankAPI/User/GetUserTransactions.swift | 19 +- .../BankAPI/User/GetUserWithAuthFactors.swift | 16 +- Sources/Pokepay/BankAPI/User/UpdateUser.swift | 15 +- Sources/Pokepay/Responses/Account.swift | 29 +- .../Pokepay/Responses/AccountBalances.swift | 18 + .../AccountCampaignPointAmounts.swift | 9 +- Sources/Pokepay/Responses/AccountDetail.swift | 24 + Sources/Pokepay/Responses/Bill.swift | 39 +- .../BillWithAdditionalPrivateMoneys.swift | 30 + Sources/Pokepay/Responses/Cashtray.swift | 33 +- .../Pokepay/Responses/CashtrayAttempts.swift | 7 +- .../CashtrayWithAttemptAndTransaction.swift | 8 + Sources/Pokepay/Responses/Check.swift | 41 +- Sources/Pokepay/Responses/Coupon.swift | 51 +- Sources/Pokepay/Responses/CouponDetail.swift | 57 +- Sources/Pokepay/Responses/CpmToken.swift | 20 + Sources/Pokepay/Responses/CreditCard.swift | 2 +- .../Responses/IdentificationResult.swift | 13 +- Sources/Pokepay/Responses/Organization.swift | 10 +- .../Responses/PaginatedAccountBalances.swift | 21 +- .../Responses/PaginatedAccountCoupons.swift | 18 + .../PaginatedAccountTransactions.swift | 18 + .../Responses/PaginatedAccountTransfers.swift | 18 + .../Responses/PaginatedCreditCards.swift | 6 +- .../PaginatedPrivateMoneyCoupons.swift | 18 + .../Responses/PaginatedPrivateMoneys.swift | 21 +- .../Responses/PaginatedUserAccounts.swift | 18 + .../Responses/PaginatedUserTransactions.swift | 18 + Sources/Pokepay/Responses/PrivateMoney.swift | 59 +- .../Responses/PrivateMoneyDetail.swift | 8 + Sources/Pokepay/Responses/Product.swift | 22 + .../Responses/SevenBankAtmSession.swift | 16 + Sources/Pokepay/Responses/Terminal.swift | 25 +- Sources/Pokepay/Responses/User.swift | 13 +- Sources/Pokepay/Responses/UserBank.swift | 26 + .../Pokepay/Responses/UserTransaction.swift | 45 +- .../UserTransactionWithCustomerBalance.swift | 32 + .../UserTransactionWithTransfers.swift | 32 + Sources/Pokepay/Responses/UserTransfer.swift | 30 + .../UserTransferWithoutAccount.swift | 22 + .../Responses/UserWithAuthFactors.swift | 23 +- .../Pokepay/Responses/UserWithDetails.swift | 18 + docs/ios-sdk/README.md | 113 ++ docs/ios-sdk/account.md | 975 ++++++++++++++++++ docs/ios-sdk/bank.md | 143 +++ docs/ios-sdk/bill.md | 372 +++++++ docs/ios-sdk/campaign.md | 55 + docs/ios-sdk/cashtray.md | 230 +++++ docs/ios-sdk/check.md | 347 +++++++ docs/ios-sdk/coupon.md | 279 +++++ docs/ios-sdk/cpm.md | 150 +++ docs/ios-sdk/credit_card.md | 148 +++ .../individual_number_identification.md | 141 +++ docs/ios-sdk/internal.md | 36 + docs/ios-sdk/merchants.md | 39 + docs/ios-sdk/open_exchange_rates.md | 5 + docs/ios-sdk/payspot.md | 8 + docs/ios-sdk/private_money.md | 279 +++++ docs/ios-sdk/responses.md | 427 ++++++++ docs/ios-sdk/sevenbankatm.md | 7 + docs/ios-sdk/terminal.md | 138 +++ docs/ios-sdk/transaction.md | 494 +++++++++ docs/ios-sdk/user.md | 275 +++++ docs/ios-sdk/voucher.md | 7 + 117 files changed, 6492 insertions(+), 524 deletions(-) create mode 100644 Sources/Pokepay/BankAPI/Account/GetAccountBalances.swift create mode 100644 Sources/Pokepay/BankAPI/Account/UpdateAccount.swift create mode 100644 Sources/Pokepay/BankAPI/Bank/BankTopUp.swift create mode 100644 Sources/Pokepay/BankAPI/Bank/DeleteBank.swift create mode 100644 Sources/Pokepay/BankAPI/Bank/ListBanks.swift create mode 100644 Sources/Pokepay/BankAPI/Bill/GetBillLastTransaction.swift create mode 100644 Sources/Pokepay/BankAPI/Bill/ListBillTransactions.swift create mode 100644 Sources/Pokepay/BankAPI/Campaign/GetAccountCampaignPointAmounts.swift create mode 100644 Sources/Pokepay/BankAPI/Coupon/GetPrivateMoneyCoupons.swift create mode 100644 Sources/Pokepay/BankAPI/Cpm/GetCpmToken.swift create mode 100644 Sources/Pokepay/BankAPI/Merchants/ListMerchantTransactions.swift create mode 100644 Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyCommercialAct.swift create mode 100644 Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPaymentAct.swift create mode 100644 Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPrivacyPolicy.swift create mode 100644 Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyTerms.swift create mode 100644 Sources/Pokepay/BankAPI/PrivateMoney/ListPrivateMoneys.swift create mode 100644 Sources/Pokepay/BankAPI/Transaction/RefundTransaction.swift create mode 100644 Sources/Pokepay/BankAPI/User/GetUser.swift create mode 100644 Sources/Pokepay/Responses/AccountBalances.swift create mode 100644 Sources/Pokepay/Responses/AccountDetail.swift create mode 100644 Sources/Pokepay/Responses/BillWithAdditionalPrivateMoneys.swift create mode 100644 Sources/Pokepay/Responses/CashtrayWithAttemptAndTransaction.swift create mode 100644 Sources/Pokepay/Responses/CpmToken.swift create mode 100644 Sources/Pokepay/Responses/PaginatedAccountCoupons.swift create mode 100644 Sources/Pokepay/Responses/PaginatedAccountTransactions.swift create mode 100644 Sources/Pokepay/Responses/PaginatedAccountTransfers.swift create mode 100644 Sources/Pokepay/Responses/PaginatedPrivateMoneyCoupons.swift create mode 100644 Sources/Pokepay/Responses/PaginatedUserAccounts.swift create mode 100644 Sources/Pokepay/Responses/PaginatedUserTransactions.swift create mode 100644 Sources/Pokepay/Responses/PrivateMoneyDetail.swift create mode 100644 Sources/Pokepay/Responses/Product.swift create mode 100644 Sources/Pokepay/Responses/SevenBankAtmSession.swift create mode 100644 Sources/Pokepay/Responses/UserBank.swift create mode 100644 Sources/Pokepay/Responses/UserTransactionWithCustomerBalance.swift create mode 100644 Sources/Pokepay/Responses/UserTransactionWithTransfers.swift create mode 100644 Sources/Pokepay/Responses/UserTransfer.swift create mode 100644 Sources/Pokepay/Responses/UserTransferWithoutAccount.swift create mode 100644 Sources/Pokepay/Responses/UserWithDetails.swift create mode 100644 docs/ios-sdk/README.md create mode 100644 docs/ios-sdk/account.md create mode 100644 docs/ios-sdk/bank.md create mode 100644 docs/ios-sdk/bill.md create mode 100644 docs/ios-sdk/campaign.md create mode 100644 docs/ios-sdk/cashtray.md create mode 100644 docs/ios-sdk/check.md create mode 100644 docs/ios-sdk/coupon.md create mode 100644 docs/ios-sdk/cpm.md create mode 100644 docs/ios-sdk/credit_card.md create mode 100644 docs/ios-sdk/individual_number_identification.md create mode 100644 docs/ios-sdk/internal.md create mode 100644 docs/ios-sdk/merchants.md create mode 100644 docs/ios-sdk/open_exchange_rates.md create mode 100644 docs/ios-sdk/payspot.md create mode 100644 docs/ios-sdk/private_money.md create mode 100644 docs/ios-sdk/responses.md create mode 100644 docs/ios-sdk/sevenbankatm.md create mode 100644 docs/ios-sdk/terminal.md create mode 100644 docs/ios-sdk/transaction.md create mode 100644 docs/ios-sdk/user.md create mode 100644 docs/ios-sdk/voucher.md diff --git a/Sources/Pokepay/BankAPI.swift b/Sources/Pokepay/BankAPI.swift index c73c1c5..19f9597 100644 --- a/Sources/Pokepay/BankAPI.swift +++ b/Sources/Pokepay/BankAPI.swift @@ -2,11 +2,16 @@ public struct BankAPI { public struct Account {} + public struct Bank {} public struct Bill {} + public struct Campaign {} public struct Cashtray {} public struct Check {} + public struct Coupon {} + public struct Cpm {} public struct CpmToken {} public struct CreditCard {} + public struct Merchants {} public struct PrivateMoney {} public struct Terminal {} public struct Transaction {} diff --git a/Sources/Pokepay/BankAPI/Account/CreateAccount.swift b/Sources/Pokepay/BankAPI/Account/CreateAccount.swift index ebaaa3b..62bc21c 100644 --- a/Sources/Pokepay/BankAPI/Account/CreateAccount.swift +++ b/Sources/Pokepay/BankAPI/Account/CreateAccount.swift @@ -1,12 +1,13 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct Create: BankRequest { + struct CreateAccount: BankRequest { public let name: String? public let privateMoneyId: String public let externalId: String? - public typealias Response = Account + public typealias Response = AccountDetail public init(name: String? = nil, privateMoneyId: String, externalId: String? = nil) { self.name = name @@ -24,15 +25,17 @@ public extension BankAPI.Account { public var parameters: Any? { var dict: [String: Any] = [:] + if name != nil { dict["name"] = name } - + dict["private_money_id"] = privateMoneyId - + if externalId != nil { dict["external_id"] = externalId } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Account/CreateAccountCpmToken.swift b/Sources/Pokepay/BankAPI/Account/CreateAccountCpmToken.swift index 3efcf89..965699a 100644 --- a/Sources/Pokepay/BankAPI/Account/CreateAccountCpmToken.swift +++ b/Sources/Pokepay/BankAPI/Account/CreateAccountCpmToken.swift @@ -1,33 +1,24 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { struct CreateAccountCpmToken: BankRequest { - - public enum Scope: Int { - case PAYMENT = 1 - case TOPUP = 2 - case BOTH = 3 - } - - public let accountId: String - public let scopes: Int + public let scopes: [String]? public let expiresIn: Int? - public let metadata: [String:String]? + public let metadata: String? + public let keepAlive: Bool? + public let isShortToken: Bool? + public let accountId: Uuid - public typealias Response = AccountCpmToken + public typealias Response = CpmToken - public init(accountId: String, scopes: Scope = .PAYMENT, expiresIn: Int? = nil, metadata: [String:String]? = nil) { - self.accountId = accountId - self.scopes = scopes.rawValue - self.expiresIn = expiresIn - self.metadata = metadata - } - - public init(accountId:String, scopes:Int,expiresIn: Int? = nil,metadata: [String:String]? = nil){ - self.accountId = accountId + public init(scopes: [String]? = nil, expiresIn: Int? = nil, metadata: String? = nil, keepAlive: Bool? = nil, isShortToken: Bool? = nil, accountId: Uuid) { self.scopes = scopes self.expiresIn = expiresIn self.metadata = metadata + self.keepAlive = keepAlive + self.isShortToken = isShortToken + self.accountId = accountId } public var method: HTTPMethod { @@ -40,37 +31,28 @@ public extension BankAPI.Account { public var parameters: Any? { var dict: [String: Any] = [:] - var scopesArr: [String] = [] - if (scopes & Scope.PAYMENT.rawValue) != 0 { - scopesArr.append("payment") - } - if (scopes & Scope.TOPUP.rawValue) != 0 { - scopesArr.append("topup") + + if scopes != nil { + dict["scopes"] = scopes } - dict["scopes"] = scopesArr + if expiresIn != nil { dict["expires_in"] = expiresIn } + if metadata != nil { - - dict["metadata"] = self.toJsonString(metadata:metadata!) + dict["metadata"] = metadata } - return dict - } - - private func toJsonString(metadata:[String:String]) -> String{ - var jsonString = "{" - for (key, value) in metadata { - jsonString.append("\"") - jsonString.append(key) - jsonString.append("\":\"") - jsonString.append(value) - jsonString.append("\"") - jsonString.append(",") + + if keepAlive != nil { + dict["keep_alive"] = keepAlive + } + + if isShortToken != nil { + dict["is_short_token"] = isShortToken } - jsonString.removeLast() - jsonString.append("}") - return jsonString + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Account/GetAccount.swift b/Sources/Pokepay/BankAPI/Account/GetAccount.swift index 0eb7c47..8361f2c 100644 --- a/Sources/Pokepay/BankAPI/Account/GetAccount.swift +++ b/Sources/Pokepay/BankAPI/Account/GetAccount.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct Get: BankRequest { - public let id: String + struct GetAccount: BankRequest { + public let accountId: Uuid - public typealias Response = Account + public typealias Response = AccountDetail - public init(id: String) { - self.id = id + public init(accountId: Uuid) { + self.accountId = accountId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Account { } public var path: String { - return "/accounts/\(id)" + return "/accounts/\(accountId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Account/GetAccountBalances.swift b/Sources/Pokepay/BankAPI/Account/GetAccountBalances.swift new file mode 100644 index 0000000..4e03923 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Account/GetAccountBalances.swift @@ -0,0 +1,50 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Account { + struct GetAccountBalances: BankRequest { + public let accountId: String + public let before: String? + public let after: String? + public let perPage: Int? + public let expired: BooleanString + + public typealias Response = PaginatedAccountBalances + + public init(accountId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil, expired: BooleanString) { + self.accountId = accountId + self.before = before + self.after = after + self.perPage = perPage + self.expired = expired + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/accounts/\(accountId)/balances" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if before != nil { + dict["before"] = before + } + + if after != nil { + dict["after"] = after + } + + if perPage != nil { + dict["per_page"] = perPage + } + + dict["expired"] = expired + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Account/GetAccountCouponDetail.swift b/Sources/Pokepay/BankAPI/Account/GetAccountCouponDetail.swift index 8bf76c3..ed2f92a 100644 --- a/Sources/Pokepay/BankAPI/Account/GetAccountCouponDetail.swift +++ b/Sources/Pokepay/BankAPI/Account/GetAccountCouponDetail.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct GetCouponDetail:BankRequest { + struct GetAccountCouponDetail: BankRequest { public let accountId: String - public let couponId:String + public let couponId: String public typealias Response = CouponDetail - public init(accountId: String, couponId:String) { + public init(accountId: String, couponId: String) { self.accountId = accountId self.couponId = couponId } @@ -19,5 +20,11 @@ public extension BankAPI.Account { public var path: String { return "/accounts/\(accountId)/coupons/\(couponId)" } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } } } diff --git a/Sources/Pokepay/BankAPI/Account/GetAccountCoupons.swift b/Sources/Pokepay/BankAPI/Account/GetAccountCoupons.swift index 1d92fe4..1106df6 100644 --- a/Sources/Pokepay/BankAPI/Account/GetAccountCoupons.swift +++ b/Sources/Pokepay/BankAPI/Account/GetAccountCoupons.swift @@ -1,16 +1,17 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { struct GetAccountCoupons: BankRequest { - public let accountId: String - public let isAvailable:Bool? + public let accountId: Uuid + public let isAvailable: BooleanString public let before: String? public let after: String? - public let perPage: Int32? + public let perPage: Int? - public typealias Response = PaginatedCoupons + public typealias Response = PaginatedAccountCoupons - public init(accountId: String,isAvailable:Bool? = nil , before: String? = nil, after: String? = nil, perPage: Int32? = nil) { + public init(accountId: Uuid, isAvailable: BooleanString, before: String? = nil, after: String? = nil, perPage: Int? = nil) { self.accountId = accountId self.isAvailable = isAvailable self.before = before @@ -28,18 +29,21 @@ public extension BankAPI.Account { public var parameters: Any? { var dict: [String: Any] = [:] - if isAvailable != nil { - dict["is_available"] = isAvailable - } + + dict["is_available"] = isAvailable + if before != nil { dict["before"] = before } + if after != nil { dict["after"] = after } + if perPage != nil { dict["per_page"] = perPage } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Account/GetAccountTransactions.swift b/Sources/Pokepay/BankAPI/Account/GetAccountTransactions.swift index fe8bd0b..ec5f1b0 100644 --- a/Sources/Pokepay/BankAPI/Account/GetAccountTransactions.swift +++ b/Sources/Pokepay/BankAPI/Account/GetAccountTransactions.swift @@ -1,16 +1,17 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct GetTransactions: BankRequest { - public let id: String + struct GetAccountTransactions: BankRequest { + public let accountId: Uuid public let before: String? public let after: String? - public let perPage: Int32? + public let perPage: Int? - public typealias Response = PaginatedTransactions + public typealias Response = PaginatedAccountTransactions - public init(id: String, before: String? = nil, after: String? = nil, perPage: Int32? = nil) { - self.id = id + public init(accountId: Uuid, before: String? = nil, after: String? = nil, perPage: Int? = nil) { + self.accountId = accountId self.before = before self.after = after self.perPage = perPage @@ -21,20 +22,24 @@ public extension BankAPI.Account { } public var path: String { - return "/accounts/\(id)/transactions" + return "/accounts/\(accountId)/transactions" } public var parameters: Any? { var dict: [String: Any] = [:] + if before != nil { dict["before"] = before } + if after != nil { dict["after"] = after } + if perPage != nil { dict["per_page"] = perPage } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Account/GetAccountTransfers.swift b/Sources/Pokepay/BankAPI/Account/GetAccountTransfers.swift index 36700cf..1cb331e 100644 --- a/Sources/Pokepay/BankAPI/Account/GetAccountTransfers.swift +++ b/Sources/Pokepay/BankAPI/Account/GetAccountTransfers.swift @@ -1,16 +1,17 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct GetTransfers: BankRequest { - public let id: String + struct GetAccountTransfers: BankRequest { + public let accountId: Uuid public let before: String? public let after: String? - public let perPage: Int32? + public let perPage: Int? - public typealias Response = PaginatedTransfers + public typealias Response = PaginatedAccountTransfers - public init(id: String, before: String? = nil, after: String? = nil, perPage: Int32? = nil) { - self.id = id + public init(accountId: Uuid, before: String? = nil, after: String? = nil, perPage: Int? = nil) { + self.accountId = accountId self.before = before self.after = after self.perPage = perPage @@ -21,22 +22,25 @@ public extension BankAPI.Account { } public var path: String { - return "/accounts/\(id)/transfers" + return "/accounts/\(accountId)/transfers" } - + public var parameters: Any? { var dict: [String: Any] = [:] + if before != nil { dict["before"] = before } + if after != nil { dict["after"] = after } + if perPage != nil { dict["per_page"] = perPage } + return dict } } } - diff --git a/Sources/Pokepay/BankAPI/Account/IdentifyIndividual.swift b/Sources/Pokepay/BankAPI/Account/IdentifyIndividual.swift index d9a4faa..0959047 100644 --- a/Sources/Pokepay/BankAPI/Account/IdentifyIndividual.swift +++ b/Sources/Pokepay/BankAPI/Account/IdentifyIndividual.swift @@ -1,21 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit -import Foundation public extension BankAPI.Account { struct IdentifyIndividual: BankRequest { - public let accountId: String public let signature: String public let signingCert: String public let expectedHash: String public let name: String? - public let gender: Gender? + public let gender: String? public let address: String? - /// pattern = YYYY-MM-DD public let dateOfBirth: String? + public let accountId: String + public typealias Response = IdentificationResult - public init(accountId: String, signature: String, signingCert: String, expectedHash: String, name: String? = nil, gender: Gender? = nil, address: String? = nil, dateOfBirth: String? = nil) { - self.accountId = accountId + public init(signature: String, signingCert: String, expectedHash: String, name: String? = nil, gender: String? = nil, address: String? = nil, dateOfBirth: String? = nil, accountId: String) { self.signature = signature self.signingCert = signingCert self.expectedHash = expectedHash @@ -23,6 +22,7 @@ public extension BankAPI.Account { self.gender = gender self.address = address self.dateOfBirth = dateOfBirth + self.accountId = accountId } public var method: HTTPMethod { @@ -37,7 +37,9 @@ public extension BankAPI.Account { var dict: [String: Any] = [:] dict["signature"] = signature + dict["signing_cert"] = signingCert + dict["expected_hash"] = expectedHash if name != nil { @@ -59,4 +61,4 @@ public extension BankAPI.Account { return dict } } -} \ No newline at end of file +} diff --git a/Sources/Pokepay/BankAPI/Account/PatchAccountCouponDetail.swift b/Sources/Pokepay/BankAPI/Account/PatchAccountCouponDetail.swift index 5470eff..3453d4d 100644 --- a/Sources/Pokepay/BankAPI/Account/PatchAccountCouponDetail.swift +++ b/Sources/Pokepay/BankAPI/Account/PatchAccountCouponDetail.swift @@ -1,19 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Account { - struct PatchCouponDetail:BankRequest { - public let accountId: String - public let couponId:String - public let isReceived: Bool + struct PatchAccountCouponDetail: BankRequest { + public let isReceived: Bool? public let code: String? + public let accountId: String + public let couponId: String public typealias Response = CouponDetail - public init(accountId: String, couponId:String, isReceived: Bool = true, code: String? = nil) { - self.accountId = accountId - self.couponId = couponId + public init(isReceived: Bool? = nil, code: String? = nil, accountId: String, couponId: String) { self.isReceived = isReceived self.code = code + self.accountId = accountId + self.couponId = couponId } public var method: HTTPMethod { @@ -23,15 +24,19 @@ public extension BankAPI.Account { public var path: String { return "/accounts/\(accountId)/coupons/\(couponId)" } - + public var parameters: Any? { var dict: [String: Any] = [:] - dict["is_received"] = isReceived + + if isReceived != nil { + dict["is_received"] = isReceived + } + if code != nil { dict["code"] = code } + return dict } } } - diff --git a/Sources/Pokepay/BankAPI/Account/UpdateAccount.swift b/Sources/Pokepay/BankAPI/Account/UpdateAccount.swift new file mode 100644 index 0000000..61eb086 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Account/UpdateAccount.swift @@ -0,0 +1,34 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Account { + struct UpdateAccount: BankRequest { + public let name: String? + public let accountId: Uuid + + public typealias Response = AccountDetail + + public init(name: String? = nil, accountId: Uuid) { + self.name = name + self.accountId = accountId + } + + public var method: HTTPMethod { + return .patch + } + + public var path: String { + return "/accounts/\(accountId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if name != nil { + dict["name"] = name + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bank/BankTopUp.swift b/Sources/Pokepay/BankAPI/Bank/BankTopUp.swift new file mode 100644 index 0000000..24ca8ff --- /dev/null +++ b/Sources/Pokepay/BankAPI/Bank/BankTopUp.swift @@ -0,0 +1,46 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Bank { + struct BankTopUp: BankRequest { + public let accountId: String + public let bankId: String + public let amount: Int + public let requestId: String? + public let userId: String + + public typealias Response = UserTransaction + + public init(accountId: String, bankId: String, amount: Int, requestId: String? = nil, userId: String) { + self.accountId = accountId + self.bankId = bankId + self.amount = amount + self.requestId = requestId + self.userId = userId + } + + public var method: HTTPMethod { + return .post + } + + public var path: String { + return "/users/\(userId)/banks/topup" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + dict["account_id"] = accountId + + dict["bank_id"] = bankId + + dict["amount"] = amount + + if requestId != nil { + dict["request_id"] = requestId + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bank/DeleteBank.swift b/Sources/Pokepay/BankAPI/Bank/DeleteBank.swift new file mode 100644 index 0000000..828c0b7 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Bank/DeleteBank.swift @@ -0,0 +1,32 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Bank { + struct DeleteBank: BankRequest { + public let bankId: String + public let userId: String + + public typealias Response = NoContent + + public init(bankId: String, userId: String) { + self.bankId = bankId + self.userId = userId + } + + public var method: HTTPMethod { + return .delete + } + + public var path: String { + return "/users/\(userId)/banks" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + dict["bank_id"] = bankId + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bank/ListBanks.swift b/Sources/Pokepay/BankAPI/Bank/ListBanks.swift new file mode 100644 index 0000000..9d31e32 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Bank/ListBanks.swift @@ -0,0 +1,34 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Bank { + struct ListBanks: BankRequest { + public let userId: String + public let privateMoneyId: String? + + public typealias Response = UserBanks + + public init(userId: String, privateMoneyId: String? = nil) { + self.userId = userId + self.privateMoneyId = privateMoneyId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/users/\(userId)/banks" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if privateMoneyId != nil { + dict["private_money_id"] = privateMoneyId + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bill/CreateBill.swift b/Sources/Pokepay/BankAPI/Bill/CreateBill.swift index c4fef2c..1438cba 100644 --- a/Sources/Pokepay/BankAPI/Bill/CreateBill.swift +++ b/Sources/Pokepay/BankAPI/Bill/CreateBill.swift @@ -1,19 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Bill { - struct Create: BankRequest { - public let amount: Double? + struct CreateBill: BankRequest { + public let amount: Int? public let accountId: String? + public let additionalAccountIds: [String]? public let description: String? + public let isOnetime: Bool? + public let minAmount: Int? + public let maxAmount: Int? public let products: [Product]? + public let metadata: String? public typealias Response = Bill - public init(amount: Double? = nil, accountId: String? = nil, description: String? = nil, products: [Product]? = nil) { + public init(amount: Int? = nil, accountId: String? = nil, additionalAccountIds: [String]? = nil, description: String? = nil, isOnetime: Bool? = nil, minAmount: Int? = nil, maxAmount: Int? = nil, products: [Product]? = nil, metadata: String? = nil) { self.amount = amount self.accountId = accountId + self.additionalAccountIds = additionalAccountIds self.description = description + self.isOnetime = isOnetime + self.minAmount = minAmount + self.maxAmount = maxAmount self.products = products + self.metadata = metadata } public var method: HTTPMethod { @@ -25,16 +36,44 @@ public extension BankAPI.Bill { } public var parameters: Any? { - var dict: [String: Any] = ["amount": amount as Any] + var dict: [String: Any] = [:] + + if amount != nil { + dict["amount"] = amount + } + if accountId != nil { dict["account_id"] = accountId } + + if additionalAccountIds != nil { + dict["additional_account_ids"] = additionalAccountIds + } + if description != nil { dict["description"] = description } + + if isOnetime != nil { + dict["is_onetime"] = isOnetime + } + + if minAmount != nil { + dict["min_amount"] = minAmount + } + + if maxAmount != nil { + dict["max_amount"] = maxAmount + } + if products != nil { - dict["products"] = products!.map { $0.dictionary } + dict["products"] = products + } + + if metadata != nil { + dict["metadata"] = metadata } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Bill/DeleteBill.swift b/Sources/Pokepay/BankAPI/Bill/DeleteBill.swift index b14bba4..84acdc6 100644 --- a/Sources/Pokepay/BankAPI/Bill/DeleteBill.swift +++ b/Sources/Pokepay/BankAPI/Bill/DeleteBill.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Bill { - struct Delete: BankRequest { - public let id: String + struct DeleteBill: BankRequest { + public let billId: String public typealias Response = NoContent - public init(id: String) { - self.id = id + public init(billId: String) { + self.billId = billId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Bill { } public var path: String { - return "/bills/\(id)" + return "/bills/\(billId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Bill/GetBill.swift b/Sources/Pokepay/BankAPI/Bill/GetBill.swift index 0280072..e42d505 100644 --- a/Sources/Pokepay/BankAPI/Bill/GetBill.swift +++ b/Sources/Pokepay/BankAPI/Bill/GetBill.swift @@ -1,13 +1,16 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Bill { - struct Get: BankRequest { - public let id: String + struct GetBill: BankRequest { + public let billId: String + public let privateMoneyId: String? - public typealias Response = Bill + public typealias Response = BillWithAdditionalPrivateMoneys - public init(id: String) { - self.id = id + public init(billId: String, privateMoneyId: String? = nil) { + self.billId = billId + self.privateMoneyId = privateMoneyId } public var method: HTTPMethod { @@ -15,7 +18,17 @@ public extension BankAPI.Bill { } public var path: String { - return "/bills/\(id)" + return "/bills/\(billId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if privateMoneyId != nil { + dict["private_money_id"] = privateMoneyId + } + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Bill/GetBillLastTransaction.swift b/Sources/Pokepay/BankAPI/Bill/GetBillLastTransaction.swift new file mode 100644 index 0000000..8be1a43 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Bill/GetBillLastTransaction.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Bill { + struct GetBillLastTransaction: BankRequest { + public let billId: String + + public typealias Response = UserTransaction + + public init(billId: String) { + self.billId = billId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/bills/\(billId)/transaction" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bill/ListBillTransactions.swift b/Sources/Pokepay/BankAPI/Bill/ListBillTransactions.swift new file mode 100644 index 0000000..ee39bbf --- /dev/null +++ b/Sources/Pokepay/BankAPI/Bill/ListBillTransactions.swift @@ -0,0 +1,46 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Bill { + struct ListBillTransactions: BankRequest { + public let billId: String + public let before: String? + public let after: String? + public let perPage: Int? + + public typealias Response = NIL + + public init(billId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil) { + self.billId = billId + self.before = before + self.after = after + self.perPage = perPage + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/bills/\(billId)/transactions" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if before != nil { + dict["before"] = before + } + + if after != nil { + dict["after"] = after + } + + if perPage != nil { + dict["per_page"] = perPage + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Bill/UpdateBill.swift b/Sources/Pokepay/BankAPI/Bill/UpdateBill.swift index 27713e3..ba62d1a 100644 --- a/Sources/Pokepay/BankAPI/Bill/UpdateBill.swift +++ b/Sources/Pokepay/BankAPI/Bill/UpdateBill.swift @@ -1,17 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Bill { - struct Update: BankRequest { - public let id: String - public let amount: Double? + struct UpdateBill: BankRequest { + public let amount: Int? public let description: String? + public let products: [Product]? + public let billId: String public typealias Response = Bill - public init(id: String, amount: Double? = nil, description: String? = nil) { - self.id = id + public init(amount: Int? = nil, description: String? = nil, products: [Product]? = nil, billId: String) { self.amount = amount self.description = description + self.products = products + self.billId = billId } public var method: HTTPMethod { @@ -19,15 +22,24 @@ public extension BankAPI.Bill { } public var path: String { - return "/bills/\(id)" + return "/bills/\(billId)" } public var parameters: Any? { - // 'amount' will be sent anyway even when it's nil (unsetting it) - var dict: [String: Any] = ["amount": amount as Any] + var dict: [String: Any] = [:] + + if amount != nil { + dict["amount"] = amount + } + if description != nil { dict["description"] = description } + + if products != nil { + dict["products"] = products + } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Campaign/GetAccountCampaignPointAmounts.swift b/Sources/Pokepay/BankAPI/Campaign/GetAccountCampaignPointAmounts.swift new file mode 100644 index 0000000..7130c3a --- /dev/null +++ b/Sources/Pokepay/BankAPI/Campaign/GetAccountCampaignPointAmounts.swift @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Campaign { + struct GetAccountCampaignPointAmounts: BankRequest { + public let accountId: String + public let campaignId: String + + public typealias Response = AccountCampaignPointAmounts + + public init(accountId: String, campaignId: String) { + self.accountId = accountId + self.campaignId = campaignId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/accounts/\(accountId)/campaigns/\(campaignId)/point-amounts" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Cashtray/CreateCashtray.swift b/Sources/Pokepay/BankAPI/Cashtray/CreateCashtray.swift index cf691bc..a06e44d 100644 --- a/Sources/Pokepay/BankAPI/Cashtray/CreateCashtray.swift +++ b/Sources/Pokepay/BankAPI/Cashtray/CreateCashtray.swift @@ -1,19 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Cashtray { - struct Create: BankRequest { - public let amount: Double + struct CreateCashtray: BankRequest { + public let amount: Int public let description: String? - public let expiresIn: Int32? - public let products: [Product]? + public let expiresIn: Int? public typealias Response = Cashtray - public init(amount: Double, description: String? = nil, expiresIn: Int32? = nil, products: [Product]? = nil) { + public init(amount: Int, description: String? = nil, expiresIn: Int? = nil) { self.amount = amount self.description = description self.expiresIn = expiresIn - self.products = products } public var method: HTTPMethod { @@ -25,16 +24,18 @@ public extension BankAPI.Cashtray { } public var parameters: Any? { - var dict: [String: Any] = ["amount": amount as Any] + var dict: [String: Any] = [:] + + dict["amount"] = amount + if description != nil { dict["description"] = description } + if expiresIn != nil { dict["expires_in"] = expiresIn } - if products != nil { - dict["products"] = products!.map { $0.dictionary } - } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Cashtray/DeleteCashtray.swift b/Sources/Pokepay/BankAPI/Cashtray/DeleteCashtray.swift index 1ec01d9..0179626 100644 --- a/Sources/Pokepay/BankAPI/Cashtray/DeleteCashtray.swift +++ b/Sources/Pokepay/BankAPI/Cashtray/DeleteCashtray.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Cashtray { - struct Delete: BankRequest { - public let id: String + struct DeleteCashtray: BankRequest { + public let cashtrayId: String public typealias Response = NoContent - public init(id: String) { - self.id = id + public init(cashtrayId: String) { + self.cashtrayId = cashtrayId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Cashtray { } public var path: String { - return "/cashtrays/\(id)" + return "/cashtrays/\(cashtrayId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Cashtray/GetCashtray.swift b/Sources/Pokepay/BankAPI/Cashtray/GetCashtray.swift index 7e9fe71..e141001 100644 --- a/Sources/Pokepay/BankAPI/Cashtray/GetCashtray.swift +++ b/Sources/Pokepay/BankAPI/Cashtray/GetCashtray.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Cashtray { - struct Get: BankRequest { - public let id: String + struct GetCashtray: BankRequest { + public let cashtrayId: String - public typealias Response = Cashtray + public typealias Response = CashtrayWithAttemptAndTransaction - public init(id: String) { - self.id = id + public init(cashtrayId: String) { + self.cashtrayId = cashtrayId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Cashtray { } public var path: String { - return "/cashtrays/\(id)" + return "/cashtrays/\(cashtrayId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Cashtray/GetCashtrayAttempts.swift b/Sources/Pokepay/BankAPI/Cashtray/GetCashtrayAttempts.swift index ee41e66..60a0147 100644 --- a/Sources/Pokepay/BankAPI/Cashtray/GetCashtrayAttempts.swift +++ b/Sources/Pokepay/BankAPI/Cashtray/GetCashtrayAttempts.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Cashtray { - struct GetAttempts: BankRequest { - public let id: String + struct GetCashtrayAttempts: BankRequest { + public let cashtrayId: String public typealias Response = CashtrayAttempts - public init(id: String) { - self.id = id + public init(cashtrayId: String) { + self.cashtrayId = cashtrayId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Cashtray { } public var path: String { - return "/cashtrays/\(id)/attempts" + return "/cashtrays/\(cashtrayId)/attempts" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Cashtray/UpdateCashtray.swift b/Sources/Pokepay/BankAPI/Cashtray/UpdateCashtray.swift index 8f8b6a8..657d652 100644 --- a/Sources/Pokepay/BankAPI/Cashtray/UpdateCashtray.swift +++ b/Sources/Pokepay/BankAPI/Cashtray/UpdateCashtray.swift @@ -1,19 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Cashtray { - struct Update: BankRequest { - public let id: String - public let amount: Double? + struct UpdateCashtray: BankRequest { + public let amount: Int? public let description: String? - public let expiresIn: Int32? + public let expiresIn: Int? + public let products: [Product]? + public let cashtrayId: String public typealias Response = Cashtray - public init(id: String, amount: Double? = nil, description: String? = nil, expiresIn: Int32? = nil) { - self.id = id + public init(amount: Int? = nil, description: String? = nil, expiresIn: Int? = nil, products: [Product]? = nil, cashtrayId: String) { self.amount = amount self.description = description self.expiresIn = expiresIn + self.products = products + self.cashtrayId = cashtrayId } public var method: HTTPMethod { @@ -21,20 +24,28 @@ public extension BankAPI.Cashtray { } public var path: String { - return "/cashtrays/\(id)" + return "/cashtrays/\(cashtrayId)" } public var parameters: Any? { var dict: [String: Any] = [:] + if amount != nil { dict["amount"] = amount } + if description != nil { dict["description"] = description } + if expiresIn != nil { dict["expires_in"] = expiresIn } + + if products != nil { + dict["products"] = products + } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Check/CreateCheck.swift b/Sources/Pokepay/BankAPI/Check/CreateCheck.swift index cd22044..9a7606a 100644 --- a/Sources/Pokepay/BankAPI/Check/CreateCheck.swift +++ b/Sources/Pokepay/BankAPI/Check/CreateCheck.swift @@ -1,20 +1,34 @@ -import Foundation +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Check { - struct Create: BankRequest { - public let amount: Double? + struct CreateCheck: BankRequest { + public let amount: Int? + public let moneyAmount: Int? + public let pointAmount: Int? public let accountId: String? public let description: String? - public let expiresAt: Date? + public let isOnetime: Bool? + public let usageLimit: Int? + public let expiresAt: String? + public let pointExpiresAt: String? + public let pointExpiresInDays: Int? + public let metadata: String? public typealias Response = Check - public init(amount: Double? = nil, accountId: String? = nil, description: String? = nil, expiresAt: Date? = nil) { + public init(amount: Int? = nil, moneyAmount: Int? = nil, pointAmount: Int? = nil, accountId: String? = nil, description: String? = nil, isOnetime: Bool? = nil, usageLimit: Int? = nil, expiresAt: String? = nil, pointExpiresAt: String? = nil, pointExpiresInDays: Int? = nil, metadata: String? = nil) { self.amount = amount + self.moneyAmount = moneyAmount + self.pointAmount = pointAmount self.accountId = accountId self.description = description + self.isOnetime = isOnetime + self.usageLimit = usageLimit self.expiresAt = expiresAt + self.pointExpiresAt = pointExpiresAt + self.pointExpiresInDays = pointExpiresInDays + self.metadata = metadata } public var method: HTTPMethod { @@ -27,18 +41,51 @@ public extension BankAPI.Check { public var parameters: Any? { var dict: [String: Any] = [:] + if amount != nil { dict["amount"] = amount } + + if moneyAmount != nil { + dict["money_amount"] = moneyAmount + } + + if pointAmount != nil { + dict["point_amount"] = pointAmount + } + if accountId != nil { dict["account_id"] = accountId } + if description != nil { dict["description"] = description } - if let p = expiresAt { - dict["expires_at"] = BankAPIDateFormatter.string(date: p) + + if isOnetime != nil { + dict["is_onetime"] = isOnetime + } + + if usageLimit != nil { + dict["usage_limit"] = usageLimit } + + if expiresAt != nil { + dict["expires_at"] = expiresAt + } + + if pointExpiresAt != nil { + dict["point_expires_at"] = pointExpiresAt + } + + if pointExpiresInDays != nil { + dict["point_expires_in_days"] = pointExpiresInDays + } + + if metadata != nil { + dict["metadata"] = metadata + } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Check/DeleteCheck.swift b/Sources/Pokepay/BankAPI/Check/DeleteCheck.swift index 9bc7044..3ce3a24 100644 --- a/Sources/Pokepay/BankAPI/Check/DeleteCheck.swift +++ b/Sources/Pokepay/BankAPI/Check/DeleteCheck.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Check { - struct Delete: BankRequest { - public let id: String + struct DeleteCheck: BankRequest { + public let checkId: String public typealias Response = NoContent - public init(id: String) { - self.id = id + public init(checkId: String) { + self.checkId = checkId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Check { } public var path: String { - return "/checks/\(id)" + return "/checks/\(checkId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Check/GetCheck.swift b/Sources/Pokepay/BankAPI/Check/GetCheck.swift index 5f2c240..603f974 100644 --- a/Sources/Pokepay/BankAPI/Check/GetCheck.swift +++ b/Sources/Pokepay/BankAPI/Check/GetCheck.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Check { - struct Get: BankRequest { - public let id: String + struct GetCheck: BankRequest { + public let checkId: String public typealias Response = Check - public init(id: String) { - self.id = id + public init(checkId: String) { + self.checkId = checkId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Check { } public var path: String { - return "/checks/\(id)" + return "/checks/\(checkId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Check/UpdateCheck.swift b/Sources/Pokepay/BankAPI/Check/UpdateCheck.swift index af004a8..66fadc6 100644 --- a/Sources/Pokepay/BankAPI/Check/UpdateCheck.swift +++ b/Sources/Pokepay/BankAPI/Check/UpdateCheck.swift @@ -1,17 +1,24 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Check { - struct Update: BankRequest { - public let id: String - public let amount: Double? + struct UpdateCheck: BankRequest { + public let amount: Int? public let description: String? + public let expiresAt: String? + public let pointExpiresAt: String? + public let pointExpiresInDays: Int? + public let checkId: String public typealias Response = Check - public init(id: String, amount: Double? = nil, description: String? = nil) { - self.id = id + public init(amount: Int? = nil, description: String? = nil, expiresAt: String? = nil, pointExpiresAt: String? = nil, pointExpiresInDays: Int? = nil, checkId: String) { self.amount = amount self.description = description + self.expiresAt = expiresAt + self.pointExpiresAt = pointExpiresAt + self.pointExpiresInDays = pointExpiresInDays + self.checkId = checkId } public var method: HTTPMethod { @@ -19,17 +26,32 @@ public extension BankAPI.Check { } public var path: String { - return "/checks/\(id)" + return "/checks/\(checkId)" } public var parameters: Any? { var dict: [String: Any] = [:] + if amount != nil { dict["amount"] = amount } + if description != nil { dict["description"] = description } + + if expiresAt != nil { + dict["expires_at"] = expiresAt + } + + if pointExpiresAt != nil { + dict["point_expires_at"] = pointExpiresAt + } + + if pointExpiresInDays != nil { + dict["point_expires_in_days"] = pointExpiresInDays + } + return dict } } diff --git a/Sources/Pokepay/BankAPI/Coupon/GetPrivateMoneyCoupons.swift b/Sources/Pokepay/BankAPI/Coupon/GetPrivateMoneyCoupons.swift new file mode 100644 index 0000000..0b48e9a --- /dev/null +++ b/Sources/Pokepay/BankAPI/Coupon/GetPrivateMoneyCoupons.swift @@ -0,0 +1,42 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Coupon { + struct GetPrivateMoneyCoupons: BankRequest { + public let privateMoneyId: Uuid + public let before: Uuid + public let after: Uuid + public let perPage: Int? + + public typealias Response = PaginatedPrivateMoneyCoupons + + public init(privateMoneyId: Uuid, before: Uuid, after: Uuid, perPage: Int? = nil) { + self.privateMoneyId = privateMoneyId + self.before = before + self.after = after + self.perPage = perPage + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys/\(privateMoneyId)/coupons" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + dict["before"] = before + + dict["after"] = after + + if perPage != nil { + dict["per_page"] = perPage + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Cpm/GetCpmToken.swift b/Sources/Pokepay/BankAPI/Cpm/GetCpmToken.swift new file mode 100644 index 0000000..b27eaa2 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Cpm/GetCpmToken.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Cpm { + struct GetCpmToken: BankRequest { + public let cpmToken: String + + public typealias Response = CpmToken + + public init(cpmToken: String) { + self.cpmToken = cpmToken + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/cpm/\(cpmToken)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/CreditCard/CreateCreditCard.swift b/Sources/Pokepay/BankAPI/CreditCard/CreateCreditCard.swift index 5d853a4..20c06fd 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/CreateCreditCard.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/CreateCreditCard.swift @@ -5,12 +5,12 @@ public extension BankAPI.CreditCard { struct CreateCreditCard: BankRequest { public let token: String public let isCardholderNameSpecified: Bool? - public let organizationCode: String? + public let organizationCode: String public let userId: String public typealias Response = CreditCard - public init(token: String, isCardholderNameSpecified: Bool? = nil, organizationCode: String? = nil, userId: String) { + public init(token: String, isCardholderNameSpecified: Bool? = nil, organizationCode: String, userId: String) { self.token = token self.isCardholderNameSpecified = isCardholderNameSpecified self.organizationCode = organizationCode @@ -34,9 +34,7 @@ public extension BankAPI.CreditCard { dict["is_cardholder_name_specified"] = isCardholderNameSpecified } - if organizationCode != nil { - dict["organization_code"] = organizationCode - } + dict["organization_code"] = organizationCode return dict } diff --git a/Sources/Pokepay/BankAPI/CreditCard/DeleteCreditCard.swift b/Sources/Pokepay/BankAPI/CreditCard/DeleteCreditCard.swift index a5b1b8e..fd26719 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/DeleteCreditCard.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/DeleteCreditCard.swift @@ -4,12 +4,12 @@ import APIKit public extension BankAPI.CreditCard { struct DeleteCreditCard: BankRequest { public let cardRegisteredAt: String - public let organizationCode: String? + public let organizationCode: String public let userId: String public typealias Response = NoContent - public init(cardRegisteredAt: String, organizationCode: String? = nil, userId: String) { + public init(cardRegisteredAt: String, organizationCode: String, userId: String) { self.cardRegisteredAt = cardRegisteredAt self.organizationCode = organizationCode self.userId = userId @@ -28,9 +28,7 @@ public extension BankAPI.CreditCard { dict["card_registered_at"] = cardRegisteredAt - if organizationCode != nil { - dict["organization_code"] = organizationCode - } + dict["organization_code"] = organizationCode return dict } diff --git a/Sources/Pokepay/BankAPI/CreditCard/GetCreditCards.swift b/Sources/Pokepay/BankAPI/CreditCard/GetCreditCards.swift index b8c8c6d..5b803a1 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/GetCreditCards.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/GetCreditCards.swift @@ -7,11 +7,11 @@ public extension BankAPI.CreditCard { public let before: String? public let after: String? public let perPage: Int? - public let organizationCode: String? + public let organizationCode: String public typealias Response = PaginatedCreditCards - public init(userId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil, organizationCode: String? = nil) { + public init(userId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil, organizationCode: String) { self.userId = userId self.before = before self.after = after @@ -42,9 +42,7 @@ public extension BankAPI.CreditCard { dict["per_page"] = perPage } - if organizationCode != nil { - dict["organization_code"] = organizationCode - } + dict["organization_code"] = organizationCode return dict } diff --git a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift index 2b30dfd..bb96902 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMdkToken.swift @@ -7,20 +7,20 @@ public extension BankAPI.CreditCard { public let token: String public let accountId: String public let amount: Int - public let requestId: String? - public let organizationCode: String? + public let organizationCode: String public let isCardholderNameSpecified: Bool? + public let requestId: String? public typealias Response = String - public init(userId: String, token: String, accountId: String, amount: Int, requestId: String? = nil, organizationCode: String? = nil, isCardholderNameSpecified: Bool? = nil) { + public init(userId: String, token: String, accountId: String, amount: Int, organizationCode: String, isCardholderNameSpecified: Bool? = nil, requestId: String? = nil) { self.userId = userId self.token = token self.accountId = accountId self.amount = amount - self.requestId = requestId self.organizationCode = organizationCode self.isCardholderNameSpecified = isCardholderNameSpecified + self.requestId = requestId } public var method: HTTPMethod { @@ -42,18 +42,16 @@ public extension BankAPI.CreditCard { dict["amount"] = amount - if requestId != nil { - dict["request_id"] = requestId - } - - if organizationCode != nil { - dict["organization_code"] = organizationCode - } + dict["organization_code"] = organizationCode if isCardholderNameSpecified != nil { dict["is_cardholder_name_specified"] = isCardholderNameSpecified } + if requestId != nil { + dict["request_id"] = requestId + } + return dict } diff --git a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift index 0996473..60579af 100644 --- a/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift +++ b/Sources/Pokepay/BankAPI/CreditCard/TopupWithCreditCardMembership.swift @@ -7,20 +7,20 @@ public extension BankAPI.CreditCard { public let cardRegisteredAt: String public let accountId: String public let amount: Int - public let requestId: String? public let deleteCardIfAuthFail: Bool? - public let organizationCode: String? + public let organizationCode: String + public let requestId: String? public typealias Response = String - public init(userId: String, cardRegisteredAt: String, accountId: String, amount: Int, requestId: String? = nil, deleteCardIfAuthFail: Bool? = nil, organizationCode: String? = nil) { + public init(userId: String, cardRegisteredAt: String, accountId: String, amount: Int, deleteCardIfAuthFail: Bool? = nil, organizationCode: String, requestId: String? = nil) { self.userId = userId self.cardRegisteredAt = cardRegisteredAt self.accountId = accountId self.amount = amount - self.requestId = requestId self.deleteCardIfAuthFail = deleteCardIfAuthFail self.organizationCode = organizationCode + self.requestId = requestId } public var method: HTTPMethod { @@ -42,16 +42,14 @@ public extension BankAPI.CreditCard { dict["amount"] = amount - if requestId != nil { - dict["request_id"] = requestId - } - if deleteCardIfAuthFail != nil { dict["delete_card_if_auth_fail"] = deleteCardIfAuthFail } - if organizationCode != nil { - dict["organization_code"] = organizationCode + dict["organization_code"] = organizationCode + + if requestId != nil { + dict["request_id"] = requestId } return dict diff --git a/Sources/Pokepay/BankAPI/Merchants/ListMerchantTransactions.swift b/Sources/Pokepay/BankAPI/Merchants/ListMerchantTransactions.swift new file mode 100644 index 0000000..0148435 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Merchants/ListMerchantTransactions.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Merchants { + struct ListMerchantTransactions: BankRequest { + public let transactionId: String + + public typealias Response = UserTransactionWithCustomerBalance + + public init(transactionId: String) { + self.transactionId = transactionId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/merchants/transactions/\(transactionId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoney.swift b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoney.swift index f6f9b1d..f6d15f6 100644 --- a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoney.swift +++ b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoney.swift @@ -1,13 +1,13 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.PrivateMoney { - struct GetPrivateMoney: BankRequest { - public let privateMoneyId:String + public let privateMoneyId: Uuid - public typealias Response = PrivateMoney + public typealias Response = PrivateMoneyDetail - public init(privateMoneyId: String) { + public init(privateMoneyId: Uuid) { self.privateMoneyId = privateMoneyId } @@ -20,9 +20,9 @@ public extension BankAPI.PrivateMoney { } public var parameters: Any? { - return [:] - } + var dict: [String: Any] = [:] + return dict + } } - } diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyCommercialAct.swift b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyCommercialAct.swift new file mode 100644 index 0000000..bfc8bac --- /dev/null +++ b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyCommercialAct.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.PrivateMoney { + struct GetPrivateMoneyCommercialAct: BankRequest { + public let privateMoneyId: Uuid + + public typealias Response = NIL + + public init(privateMoneyId: Uuid) { + self.privateMoneyId = privateMoneyId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys/\(privateMoneyId)/commercial-act" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPaymentAct.swift b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPaymentAct.swift new file mode 100644 index 0000000..31483a7 --- /dev/null +++ b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPaymentAct.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.PrivateMoney { + struct GetPrivateMoneyPaymentAct: BankRequest { + public let privateMoneyId: Uuid + + public typealias Response = NIL + + public init(privateMoneyId: Uuid) { + self.privateMoneyId = privateMoneyId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys/\(privateMoneyId)/payment-act" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPrivacyPolicy.swift b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPrivacyPolicy.swift new file mode 100644 index 0000000..a648d9a --- /dev/null +++ b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyPrivacyPolicy.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.PrivateMoney { + struct GetPrivateMoneyPrivacyPolicy: BankRequest { + public let privateMoneyId: Uuid + + public typealias Response = NIL + + public init(privateMoneyId: Uuid) { + self.privateMoneyId = privateMoneyId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys/\(privateMoneyId)/privacy-policy" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyTerms.swift b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyTerms.swift new file mode 100644 index 0000000..c75ed25 --- /dev/null +++ b/Sources/Pokepay/BankAPI/PrivateMoney/GetPrivateMoneyTerms.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.PrivateMoney { + struct GetPrivateMoneyTerms: BankRequest { + public let privateMoneyId: Uuid + + public typealias Response = NIL + + public init(privateMoneyId: Uuid) { + self.privateMoneyId = privateMoneyId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys/\(privateMoneyId)/terms" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/PrivateMoney/ListPrivateMoneys.swift b/Sources/Pokepay/BankAPI/PrivateMoney/ListPrivateMoneys.swift new file mode 100644 index 0000000..fe06cd7 --- /dev/null +++ b/Sources/Pokepay/BankAPI/PrivateMoney/ListPrivateMoneys.swift @@ -0,0 +1,52 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.PrivateMoney { + struct ListPrivateMoneys: BankRequest { + public let name: String? + public let includeExclusive: Bool? + public let before: Uuid + public let after: Uuid + public let perPage: Int? + + public typealias Response = PaginatedPrivateMoneys + + public init(name: String? = nil, includeExclusive: Bool? = nil, before: Uuid, after: Uuid, perPage: Int? = nil) { + self.name = name + self.includeExclusive = includeExclusive + self.before = before + self.after = after + self.perPage = perPage + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/private-moneys" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if name != nil { + dict["name"] = name + } + + if includeExclusive != nil { + dict["include_exclusive"] = includeExclusive + } + + dict["before"] = before + + dict["after"] = after + + if perPage != nil { + dict["per_page"] = perPage + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/Terminal/AddTerminalPublicKey.swift b/Sources/Pokepay/BankAPI/Terminal/AddTerminalPublicKey.swift index a7d47ab..daa58f5 100644 --- a/Sources/Pokepay/BankAPI/Terminal/AddTerminalPublicKey.swift +++ b/Sources/Pokepay/BankAPI/Terminal/AddTerminalPublicKey.swift @@ -1,10 +1,11 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Terminal { - struct AddPublicKey: BankRequest { + struct AddTerminalPublicKey: BankRequest { public let key: String - public typealias Response = ServerKey + public typealias Response = TerminalServerKey public init(key: String) { self.key = key @@ -19,9 +20,11 @@ public extension BankAPI.Terminal { } public var parameters: Any? { - return [ - "key": self.key - ] + var dict: [String: Any] = [:] + + dict["key"] = key + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Terminal/GetTerminal.swift b/Sources/Pokepay/BankAPI/Terminal/GetTerminal.swift index 9bc0e3b..9df85f7 100644 --- a/Sources/Pokepay/BankAPI/Terminal/GetTerminal.swift +++ b/Sources/Pokepay/BankAPI/Terminal/GetTerminal.swift @@ -1,10 +1,13 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Terminal { - struct Get: BankRequest { + struct GetTerminal: BankRequest { + public typealias Response = Terminal - public init() {} + public init() { + } public var method: HTTPMethod { return .get @@ -13,5 +16,11 @@ public extension BankAPI.Terminal { public var path: String { return "/terminal" } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } } } diff --git a/Sources/Pokepay/BankAPI/Terminal/UpdateTerminal.swift b/Sources/Pokepay/BankAPI/Terminal/UpdateTerminal.swift index 1c19555..7ea278b 100644 --- a/Sources/Pokepay/BankAPI/Terminal/UpdateTerminal.swift +++ b/Sources/Pokepay/BankAPI/Terminal/UpdateTerminal.swift @@ -1,16 +1,19 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Terminal { - struct Update: BankRequest { - let accountId: String - let name: String - let pushToken: String? + struct UpdateTerminal: BankRequest { + public let name: String? + public let accountId: String? + public let pushService: String? + public let pushToken: String? public typealias Response = Terminal - public init(name: String, accountId: String, pushToken: String? = nil) { + public init(name: String? = nil, accountId: String? = nil, pushService: String? = nil, pushToken: String? = nil) { self.name = name self.accountId = accountId + self.pushService = pushService self.pushToken = pushToken } @@ -23,11 +26,25 @@ public extension BankAPI.Terminal { } public var parameters: Any? { - return [ - "account_id": accountId, - "name": name, - "push_token": pushToken - ] + var dict: [String: Any] = [:] + + if name != nil { + dict["name"] = name + } + + if accountId != nil { + dict["account_id"] = accountId + } + + if pushService != nil { + dict["push_service"] = pushService + } + + if pushToken != nil { + dict["push_token"] = pushToken + } + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Transaction/GetTransaction.swift b/Sources/Pokepay/BankAPI/Transaction/GetTransaction.swift index 9c76482..2b69532 100644 --- a/Sources/Pokepay/BankAPI/Transaction/GetTransaction.swift +++ b/Sources/Pokepay/BankAPI/Transaction/GetTransaction.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.Transaction { - struct Get: BankRequest { - public let id: String + struct GetTransaction: BankRequest { + public let transactionId: String public typealias Response = UserTransaction - public init(id: String) { - self.id = id + public init(transactionId: String) { + self.transactionId = transactionId } public var method: HTTPMethod { @@ -15,7 +16,13 @@ public extension BankAPI.Transaction { } public var path: String { - return "/transactions/\(id)" + return "/transactions/\(transactionId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict } } } diff --git a/Sources/Pokepay/BankAPI/Transaction/RefundTransaction.swift b/Sources/Pokepay/BankAPI/Transaction/RefundTransaction.swift new file mode 100644 index 0000000..269b1c9 --- /dev/null +++ b/Sources/Pokepay/BankAPI/Transaction/RefundTransaction.swift @@ -0,0 +1,34 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.Transaction { + struct RefundTransaction: BankRequest { + public let amount: Int? + public let transactionId: String + + public typealias Response = UserTransaction + + public init(amount: Int? = nil, transactionId: String) { + self.amount = amount + self.transactionId = transactionId + } + + public var method: HTTPMethod { + return .post + } + + public var path: String { + return "/transactions/\(transactionId)/refund" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + if amount != nil { + dict["amount"] = amount + } + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/User/GetUser.swift b/Sources/Pokepay/BankAPI/User/GetUser.swift new file mode 100644 index 0000000..9a666b6 --- /dev/null +++ b/Sources/Pokepay/BankAPI/User/GetUser.swift @@ -0,0 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. +import APIKit + +public extension BankAPI.User { + struct GetUser: BankRequest { + public let userId: String + + public typealias Response = UserWithDetails + + public init(userId: String) { + self.userId = userId + } + + public var method: HTTPMethod { + return .get + } + + public var path: String { + return "/users/\(userId)" + } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } + } +} diff --git a/Sources/Pokepay/BankAPI/User/GetUserAccounts.swift b/Sources/Pokepay/BankAPI/User/GetUserAccounts.swift index fb774d2..8787eb3 100644 --- a/Sources/Pokepay/BankAPI/User/GetUserAccounts.swift +++ b/Sources/Pokepay/BankAPI/User/GetUserAccounts.swift @@ -1,16 +1,17 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.User { - struct GetAccounts: BankRequest { - public let id: String + struct GetUserAccounts: BankRequest { + public let userId: String public let before: String? public let after: String? - public let perPage: Int32? + public let perPage: Int? - public typealias Response = PaginatedAccounts + public typealias Response = PaginatedUserAccounts - public init(id: String, before: String? = nil, after: String? = nil, perPage: Int32? = nil) { - self.id = id + public init(userId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil) { + self.userId = userId self.before = before self.after = after self.perPage = perPage @@ -21,20 +22,24 @@ public extension BankAPI.User { } public var path: String { - return "/users/\(id)/accounts" + return "/users/\(userId)/accounts" } public var parameters: Any? { var dict: [String: Any] = [:] + if before != nil { dict["before"] = before } + if after != nil { dict["after"] = after } + if perPage != nil { dict["per_page"] = perPage } + return dict } } diff --git a/Sources/Pokepay/BankAPI/User/GetUserSettingUrl.swift b/Sources/Pokepay/BankAPI/User/GetUserSettingUrl.swift index 7a0aaf4..ec39dac 100644 --- a/Sources/Pokepay/BankAPI/User/GetUserSettingUrl.swift +++ b/Sources/Pokepay/BankAPI/User/GetUserSettingUrl.swift @@ -1,14 +1,12 @@ - +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.User { struct GetUserSettingUrl: BankRequest { - public let accessCode: String - public typealias Response = UserSettingUrl + public typealias Response = NIL - public init(accessCode: String) { - self.accessCode = accessCode + public init() { } public var method: HTTPMethod { @@ -18,5 +16,11 @@ public extension BankAPI.User { public var path: String { return "/oauth/full-access" } + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } } } diff --git a/Sources/Pokepay/BankAPI/User/GetUserTransactions.swift b/Sources/Pokepay/BankAPI/User/GetUserTransactions.swift index a3c62c8..5cb55c8 100644 --- a/Sources/Pokepay/BankAPI/User/GetUserTransactions.swift +++ b/Sources/Pokepay/BankAPI/User/GetUserTransactions.swift @@ -1,16 +1,17 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.User { - struct GetTransactions: BankRequest { - public let id: String + struct GetUserTransactions: BankRequest { + public let userId: String public let before: String? public let after: String? - public let perPage: Int32? + public let perPage: Int? - public typealias Response = PaginatedTransactions + public typealias Response = PaginatedUserTransactions - public init(id: String, before: String? = nil, after: String? = nil, perPage: Int32? = nil) { - self.id = id + public init(userId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil) { + self.userId = userId self.before = before self.after = after self.perPage = perPage @@ -21,20 +22,24 @@ public extension BankAPI.User { } public var path: String { - return "/users/\(id)/transactions" + return "/users/\(userId)/transactions" } public var parameters: Any? { var dict: [String: Any] = [:] + if before != nil { dict["before"] = before } + if after != nil { dict["after"] = after } + if perPage != nil { dict["per_page"] = perPage } + return dict } } diff --git a/Sources/Pokepay/BankAPI/User/GetUserWithAuthFactors.swift b/Sources/Pokepay/BankAPI/User/GetUserWithAuthFactors.swift index 07db12f..a1f6cd9 100644 --- a/Sources/Pokepay/BankAPI/User/GetUserWithAuthFactors.swift +++ b/Sources/Pokepay/BankAPI/User/GetUserWithAuthFactors.swift @@ -1,22 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.User { struct GetUserWithAuthFactors: BankRequest { public let userId: String - + public typealias Response = UserWithAuthFactors - + public init(userId: String) { self.userId = userId } - + public var method: HTTPMethod { return .get } - + public var path: String { return "/users/\(userId)/auth-factors" } - + + public var parameters: Any? { + var dict: [String: Any] = [:] + + return dict + } } } diff --git a/Sources/Pokepay/BankAPI/User/UpdateUser.swift b/Sources/Pokepay/BankAPI/User/UpdateUser.swift index 55e4822..cea3928 100644 --- a/Sources/Pokepay/BankAPI/User/UpdateUser.swift +++ b/Sources/Pokepay/BankAPI/User/UpdateUser.swift @@ -1,15 +1,16 @@ +// DO NOT EDIT: File is generated by code generator. import APIKit public extension BankAPI.User { - struct Update: BankRequest { - public let id: String + struct UpdateUser: BankRequest { public let name: String? + public let userId: String - public typealias Response = User + public typealias Response = UserWithDetails - public init(id: String, name: String? = nil) { - self.id = id + public init(name: String? = nil, userId: String) { self.name = name + self.userId = userId } public var method: HTTPMethod { @@ -17,14 +18,16 @@ public extension BankAPI.User { } public var path: String { - return "/users/\(id)" + return "/users/\(userId)" } public var parameters: Any? { var dict: [String: Any] = [:] + if name != nil { dict["name"] = name } + return dict } } diff --git a/Sources/Pokepay/Responses/Account.swift b/Sources/Pokepay/Responses/Account.swift index ba7915a..671775e 100644 --- a/Sources/Pokepay/Responses/Account.swift +++ b/Sources/Pokepay/Responses/Account.swift @@ -1,25 +1,24 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Account: Codable { - public let id: String - public let name: String - public let balance: Double - public let moneyBalance: Double - public let pointBalance: Double - public let isSuspended: Bool - public let privateMoney: PrivateMoney - public let nearestExpiresAt: Date? - public let pointDebt: Double + public let id: String; + public let name: String; + public let balance: Int; + public let moneyBalance: Int; + public let pointBalance: Int; + public let pointDebt: Int; + public let isSuspended: Bool; + public let privateMoney: PrivateMoney; - private enum CodingKeys: String, CodingKey { - case id - case name - case balance + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case balance = "balance" case moneyBalance = "money_balance" case pointBalance = "point_balance" + case pointDebt = "point_debt" case isSuspended = "is_suspended" case privateMoney = "private_money" - case nearestExpiresAt = "nearest_expires_at" - case pointDebt = "point_debt" } } diff --git a/Sources/Pokepay/Responses/AccountBalances.swift b/Sources/Pokepay/Responses/AccountBalances.swift new file mode 100644 index 0000000..f0cfc44 --- /dev/null +++ b/Sources/Pokepay/Responses/AccountBalances.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct AccountBalances: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [AccountBalance]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/AccountCampaignPointAmounts.swift b/Sources/Pokepay/Responses/AccountCampaignPointAmounts.swift index 38ca371..8a0810e 100644 --- a/Sources/Pokepay/Responses/AccountCampaignPointAmounts.swift +++ b/Sources/Pokepay/Responses/AccountCampaignPointAmounts.swift @@ -1,11 +1,12 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct AccountCampaignPointAmounts: Codable { - public let maxTotalPointAmount: Double? - public let totalPointAmount: Double? - public let remainPointAmount: Double? + public let maxTotalPointAmount: Int; + public let totalPointAmount: Int; + public let remainPointAmount: Int; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case maxTotalPointAmount = "max_total_point_amount" case totalPointAmount = "total_point_amount" case remainPointAmount = "remain_point_amount" diff --git a/Sources/Pokepay/Responses/AccountDetail.swift b/Sources/Pokepay/Responses/AccountDetail.swift new file mode 100644 index 0000000..2da2bff --- /dev/null +++ b/Sources/Pokepay/Responses/AccountDetail.swift @@ -0,0 +1,24 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct AccountDetail: Codable { + public let id: String; + public let name: String; + public let balance: Int; + public let moneyBalance: Int; + public let pointBalance: Int; + public let isSuspended: Bool; + public let privateMoney: PrivateMoneyDetail; + public let nearestExpiresAt: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case balance = "balance" + case moneyBalance = "money_balance" + case pointBalance = "point_balance" + case isSuspended = "is_suspended" + case privateMoney = "private_money" + case nearestExpiresAt = "nearest_expires_at" + } +} diff --git a/Sources/Pokepay/Responses/Bill.swift b/Sources/Pokepay/Responses/Bill.swift index 52224cb..5bc5bb8 100644 --- a/Sources/Pokepay/Responses/Bill.swift +++ b/Sources/Pokepay/Responses/Bill.swift @@ -1,29 +1,28 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Bill: Codable { - public let id: String - public let amount: Double? - public let description: String - public let user: User - public let privateMoney: PrivateMoney - public let isOnetime: Bool - public let isDisabled: Bool - public let token: String - public let minAmount: Double? - public let maxAmount: Double? - public let additionalPrivateMoneys: [PrivateMoney]? + public let id: String; + public let amount: Int; + public let description: String; + public let user: User; + public let isOnetime: Bool; + public let isDisabled: Bool; + public let privateMoney: PrivateMoney; + public let token: String; + public let maxAmount: Int; + public let minAmount: Int; - private enum CodingKeys: String, CodingKey { - case id - case amount - case description - case user - case privateMoney = "private_money" + private enum CodingKeys: String, CodingKeys { + case id = "id" + case amount = "amount" + case description = "description" + case user = "user" case isOnetime = "is_onetime" case isDisabled = "is_disabled" - case token - case minAmount = "min_amount" + case privateMoney = "private_money" + case token = "token" case maxAmount = "max_amount" - case additionalPrivateMoneys = "additional_private_moneys" + case minAmount = "min_amount" } } diff --git a/Sources/Pokepay/Responses/BillWithAdditionalPrivateMoneys.swift b/Sources/Pokepay/Responses/BillWithAdditionalPrivateMoneys.swift new file mode 100644 index 0000000..cedbe32 --- /dev/null +++ b/Sources/Pokepay/Responses/BillWithAdditionalPrivateMoneys.swift @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct BillWithAdditionalPrivateMoneys: Codable { + public let id: String; + public let amount: Int; + public let description: String; + public let user: User; + public let isOnetime: Bool; + public let isDisabled: Bool; + public let privateMoney: PrivateMoney; + public let token: String; + public let maxAmount: Int; + public let minAmount: Int; + public let additionalPrivateMoneys: [PrivateMoney]; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case amount = "amount" + case description = "description" + case user = "user" + case isOnetime = "is_onetime" + case isDisabled = "is_disabled" + case privateMoney = "private_money" + case token = "token" + case maxAmount = "max_amount" + case minAmount = "min_amount" + case additionalPrivateMoneys = "additional_private_moneys" + } +} diff --git a/Sources/Pokepay/Responses/Cashtray.swift b/Sources/Pokepay/Responses/Cashtray.swift index 51fb95e..56182c0 100644 --- a/Sources/Pokepay/Responses/Cashtray.swift +++ b/Sources/Pokepay/Responses/Cashtray.swift @@ -1,27 +1,24 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Cashtray: Codable { - public let id: String - public let amount: Double - public let description: String - public let user: User - public let privateMoney: PrivateMoney - public let expiresAt: Date - public let canceledAt: Date? - public let token: String - public let attempt: CashtrayAttempt? - public let transaction: UserTransaction? + public let id: String; + public let amount: Int; + public let description: String; + public let user: User; + public let privateMoney: PrivateMoney; + public let expiresAt: String; + public let canceledAt: String; + public let token: String; - private enum CodingKeys: String, CodingKey { - case id - case amount - case description - case user + private enum CodingKeys: String, CodingKeys { + case id = "id" + case amount = "amount" + case description = "description" + case user = "user" case privateMoney = "private_money" case expiresAt = "expires_at" case canceledAt = "canceled_at" - case token - case attempt - case transaction + case token = "token" } } diff --git a/Sources/Pokepay/Responses/CashtrayAttempts.swift b/Sources/Pokepay/Responses/CashtrayAttempts.swift index bb1edc3..919f6d1 100644 --- a/Sources/Pokepay/Responses/CashtrayAttempts.swift +++ b/Sources/Pokepay/Responses/CashtrayAttempts.swift @@ -1,9 +1,10 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct CashtrayAttempts: Codable { - public let rows: [CashtrayAttempt] + public let rows: [CashtrayAttempt]; - private enum CodingKeys: String, CodingKey { - case rows + private enum CodingKeys: String, CodingKeys { + case rows = "rows" } } diff --git a/Sources/Pokepay/Responses/CashtrayWithAttemptAndTransaction.swift b/Sources/Pokepay/Responses/CashtrayWithAttemptAndTransaction.swift new file mode 100644 index 0000000..11c0969 --- /dev/null +++ b/Sources/Pokepay/Responses/CashtrayWithAttemptAndTransaction.swift @@ -0,0 +1,8 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct CashtrayWithAttemptAndTransaction: Codable { + + private enum CodingKeys: String, CodingKeys { + } +} diff --git a/Sources/Pokepay/Responses/Check.swift b/Sources/Pokepay/Responses/Check.swift index 3a14839..acf5ebb 100644 --- a/Sources/Pokepay/Responses/Check.swift +++ b/Sources/Pokepay/Responses/Check.swift @@ -1,33 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Check: Codable { - public let id: String - public let amount: Double - public let moneyAmount: Double - public let pointAmount: Double - public let description: String - public let user: User - public let privateMoney: PrivateMoney - public let isOnetime: Bool - public let isDisabled: Bool - public let expiresAt: Date - public let token: String - public let pointExpiresAt: Date? - public let pointExpiresInDays: Int32? + public let id: String; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let description: String; + public let user: User; + public let isOnetime: Bool; + public let isDisabled: Bool; + public let expiresAt: String; + public let privateMoney: PrivateMoney; + public let token: String; - private enum CodingKeys: String, CodingKey { - case id - case amount + private enum CodingKeys: String, CodingKeys { + case id = "id" + case amount = "amount" case moneyAmount = "money_amount" case pointAmount = "point_amount" - case description - case user - case privateMoney = "private_money" + case description = "description" + case user = "user" case isOnetime = "is_onetime" case isDisabled = "is_disabled" case expiresAt = "expires_at" - case token - case pointExpiresAt = "point_expires_at" - case pointExpiresInDays = "point_expires_in_days" + case privateMoney = "private_money" + case token = "token" } } diff --git a/Sources/Pokepay/Responses/Coupon.swift b/Sources/Pokepay/Responses/Coupon.swift index 3c07fb3..764c301 100644 --- a/Sources/Pokepay/Responses/Coupon.swift +++ b/Sources/Pokepay/Responses/Coupon.swift @@ -1,32 +1,33 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation -public struct Coupon :Codable{ - public let id:String - public let name:String - public let description:String - public let discountAmount:Int - public let discountPercentage:Int? - public let startAt:Date - public let endAt:Date - public let displayStartAt:Date - public let displayEndAt:Date - public let usageLimit:Int - public let minAmount:Int? - public let isShopSpecified:Bool - public let isDisabled:Bool - public let isHidden:Bool - public let couponImage:String? - - private enum CodingKeys: String, CodingKey { - case id - case name - case description +public struct Coupon: Codable { + public let id: String; + public let name: String; + public let description: String; + public let discountAmount: Int; + public let discountPercentage: Int; + public let startsAt: String; + public let endsAt: String; + public let displayStartsAt: String; + public let displayEndsAt: String; + public let usageLimit: Int; + public let minAmount: Int; + public let isShopSpecified: Bool; + public let isDisabled: Bool; + public let isHidden: Bool; + public let couponImage: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case description = "description" case discountAmount = "discount_amount" case discountPercentage = "discount_percentage" - case startAt = "starts_at" - case endAt = "ends_at" - case displayStartAt = "display_starts_at" - case displayEndAt = "display_ends_at" + case startsAt = "starts_at" + case endsAt = "ends_at" + case displayStartsAt = "display_starts_at" + case displayEndsAt = "display_ends_at" case usageLimit = "usage_limit" case minAmount = "min_amount" case isShopSpecified = "is_shop_specified" diff --git a/Sources/Pokepay/Responses/CouponDetail.swift b/Sources/Pokepay/Responses/CouponDetail.swift index 02bcf7b..0a8d956 100644 --- a/Sources/Pokepay/Responses/CouponDetail.swift +++ b/Sources/Pokepay/Responses/CouponDetail.swift @@ -1,35 +1,36 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation -public struct CouponDetail:Codable{ - public let id:String - public let name:String - public let description:String - public let discountAmount:Int? - public let discountPercentage:Int? - public let startAt:Date - public let endAt:Date - public let displayStartAt:Date - public let displayEndAt:Date - public let usageLimit:Int? - public let minAmount:Int? - public let isShopSpecified:Bool - public let isDisabled:Bool - public let isHidden:Bool - public let couponImage:String? - public let receivedAt:String? - public let usageCount:Int - public let availableShops:[User] - - private enum CodingKeys: String, CodingKey{ - case id - case name - case description +public struct CouponDetail: Codable { + public let id: String; + public let name: String; + public let description: String; + public let discountAmount: Int; + public let discountPercentage: Int; + public let startsAt: String; + public let endsAt: String; + public let displayStartsAt: String; + public let displayEndsAt: String; + public let usageLimit: Int; + public let minAmount: Int; + public let isShopSpecified: Bool; + public let isDisabled: Bool; + public let isHidden: Bool; + public let couponImage: String; + public let receivedAt: String; + public let usageCount: Int; + public let availableShops: [User]; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case description = "description" case discountAmount = "discount_amount" case discountPercentage = "discount_percentage" - case startAt = "starts_at" - case endAt = "ends_at" - case displayStartAt = "display_starts_at" - case displayEndAt = "display_ends_at" + case startsAt = "starts_at" + case endsAt = "ends_at" + case displayStartsAt = "display_starts_at" + case displayEndsAt = "display_ends_at" case usageLimit = "usage_limit" case minAmount = "min_amount" case isShopSpecified = "is_shop_specified" diff --git a/Sources/Pokepay/Responses/CpmToken.swift b/Sources/Pokepay/Responses/CpmToken.swift new file mode 100644 index 0000000..646e812 --- /dev/null +++ b/Sources/Pokepay/Responses/CpmToken.swift @@ -0,0 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct CpmToken: Codable { + public let cpmToken: String; + public let account: Account; + public let transaction: UserTransaction; + public let scopes: [String]; + public let expiresAt: String; + public let metadata: String; + + private enum CodingKeys: String, CodingKeys { + case cpmToken = "cpm_token" + case account = "account" + case transaction = "transaction" + case scopes = "scopes" + case expiresAt = "expires_at" + case metadata = "metadata" + } +} diff --git a/Sources/Pokepay/Responses/CreditCard.swift b/Sources/Pokepay/Responses/CreditCard.swift index baa8802..7d11911 100644 --- a/Sources/Pokepay/Responses/CreditCard.swift +++ b/Sources/Pokepay/Responses/CreditCard.swift @@ -5,7 +5,7 @@ public struct CreditCard: Codable { public let cardNumber: String; public let registeredAt: String; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case cardNumber = "card_number" case registeredAt = "registered_at" } diff --git a/Sources/Pokepay/Responses/IdentificationResult.swift b/Sources/Pokepay/Responses/IdentificationResult.swift index 290310b..3b8638b 100644 --- a/Sources/Pokepay/Responses/IdentificationResult.swift +++ b/Sources/Pokepay/Responses/IdentificationResult.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct IdentificationResult: Codable { - public let isValid: Bool - public let identifiedAt: String? - public let match: IdentificationMatch + public let isValid: Bool; + public let identifiedAt: String; + public let match: Object; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case isValid = "is_valid" case identifiedAt = "identified_at" - case match + case match = "match" } -} \ No newline at end of file +} diff --git a/Sources/Pokepay/Responses/Organization.swift b/Sources/Pokepay/Responses/Organization.swift index 1158dc7..9d0a1ff 100644 --- a/Sources/Pokepay/Responses/Organization.swift +++ b/Sources/Pokepay/Responses/Organization.swift @@ -1,6 +1,12 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Organization: Codable { - public let code: String - public let name: String + public let code: String; + public let name: String; + + private enum CodingKeys: String, CodingKeys { + case code = "code" + case name = "name" + } } diff --git a/Sources/Pokepay/Responses/PaginatedAccountBalances.swift b/Sources/Pokepay/Responses/PaginatedAccountBalances.swift index a3443a2..a298126 100644 --- a/Sources/Pokepay/Responses/PaginatedAccountBalances.swift +++ b/Sources/Pokepay/Responses/PaginatedAccountBalances.swift @@ -1,17 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct PaginatedAccountBalances: Codable { - public let perPage: Int32 - public let count: Int32 - public let next: String? - public let prev: String? - public let items: [AccountBalance] + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [AccountBalance]; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case perPage = "per_page" - case count - case next - case prev - case items + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" } } diff --git a/Sources/Pokepay/Responses/PaginatedAccountCoupons.swift b/Sources/Pokepay/Responses/PaginatedAccountCoupons.swift new file mode 100644 index 0000000..9dcd788 --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedAccountCoupons.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedAccountCoupons: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [Coupon]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PaginatedAccountTransactions.swift b/Sources/Pokepay/Responses/PaginatedAccountTransactions.swift new file mode 100644 index 0000000..033e7cf --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedAccountTransactions.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedAccountTransactions: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [UserTransaction]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PaginatedAccountTransfers.swift b/Sources/Pokepay/Responses/PaginatedAccountTransfers.swift new file mode 100644 index 0000000..dae70d0 --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedAccountTransfers.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedAccountTransfers: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [UserTransfer]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PaginatedCreditCards.swift b/Sources/Pokepay/Responses/PaginatedCreditCards.swift index 8f3e8f5..8d4dd83 100644 --- a/Sources/Pokepay/Responses/PaginatedCreditCards.swift +++ b/Sources/Pokepay/Responses/PaginatedCreditCards.swift @@ -4,11 +4,11 @@ import Foundation public struct PaginatedCreditCards: Codable { public let perPage: Int; public let count: Int; - public let next: String?; - public let prev: String?; + public let next: String; + public let prev: String; public let items: [CreditCard]; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case perPage = "per_page" case count = "count" case next = "next" diff --git a/Sources/Pokepay/Responses/PaginatedPrivateMoneyCoupons.swift b/Sources/Pokepay/Responses/PaginatedPrivateMoneyCoupons.swift new file mode 100644 index 0000000..c95d319 --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedPrivateMoneyCoupons.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedPrivateMoneyCoupons: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [Coupon]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PaginatedPrivateMoneys.swift b/Sources/Pokepay/Responses/PaginatedPrivateMoneys.swift index e375cb9..f018072 100644 --- a/Sources/Pokepay/Responses/PaginatedPrivateMoneys.swift +++ b/Sources/Pokepay/Responses/PaginatedPrivateMoneys.swift @@ -1,17 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct PaginatedPrivateMoneys: Codable { - public let perPage: Int32 - public let count: Int32 - public let next: String? - public let prev: String? - public let items: [PrivateMoney] + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [PrivateMoney]; - private enum CodingKeys: String, CodingKey { + private enum CodingKeys: String, CodingKeys { case perPage = "per_page" - case count - case next - case prev - case items + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" } } diff --git a/Sources/Pokepay/Responses/PaginatedUserAccounts.swift b/Sources/Pokepay/Responses/PaginatedUserAccounts.swift new file mode 100644 index 0000000..1ef4619 --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedUserAccounts.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedUserAccounts: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [Account]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PaginatedUserTransactions.swift b/Sources/Pokepay/Responses/PaginatedUserTransactions.swift new file mode 100644 index 0000000..79a8a80 --- /dev/null +++ b/Sources/Pokepay/Responses/PaginatedUserTransactions.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PaginatedUserTransactions: Codable { + public let perPage: Int; + public let count: Int; + public let next: String; + public let prev: String; + public let items: [UserTransaction]; + + private enum CodingKeys: String, CodingKeys { + case perPage = "per_page" + case count = "count" + case next = "next" + case prev = "prev" + case items = "items" + } +} diff --git a/Sources/Pokepay/Responses/PrivateMoney.swift b/Sources/Pokepay/Responses/PrivateMoney.swift index f5be616..e209c8c 100644 --- a/Sources/Pokepay/Responses/PrivateMoney.swift +++ b/Sources/Pokepay/Responses/PrivateMoney.swift @@ -1,37 +1,37 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct PrivateMoney: Codable { - public let id: String - public let name: String - public let type: String - public let unit: String - public let description: String - public let onelineMessage: String - public let accountImage: String? - public let images: Images - public let organization: Organization - public let maxBalance: Double - public let transferLimit: Double - public let expirationType: String - public let isExclusive: Bool - public let termsUrl: String? - public let privacyPolicyUrl: String? - public let paymentActUrl: String? - public let commercialActUrl: String? - public let canUseCreditCard: Bool? - public let canUseC2CTransfer: Bool - public let customDomainName: String? + public let id: String; + public let name: String; + public let type: String; + public let unit: String; + public let description: String; + public let onelineMessage: String; + public let displayMoneyAndPoint: String; + public let accountImage: String; + public let images: PrivateMoneyImages; + public let organization: Organization; + public let maxBalance: Int; + public let transferLimit: Int; + public let expirationType: String; + public let isExclusive: Bool; + public let termsUrl: String; + public let privacyPolicyUrl: String; + public let paymentActUrl: String; + public let commercialActUrl: String; - private enum CodingKeys: String, CodingKey { - case id - case name - case type - case unit - case description + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case type = "type" + case unit = "unit" + case description = "description" case onelineMessage = "oneline_message" + case displayMoneyAndPoint = "display_money_and_point" case accountImage = "account_image" - case images - case organization + case images = "images" + case organization = "organization" case maxBalance = "max_balance" case transferLimit = "transfer_limit" case expirationType = "expiration_type" @@ -40,8 +40,5 @@ public struct PrivateMoney: Codable { case privacyPolicyUrl = "privacy_policy_url" case paymentActUrl = "payment_act_url" case commercialActUrl = "commercial_act_url" - case canUseCreditCard = "can_use_credit_card" - case canUseC2CTransfer = "can_use_c2c_transfer" - case customDomainName = "custom_domain_name" } } diff --git a/Sources/Pokepay/Responses/PrivateMoneyDetail.swift b/Sources/Pokepay/Responses/PrivateMoneyDetail.swift new file mode 100644 index 0000000..0971d93 --- /dev/null +++ b/Sources/Pokepay/Responses/PrivateMoneyDetail.swift @@ -0,0 +1,8 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct PrivateMoneyDetail: Codable { + + private enum CodingKeys: String, CodingKeys { + } +} diff --git a/Sources/Pokepay/Responses/Product.swift b/Sources/Pokepay/Responses/Product.swift new file mode 100644 index 0000000..43d5549 --- /dev/null +++ b/Sources/Pokepay/Responses/Product.swift @@ -0,0 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct Product: Codable { + public let janCode: String; + public let name: String; + public let unitPrice: Int; + public let price: Int; + public let quantity: Int; + public let isDiscounted: Bool; + public let other: String; + + private enum CodingKeys: String, CodingKeys { + case janCode = "jan_code" + case name = "name" + case unitPrice = "unit_price" + case price = "price" + case quantity = "quantity" + case isDiscounted = "is_discounted" + case other = "other" + } +} diff --git a/Sources/Pokepay/Responses/SevenBankAtmSession.swift b/Sources/Pokepay/Responses/SevenBankAtmSession.swift new file mode 100644 index 0000000..4955a0a --- /dev/null +++ b/Sources/Pokepay/Responses/SevenBankAtmSession.swift @@ -0,0 +1,16 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct SevenBankAtmSession: Codable { + public let qrInfo: String; + public let account: Account; + public let amount: Int; + public let transaction: UserTransactionWithTransfers; + + private enum CodingKeys: String, CodingKeys { + case qrInfo = "qr_info" + case account = "account" + case amount = "amount" + case transaction = "transaction" + } +} diff --git a/Sources/Pokepay/Responses/Terminal.swift b/Sources/Pokepay/Responses/Terminal.swift index 05d7445..e0c41b3 100644 --- a/Sources/Pokepay/Responses/Terminal.swift +++ b/Sources/Pokepay/Responses/Terminal.swift @@ -1,21 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct Terminal: Codable { - public let id: String - public let name: String - public let hardwareId: String - public let pushService: String? - public let pushToken: String? - public let user: User - public let account: Account + public let id: String; + public let name: String; + public let hardwareId: String; + public let pushService: String; + public let pushToken: String; + public let user: UserWithDetails; + public let account: Nil; - private enum CodingKeys: String, CodingKey { - case id - case name + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" case hardwareId = "hardware_id" case pushService = "push_service" case pushToken = "push_token" - case user - case account + case user = "user" + case account = "account" } } diff --git a/Sources/Pokepay/Responses/User.swift b/Sources/Pokepay/Responses/User.swift index d8b6c01..c813dea 100644 --- a/Sources/Pokepay/Responses/User.swift +++ b/Sources/Pokepay/Responses/User.swift @@ -1,13 +1,14 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct User: Codable { - public let id: String - public let name: String - public let isMerchant: Bool + public let id: String; + public let name: String; + public let isMerchant: Bool; - private enum CodingKeys: String, CodingKey { - case id - case name + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" case isMerchant = "is_merchant" } } diff --git a/Sources/Pokepay/Responses/UserBank.swift b/Sources/Pokepay/Responses/UserBank.swift new file mode 100644 index 0000000..584964c --- /dev/null +++ b/Sources/Pokepay/Responses/UserBank.swift @@ -0,0 +1,26 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserBank: Codable { + public let id: String; + public let privateMoney: PrivateMoney; + public let bankName: String; + public let bankCode: String; + public let branchNumber: String; + public let branchName: String; + public let depositType: String; + public let maskedAccountNumber: String; + public let accountName: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case privateMoney = "private_money" + case bankName = "bank_name" + case bankCode = "bank_code" + case branchNumber = "branch_number" + case branchName = "branch_name" + case depositType = "deposit_type" + case maskedAccountNumber = "masked_account_number" + case accountName = "account_name" + } +} diff --git a/Sources/Pokepay/Responses/UserTransaction.swift b/Sources/Pokepay/Responses/UserTransaction.swift index 0abdffb..d297f08 100644 --- a/Sources/Pokepay/Responses/UserTransaction.swift +++ b/Sources/Pokepay/Responses/UserTransaction.swift @@ -1,33 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct UserTransaction: Codable { - public let id: String - public let type: String - public let isModified: Bool - public let user: User - public let balance: Double - public let customerBalance: Double? - public let amount: Double - public let moneyAmount: Double - public let pointAmount: Double - public let account: Account - public let description: String - public let doneAt: Date - public let transfers: [Transfer]? + public let id: String; + public let user: User; + public let balance: Int; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let account: Account; + public let description: String; + public let doneAt: String; + public let type: String; + public let isModified: Bool; - private enum CodingKeys: String, CodingKey { - case id - case type - case isModified = "is_modified" - case user - case balance - case customerBalance = "customer_balance" - case amount + private enum CodingKeys: String, CodingKeys { + case id = "id" + case user = "user" + case balance = "balance" + case amount = "amount" case moneyAmount = "money_amount" case pointAmount = "point_amount" - case account - case description + case account = "account" + case description = "description" case doneAt = "done_at" - case transfers + case type = "type" + case isModified = "is_modified" } } diff --git a/Sources/Pokepay/Responses/UserTransactionWithCustomerBalance.swift b/Sources/Pokepay/Responses/UserTransactionWithCustomerBalance.swift new file mode 100644 index 0000000..bd9f422 --- /dev/null +++ b/Sources/Pokepay/Responses/UserTransactionWithCustomerBalance.swift @@ -0,0 +1,32 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserTransactionWithCustomerBalance: Codable { + public let id: String; + public let user: User; + public let balance: Int; + public let customerBalance: Int; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let account: Account; + public let description: String; + public let doneAt: String; + public let type: String; + public let isModified: Bool; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case user = "user" + case balance = "balance" + case customerBalance = "customer_balance" + case amount = "amount" + case moneyAmount = "money_amount" + case pointAmount = "point_amount" + case account = "account" + case description = "description" + case doneAt = "done_at" + case type = "type" + case isModified = "is_modified" + } +} diff --git a/Sources/Pokepay/Responses/UserTransactionWithTransfers.swift b/Sources/Pokepay/Responses/UserTransactionWithTransfers.swift new file mode 100644 index 0000000..2aaa806 --- /dev/null +++ b/Sources/Pokepay/Responses/UserTransactionWithTransfers.swift @@ -0,0 +1,32 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserTransactionWithTransfers: Codable { + public let id: String; + public let user: User; + public let balance: Int; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let account: Account; + public let description: String; + public let doneAt: String; + public let type: String; + public let isModified: Bool; + public let transfers: [UserTransferWithoutAccount]; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case user = "user" + case balance = "balance" + case amount = "amount" + case moneyAmount = "money_amount" + case pointAmount = "point_amount" + case account = "account" + case description = "description" + case doneAt = "done_at" + case type = "type" + case isModified = "is_modified" + case transfers = "transfers" + } +} diff --git a/Sources/Pokepay/Responses/UserTransfer.swift b/Sources/Pokepay/Responses/UserTransfer.swift new file mode 100644 index 0000000..034c5fd --- /dev/null +++ b/Sources/Pokepay/Responses/UserTransfer.swift @@ -0,0 +1,30 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserTransfer: Codable { + public let id: String; + public let transactionId: String; + public let user: User; + public let balance: Int; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let account: Account; + public let description: String; + public let doneAt: String; + public let type: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case transactionId = "transaction_id" + case user = "user" + case balance = "balance" + case amount = "amount" + case moneyAmount = "money_amount" + case pointAmount = "point_amount" + case account = "account" + case description = "description" + case doneAt = "done_at" + case type = "type" + } +} diff --git a/Sources/Pokepay/Responses/UserTransferWithoutAccount.swift b/Sources/Pokepay/Responses/UserTransferWithoutAccount.swift new file mode 100644 index 0000000..b89e770 --- /dev/null +++ b/Sources/Pokepay/Responses/UserTransferWithoutAccount.swift @@ -0,0 +1,22 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserTransferWithoutAccount: Codable { + public let id: String; + public let amount: Int; + public let moneyAmount: Int; + public let pointAmount: Int; + public let description: String; + public let doneAt: String; + public let type: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case amount = "amount" + case moneyAmount = "money_amount" + case pointAmount = "point_amount" + case description = "description" + case doneAt = "done_at" + case type = "type" + } +} diff --git a/Sources/Pokepay/Responses/UserWithAuthFactors.swift b/Sources/Pokepay/Responses/UserWithAuthFactors.swift index 5f3399a..844329b 100644 --- a/Sources/Pokepay/Responses/UserWithAuthFactors.swift +++ b/Sources/Pokepay/Responses/UserWithAuthFactors.swift @@ -1,19 +1,20 @@ +// DO NOT EDIT: File is generated by code generator. import Foundation public struct UserWithAuthFactors: Codable { - public let id: String - public let name: String - public let isMerchant: Bool - public let tel: String? - public let email: String? - public let isPasswordRegistered: Bool + public let id: String; + public let name: String; + public let isMerchant: Bool; + public let tel: String; + public let email: String; + public let isPasswordRegistered: Bool; - private enum CodingKeys: String, CodingKey { - case id - case name + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" case isMerchant = "is_merchant" - case tel - case email + case tel = "tel" + case email = "email" case isPasswordRegistered = "is_password_registered" } } diff --git a/Sources/Pokepay/Responses/UserWithDetails.swift b/Sources/Pokepay/Responses/UserWithDetails.swift new file mode 100644 index 0000000..d071ca9 --- /dev/null +++ b/Sources/Pokepay/Responses/UserWithDetails.swift @@ -0,0 +1,18 @@ +// DO NOT EDIT: File is generated by code generator. +import Foundation + +public struct UserWithDetails: Codable { + public let id: String; + public let name: String; + public let isMerchant: Bool; + public let tel: String; + public let email: String; + + private enum CodingKeys: String, CodingKeys { + case id = "id" + case name = "name" + case isMerchant = "is_merchant" + case tel = "tel" + case email = "email" + } +} diff --git a/docs/ios-sdk/README.md b/docs/ios-sdk/README.md new file mode 100644 index 0000000..bb8b643 --- /dev/null +++ b/docs/ios-sdk/README.md @@ -0,0 +1,113 @@ + +## API Operations + +### Terminal +- [GetTerminal](./terminal.md#get-terminal): 端末の情報を取埗 +- [UpdateTerminal](./terminal.md#update-terminal): 端末の情報を倉曎 +- [AddTerminalPublicKey](./terminal.md#add-terminal-public-key): 端末に新たな公開鍵を远加 + +### Check +- [DeleteCheck](./check.md#delete-check): チャヌゞQRコヌドを無効にする +- [GetCheck](./check.md#get-check): チャヌゞQRコヌドを取埗する +- [UpdateCheck](./check.md#update-check): チャヌゞQRコヌドを修正する +- [CreateCheck](./check.md#create-check): チャヌゞQRコヌドの発行する + +### Bill +- [DeleteBill](./bill.md#delete-bill): 䜜成枈みBillを無効化する +- [GetBill](./bill.md#get-bill): 䜜成枈みBillの蚭定内容を参照する +- [UpdateBill](./bill.md#update-bill): Billの蚭定内容を曎新 +- [ListBillTransactions](./bill.md#list-bill-transactions): Billによる取匕䞀芧を取埗する +- [GetBillLastTransaction](./bill.md#get-bill-last-transaction): Get the last transaction of bill +- [CreateBill](./bill.md#create-bill): 支払い甚QR(トヌクン)を新芏登録 + +### Cashtray +- [DeleteCashtray](./cashtray.md#delete-cashtray): Cashtrayを無効化 +- [GetCashtray](./cashtray.md#get-cashtray): Cashtrayの蚭定内容を参照 +- [UpdateCashtray](./cashtray.md#update-cashtray): Cashtrayの蚭定内容を曎新 +- [CreateCashtray](./cashtray.md#create-cashtray): Cashtrayを新芏登録 +- [GetCashtrayAttempts](./cashtray.md#get-cashtray-attempts): Cashtrayを利甚した決枈の状況を確認 + +### Credit Card +- [GetCreditCards](./credit_card.md#get-credit-cards): Get user credit cards +- [CreateCreditCard](./credit_card.md#create-credit-card): Create user credit card +- [DeleteCreditCard](./credit_card.md#delete-credit-card): Create user credit card +- [TopupWithCreditCardMembership](./credit_card.md#topup-with-credit-card-membership): 䌚員情報によるクレゞットカヌドチャヌゞ +- [TopupWithCreditCardMdkToken](./credit_card.md#topup-with-credit-card-mdk-token): MDKトヌクンによるクレゞットカヌドチャヌゞ + +### User +- [GetUser](./user.md#get-user): Show the user information +- [UpdateUser](./user.md#update-user): ナヌザ情報の曎新 +- [GetUserWithAuthFactors](./user.md#get-user-with-auth-factors): ナヌザの認蚌情報の取埗 +- [GetUserTransactions](./user.md#get-user-transactions): 取匕情報の取埗 +- [GetUserAccounts](./user.md#get-user-accounts): ナヌザのアカりント䞀芧取埗 +- [GetUserSettingUrl](./user.md#get-user-setting-url): 䞀時的なフルアクセスを蚱可する認蚌のためのURLを取埗 + +### Bank +- [DeleteBank](./bank.md#delete-bank): 銀行口座ずの連携を解陀 +- [ListBanks](./bank.md#list-banks): 登録枈みの銀行䞀芧の取埗 +- [BankTopUp](./bank.md#bank-top-up): 登録した銀行からのチャヌゞ + +### Merchants +- [ListMerchantTransactions](./merchants.md#list-merchant-transactions): Show the merchant's transaction + +### Transaction +- [GetTransaction](./transaction.md#get-transaction): 取匕情報取埗 +- [RefundTransaction](./transaction.md#refund-transaction): 取匕キャンセル +- [ListBillTransactions](./transaction.md#list-bill-transactions): Billによる取匕䞀芧を取埗する +- [GetBillLastTransaction](./transaction.md#get-bill-last-transaction): Get the last transaction of bill +- [GetUserTransactions](./transaction.md#get-user-transactions): 取匕情報の取埗 +- [GetAccountTransactions](./transaction.md#get-account-transactions): 取匕履歎取埗 +- [SendToAccount](./transaction.md#send-to-account): Send money to an account +- [GetAccountTransfers](./transaction.md#get-account-transfers): 取匕明现䞀芧 + +### Account +- [GetUserAccounts](./account.md#get-user-accounts): ナヌザのアカりント䞀芧取埗 +- [GetAccount](./account.md#get-account): りォレット情報を取埗する +- [UpdateAccount](./account.md#update-account): Update account information +- [CreateAccount](./account.md#create-account): アカりント䜜成 +- [GetAccountTransactions](./account.md#get-account-transactions): 取匕履歎取埗 +- [SendToAccount](./account.md#send-to-account): Send money to an account +- [GetAccountTransfers](./account.md#get-account-transfers): 取匕明现䞀芧 +- [GetAccountBalances](./account.md#get-account-balances): 残高内蚳を取埗する +- [CreateAccountCpmToken](./account.md#create-account-cpm-token): CPMトヌクン䜜成 +- [GetAccountCoupons](./account.md#get-account-coupons): クヌポン衚瀺 +- [GetAccountCouponDetail](./account.md#get-account-coupon-detail): クヌポンを取埗する +- [PatchAccountCouponDetail](./account.md#patch-account-coupon-detail): クヌポンを受け取る +- [IdentifyIndividual](./account.md#identify-individual): マむナンバヌ確認セッションを䜜成する + +### Individual Number Identification +- [IdentifyIndividual](./individual_number_identification.md#identify-individual): マむナンバヌ確認セッションを䜜成する + +### Campaign +- [GetAccountCampaignPointAmounts](./campaign.md#get-account-campaign-point-amounts): キャンペヌンのポむント付䞎総額取埗 + +### Cpm +- [CreateAccountCpmToken](./cpm.md#create-account-cpm-token): CPMトヌクン䜜成 +- [GetCpmToken](./cpm.md#get-cpm-token): CPMトヌクンの情報を取埗 + +### Sevenbankatm + +### Coupon +- [GetAccountCoupons](./coupon.md#get-account-coupons): クヌポン衚瀺 +- [GetAccountCouponDetail](./coupon.md#get-account-coupon-detail): クヌポンを取埗する +- [PatchAccountCouponDetail](./coupon.md#patch-account-coupon-detail): クヌポンを受け取る +- [GetPrivateMoneyCoupons](./coupon.md#get-private-money-coupons): マネヌのクヌポン情報を取埗 + +### Private Money +- [GetPrivateMoney](./private_money.md#get-private-money): マネヌ情報を取埗 +- [GetPrivateMoneyTerms](./private_money.md#get-private-money-terms): Get the private money terms +- [GetPrivateMoneyPrivacyPolicy](./private_money.md#get-private-money-privacy-policy): Get the private money pricvacy-policy +- [GetPrivateMoneyPaymentAct](./private_money.md#get-private-money-payment-act): Get the private money payment-act +- [GetPrivateMoneyCommercialAct](./private_money.md#get-private-money-commercial-act): Get the private money commercial-act +- [GetUserAttributeSchema](./private_money.md#get-user-attribute-schema): ナヌザアンケヌト項目 +- [ListPrivateMoneys](./private_money.md#list-private-moneys): マネヌ䞀芧を取埗する + +### Voucher + +### Open Exchange Rates + +### Payspot + +### Internal +- [GetUserAttributeSchema](./internal.md#get-user-attribute-schema): ナヌザアンケヌト項目 + diff --git a/docs/ios-sdk/account.md b/docs/ios-sdk/account.md new file mode 100644 index 0000000..a0e83cc --- /dev/null +++ b/docs/ios-sdk/account.md @@ -0,0 +1,975 @@ +# Account +りォレットを衚すデヌタです。 +CustomerもMerchantも所有し、同䞀りォレット間の送金は取匕ずしお蚘録されたす。 +Customerのりォレットはマネヌ残高(有償バリュヌ)、ポむント残高(無償バリュヌ)の2皮類の残高をもちたす。 +たた有効期限別で金額管理しおおり、有効期限はチャヌゞ時のコンテキストによっお決定されたす。 +ナヌザはマネヌ別に耇数のりォレットを保有するこずが可胜です。 +ただしマネヌりォレットのみであり、同䞀マネヌのりォレットを耇数所有するこずはできたせん。 + + + +## GetUserAccounts: ナヌザのアカりント䞀芧取埗 +ナヌザのアカりント䞀芧を取埗したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string" +} +``` + +**`after`** + + + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedUserAccounts](./responses.md#paginated-user-accounts) +を返したす + + + +--- + + + +## GetAccount: りォレット情報を取埗する +指定したりォレットの情報を取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[AccountDetail](./responses.md#account-detail) +を返したす + + + +--- + + + +## UpdateAccount: Update account information + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`name`** + + + +```json +{ + "type": "string", + "maxLength": 256 +} +``` + + + +成功したずきは +[AccountDetail](./responses.md#account-detail) +を返したす + + + +--- + + + +## CreateAccount: アカりント䜜成 +新芏アカりントを䜜成したす。 + +```swift + +``` + + + +### Parameters +**`name`** + + +䜜成するアカりントの名前です。 + +```json +{ + "type": "string", + "maxLength": 256 +} +``` + +**`private_money_id`** + + +䜜成するアカりントに玐づくマネヌのIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`external_id`** + + +䜜成するアカりントに玐づく倖郚IDです。 + +```json +{ + "type": "string", + "maxLength": 50 +} +``` + + + +成功したずきは +[AccountDetail](./responses.md#account-detail) +を返したす + + + +--- + + + +## GetAccountTransactions: 取匕履歎取埗 +指定したIDのりォレットの取匕履歎を取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺する取匕履歎の件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedAccountTransactions](./responses.md#paginated-account-transactions) +を返したす + + + +--- + + + +## SendToAccount: Send money to an account + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`receiver_terminal_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`sender_account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`description`** + + + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## GetAccountTransfers: 取匕明现䞀芧 +指定したりォレットIDの取匕履歎を明现レベルで取埗したす。 +取匕明现には返金やキャンペヌンによるポむント付䞎などが含たれたす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺する取匕履歎の件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedAccountTransfers](./responses.md#paginated-account-transfers) +を返したす + + + +--- + + + +## GetAccountBalances: 残高内蚳を取埗する +指定したりォレットの有効期限別残高䞀芧を取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + +有効期限によるフィルタヌの期間指定のために䜿いたす。 +このパラメヌタを指定するず、有効期限が指定した日時より前の残高が抜出されたす。 + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`after`** + + +有効期限によるフィルタヌの期間指定のために䜿いたす。 +このパラメヌタを指定するず、有効期限が指定した日時より埌の残高が抜出されたす。 + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`per_page`** + + +1ペヌゞ圓たり取埗数です。デフォルト倀は30です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + +**`expired`** + + +倱効枈みの残高を衚瀺するかどうかのフラグです。 +trueの堎合、倱効枈みの残高のみを取埗し、falseの堎合は有効な残高のみを取埗したす。 +デフォルト倀はfalseです。 + +```json +{ + "type": "string", + "enum": [ + "true", + "false" + ] +} +``` + + + +成功したずきは +[PaginatedAccountBalances](./responses.md#paginated-account-balances) +を返したす + + + +--- + + + +## CreateAccountCpmToken: CPMトヌクン䜜成 +ナヌザのりォレットID (account_id) を指定しおCPMトヌクンを䜜成したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`scopes`** + + + +```json +{ + "type": "array", + "items": { + "type": "string", + "enum": [ + "payment", + "topup", + "external-transaction" + ] + } +} +``` + +**`expires_in`** + + +CPMトヌクンの有効期限です。単䜍は秒で、デフォルトの倀は300秒(5分)です。 +最倧倀は2592000秒(30日)ですが、セキュリティの芳点では短い時間が望たしいずされおいたす。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 2592000 +} +``` + +**`metadata`** + + +CPMトヌクンにメタデヌタを蚭定したす。 +ここで指定したメタデヌタは取匕䜜成時に匕き継がれ、キャンペヌンの発火条件などに䜿甚されたす。 + +```json +{ + "type": "string", + "format": "json" +} +``` + +**`keep_alive`** + + +通垞、新しいCPMトヌクンが生成されるず、それたでに䜜られたCPMトヌクンはたずえ有効期限内であっおも倱効したす。 +keep_aliveフラグを true にするず、埌のCPMトヌクン生成時にも倱効させられないCPMトヌクンを䜜るこずができたす。 +テスト時などに長寿呜のCPMトヌクンを䜜る際に、同時に指定するこずが倚いです。 +デフォルトでは false になりたす。 + +```json +{ + "type": "boolean" +} +``` + +**`is_short_token`** + + +このパラメヌタが true に蚭定されおいるずき、20桁に短瞮されたCPMトヌクンが生成されたす。 +通垞は22桁で、䞋䜍8桁がランダム郚分ですが、is_short_tokenを true にするず䞋䜍6桁がランダム郚分になりたす。 +デフォルトではfalseで、22桁のCPMトヌクンが生成されたす。 + +```json +{ + "type": "boolean" +} +``` + + + +成功したずきは +[CpmToken](./responses.md#cpm-token) +を返したす + + + +--- + + + +## GetAccountCoupons: クヌポン衚瀺 +指定したアカりントが察象のクヌポンを取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`is_available`** + + +利甚可胜なクヌポンのみを衚瀺するかどうかのフラグです。 +デフォルト倀はtrueです。 + +```json +{ + "type": "string", + "enum": [ + "true", + "false" + ] +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺するクヌポンの件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1 +} +``` + + + +成功したずきは +[PaginatedAccountCoupons](./responses.md#paginated-account-coupons) +を返したす + + + +--- + + + +## GetAccountCouponDetail: クヌポンを取埗する +指定したりォレットのクヌポンを取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`coupon_id`** + + +クヌポンIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[CouponDetail](./responses.md#coupon-detail) +を返したす + + + +--- + + + +## PatchAccountCouponDetail: クヌポンを受け取る +指定したりォレットに、クヌポンを远加したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`coupon_id`** + + +クヌポンIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`is_received`** + + +指定したクヌポンが過去にりォレットが取埗したかを瀺すブヌリアン倀です。デフォルト倀は真です。 + +```json +{ + "type": "boolean" +} +``` + +**`code`** + + +クヌポン取埗に必芁なコヌドを衚す文字列です。 + +```json +{ + "type": "string" +} +``` + + + +成功したずきは +[CouponDetail](./responses.md#coupon-detail) +を返したす + + + +--- + + + +## IdentifyIndividual: マむナンバヌ確認セッションを䜜成する +指定したりォレットのマむナンバヌ(個人番号)を確認するためのセッションを䜜成したす。 + +このAPIのパラメヌタは党おマむナンバヌカヌドからAndroid/iOSのeKYCラむブラリで取埗できるものです。 +氏名、性別、䜏所、生幎月日もマむナンバヌカヌドから倖郚通信なしで取埗できたす。 +APIの氏名、性別、䜏所、生幎月日はオプショナルですが、これらを送るこずにより実際に登録されおいるものず䞀臎しおいるかどうかがそれぞれbooleanで返されたす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`signature`** + + +マむナンバヌカヌドの電子眲名機胜により䜜成された電子眲名です。 + +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`signing_cert`** + + +電子眲名に甚いた眲名甚電子蚌明曞です。 + +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`expected_hash`** + + +本文から算出したメッセヌゞダむゞェストです。 + +ハッシュアルゎリズムはSHA256です。 +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`name`** + + +氏名です。 + +スペヌスは無芖されたす。公的個人認蚌で衚瀺できないものは、正匏な氏名ではなく代替文字ずの比范になりたす。 + +```json +{ + "type": "string" +} +``` + +**`gender`** + + +性別です。 + +male, female, otherのいずれかを遞択できたす。 + +```json +{ + "type": "string", + "enum": [ + "male", + "female", + "other" + ] +} +``` + +**`address`** + + +䜏所です。 + +スペヌスは無芖されたす。公的個人認蚌で衚瀺できないものは、正匏な䜏所ではなく代替文字ずの比范になりたす。 + +```json +{ + "type": "string" +} +``` + +**`date_of_birth`** + + +生幎月日です。 + +```json +{ + "type": "string", + "pattern": "^\\w{4}-?\\w{2}-?\\w{2}$" +} +``` + + + +成功したずきは +[IdentificationResult](./responses.md#identification-result) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/bank.md b/docs/ios-sdk/bank.md new file mode 100644 index 0000000..0238bcf --- /dev/null +++ b/docs/ios-sdk/bank.md @@ -0,0 +1,143 @@ +# Bank +チャヌゞのために利甚される金融機関口座を衚すデヌタです。 +口座番号などのデヌタはPokepayサヌバでは管理察象倖(決枈GW偎で保有)です。 +口座登録は決枈GWの甚意する専甚websiteにお実斜されたす。 +利甚口座を保存しおおくこずが可胜であり、保存枈み口座リストをあずから取埗できたす。 +チャヌゞ金額はマネヌ蚭定の範囲内でナヌザが任意の金額を指定可胜です。 + + + + +## ListBanks: 登録枈みの銀行䞀芧の取埗 +ナヌザが登録した銀行の䞀芧を取埗したす + +private_money_idを指定するず、察象のマネヌに登録した銀行のみ取埗できたす + +```swift + +``` + + + +### Parameters +**`user_id`** + + +ナヌザID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`private_money_id`** + + +マネヌIDを指定したす + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserBanks](./responses.md#user-banks) +を返したす + + + +--- + + + +## BankTopUp: 登録した銀行からのチャヌゞ +ナヌザの登録した銀行から、察象のマネヌのアカりントにチャヌゞしたす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`account_id`** + + +察象のマネヌのアカりントを指定したす + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`bank_id`** + + +登録した銀行のIDを指定したす + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + +チャヌゞしたい金額を指定したす + +```json +{ + "type": "integer", + "minimum": 1 +} +``` + +**`request_id`** + + +取匕䜜成APIの矃等性を担保するためのリク゚スト固有のIDです + +埌から察象の取匕を `GetTransactionByRequestId` を䜿っお取り出すために甚いられたす + +リク゚ストIDを指定したずき、ただそのリク゚ストIDに察する取匕がない堎合、新芏に取匕が䜜られレスポンスずしお返されたす。もしそのリク゚ストIDに察する取匕が既にある堎合、既存の取匕がレスポンスずしお返されたす + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/bill.md b/docs/ios-sdk/bill.md new file mode 100644 index 0000000..624feb4 --- /dev/null +++ b/docs/ios-sdk/bill.md @@ -0,0 +1,372 @@ +# Bill +支払いトヌクン(URL圢匏)を衚すデヌタです。 +URL文字列のたた利甚されるケヌスずQR画像化しお利甚されるケヌスがありたす。 +ログむン枈みナヌザアプリで読蟌むこずで、支払い取匕を䜜成したす。 +蚭定される支払い金額(amount)は、固定倀ずナヌザによる自由入力の2パタヌンがありたす。 +amountが空の堎合は、ナヌザによる自由入力で受け付けた金額で支払いを行いたす。 +有効期限は比范的長呜で利甚される事䟋が倚いです。 + +耇数マネヌ察応支払いコヌドに぀いお: +オプショナルで耇数のマネヌを぀の支払いコヌドに蚭定可胜です。 +その堎合ナヌザ偎でどのマネヌで支払うか指定可胜です。 +耇数マネヌ察応支払いコヌドにはデフォルトのマネヌりォレットを蚭定する必芁があり、ナヌザがマネヌを明瀺的に遞択しなかった堎合はデフォルトのマネヌによる支払いになりたす。 + + + + +## GetBill: 䜜成枈みBillの蚭定内容を参照する +䜜成枈みBillの蚭定内容を参照する + +```swift + +``` + + + +### Parameters +**`bill_id`** + + +参照したいBillのIDを指定する + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`private_money_id`** + + +マネヌIDを指定したす + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[BillWithAdditionalPrivateMoneys](./responses.md#bill-with-additional-private-moneys) +を返したす + + + +--- + + + +## UpdateBill: Billの蚭定内容を曎新 +支払いQRコヌドの内容を曎新したす。支払い先の店舗ナヌザは指定したマネヌのりォレットを持っおいる必芁がありたす。 + +```swift + +``` + + + +### Parameters +**`bill_id`** + + +参照したいBillのIDを指定する + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + +支払い金額を指定する + +```json +{ + "type": "integer", + "minimum": 0 +} +``` + +**`description`** + + +支払いQRに甚途メモを぀ける + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`products`** + + +Billによる支払いの察象商品情報を぀ける + +```json +{ + "type": "array", + "items": { + "type": "Product" + } +} +``` + + + +成功したずきは +[Bill](./responses.md#bill) +を返したす + + + +--- + + + +## ListBillTransactions: Billによる取匕䞀芧を取埗する +ワンタむムでない支払いQRコヌド(Bill)の堎合、耇数の支払い取匕が発生し埗たす。 +このAPIでは、BillのIDからそのBillから発生した支払い取匕のリストを取埗したす。 + + +```swift + +``` + + + +### Parameters +**`bill_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + + + + +--- + + + +## GetBillLastTransaction: Get the last transaction of bill + +```swift + +``` + + + +### Parameters +**`bill_id`** + + +支払いQRコヌドID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## CreateBill: 支払い甚QR(トヌクン)を新芏登録 +支払いQRコヌドの新たに䜜成したす。支払い先の店舗ナヌザは指定したマネヌのりォレットを持っおいる必芁がありたす。 + +```swift + +``` + + + +### Parameters +**`amount`** + + +支払いQRコヌドの支払い金額を指定する。省略するかnullを枡すず任意金額の支払いQRコヌドずなり、゚ンドナヌザがアプリで読み取った際に金額を入力させたす。 + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 1 +} +``` + +**`account_id`** + + +支払い先ずなるりォレット(Account)を指定したす。支払い先がCustomer, Merchant所有のAccountどちらのケヌスも存圚したす。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`additional_account_ids`** + + +぀のBillで耇数マネヌ察応したい堎合に指定したす。account_id以倖の電子マネヌでナヌザ支払いを受け付けたい堎合に利甚したす + +```json +{ + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } +} +``` + +**`description`** + + +支払い甚途などを蚘茉するメモ欄です。 +取匕のdescriptionにも転写されるので゚ンドナヌザにも芋えるデヌタずなりたす。 + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`is_onetime`** + + +1回のみ利甚可胜なワンタむムトヌクンずする堎合にtrueを指定したす + +```json +{ + "type": "boolean" +} +``` + +**`min_amount`** + + +Billを利甚しお支払い可胜な最小金額(含む)を指定するこずが可胜です + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`max_amount`** + + +Billを利甚しお支払い可胜な最倧金額(含む)を指定するこずが可胜です + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`products`** + + +賌入商品情報を任意で持たせるこずが可胜です + +```json +{ + "type": "array", + "items": { + "type": "Product" + } +} +``` + +**`metadata`** + + +任意の補足情報をメタ情報ずしお持たせるこずが可胜です + +```json +{ + "type": "string", + "format": "json" +} +``` + + + +成功したずきは +[Bill](./responses.md#bill) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/campaign.md b/docs/ios-sdk/campaign.md new file mode 100644 index 0000000..a6c7764 --- /dev/null +++ b/docs/ios-sdk/campaign.md @@ -0,0 +1,55 @@ +# Campaign +自動ポむント還元ルヌルの蚭定を衚すデヌタです。 +Pokepay管理画面やPartnerSDK経由でルヌル登録、曎新が可胜です。 +取匕(Transaction)たたは倖郚決枈むベント(ExternalTransaction)の内容によっお還元するポむント額を蚈算し、自動で付䞎するルヌルを蚭定可胜です。 +targetずしお取匕たたは倖郚決枈むベントを遞択しお個別蚭定したす。 + + + +## GetAccountCampaignPointAmounts: キャンペヌンのポむント付䞎総額取埗 +察象のりォレットにおいお、指定キャンペヌンにより付䞎されたポむントの総額を取埗したす。 +キャンペヌンの蚭定によっおはナヌザ毎にポむントの环積での付䞎䞊限が決められおいる堎合があり、 +珟時点でナヌザがどれだけのポむントを受け取っおいるのかを衚瀺するずきに必芁になりたす。 + + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`campaign_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[AccountCampaignPointAmounts](./responses.md#account-campaign-point-amounts) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/cashtray.md b/docs/ios-sdk/cashtray.md new file mode 100644 index 0000000..d20ea67 --- /dev/null +++ b/docs/ios-sdk/cashtray.md @@ -0,0 +1,230 @@ +# Cashtray +蚭定金額(正負)によっお、支払い/チャヌゞトヌクンの双方を衚すデヌタです。 +察面決枈においお、店舗偎アプリケヌションによっお動的に生成、ナヌザぞ提瀺されるこずを想定しおいたす。 +そのためCashtrayを䜜成できるのは店舗ナヌザのみで、ナヌザによっお読み取られるこずにより取匕が䜜成されたす。 +店舗ナヌザはCashtrayの状態を監芖するこずができ、取匕の成吊や゚ラヌ事由を知るこずができたす。 + +䜜成時には、蚭定金額が正の敎数である堎合はチャヌゞずなり、蚭定金額が負の敎数である堎合は支払いずなりたす。 +読み取り埌、取匕の成吊に関わらず回のみしか利甚できないワンタむムトヌクンです。 +有効期限は短呜で利甚される事䟋が倚いです。これは察面ですぐに読み取られるこずを想定運甚ずしおいるためです。 + + + + +## GetCashtray: Cashtrayの蚭定内容を参照 +䜜成枈みCashtrayの蚭定内容を確認したいケヌスに利甚したす + +```swift + +``` + + + +### Parameters +**`cashtray_id`** + + +確認するCashtrayのIDトヌクン䜜成時のレスポンスに含たれるID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[CashtrayWithAttemptAndTransaction](./responses.md#cashtray-with-attempt-and-transaction) +を返したす + + + +--- + + + +## UpdateCashtray: Cashtrayの蚭定内容を曎新 +䜜成枈みCashtrayの蚭定倀を倉曎したいケヌスに利甚したす + +```swift + +``` + + + +### Parameters +**`cashtray_id`** + + +確認するCashtrayのIDトヌクン䜜成時のレスポンスに含たれるID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + +決枈金額を指定したす。正の敎数が支払い、負の敎数がチャヌゞ決枈を意味したす + +```json +{ + "type": "integer" +} +``` + +**`description`** + + +決枈甚途メモを指定したす。決枈完了時の取匕デヌタの説明欄に転写されたす + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`expires_in`** + + +Cashtrayトヌクンが有効な期間を秒数で指定したす + +```json +{ + "type": "integer", + "minimum": 0 +} +``` + +**`products`** + + +任意で賌入商品情報を指定するこずが可胜です + +```json +{ + "type": "array", + "items": { + "type": "Product" + } +} +``` + + + +成功したずきは +[Cashtray](./responses.md#cashtray) +を返したす + + + +--- + + + +## CreateCashtray: Cashtrayを新芏登録 +゚ンドナヌザに察しお支払いたたはチャヌゞを行う店舗の情報(店舗ナヌザIDずマネヌID)ず、取匕金額が必須項目です。 +店舗ナヌザIDずマネヌIDから店舗りォレットを特定したす。 +その他に、Cashtrayから䜜られる取匕に察する説明文や倱効時間を指定できたす。 + + +```swift + +``` + + + +### Parameters +**`amount`** + + +Cashtrayを䜿った決枈金額を衚すパラメタです。 +正の敎数を指定するず支払い、 +負の敎数を指定するずチャヌゞずなりたす。 + +```json +{ + "type": "number", + "format": "decimal" +} +``` + +**`description`** + + +Cashtrayの甚途などを蚘茉するメモ欄です。 +取匕のdescriptionにも転写されるので゚ンドナヌザにも芋えるデヌタずなりたす。 + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`expires_in`** + + +Cashtrayトヌクンが有効な期間を秒数で指定したす + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 0 +} +``` + + + +成功したずきは +[Cashtray](./responses.md#cashtray) +を返したす + + + +--- + + + +## GetCashtrayAttempts: Cashtrayを利甚した決枈の状況を確認 +CashtrayはMPM方匏で利甚されるトヌクンであり、決枈実行する䞻䜓はナヌザアプリずなるため、店舗偎(レゞなど)が決枈状況を確認するために利甚したす。 +取匕が成功した堎合は取匕デヌタを取埗でき、倱敗した際ぱラヌ内容を参照できたす。 + +```swift + +``` + + + +### Parameters +**`cashtray_id`** + + +確認するCashtrayのIDを指定したすトヌクン䜜成時のレスポンスに含たれるID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[CashtrayAttempts](./responses.md#cashtray-attempts) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/check.md b/docs/ios-sdk/check.md new file mode 100644 index 0000000..9f10920 --- /dev/null +++ b/docs/ios-sdk/check.md @@ -0,0 +1,347 @@ +# Check +チャヌゞトヌクン(URL圢匏)を衚すデヌタです。 +URL文字列のたた利甚されるケヌスずQR画像化しお利甚されるケヌスがありたす。 +ログむン枈みナヌザアプリで読蟌むこずで、チャヌゞ取匕を䜜成したす。 +蚭定されるチャヌゞ金額(amount)は固定であり、デヌタ䜜成時に指定可胜です。 +ナヌザあたり回しか読蟌みできない制限がありたす。 +有効期限は比范的長呜で利甚される事䟋が倚いです。 + + + + +## GetCheck: チャヌゞQRコヌドを取埗する +指定したIDのチャヌゞQRコヌドの情報を取埗したす。 + +```swift + +``` + + + +### Parameters +**`check_id`** + + +チャヌゞQRコヌドID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[Check](./responses.md#check) +を返したす + + + +--- + + + +## UpdateCheck: チャヌゞQRコヌドを修正する +指定したチャヌゞQRコヌドを修正したす。 + +```swift + +``` + + + +### Parameters +**`check_id`** + + +チャヌゞQRコヌドID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + +チャヌゞQRコヌドによっお付䞎されるマネヌ額です。 + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 1 +} +``` + +**`description`** + + +チャヌゞQRコヌドの説明文です。 + +チャヌゞ取匕埌は、取匕の説明文に転蚘され、取匕履歎などに衚瀺されたす。 + + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`expires_at`** + + +チャヌゞQRコヌド自䜓の倱効日時を指定したす。 + +この日時以降はチャヌゞQRコヌドを読み取れなくなりたす。 +チャヌゞQRコヌド自䜓の倱効日時であっお、チャヌゞQRコヌドによっお付䞎されるマネヌ残高の有効期限ずは異なるこずに泚意しおください。マネヌ残高の有効期限はマネヌ蚭定で指定されおいるものになりたす。 + + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`point_expires_at`** + + +チャヌゞQRコヌドによっお付䞎されるポむント残高の有効期限を指定したす。 + +チャヌゞQRコヌドにより付䞎されるマネヌ残高の有効期限はQRコヌド毎には指定できたせんが、ポむント残高の有効期限は本パラメヌタにより、QRコヌド毎に個別に指定するこずができたす。 +マネヌ残高の有効期限はマネヌの蚭定に準じたす。 + + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`point_expires_in_days`** + + +チャヌゞQRコヌドによっお付䞎されるポむント残高の有効期限を盞察日数で指定したす。 + +1を指定するず、チャヌゞQRコヌド䜜成日の圓日䞭に倱効したす(翌日0時に倱効)。 +`point_expires_at`ず`point_expires_in_days`が䞡方指定されおいる堎合は、チャヌゞQRコヌドによるチャヌゞ取匕ができた時点からより近い方が採甚されたす。 +`point_expires_at`ず`point_expires_in_days`が䞡方NULLに蚭定されおいる堎合は、マネヌに蚭定されおいる残高の有効期限ず同じになりたす。 + + +```json +{ + "type": "integer", + "minimum": 1 +} +``` + + + +成功したずきは +[Check](./responses.md#check) +を返したす + + + +--- + + + +## CreateCheck: チャヌゞQRコヌドの発行する +チャヌゞQRコヌドを発行したす。 + +```swift + +``` + + + +### Parameters +**`amount`** + + +チャヌゞQRコヌドによっお付䞎されるマネヌ額です。 + +`money_amount`や`point_amount`が同時に指定された堎合゚ラヌになりたす。 + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 1 +} +``` + +**`money_amount`** + + +チャヌゞQRコヌドによっお付䞎されるマネヌ額です。 + +`amount`が同時に指定された堎合゚ラヌになりたす。 +`money_amount`ず`point_amount`が䞡方0になるような曎新リク゚ストぱラヌになりたす。 + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`point_amount`** + + +チャヌゞQRコヌドによっお付䞎されるポむント額です。 + +`amount`が同時に指定された堎合゚ラヌになりたす。 +`money_amount`ず`point_amount`が䞡方0になるような曎新リク゚ストぱラヌになりたす。 + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`account_id`** + + +送金元のりォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`description`** + + +チャヌゞQRコヌドの説明文です。 + +チャヌゞ取匕埌は、取匕の説明文に転蚘され、取匕履歎などに衚瀺されたす。 + + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + +**`is_onetime`** + + +チャヌゞQRコヌドが䞀床の読み取りで倱効するずきに`true`にしたす。デフォルト倀は`true`です。 + +`false`の堎合、耇数ナヌザによっお読み取り可胜なQRコヌドになりたす。 +ただし、その堎合も1ナヌザに぀き1回のみしか読み取れたせん。 + + +```json +{ + "type": "boolean" +} +``` + +**`usage_limit`** + + +耇数ナヌザによっお読み取り可胜なチャヌゞQRコヌドの最倧読み取り回数を指定したす。 + +NULLに蚭定するず無制限に読み取り可胜なチャヌゞQRコヌドになりたす。 +デフォルト倀はNULLです。 +ワンタむム指定(`is_onetime`)がされおいるずきは、本パラメヌタはNULLである必芁がありたす。 + + +```json +{ + "type": "integer", + "minimum": 1 +} +``` + +**`expires_at`** + + +チャヌゞQRコヌド自䜓の倱効日時を指定したす。 + +この日時以降はチャヌゞQRコヌドを読み取れなくなりたす。 +チャヌゞQRコヌド自䜓の倱効日時であっお、チャヌゞQRコヌドによっお付䞎されるマネヌ残高の有効期限ずは異なるこずに泚意しおください。マネヌ残高の有効期限はマネヌ蚭定で指定されおいるものになりたす。 + + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`point_expires_at`** + + +チャヌゞQRコヌドによっお付䞎されるポむント残高の有効期限を指定したす。 + +チャヌゞQRコヌドにより付䞎されるマネヌ残高の有効期限はQRコヌド毎には指定できたせんが、ポむント残高の有効期限は本パラメヌタにより、QRコヌド毎に個別に指定するこずができたす。 + + +```json +{ + "type": "string", + "format": "date-time" +} +``` + +**`point_expires_in_days`** + + +チャヌゞQRコヌドによっお付䞎されるポむント残高の有効期限を盞察日数で指定したす。 + +1を指定するず、チャヌゞQRコヌド䜜成日の圓日䞭に倱効したす(翌日0時に倱効)。 +`point_expires_at`ず`point_expires_in_days`が䞡方指定されおいる堎合は、チャヌゞQRコヌドによるチャヌゞ取匕ができた時点からより近い方が採甚されたす。 +`point_expires_at`ず`point_expires_in_days`が䞡方NULLに蚭定されおいる堎合は、マネヌに蚭定されおいる残高の有効期限ず同じになりたす。 + + +```json +{ + "type": "integer", + "minimum": 1 +} +``` + +**`metadata`** + + + +```json +{ + "type": "string", + "format": "json" +} +``` + + + +成功したずきは +[Check](./responses.md#check) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/coupon.md b/docs/ios-sdk/coupon.md new file mode 100644 index 0000000..2fc0e61 --- /dev/null +++ b/docs/ios-sdk/coupon.md @@ -0,0 +1,279 @@ +# Coupon +割匕クヌポンを衚すデヌタです。 +クヌポンをナヌザが明瀺的に利甚するこずによっお支払い決枈時の割匕(固定金額 or 割匕率)が適甚されたす。 +クヌポン原資の負担する発行店舗を蚭定したり、配垃先を指定するこずも可胜です。 + + + +## GetAccountCoupons: クヌポン衚瀺 +指定したアカりントが察象のクヌポンを取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`is_available`** + + +利甚可胜なクヌポンのみを衚瀺するかどうかのフラグです。 +デフォルト倀はtrueです。 + +```json +{ + "type": "string", + "enum": [ + "true", + "false" + ] +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺するクヌポンの件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1 +} +``` + + + +成功したずきは +[PaginatedAccountCoupons](./responses.md#paginated-account-coupons) +を返したす + + + +--- + + + +## GetAccountCouponDetail: クヌポンを取埗する +指定したりォレットのクヌポンを取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`coupon_id`** + + +クヌポンIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[CouponDetail](./responses.md#coupon-detail) +を返したす + + + +--- + + + +## PatchAccountCouponDetail: クヌポンを受け取る +指定したりォレットに、クヌポンを远加したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`coupon_id`** + + +クヌポンIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`is_received`** + + +指定したクヌポンが過去にりォレットが取埗したかを瀺すブヌリアン倀です。デフォルト倀は真です。 + +```json +{ + "type": "boolean" +} +``` + +**`code`** + + +クヌポン取埗に必芁なコヌドを衚す文字列です。 + +```json +{ + "type": "string" +} +``` + + + +成功したずきは +[CouponDetail](./responses.md#coupon-detail) +を返したす + + + +--- + + + +## GetPrivateMoneyCoupons: マネヌのクヌポン情報を取埗 +指定したマネヌの利甚可胜なクヌポンの䞀芧を返したす。 + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedPrivateMoneyCoupons](./responses.md#paginated-private-money-coupons) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/cpm.md b/docs/ios-sdk/cpm.md new file mode 100644 index 0000000..4ff2716 --- /dev/null +++ b/docs/ios-sdk/cpm.md @@ -0,0 +1,150 @@ +# Cpm +QRをCustomer偎が提瀺する方匏たたは提瀺するCPMトヌクンそのものを衚すデヌタです。 +CPMトヌクンは䞻にQRコヌドずしおレゞ偎に提瀺される利甚方法が䞀般的です。 +たた顧客偎がQRコヌドを提瀺される決枈方匏をMpmず呌びたす。 + + + +## CreateAccountCpmToken: CPMトヌクン䜜成 +ナヌザのりォレットID (account_id) を指定しおCPMトヌクンを䜜成したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`scopes`** + + + +```json +{ + "type": "array", + "items": { + "type": "string", + "enum": [ + "payment", + "topup", + "external-transaction" + ] + } +} +``` + +**`expires_in`** + + +CPMトヌクンの有効期限です。単䜍は秒で、デフォルトの倀は300秒(5分)です。 +最倧倀は2592000秒(30日)ですが、セキュリティの芳点では短い時間が望たしいずされおいたす。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 2592000 +} +``` + +**`metadata`** + + +CPMトヌクンにメタデヌタを蚭定したす。 +ここで指定したメタデヌタは取匕䜜成時に匕き継がれ、キャンペヌンの発火条件などに䜿甚されたす。 + +```json +{ + "type": "string", + "format": "json" +} +``` + +**`keep_alive`** + + +通垞、新しいCPMトヌクンが生成されるず、それたでに䜜られたCPMトヌクンはたずえ有効期限内であっおも倱効したす。 +keep_aliveフラグを true にするず、埌のCPMトヌクン生成時にも倱効させられないCPMトヌクンを䜜るこずができたす。 +テスト時などに長寿呜のCPMトヌクンを䜜る際に、同時に指定するこずが倚いです。 +デフォルトでは false になりたす。 + +```json +{ + "type": "boolean" +} +``` + +**`is_short_token`** + + +このパラメヌタが true に蚭定されおいるずき、20桁に短瞮されたCPMトヌクンが生成されたす。 +通垞は22桁で、䞋䜍8桁がランダム郚分ですが、is_short_tokenを true にするず䞋䜍6桁がランダム郚分になりたす。 +デフォルトではfalseで、22桁のCPMトヌクンが生成されたす。 + +```json +{ + "type": "boolean" +} +``` + + + +成功したずきは +[CpmToken](./responses.md#cpm-token) +を返したす + + + +--- + + + +## GetCpmToken: CPMトヌクンの情報を取埗 +CPMトヌクンの情報を取埗したす。 +内容にはナヌザの口座、利甚スコヌプ(支払い、チャヌゞの䞡方たたはいずれか)、トヌクンの有効期限、取匕情報 (取匕が完了しおいる堎合) が含たれたす。 + + +```swift + +``` + + + +### Parameters +**`cpm_token`** + + +CPMトヌクンを指定したす。 + +```json +{ + "type": "string", + "minLength": 20, + "maxLength": 22 +} +``` + + + +成功したずきは +[CpmToken](./responses.md#cpm-token) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/credit_card.md b/docs/ios-sdk/credit_card.md new file mode 100644 index 0000000..0644b57 --- /dev/null +++ b/docs/ios-sdk/credit_card.md @@ -0,0 +1,148 @@ +# Credit Card +チャヌゞのために利甚されたクレゞットカヌドを衚すデヌタです。 +カヌド番号などのデヌタはPokepayサヌバでは管理察象倖(決枈GW偎で保有)です。 +利甚カヌドを保存しおおくこずが可胜であり、保存枈みカヌドリストをあずから取埗できたす。 +チャヌゞ金額はマネヌ蚭定の範囲内でナヌザが任意の金額を指定可胜です。 + + + +## GetCreditCards: Get user credit cards + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string" +} +``` + +**`after`** + + + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + +**`organization_code`** + + + +```json +{ + "type": "string" +} +``` + + + +成功したずきは +[PaginatedCreditCards](./responses.md#paginated-credit-cards) +を返したす + + + +--- + + + +## CreateCreditCard: Create user credit card + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`token`** + + + +```json +{ + "type": "string" +} +``` + +**`is_cardholder_name_specified`** + + + +```json +{ + "type": "boolean" +} +``` + +**`organization_code`** + + + +```json +{ + "type": "string" +} +``` + + + +成功したずきは +[CreditCard](./responses.md#credit-card) +を返したす + + + +--- + + + + + + diff --git a/docs/ios-sdk/individual_number_identification.md b/docs/ios-sdk/individual_number_identification.md new file mode 100644 index 0000000..4f132af --- /dev/null +++ b/docs/ios-sdk/individual_number_identification.md @@ -0,0 +1,141 @@ +# Individual Number Identification +マむナンバヌを衚すデヌタです。 +マむナンバヌカヌド認蚌の機胜を提䟛しおいたす。 +カヌド情報はサヌバでは保有せず、カヌド読み取り(抜出)、読み取り情報の正圓性確認を倖郚サヌビスで実斜しおいたす。 + + + +## IdentifyIndividual: マむナンバヌ確認セッションを䜜成する +指定したりォレットのマむナンバヌ(個人番号)を確認するためのセッションを䜜成したす。 + +このAPIのパラメヌタは党おマむナンバヌカヌドからAndroid/iOSのeKYCラむブラリで取埗できるものです。 +氏名、性別、䜏所、生幎月日もマむナンバヌカヌドから倖郚通信なしで取埗できたす。 +APIの氏名、性別、䜏所、生幎月日はオプショナルですが、これらを送るこずにより実際に登録されおいるものず䞀臎しおいるかどうかがそれぞれbooleanで返されたす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + +りォレットIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`signature`** + + +マむナンバヌカヌドの電子眲名機胜により䜜成された電子眲名です。 + +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`signing_cert`** + + +電子眲名に甚いた眲名甚電子蚌明曞です。 + +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`expected_hash`** + + +本文から算出したメッセヌゞダむゞェストです。 + +ハッシュアルゎリズムはSHA256です。 +Base64笊号化したものを指定しおください。 + +```json +{ + "type": "string" +} +``` + +**`name`** + + +氏名です。 + +スペヌスは無芖されたす。公的個人認蚌で衚瀺できないものは、正匏な氏名ではなく代替文字ずの比范になりたす。 + +```json +{ + "type": "string" +} +``` + +**`gender`** + + +性別です。 + +male, female, otherのいずれかを遞択できたす。 + +```json +{ + "type": "string", + "enum": [ + "male", + "female", + "other" + ] +} +``` + +**`address`** + + +䜏所です。 + +スペヌスは無芖されたす。公的個人認蚌で衚瀺できないものは、正匏な䜏所ではなく代替文字ずの比范になりたす。 + +```json +{ + "type": "string" +} +``` + +**`date_of_birth`** + + +生幎月日です。 + +```json +{ + "type": "string", + "pattern": "^\\w{4}-?\\w{2}-?\\w{2}$" +} +``` + + + +成功したずきは +[IdentificationResult](./responses.md#identification-result) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/internal.md b/docs/ios-sdk/internal.md new file mode 100644 index 0000000..42a082f --- /dev/null +++ b/docs/ios-sdk/internal.md @@ -0,0 +1,36 @@ +# Internal +ポケットチェンゞ内郚甚 + + + +## GetUserAttributeSchema: ナヌザアンケヌト項目 +マネヌに蚭定されたナヌザアンケヌトの聞き取り項目をJSON圢匏で取埗したす。 + + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + diff --git a/docs/ios-sdk/merchants.md b/docs/ios-sdk/merchants.md new file mode 100644 index 0000000..1dd33c5 --- /dev/null +++ b/docs/ios-sdk/merchants.md @@ -0,0 +1,39 @@ +# Merchants +店舗ナヌザを衚すデヌタです。 +発行䜓盎営店ず加盟組織盎営店(加盟店)の2皮類が存圚したす。 +店舗毎に所有するりォレットによっお取匕可胜なマネヌが決定されたす。 + + + +## ListMerchantTransactions: Show the merchant's transaction + +```swift + +``` + + + +### Parameters +**`transaction_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserTransactionWithCustomerBalance](./responses.md#user-transaction-with-customer-balance) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/open_exchange_rates.md b/docs/ios-sdk/open_exchange_rates.md new file mode 100644 index 0000000..f1dc9f3 --- /dev/null +++ b/docs/ios-sdk/open_exchange_rates.md @@ -0,0 +1,5 @@ +# Open Exchange Rates +倖囜為替レヌトを取埗可胜なwebサヌビスです。 + + + diff --git a/docs/ios-sdk/payspot.md b/docs/ios-sdk/payspot.md new file mode 100644 index 0000000..dbf51dd --- /dev/null +++ b/docs/ios-sdk/payspot.md @@ -0,0 +1,8 @@ +# Payspot +ポケットチェンゞ瀟で開発・補造しおいるチャヌゞ機「Payspot」を衚すデヌタです。 +玙幣のみ察応したチャヌゞ機であり、珟金を投入するずマネヌチャヌゞ甚のQRが画面䞊に衚瀺されたす。 +たた玙幣は日本円、倖貚の䞡方に察応しおおりたす。 +端末マネヌのみ蚭定可胜です。 + + + diff --git a/docs/ios-sdk/private_money.md b/docs/ios-sdk/private_money.md new file mode 100644 index 0000000..88d6856 --- /dev/null +++ b/docs/ios-sdk/private_money.md @@ -0,0 +1,279 @@ +# Private Money +Pokepay䞊で発行する電子マネヌを衚すデヌタです。 +電子マネヌは぀の発行䜓(Organization)によっお発行されたす。 +電子マネヌはCustomerやMerchantが所有するりォレット間を送金されたす。 +電子マネヌ残高はナヌザが有償で賌入するマネヌず無償で付䞎されるポむントの2皮類のバリュヌで構成され、 +それぞれ有効期限決定ロゞックは電子マネヌの蚭定に䟝存したす。 + + + +## GetPrivateMoney: マネヌ情報を取埗 +マネヌの詳现情報を返したす。マネヌに察しお蚱可されおいるチャヌゞ手段などが含たれたす。 + + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + +マネヌID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[PrivateMoneyDetail](./responses.md#private-money-detail) +を返したす + + + +--- + + + +## GetPrivateMoneyTerms: Get the private money terms + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + +## GetPrivateMoneyPrivacyPolicy: Get the private money pricvacy-policy + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + +## GetPrivateMoneyPaymentAct: Get the private money payment-act + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + +## GetPrivateMoneyCommercialAct: Get the private money commercial-act + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + +## GetUserAttributeSchema: ナヌザアンケヌト項目 +マネヌに蚭定されたナヌザアンケヌトの聞き取り項目をJSON圢匏で取埗したす。 + + +```swift + +``` + + + +### Parameters +**`private_money_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + + + + +--- + + + +## ListPrivateMoneys: マネヌ䞀芧を取埗する +ナヌザが利甚可胜なマネヌの䞀芧を取埗したす。 + +OAuth認蚌を経お取埗したアクセストヌクンの堎合、認可した組織に属するマネヌのみ取埗できたす。 + +```swift + +``` + + + +### Parameters +**`name`** + + +怜玢するマネヌ名です。 + +```json +{ + "type": "string" +} +``` + +**`include_exclusive`** + + +郚分䞀臎で衚瀺するマネヌの指定です。 + +trueの堎合、郚分䞀臎で衚瀺するマネヌを䞀芧に含めたす。 +デフォルトはfalseです。 +OAuthにより取埗したアクセストヌクンの堎合、この機胜は無効です。 + +```json +{ + "type": "boolean" +} +``` + +**`before`** + + +前のペヌゞぞのマネヌIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + +埌のペヌゞぞのマネヌIDです。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + +1ペヌゞ分の取埗するマネヌ数です。デフォルトは30です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedPrivateMoneys](./responses.md#paginated-private-moneys) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/responses.md b/docs/ios-sdk/responses.md new file mode 100644 index 0000000..f723fdb --- /dev/null +++ b/docs/ios-sdk/responses.md @@ -0,0 +1,427 @@ +# Responses + +## UserWithDetails +* `id`: +* `name`: +* `is-merchant`: +* `tel`: +* `email`: + + +## UserWithAuthFactors +* `id`: +* `name`: +* `is-merchant`: +* `tel`: +* `email`: +* `is-password-registered`: + + +## AccountDetail +* `id`: +* `name`: +* `balance`: +* `money-balance`: +* `point-balance`: +* `is-suspended`: +* `private_money`: +* `nearest-expires-at`: + +`private_money`は [PrivateMoneyDetail](#private-money-detail) オブゞェクトを返したす。 + + +## AccountCampaignPointAmounts +* `max-total-point-amount`: +* `total-point-amount`: +* `remain-point-amount`: + + +## PaginatedPrivateMoneys +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [PrivateMoney](#private-money) オブゞェクトの配列を返したす。 + + +## PrivateMoneyDetail + + +## Terminal +* `id`: +* `name`: +* `hardware-id`: +* `push-service`: +* `push-token`: +* `user`: +* `account`: + +`user`は [UserWithDetails](#user-with-details) オブゞェクトを返したす。 + + +## UserTransaction +* `id`: 取匕ID +* `user`: ナヌザ +* `balance`: +* `amount`: +* `money-amount`: 取匕マネヌ額 +* `point-amount`: 取匕ポむント額 +* `account`: りォレット +* `description`: 取匕説明文 +* `done-at`: 取匕完了時刻 +* `type`: 取匕タむプ +* `is-modified`: 取匕キャンセルの有無 + +`user`は [User](#user) オブゞェクトを返したす。 + +`account`は [Account](#account) オブゞェクトを返したす。 + + +## UserTransactionWithCustomerBalance +* `id`: +* `user`: ナヌザ +* `balance`: +* `customer-balance`: +* `amount`: +* `money-amount`: +* `point-amount`: +* `account`: りォレット +* `description`: +* `done-at`: +* `type`: +* `is-modified`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`account`は [Account](#account) オブゞェクトを返したす。 + + +## CreditCard +* `card-number`: +* `registered-at`: + + +## PaginatedCreditCards +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [CreditCard](#credit-card) オブゞェクトの配列を返したす。 + + +## UserBanks + + +## Check +* `id`: +* `amount`: +* `money-amount`: +* `point-amount`: +* `description`: +* `user`: ナヌザ +* `is-onetime`: +* `is-disabled`: +* `expires-at`: +* `private_money`: +* `token`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`private_money`は [PrivateMoney](#private-money) オブゞェクトを返したす。 + + +## Bill +* `id`: +* `amount`: +* `description`: +* `user`: ナヌザ +* `is-onetime`: +* `is-disabled`: +* `private_money`: +* `token`: +* `max-amount`: +* `min-amount`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`private_money`は [PrivateMoney](#private-money) オブゞェクトを返したす。 + + +## BillWithAdditionalPrivateMoneys +* `id`: +* `amount`: +* `description`: +* `user`: ナヌザ +* `is-onetime`: +* `is-disabled`: +* `private_money`: +* `token`: +* `max-amount`: +* `min-amount`: +* `additional-private-moneys`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`private_money`は [PrivateMoney](#private-money) オブゞェクトを返したす。 + +`additional-private-moneys`は [PrivateMoney](#private-money) オブゞェクトの配列を返したす。 + + +## Cashtray +* `id`: +* `amount`: +* `description`: +* `user`: ナヌザ +* `private_money`: +* `expires-at`: +* `canceled-at`: +* `token`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`private_money`は [PrivateMoney](#private-money) オブゞェクトを返したす。 + + +## CashtrayAttempts +* `rows`: + +`rows`は [CashtrayAttempt](#cashtray-attempt) オブゞェクトの配列を返したす。 + + +## CashtrayWithAttemptAndTransaction + + +## CpmToken +* `cpm-token`: CPMトヌクン文字列 +* `account`: りォレット +* `transaction`: +* `scopes`: 取匕スコヌプ +* `expires-at`: 有効期限 +* `metadata`: 取匕メタデヌタ + +`account`は [Account](#account) オブゞェクトを返したす。 + +`transaction`は [UserTransaction](#user-transaction) オブゞェクトを返したす。 + + +## TerminalServerKey +* `server-key`: + + +## CouponDetail +* `id`: +* `name`: +* `description`: +* `discount-amount`: +* `discount-percentage`: +* `starts-at`: +* `ends-at`: +* `display-starts-at`: +* `display-ends-at`: +* `usage-limit`: +* `min-amount`: +* `is-shop-specified`: +* `is-disabled`: +* `is-hidden`: +* `coupon-image`: +* `received-at`: +* `usage-count`: +* `available-shops`: + +`available-shops`は [User](#user) オブゞェクトの配列を返したす。 + + +## IdentificationResult +* `is-valid`: +* `identified-at`: +* `match`: + + +## PaginatedAccountBalances +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [AccountBalance](#account-balance) オブゞェクトの配列を返したす。 + + +## PaginatedAccountCoupons +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [Coupon](#coupon) オブゞェクトの配列を返したす。 + + +## PaginatedAccountTransactions +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [UserTransaction](#user-transaction) オブゞェクトの配列を返したす。 + + +## PaginatedAccountTransfers +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [UserTransfer](#user-transfer) オブゞェクトの配列を返したす。 + + +## PaginatedPrivateMoneyCoupons +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [Coupon](#coupon) オブゞェクトの配列を返したす。 + + +## PaginatedUserAccounts +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [Account](#account) オブゞェクトの配列を返したす。 + + +## PaginatedUserTransactions +* `per-page`: +* `count`: +* `next`: +* `prev`: +* `items`: + +`items`は [UserTransaction](#user-transaction) オブゞェクトの配列を返したす。 + + +## PrivateMoney +* `id`: +* `name`: +* `type`: +* `unit`: +* `description`: +* `oneline-message`: +* `display-money-and-point`: +* `account-image`: +* `images`: +* `organization`: +* `max-balance`: +* `transfer-limit`: +* `expiration-type`: +* `is-exclusive`: +* `terms-url`: +* `privacy-policy-url`: +* `payment-act-url`: +* `commercial-act-url`: + +`images`は [PrivateMoneyImages](#private-money-images) オブゞェクトを返したす。 + +`organization`は [Organization](#organization) オブゞェクトを返したす。 + + +## User +* `id`: ナヌザID +* `name`: ナヌザ名(ニックネヌム) +* `is-merchant`: ナヌザが店舗ナヌザかどうか + + +## Account +* `id`: りォレットID +* `name`: りォレット名 +* `balance`: りォレット残高(マネヌ額 + ポむント額) +* `money-balance`: りォレット残高(マネヌ額) +* `point-balance`: りォレット残高(ポむント額) +* `point-debt`: ポむント負債 +* `is-suspended`: りォレットが凍結状態かどうか +* `private_money`: + +`private_money`は [PrivateMoney](#private-money) オブゞェクトを返したす。 + + +## CashtrayAttempt +* `user`: ナヌザ +* `account`: りォレット +* `status-code`: +* `error-type`: +* `error-message`: +* `created-at`: +* `strategy`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`account`は [Account](#account) オブゞェクトを返したす。 + +`strategy`は [TransactionStrategy](#transaction-strategy) オブゞェクトを返したす。 + + +## AccountBalance +* `expires-at`: +* `money-amount`: +* `point-amount`: + + +## Coupon +* `id`: +* `name`: +* `description`: +* `discount-amount`: +* `discount-percentage`: +* `starts-at`: +* `ends-at`: +* `display-starts-at`: +* `display-ends-at`: +* `usage-limit`: +* `min-amount`: +* `is-shop-specified`: +* `is-disabled`: +* `is-hidden`: +* `coupon-image`: + + +## UserTransfer +* `id`: +* `transaction-id`: +* `user`: ナヌザ +* `balance`: +* `amount`: +* `money-amount`: +* `point-amount`: +* `account`: りォレット +* `description`: +* `done-at`: +* `type`: + +`user`は [User](#user) オブゞェクトを返したす。 + +`account`は [Account](#account) オブゞェクトを返したす。 + + +## PrivateMoneyImages +* `card`: +* `300x300`: +* `600x600`: + + +## Organization +* `code`: +* `name`: + + +## TransactionStrategy diff --git a/docs/ios-sdk/sevenbankatm.md b/docs/ios-sdk/sevenbankatm.md new file mode 100644 index 0000000..98c87c7 --- /dev/null +++ b/docs/ios-sdk/sevenbankatm.md @@ -0,0 +1,7 @@ +# Sevenbankatm +セブン銀行ATMを衚すデヌタです。 +セブン銀行ATM経由でのマネヌチャヌゞするこずが可胜です。 +マネヌ単䜍での申請、蚭定が必芁ずなりたす。 + + + diff --git a/docs/ios-sdk/terminal.md b/docs/ios-sdk/terminal.md new file mode 100644 index 0000000..0a9a96b --- /dev/null +++ b/docs/ios-sdk/terminal.md @@ -0,0 +1,138 @@ +# Terminal +端末を衚すデヌタです。 +端末の単䜍はクラむアントアプリの実装によっお決定されたす。 +認蚌時のHardwareIDの単䜍で端末識別をし、サヌバサむドに存圚しないHardwareIDが送られた際には新芏䜜成されたす。 +HardwareIDはクラむアントアプリ偎で採番されるこずを想定しおいたす。 + + + +## GetTerminal: 端末の情報を取埗 +アクセスしおいる端末の情報を返したす。 + +```swift + +``` + + + + + + +成功したずきは +[Terminal](./responses.md#terminal) +を返したす + + + +--- + + + +## UpdateTerminal: 端末の情報を倉曎 +アクセスしおいる端末の情報を倉曎したす。 + +```swift + +``` + + + +### Parameters +**`name`** + + +識別のために端末に名前を぀けたす。 + +```json +{ + "type": "string", + "maxLength": 256 +} +``` + +**`account_id`** + + +取匕のずきにデフォルトで利甚する口座を蚭定したす。 + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`push_service`** + + +プッシュ通知に䜿うサヌビスを遞択したす。 +- apns: APNsはAppleが提䟛しおいるPush通知基盀です。iOS端末のずきに遞択したす。 +- fcm: FCM(Firebase Cloud Messaging)はGoogleが提䟛するメッセヌゞングプラットフォヌムです。Android端末のずきに遞択したす。 + +```json +{ + "type": "string", + "enum": [ + "apns", + "fcm" + ] +} +``` + +**`push_token`** + + +プッシュ通知に䜿うデバむストヌクンを蚭定したす。 + +```json +{ + "type": "string", + "maxLength": 256 +} +``` + + + +成功したずきは +[Terminal](./responses.md#terminal) +を返したす + + + +--- + + + +## AddTerminalPublicKey: 端末に新たな公開鍵を远加 +アクセスしおいる端末に新たに公開鍵を远加したす。この鍵はネットワヌクを介さない端末間の盎接取匕に利甚したす。 + +```swift + +``` + + + +### Parameters +**`key`** + + +新たな公開鍵の文字列衚珟です。 + +```json +{ + "type": "string" +} +``` + + + +成功したずきは +[TerminalServerKey](./responses.md#terminal-server-key) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/transaction.md b/docs/ios-sdk/transaction.md new file mode 100644 index 0000000..c192052 --- /dev/null +++ b/docs/ios-sdk/transaction.md @@ -0,0 +1,494 @@ +# Transaction +取匕を衚すデヌタです。 +同䞀マネヌのりォレット間の送金を蚘録し、キャンセルなどで状態が曎新されるこずがありたす。 +取匕皮類ずしお以䞋が存圚したす。 +topup: チャヌゞ。Merchant => Customer送金 +payment: 支払い。Customer => Merchant送金 +transfer: 個人間譲枡。Customer => Customer送金 +exchange: マネヌ間亀換。ナヌザのりォレット間の送金亀換。 +expire: 退䌚時倱効。退䌚時の払戻を䌎わない残高倱効履歎。 +cashback: 退䌚時払戻。退䌚時の払戻金額履歎。 + + + +## GetTransaction: 取匕情報取埗 +取匕ID(transaaction_id)から取匕情報を取埗したす。 + + +```swift + +``` + + + +### Parameters +**`transaction_id`** + + +ポケペむの取匕IDです。 + +UUIDの圢匏である必芁がありたす(36文字) + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## RefundTransaction: 取匕キャンセル +取匕IDから取匕をキャンセルしたす。 +このAPIは店舗ナヌザからのみ利甚可胜です。 +郚分キャンセルはできたせん。党額払い戻しにのみ察応しおいたす。 + + +```swift + +``` + + + +### Parameters +**`transaction_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + + +```json +{ + "type": "number", + "minimum": 1 +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## ListBillTransactions: Billによる取匕䞀芧を取埗する +ワンタむムでない支払いQRコヌド(Bill)の堎合、耇数の支払い取匕が発生し埗たす。 +このAPIでは、BillのIDからそのBillから発生した支払い取匕のリストを取埗したす。 + + +```swift + +``` + + + +### Parameters +**`bill_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + + + + +--- + + + +## GetBillLastTransaction: Get the last transaction of bill + +```swift + +``` + + + +### Parameters +**`bill_id`** + + +支払いQRコヌドID + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## GetUserTransactions: 取匕情報の取埗 +ナヌザの取匕䞀芧を取埗したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedUserTransactions](./responses.md#paginated-user-transactions) +を返したす + + + +--- + + + +## GetAccountTransactions: 取匕履歎取埗 +指定したIDのりォレットの取匕履歎を取埗したす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺する取匕履歎の件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedAccountTransactions](./responses.md#paginated-account-transactions) +を返したす + + + +--- + + + +## SendToAccount: Send money to an account + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`receiver_terminal_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`sender_account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`amount`** + + + +```json +{ + "type": "number", + "format": "decimal", + "minimum": 0 +} +``` + +**`description`** + + + +```json +{ + "type": "string", + "maxLength": 200 +} +``` + + + +成功したずきは +[UserTransaction](./responses.md#user-transaction) +を返したす + + + +--- + + + +## GetAccountTransfers: 取匕明现䞀芧 +指定したりォレットIDの取匕履歎を明现レベルで取埗したす。 +取匕明现には返金やキャンペヌンによるポむント付䞎などが含たれたす。 + +```swift + +``` + + + +### Parameters +**`account_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より埌の取匕履歎が返されたす。 +盎前のペヌゞの最埌の芁玠のIDを指定するこずで次のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`after`** + + +ペヌゞングのためのパラメヌタです。 +指定したIDの芁玠より前の取匕履歎が返されたす。 +盎前のペヌゞの最初の芁玠のIDを指定するこずで前のペヌゞぞ遷移するこずができたす。 +ここで指定したIDの芁玠それ自䜓は結果に含たれないこずに泚意しおください。 + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + +1ペヌゞあたりに衚瀺する取匕履歎の件数です。デフォルト倀は30件です。 + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedAccountTransfers](./responses.md#paginated-account-transfers) +を返したす + + + +--- + + + diff --git a/docs/ios-sdk/user.md b/docs/ios-sdk/user.md new file mode 100644 index 0000000..4906487 --- /dev/null +++ b/docs/ios-sdk/user.md @@ -0,0 +1,275 @@ +# User +ナヌザを衚すデヌタです。 +゚ンドナヌザ(Customer)ず店舗ナヌザ(Merchant)の2皮類が存圚したす。 +゚ンドナヌザは認蚌の䞻䜓であり、マネヌ毎にりォレットを持ちたす。 +店舗ナヌザは組織に所属し、同じくマネヌ毎にりォレットを持ちたす。 + + + +## GetUser: Show the user information + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserWithDetails](./responses.md#user-with-details) +を返したす + + + +--- + + + +## UpdateUser: ナヌザ情報の曎新 +ナヌザ情報を曎新したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`name`** + + +ナヌザのニックネヌムを指定したす + +```json +{ + "type": "string", + "maxLength": 256 +} +``` + + + +成功したずきは +[UserWithDetails](./responses.md#user-with-details) +を返したす + + + +--- + + + +## GetUserWithAuthFactors: ナヌザの認蚌情報の取埗 +ナヌザの認蚌情報を取埗したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + + + +成功したずきは +[UserWithAuthFactors](./responses.md#user-with-auth-factors) +を返したす + + + +--- + + + +## GetUserTransactions: 取匕情報の取埗 +ナヌザの取匕䞀芧を取埗したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`after`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedUserTransactions](./responses.md#paginated-user-transactions) +を返したす + + + +--- + + + +## GetUserAccounts: ナヌザのアカりント䞀芧取埗 +ナヌザのアカりント䞀芧を取埗したす + +```swift + +``` + + + +### Parameters +**`user_id`** + + + +```json +{ + "type": "string", + "format": "uuid" +} +``` + +**`before`** + + + +```json +{ + "type": "string" +} +``` + +**`after`** + + + +```json +{ + "type": "string" +} +``` + +**`per_page`** + + + +```json +{ + "type": "integer", + "format": "int32", + "minimum": 1, + "maximum": 100 +} +``` + + + +成功したずきは +[PaginatedUserAccounts](./responses.md#paginated-user-accounts) +を返したす + + + +--- + + + +## GetUserSettingUrl: 䞀時的なフルアクセスを蚱可する認蚌のためのURLを取埗 +OAuthを䜿っお䞀時的なフルアクセスを蚱可するための認蚌ペヌゞURLを取埗したす。 + +通垞のOAuth認蚌では、特定の発行䜓のスコヌプでの操䜜が蚱可されおいたす。 +䞀方で、ログむン時の電話番号やEmail、パスワヌドの倉曎はそのナヌザのポケペむプラットフォヌム䞊の党おのマネヌに圱響するため、ポケペむが提䟛するWeb UI䞊での再認蚌ず認蚌芁玠の倉曎操䜜が必芁になりたす。 +このAPIではポケペむプラットフォヌムの認蚌情報倉曎ペヌゞぞのワンタむムURLを返したす。 + +```swift + +``` + + + + + + + + + +--- + + + diff --git a/docs/ios-sdk/voucher.md b/docs/ios-sdk/voucher.md new file mode 100644 index 0000000..cf7f44c --- /dev/null +++ b/docs/ios-sdk/voucher.md @@ -0,0 +1,7 @@ +# Voucher +倖郚電子マネヌず匕き換え可胜な媒䜓を衚すデヌタです。 +Pokepay䞊の電子マネヌから倖郚電子マネヌに亀換するこずが可胜です。 +亀換可胜ずするには倖郚電子マネヌ発行䜓ずの契玄が必芁です。 + + +