-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #274 from bilousoleksandr/master
chore: Add missing marketplace related API
- Loading branch information
Showing
14 changed files
with
710 additions
and
9 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
Sources/OpenAPI/Generated/Entities/AlternativeDistributionDomain.swift
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,64 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionDomain: Codable, Identifiable { | ||
public var type: `Type` | ||
public var id: String | ||
public var attributes: Attributes? | ||
public var links: ResourceLinks? | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case alternativeDistributionDomains | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var domain: String? | ||
public var referenceName: String? | ||
public var createdDate: Date? | ||
|
||
public init(domain: String? = nil, referenceName: String? = nil, createdDate: Date? = nil) { | ||
self.domain = domain | ||
self.referenceName = referenceName | ||
self.createdDate = createdDate | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.domain = try values.decodeIfPresent(String.self, forKey: "domain") | ||
self.referenceName = try values.decodeIfPresent(String.self, forKey: "referenceName") | ||
self.createdDate = try values.decodeIfPresent(Date.self, forKey: "createdDate") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encodeIfPresent(domain, forKey: "domain") | ||
try values.encodeIfPresent(referenceName, forKey: "referenceName") | ||
try values.encodeIfPresent(createdDate, forKey: "createdDate") | ||
} | ||
} | ||
|
||
public init(type: `Type`, id: String, attributes: Attributes? = nil, links: ResourceLinks? = nil) { | ||
self.type = type | ||
self.id = id | ||
self.attributes = attributes | ||
self.links = links | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.type = try values.decode(`Type`.self, forKey: "type") | ||
self.id = try values.decode(String.self, forKey: "id") | ||
self.attributes = try values.decodeIfPresent(Attributes.self, forKey: "attributes") | ||
self.links = try values.decodeIfPresent(ResourceLinks.self, forKey: "links") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(type, forKey: "type") | ||
try values.encode(id, forKey: "id") | ||
try values.encodeIfPresent(attributes, forKey: "attributes") | ||
try values.encodeIfPresent(links, forKey: "links") | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
Sources/OpenAPI/Generated/Entities/AlternativeDistributionDomainCreateRequest.swift
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,70 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionDomainCreateRequest: Codable { | ||
public var data: Data | ||
|
||
public struct Data: Codable { | ||
public var type: `Type` | ||
public var attributes: Attributes | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case alternativeDistributionDomains | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var domain: String | ||
public var referenceName: String | ||
|
||
public init(domain: String, referenceName: String) { | ||
self.domain = domain | ||
self.referenceName = referenceName | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.domain = try values.decode(String.self, forKey: "domain") | ||
self.referenceName = try values.decode(String.self, forKey: "referenceName") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(domain, forKey: "domain") | ||
try values.encode(referenceName, forKey: "referenceName") | ||
} | ||
} | ||
|
||
public init(type: `Type`, attributes: Attributes) { | ||
self.type = type | ||
self.attributes = attributes | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.type = try values.decode(`Type`.self, forKey: "type") | ||
self.attributes = try values.decode(Attributes.self, forKey: "attributes") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(type, forKey: "type") | ||
try values.encode(attributes, forKey: "attributes") | ||
} | ||
} | ||
|
||
public init(data: Data) { | ||
self.data = data | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode(Data.self, forKey: "data") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Sources/OpenAPI/Generated/Entities/AlternativeDistributionDomainResponse.swift
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,27 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionDomainResponse: Codable { | ||
/// AlternativeDistributionDomain | ||
public var data: AlternativeDistributionDomain | ||
public var links: DocumentLinks | ||
|
||
public init(data: AlternativeDistributionDomain, links: DocumentLinks) { | ||
self.data = data | ||
self.links = links | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode(AlternativeDistributionDomain.self, forKey: "data") | ||
self.links = try values.decode(DocumentLinks.self, forKey: "links") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
try values.encode(links, forKey: "links") | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Sources/OpenAPI/Generated/Entities/AlternativeDistributionDomainsResponse.swift
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,30 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionDomainsResponse: Codable { | ||
public var data: [AlternativeDistributionDomain] | ||
public var links: PagedDocumentLinks | ||
public var meta: PagingInformation? | ||
|
||
public init(data: [AlternativeDistributionDomain], links: PagedDocumentLinks, meta: PagingInformation? = nil) { | ||
self.data = data | ||
self.links = links | ||
self.meta = meta | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode([AlternativeDistributionDomain].self, forKey: "data") | ||
self.links = try values.decode(PagedDocumentLinks.self, forKey: "links") | ||
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
try values.encode(links, forKey: "links") | ||
try values.encodeIfPresent(meta, forKey: "meta") | ||
} | ||
} |
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
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
37 changes: 37 additions & 0 deletions
37
Sources/OpenAPI/Generated/Paths/PathsV1AlternativeDistributionDomains.swift
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,37 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
import URLQueryEncoder | ||
|
||
extension APIEndpoint.V1 { | ||
public var alternativeDistributionDomains: AlternativeDistributionDomains { | ||
AlternativeDistributionDomains(path: path + "/alternativeDistributionDomains") | ||
} | ||
|
||
public struct AlternativeDistributionDomains { | ||
/// Path: `/v1/alternativeDistributionDomains` | ||
public let path: String | ||
|
||
public func get(fieldsAlternativeDistributionDomains: [FieldsAlternativeDistributionDomains]? = nil, limit: Int? = nil) -> Request<AppStoreConnect_Swift_SDK.AlternativeDistributionDomainsResponse> { | ||
Request(path: path, method: "GET", query: makeGetQuery(fieldsAlternativeDistributionDomains, limit), id: "alternativeDistributionDomains-get_collection") | ||
} | ||
|
||
private func makeGetQuery(_ fieldsAlternativeDistributionDomains: [FieldsAlternativeDistributionDomains]?, _ limit: Int?) -> [(String, String?)] { | ||
let encoder = URLQueryEncoder() | ||
encoder.encode(fieldsAlternativeDistributionDomains, forKey: "fields[alternativeDistributionDomains]", explode: false) | ||
encoder.encode(limit, forKey: "limit") | ||
return encoder.items | ||
} | ||
|
||
public enum FieldsAlternativeDistributionDomains: String, Codable, CaseIterable { | ||
case createdDate | ||
case domain | ||
case referenceName | ||
} | ||
|
||
public func post(_ body: AppStoreConnect_Swift_SDK.AlternativeDistributionDomainCreateRequest) -> Request<AppStoreConnect_Swift_SDK.AlternativeDistributionDomainResponse> { | ||
Request(path: path, method: "POST", body: body, id: "alternativeDistributionDomains-create_instance") | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Sources/OpenAPI/Generated/Paths/PathsV1AlternativeDistributionDomainsWithID.swift
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,36 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
import URLQueryEncoder | ||
|
||
extension APIEndpoint.V1.AlternativeDistributionDomains { | ||
public func id(_ id: String) -> WithID { | ||
WithID(path: "\(path)/\(id)") | ||
} | ||
|
||
public struct WithID { | ||
/// Path: `/v1/alternativeDistributionDomains/{id}` | ||
public let path: String | ||
|
||
public func get(fieldsAlternativeDistributionDomains: [FieldsAlternativeDistributionDomains]? = nil) -> Request<AppStoreConnect_Swift_SDK.AlternativeDistributionDomainResponse> { | ||
Request(path: path, method: "GET", query: makeGetQuery(fieldsAlternativeDistributionDomains), id: "alternativeDistributionDomains-get_instance") | ||
} | ||
|
||
private func makeGetQuery(_ fieldsAlternativeDistributionDomains: [FieldsAlternativeDistributionDomains]?) -> [(String, String?)] { | ||
let encoder = URLQueryEncoder() | ||
encoder.encode(fieldsAlternativeDistributionDomains, forKey: "fields[alternativeDistributionDomains]", explode: false) | ||
return encoder.items | ||
} | ||
|
||
public enum FieldsAlternativeDistributionDomains: String, Codable, CaseIterable { | ||
case createdDate | ||
case domain | ||
case referenceName | ||
} | ||
|
||
public var delete: Request<Void> { | ||
Request(path: path, method: "DELETE", id: "alternativeDistributionDomains-delete_instance") | ||
} | ||
} | ||
} |
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
Oops, something went wrong.