Skip to content

Commit

Permalink
Cleanup - make ConfirmPaymentSource CodingKeys private
Browse files Browse the repository at this point in the history
  • Loading branch information
scannillo committed Aug 9, 2023
1 parent c83eb48 commit 55f71c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/CardPayments/APIRequests/CheckoutOrdersAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CheckoutOrdersAPI {
self.coreConfig = coreConfig
}

// MARK: - Internal Functions
// MARK: - Internal Methods

func confirmPaymentSource(clientID: String, cardRequest: CardRequest) async throws -> ConfirmPaymentSourceResponse {
let apiClient = APIClient(coreConfig: coreConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ struct ConfirmPaymentSourceRequest: Encodable {

// MARK: - Coding Keys

enum TopLevelKeys: String, CodingKey {
private enum TopLevelKeys: String, CodingKey {
case paymentSource = "payment_source"
case applicationContext = "application_context"
}

enum ApplicationContextKeys: String, CodingKey {
private enum ApplicationContextKeys: String, CodingKey {
case returnURL = "return_url"
case cancelURL = "cancel_url"
}

enum PaymentSourceKeys: String, CodingKey {
private enum PaymentSourceKeys: String, CodingKey {
case card
}

enum CardKeys: String, CodingKey {
private enum CardKeys: String, CodingKey {
case number
case expiry
case billingAddress
case name
case attributes
}

enum BillingAddressKeys: String, CodingKey {
private enum BillingAddressKeys: String, CodingKey {
case addressLine1 = "address_line_1"
case addressLine2 = "address_line_2"
case adminArea1 = "admin_area_1"
Expand All @@ -39,12 +39,12 @@ struct ConfirmPaymentSourceRequest: Encodable {
case countryCode
}

enum AttributesKeys: String, CodingKey {
private enum AttributesKeys: String, CodingKey {
case vault
case verification
}

enum VerificationKeys: String, CodingKey {
private enum VerificationKeys: String, CodingKey {
case method
}

Expand Down
1 change: 1 addition & 0 deletions Sources/CorePayments/Networking/HTTP.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class HTTP {
}
}

/// :nodoc:
public struct HTTPRequest {

let url: URL
Expand Down

0 comments on commit 55f71c4

Please sign in to comment.