Skip to content

Commit

Permalink
Merge pull request #64 from wordpress-mobile/issue/10711-redux-struct…
Browse files Browse the repository at this point in the history
…-accessibility

Exposed public initializer for SiteCreationRequest
  • Loading branch information
stevebaranski authored Jan 4, 2019
2 parents 46c2bc0 + a70d0e5 commit 09dbbea
Showing 1 changed file with 33 additions and 10 deletions.
43 changes: 33 additions & 10 deletions WordPressKit/WordPressComServiceRemote+SiteCreation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,39 @@ import Foundation
/// This value type is intended to express a site creation request.
///
public struct SiteCreationRequest: Encodable {
let segmentIdentifier: Int64
let verticalIdentifier: String?
let title: String
let tagline: String?
let siteURLString: String
let isPublic: Bool
let languageIdentifier: String
let shouldValidate: Bool
let clientIdentifier: String
let clientSecret: String
public let segmentIdentifier: Int64
public let verticalIdentifier: String?
public let title: String
public let tagline: String?
public let siteURLString: String
public let isPublic: Bool
public let languageIdentifier: String
public let shouldValidate: Bool
public let clientIdentifier: String
public let clientSecret: String

public init(segmentIdentifier: Int64,
verticalIdentifier: String?,
title: String,
tagline: String?,
siteURLString: String,
isPublic: Bool,
languageIdentifier: String,
shouldValidate: Bool,
clientIdentifier: String,
clientSecret: String) {

self.segmentIdentifier = segmentIdentifier
self.verticalIdentifier = verticalIdentifier
self.title = title
self.tagline = tagline
self.siteURLString = siteURLString
self.isPublic = isPublic
self.languageIdentifier = languageIdentifier
self.shouldValidate = shouldValidate
self.clientIdentifier = clientIdentifier
self.clientSecret = clientSecret
}

public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
Expand Down

0 comments on commit 09dbbea

Please sign in to comment.