ProductsAPI
public enum ProductsAPI
                Caseless enumeration with static methods to send Product Requests
- 
                  
                  
Sends a request to retrieve all products under a specified category.
Declaration
Swift
public static func getProducts(category: String, with parameters: Parameters? = nil, completion: ResponseCompletion<[Product]> = nil)Parameters
categorySpecified category.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get all product categories.
Declaration
Swift
public static func getCategories(completion: ResponseCompletion<[Product.Category]> = nil)Parameters
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get a the whole product object.
Declaration
Swift
public static func loadProductComponents(id: Int, with parameters: Parameters? = nil, completion: ResponseCompletion<Product> = nil)Parameters
idID of the product.
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get prepare client’s token.
Declaration
Swift
public static func prepareClientToken(completion: ResponseCompletion<String> = nil)Parameters
completionThe closure to be executed once the request has finished.
 - 
                  
                  
Sends a request to get orders.
Declaration
Swift
public static func getOrders(with parameters: Parameters? = nil, completion: ResponseCompletion<[Order]> = nil)Parameters
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 - 
                  
                  
Declaration
Swift
public static func getOrder(with id: Int, parameters: Parameters? = nil, completion: ResponseCompletion<Order> = nil)Parameters
idID of the order.
parametersThe
Parametersto apply.completionThe closure to be executed once the request has finished.
 
View on GitHub
        ProductsAPI Enumeration Reference