     public func create(type: ConnectedAccountType,
                        email: String?,
                        country: String?,
-                       metadata: [String: String]?) throws -> Future<StripeConnectAccount> {
-        var body: [String: String] = [:]
+                       accountToken: String?,
+                       businessLogo: String?,
+                       businessName: String?,
+                       businessPrimaryColor: String?,
+                       businessUrl: String?,
+                       debitNegativeBalances: Bool?,
+                       declineChargeOn: [String: Bool]?,
+                       defaultCurrency: StripeCurrency?,
+                       externalAccount: Any?,
+                       legalEntity: StripeConnectAccountLegalEntity?,
+                       metadata: [String: String]?,
+                       payoutSchedule: [String: String]?,
+                       payoutStatementDescriptor: String?,
+                       productDescription: String?,
+                       statementDescriptor: String?,
+                       supportEmail: String?,
+                       supportPhone: String?,
+                       supportUrl: String?,
+                       tosAcceptance: StripeTOSAcceptance?) throws -> Future<StripeConnectAccount> {
+        var body: [String: Any] = [:]
         body["type"] = type.rawValue
+        
+        if let country = country {
+            body["country"] = country
+        }
         
         if let email = email {
             body["email"] = email
         }
         
-        if let country = country {
-            body["country"] = country
+        if let accountToken = accountToken {
+            body["account_token"] = accountToken
+        }
+        
+        if let businessLogo = businessLogo {
+            body["business_logo"] = businessLogo
+        }
+        
+        if let businessname = businessName {
+            body["business_name"] = businessname
+        }
+        
+        if let businesscolor = businessPrimaryColor {
+            body["business_primary_color"] = businesscolor
+        }
+        
+        if let businessurl = businessUrl {
+            body["business_url"] = businessurl
+        }
+        
+        if let debNegBal = debitNegativeBalances {
+            body["debit_negative_balances"] = debNegBal
+        }
+        
+        if let declinechargeon = declineChargeOn {
+            declinechargeon.forEach { body["decline_charge_on[\($0)]"] = $1 }
+        }
+        
+        if let currency = defaultCurrency {
+            body["default_currency"] = currency.rawValue
+        }
+        
+        if let externalAccountToken = externalAccount as? String {
+            body["external_account"] = externalAccountToken
+        } else if let externalBankAccount = externalAccount as? StripeExternalBankAccount {
+            try externalBankAccount.toEncodedDictionary().forEach { body["external_account[\($0)]"] = $1 }
+        } else if let externalCardAccount = externalAccount as? StripeExternalCardAccount {
+            try externalCardAccount.toEncodedDictionary().forEach { body["external_account[\($0)]"] = $1 }
+        }
+        
+        if let legalEntity = legalEntity {
+            try legalEntity.toEncodedDictionary().forEach { body["legal_entity[\($0)]"] = $1 }
         }
         
         if let metadata = metadata {
             metadata.forEach { body["metadata[\($0)]"] = $1 }
+        }
+        
+        if let payoutSchedule = payoutSchedule {
+            payoutSchedule.forEach { body["payout_schedule[\($0)]"] = $1 }
+        }
+        
+        if let payoutstatement = payoutStatementDescriptor {
+            body["payout_statement_descriptor"] = payoutstatement
+        }
+        
+        if let productDescription = productDescription {
+            body["product_description"] = productDescription
+        }
+        
+        if let statementdescriptor = statementDescriptor {
+            body["statement_descriptor"] = statementdescriptor
+        }
+        
+        if let supportEmail = supportEmail {
+            body["support_email"] = supportEmail
+        }
+        
+        if let supportPhone = supportPhone {
+            body["support_phone"] = supportPhone
+        }
+        
+        if let supportUrl = supportUrl {
+            body["support_url"] = supportUrl
+        }
+        
+        if let tos = tosAcceptance {
+            try tos.toEncodedDictionary().forEach { body["tos_acceptance[\($0)]"] = $1 }
         }
         
         return try request.send(method: .POST, path: StripeAPIEndpoint.account.endpoint, body: body.queryParameters)

import Vapor

public protocol AccountRoutes {
    func create(type: ConnectedAccountType, email: String?, country: String?, metadata: [String: String]?) throws -> Future<StripeConnectAccount>
    func retrieve(account: String) throws -> Future<StripeConnectAccount>
    func update(account: String, businessName: String?, businessPrimaryColor: String?, businessUrl: String?, debitNegativeBalances: Bool?, declineChargeOn: [String: Bool]?, defaultCurrency: StripeCurrency?, email: String?, externalAccount: Any?, legalEntity: StripeConnectAccountLegalEntity?, metadata: [String: String]?, payoutSchedule: [String: String]?, payoutStatementDescriptor: String?, productDescription: String?, statementDescriptor: String?, supportEmail: String?, supportPhone: String?, supportUrl: String?, tosAcceptance: StripeTOSAcceptance?) throws -> Future<StripeConnectAccount>
    func delete(account: String) throws -> Future<StripeDeletedObject>

}

extension AccountRoutes {
    public func create(type: ConnectedAccountType,
                       email: String? = nil,
                       country: String? = nil,
                       accountToken: String? = nil,
                       businessLogo: String? = nil,
                       businessName: String? = nil,
                       businessPrimaryColor: String? = nil,
                       businessUrl: String? = nil,
                       debitNegativeBalances: Bool? = nil,
                       declineChargeOn: [String: Bool]? = nil,
                       defaultCurrency: StripeCurrency? = nil,
                       externalAccount: Any? = nil,
                       legalEntity: StripeConnectAccountLegalEntity? = nil,
                       metadata: [String: String]? = nil,
                       payoutSchedule: [String: String]? = nil,
                       payoutStatementDescriptor: String? = nil,
                       productDescription: String? = nil,
                       statementDescriptor: String? = nil,
                       supportEmail: String? = nil,
                       supportPhone: String? = nil,
                       supportUrl: String? = nil,
                       tosAcceptance: StripeTOSAcceptance? = nil) throws -> Future<StripeConnectAccount> {
        return try create(type: type,
                          email: email,
                          country: country,
                          accountToken: accountToken,
                          businessLogo: businessLogo,
                          businessName: businessName,
                          businessPrimaryColor: businessPrimaryColor,
                          businessUrl: businessUrl,
                          debitNegativeBalances: debitNegativeBalances,
                          declineChargeOn: declineChargeOn,
                          defaultCurrency: defaultCurrency,
                          externalAccount: externalAccount,
                          legalEntity: legalEntity,
                          metadata: metadata,
                          payoutSchedule: payoutSchedule,
                          payoutStatementDescriptor: payoutStatementDescriptor,
                          productDescription: productDescription,
                          statementDescriptor: statementDescriptor,
                          supportEmail: supportEmail,
                          supportPhone: supportPhone,
                          supportUrl: supportUrl,
                          tosAcceptance: tosAcceptance)
    }
    
    public func retrieve(account: String) throws -> Future<StripeConnectAccount> {
