Skip to content

Latest commit

 

History

History
208 lines (143 loc) · 6.65 KB

BrandAPI.md

File metadata and controls

208 lines (143 loc) · 6.65 KB

BrandAPI

All URIs are relative to https://mgmtapi.geins.io

Method HTTP request Description
createBrand POST /API/Brand Create a new brand
getBrandById GET /API/Brand/{id} Get a specific brand
queryBrands POST /API/Brand/Query Query brands
updateBrand PUT /API/Brand/{id} Updates a brand

createBrand

    open class func createBrand(brand: BrandModelsWriteBrand, completion: @escaping (_ data: EnvelopeBrandModelsReadBrand?, _ error: Error?) -> Void)

Create a new brand

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient

let brand = Brand.Models.Write.Brand(name: "name_example", externalId: "externalId_example", descriptions: [Shared.Models.LocalizableContent(languageCode: "languageCode_example", content: "content_example")]) // BrandModelsWriteBrand | The brand to create.

// Create a new brand
BrandAPI.createBrand(brand: brand) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
brand BrandModelsWriteBrand The brand to create.

Return type

EnvelopeBrandModelsReadBrand

Authorization

apiKey, basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getBrandById

    open class func getBrandById(id: Int, completion: @escaping (_ data: EnvelopeBrandModelsReadBrand?, _ error: Error?) -> Void)

Get a specific brand

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient

let id = 987 // Int | The id of the brand to get.

// Get a specific brand
BrandAPI.getBrandById(id: id) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
id Int The id of the brand to get.

Return type

EnvelopeBrandModelsReadBrand

Authorization

apiKey, basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

queryBrands

    open class func queryBrands(query: BrandModelsBrandQuery, completion: @escaping (_ data: [BrandModelsReadBrand]?, _ error: Error?) -> Void)

Query brands

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient

let query = Brand.Models.BrandQuery(createdAfter: Date(), brandIds: [123], externalIds: ["externalIds_example"]) // BrandModelsBrandQuery | The details of the query.

// Query brands
BrandAPI.queryBrands(query: query) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
query BrandModelsBrandQuery The details of the query.

Return type

[BrandModelsReadBrand]

Authorization

apiKey, basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateBrand

    open class func updateBrand(id: Int, brand: BrandModelsWriteBrand, completion: @escaping (_ data: EnvelopeBrandModelsReadBrand?, _ error: Error?) -> Void)

Updates a brand

Leaving out a property will ensure no changes are made to that property. Collection properties will delete and/or add as necessary to match the supplied data.

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import OpenAPIClient

let id = 987 // Int | The id of the brand to update.
let brand = Brand.Models.Write.Brand(name: "name_example", externalId: "externalId_example", descriptions: [Shared.Models.LocalizableContent(languageCode: "languageCode_example", content: "content_example")]) // BrandModelsWriteBrand | The brand data to update.

// Updates a brand
BrandAPI.updateBrand(id: id, brand: brand) { (response, error) in
    guard error == nil else {
        print(error)
        return
    }

    if (response) {
        dump(response)
    }
}

Parameters

Name Type Description Notes
id Int The id of the brand to update.
brand BrandModelsWriteBrand The brand data to update.

Return type

EnvelopeBrandModelsReadBrand

Authorization

apiKey, basicAuth

HTTP request headers

  • Content-Type: application/json, text/json, application/xml, text/xml, application/x-www-form-urlencoded
  • Accept: application/json, text/json, application/xml, text/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]