forked from labd/commercetools-go-sdk
/
client_products_by_project_key_products.go
61 lines (54 loc) · 1.96 KB
/
client_products_by_project_key_products.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package platform
// Generated file, please do not change!!!
import (
"fmt"
)
type ByProjectKeyProductsRequestBuilder struct {
projectKey string
client *Client
}
func (rb *ByProjectKeyProductsRequestBuilder) WithKey(key string) *ByProjectKeyProductsKeyByKeyRequestBuilder {
return &ByProjectKeyProductsKeyByKeyRequestBuilder{
key: key,
projectKey: rb.projectKey,
client: rb.client,
}
}
func (rb *ByProjectKeyProductsRequestBuilder) WithId(id string) *ByProjectKeyProductsByIDRequestBuilder {
return &ByProjectKeyProductsByIDRequestBuilder{
id: id,
projectKey: rb.projectKey,
client: rb.client,
}
}
/**
* If [Price selection](ctp:api:type:ProductPriceSelection) query parameters are provided, the selected Prices are added to the response.
*/
func (rb *ByProjectKeyProductsRequestBuilder) Get() *ByProjectKeyProductsRequestMethodGet {
return &ByProjectKeyProductsRequestMethodGet{
url: fmt.Sprintf("/%s/products", rb.projectKey),
client: rb.client,
}
}
/**
* Check if Products exist. Responds with a `200 OK` status if any Products match the Query Predicate, or `404 Not Found` otherwise.
*/
func (rb *ByProjectKeyProductsRequestBuilder) Head() *ByProjectKeyProductsRequestMethodHead {
return &ByProjectKeyProductsRequestMethodHead{
url: fmt.Sprintf("/%s/products", rb.projectKey),
client: rb.client,
}
}
/**
* To create a new Product, send a representation that is going to become the initial _staged_ representation of the new Product in the master catalog.
* If [Price Selection](ctp:api:type:ProductPriceSelection) query parameters are provided, selected Prices will be added to the response.
* Produces the [ProductCreated](/projects/messages#product-created) Message.
*
*/
func (rb *ByProjectKeyProductsRequestBuilder) Post(body ProductDraft) *ByProjectKeyProductsRequestMethodPost {
return &ByProjectKeyProductsRequestMethodPost{
body: body,
url: fmt.Sprintf("/%s/products", rb.projectKey),
client: rb.client,
}
}