//
//  Invitation.swift
//  GithubClient
//
//  Created by Eduardo Arenas on 2/18/18.
//  Copyright © 2018 GameChanger. All rights reserved.
//

import Foundation

public struct Invitation: Decodable {
  public let id: Int
  public let repository: Repository
  public let invetee: User
  public let inviter: User
  public let permissions: InvitationPermissions
  public let createdAt: Date
  public let url: String
  public let htmlUrl: String
}

extension Invitation {
  enum CodingKeys: String, CodingKey {
    case id
    case repository
    case invetee
    case inviter
    case permissions
    case createdAt = "created_at"
    case url
    case htmlUrl = "html_url"
  }
}

//
//  Invitation.swift
//  GithubClient
//
//  Created by Eduardo Arenas on 2/18/18.
//  Copyright © 2018 GameChanger. All rights reserved.
//

import Foundation

public struct Invitation: Decodable {
  public let id: Int
  public let repository: Repository
  public let invetee: User
  public let inviter: User
  public let permissions: InvitationPermissions
  public let createdAt: Date
  public let url: String
  public let htmlUrl: String
}

--- 
+++ 
@@ -18,3 +18,16 @@
   public let url: String
   public let htmlUrl: String
 }
+
+extension Invitation {
+  enum CodingKeys: String, CodingKey {
+    case id
+    case repository
+    case invetee
+    case inviter
+    case permissions
+    case createdAt = "created_at"
+    case url
+    case htmlUrl = "html_url"
+  }
+}
Correct coding keys for invitation
