forked from labd/commercetools-go-sdk
/
client_orders_by_project_key_in_store_key_by_store_key_orders_order_number_by_order_number.go
53 lines (47 loc) · 2.27 KB
/
client_orders_by_project_key_in_store_key_by_store_key_orders_order_number_by_order_number.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
package platform
// Generated file, please do not change!!!
import (
"fmt"
)
type ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder struct {
projectKey string
storeKey string
orderNumber string
client *Client
}
/**
* Returns an order by its order number from a specific Store.
*
* If the order exists in the project but does not have the store field,
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* In case the orderNumber does not match the regular expression [a-zA-Z0-9_\-]+,
* it should be provided in URL-encoded format.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder) Get() *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodGet {
return &ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodGet{
url: fmt.Sprintf("/%s/in-store/key=%s/orders/order-number=%s", rb.projectKey, rb.storeKey, rb.orderNumber),
client: rb.client,
}
}
/**
* Updates an order in the store specified by {storeKey}.
* If the order exists in the project but does not have the store field,
* or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error.
* In case the orderNumber does not match the regular expression [a-zA-Z0-9_\-]+,
* it should be provided in URL-encoded format.
*
*/
func (rb *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder) Post(body OrderUpdate) *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodPost {
return &ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodPost{
body: body,
url: fmt.Sprintf("/%s/in-store/key=%s/orders/order-number=%s", rb.projectKey, rb.storeKey, rb.orderNumber),
client: rb.client,
}
}
func (rb *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestBuilder) Delete() *ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodDelete {
return &ByProjectKeyInStoreKeyByStoreKeyOrdersOrderNumberByOrderNumberRequestMethodDelete{
url: fmt.Sprintf("/%s/in-store/key=%s/orders/order-number=%s", rb.projectKey, rb.storeKey, rb.orderNumber),
client: rb.client,
}
}