-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored the code a bit
- Loading branch information
Showing
10 changed files
with
292 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Partner.swift | ||
// TeslaSwiftDemoTests | ||
// | ||
// Created by João Nunes on 29/10/2023. | ||
// Copyright © 2023 Joao Nunes. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct PartnerBody: Codable { | ||
let domain: String | ||
} | ||
|
||
public struct PartnerResponse: Codable { | ||
let response: PartnerResponseBody | ||
} | ||
|
||
public struct PartnerResponseBody: Codable { | ||
let domain: String | ||
let name: String | ||
let description: String | ||
let clientId: String | ||
let ca: String? | ||
let createdAt: Date | ||
let updatedAt: Date | ||
let enterpriseTier: String | ||
let publicKey: String | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case domain | ||
case name | ||
case description | ||
case clientId = "client_id" | ||
case ca | ||
case createdAt = "created_at" | ||
case updatedAt = "updated_at" | ||
case enterpriseTier = "enterprise_tier" | ||
case publicKey = "public_key" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.