Skip to content

Commit 7369df3

Browse files
authored
Merge pull request #71 from pokepay/feature/account-campaign-points
GetAccountCampaignPointAmounts endpoint
2 parents 920e5a1 + 349567e commit 7369df3

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

Pokepay.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Pokepay"
3-
s.version = "2.0.7"
3+
s.version = "2.0.8"
44
s.summary = "Pokepay iOS SDK."
55
s.description = <<-DESC
66
iOS SDK for Pokepay written in Swift.

Pokepay.xcodeproj/Pokepay_Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.7</string>
18+
<string>2.0.8</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import APIKit
2+
import Foundation
3+
4+
public extension BankAPI.Account {
5+
struct GetAccountCampaignPointAmounts: BankRequest {
6+
public let accountId: String
7+
public let campaignId: String
8+
public typealias Response = AccountCampaignPointAmounts
9+
10+
public init(accountId: String, campaignId: String) {
11+
self.accountId = accountId
12+
self.campaignId = campaignId
13+
}
14+
15+
public var method: HTTPMethod {
16+
return .get
17+
}
18+
19+
public var path: String {
20+
return "/accounts/\(accountId)/campaigns/\(campaignId)/point-amounts"
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Foundation
2+
3+
public struct AccountCampaignPointAmounts: Codable {
4+
public let maxTotalPointAmount: Double?
5+
public let totalPointAmount: Double?
6+
public let remainPointAmount: Double?
7+
8+
private enum CodingKeys: String, CodingKey {
9+
case maxTotalPointAmount = "max_total_point_amount"
10+
case totalPointAmount = "total_point_amount"
11+
case remainPointAmount = "remain_point_amount"
12+
}
13+
}

0 commit comments

Comments
 (0)