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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Sources/Pokepay/Autogen/Autogen.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// DO NOT EDIT: File is generated by code generator.

public enum Autogen {
public enum Responses {}

public enum BankAPI {
public enum Account {}
public enum Bank {}
public enum Bill {}
public enum Campaign {}
public enum Cashtray {}
public enum Check {}
public enum Coupon {}
public enum Cpm {}
public enum CreditCard {}
public enum Cvs {}
public enum Jihanpi {}
public enum Merchants {}
public enum PrivateMoney {}
public enum Shop {}
public enum Terminal {}
public enum Transaction {}
public enum User {}
public enum UserTag {}
}
}
42 changes: 42 additions & 0 deletions Sources/Pokepay/Autogen/BankAPI/Account/AutogenCreateAccount.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct CreateAccount: BankRequest {
public let name: String?
public let privateMoneyId: String
public let externalId: String?

public typealias Response = Autogen.Responses.AccountDetail

public init(name: String? = nil, privateMoneyId: String, externalId: String? = nil) {
self.name = name
self.privateMoneyId = privateMoneyId
self.externalId = externalId
}

public var method: HTTPMethod {
return .post
}

public var path: String {
return "/accounts"
}

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
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct CreateAccountCpmToken: BankRequest {
public let scopes: [String]?
public let expiresIn: Int?
public let metadata: String?
public let keepAlive: Bool?
public let isShortToken: Bool?
public let strategy: String?
public let couponId: String?
public let accountId: String

public typealias Response = Autogen.Responses.CpmToken

public init(scopes: [String]? = nil, expiresIn: Int? = nil, metadata: String? = nil, keepAlive: Bool? = nil, isShortToken: Bool? = nil, strategy: String? = nil, couponId: String? = nil, accountId: String) {
self.scopes = scopes
self.expiresIn = expiresIn
self.metadata = metadata
self.keepAlive = keepAlive
self.isShortToken = isShortToken
self.strategy = strategy
self.couponId = couponId
self.accountId = accountId
}

public var method: HTTPMethod {
return .post
}

public var path: String {
return "/accounts/\(accountId)/cpm"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

if scopes != nil {
dict["scopes"] = scopes
}

if expiresIn != nil {
dict["expires_in"] = expiresIn
}

if metadata != nil {
dict["metadata"] = metadata
}

if keepAlive != nil {
dict["keep_alive"] = keepAlive
}

if isShortToken != nil {
dict["is_short_token"] = isShortToken
}

if strategy != nil {
dict["strategy"] = strategy
}

if couponId != nil {
dict["coupon_id"] = couponId
}

return dict
}
}
}
28 changes: 28 additions & 0 deletions Sources/Pokepay/Autogen/BankAPI/Account/AutogenGetAccount.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccount: BankRequest {
public let accountId: String

public typealias Response = Autogen.Responses.AccountDetail

public init(accountId: String) {
self.accountId = accountId
}

public var method: HTTPMethod {
return .get
}

public var path: String {
return "/accounts/\(accountId)"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

return dict
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccountBalances: BankRequest {
public let accountId: String
public let before: String?
public let after: String?
public let perPage: Int?
public let expired: String?

public typealias Response = Autogen.Responses.PaginatedAccountBalances

public init(accountId: String, before: String? = nil, after: String? = nil, perPage: Int? = nil, expired: String? = nil) {
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
}

if expired != nil {
dict["expired"] = expired
}

return dict
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccountCouponDetail: BankRequest {
public let accountId: String
public let couponId: String

public typealias Response = Autogen.Responses.CouponDetail

public init(accountId: String, couponId: String) {
self.accountId = accountId
self.couponId = couponId
}

public var method: HTTPMethod {
return .get
}

public var path: String {
return "/accounts/\(accountId)/coupons/\(couponId)"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

return dict
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccountCoupons: BankRequest {
public let accountId: String
public let isAvailable: String?
public let before: String?
public let after: String?
public let perPage: Int?

public typealias Response = Autogen.Responses.PaginatedAccountCoupons

public init(accountId: String, isAvailable: String? = nil, before: String? = nil, after: String? = nil, perPage: Int? = nil) {
self.accountId = accountId
self.isAvailable = isAvailable
self.before = before
self.after = after
self.perPage = perPage
}

public var method: HTTPMethod {
return .get
}

public var path: String {
return "/accounts/\(accountId)/coupons"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

if isAvailable != nil {
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
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccountIndividualNumberIdentification: BankRequest {
public let accountId: String

public typealias Response = Autogen.Responses.IndividualNumberIdentificationStatus

public init(accountId: String) {
self.accountId = accountId
}

public var method: HTTPMethod {
return .get
}

public var path: String {
return "/accounts/\(accountId)/individual-numbers/identification"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

return dict
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// DO NOT EDIT: File is generated by code generator.
import APIKit

public extension Autogen.BankAPI.Account {
struct GetAccountTopupQuotas: BankRequest {
public let accountId: String
public let status: String?
public let showExpiredForFixedPeriod: Bool?
public let showStartedQuotas: Bool?
public let isWithinApplicablePeriod: Bool?
public let isUsableAmountLeft: Bool?

public typealias Response = Autogen.Responses.AccountTopupQuotas

public init(accountId: String, status: String? = nil, showExpiredForFixedPeriod: Bool? = nil, showStartedQuotas: Bool? = nil, isWithinApplicablePeriod: Bool? = nil, isUsableAmountLeft: Bool? = nil) {
self.accountId = accountId
self.status = status
self.showExpiredForFixedPeriod = showExpiredForFixedPeriod
self.showStartedQuotas = showStartedQuotas
self.isWithinApplicablePeriod = isWithinApplicablePeriod
self.isUsableAmountLeft = isUsableAmountLeft
}

public var method: HTTPMethod {
return .get
}

public var path: String {
return "/accounts/\(accountId)/topup-quotas"
}

public var parameters: Any? {
var dict: [String: Any] = [:]

if status != nil {
dict["status"] = status
}

if showExpiredForFixedPeriod != nil {
dict["show_expired_for_fixed_period"] = showExpiredForFixedPeriod
}

if showStartedQuotas != nil {
dict["show_started_quotas"] = showStartedQuotas
}

if isWithinApplicablePeriod != nil {
dict["is_within_applicable_period"] = isWithinApplicablePeriod
}

if isUsableAmountLeft != nil {
dict["is_usable_amount_left"] = isUsableAmountLeft
}

return dict
}
}
}
Loading