Skip to content

Latest commit

 

History

History
144 lines (94 loc) · 4.85 KB

UpdateMenuRecordAPI.md

File metadata and controls

144 lines (94 loc) · 4.85 KB

\UpdateMenuRecordAPI

All URIs are relative to https://partner-api.stg-myteksi.com/grabfood-sandbox

Method HTTP request Description
BatchUpdateMenu Put /partner/v1/batch/menu Batch Update Menu
UpdateMenu Put /partner/v1/menu Update menu record

BatchUpdateMenu

BatchUpdateMenuResponse BatchUpdateMenu(ctx).ContentType(contentType).Authorization(authorization).BatchUpdateMenuItem(batchUpdateMenuItem).Execute()

Batch Update Menu

Example

package main

import (
	"context"
	"fmt"
	"os"
	grabfood "github.com/grab/grabfood-api-sdk-go"
)

func main() {
	contentType := "application/json" // string | The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
	authorization := "Bearer <ACCESS_TOKEN_HERE>" // string | Specify the generated authorization token of the bearer type.
	batchUpdateMenuItem := *grabfood.NewBatchUpdateMenuItem("1-CYNGRUNGSBCCC", "ITEM") // BatchUpdateMenuItem | 

	configuration := grabfood.NewConfiguration()
	apiClient := grabfood.NewAPIClient(configuration)
	resp, r, err := apiClient.UpdateMenuRecordAPI.BatchUpdateMenu(context.Background()).ContentType(contentType).Authorization(authorization).BatchUpdateMenuItem(batchUpdateMenuItem).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `UpdateMenuRecordAPI.BatchUpdateMenu``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `BatchUpdateMenu`: BatchUpdateMenuResponse
	fmt.Fprintf(os.Stdout, "Response from `UpdateMenuRecordAPI.BatchUpdateMenu`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiBatchUpdateMenuRequest struct via the builder pattern

Name Type Description Notes
contentType string The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
authorization string Specify the generated authorization token of the bearer type.
batchUpdateMenuItem BatchUpdateMenuItem

Return type

BatchUpdateMenuResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

UpdateMenu

UpdateMenu(ctx).ContentType(contentType).Authorization(authorization).UpdateMenuRequest(updateMenuRequest).Execute()

Update menu record

Example

package main

import (
	"context"
	"fmt"
	"os"
	grabfood "github.com/grab/grabfood-api-sdk-go"
)

func main() {
	contentType := "application/json" // string | The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
	authorization := "Bearer <ACCESS_TOKEN_HERE>" // string | Specify the generated authorization token of the bearer type.
	updateMenuRequest := grabfood.update_menu_request{UpdateMenuItem: grabfood.NewUpdateMenuItem("1-CYNGRUNGSBCCC", "ITEM", "ITEM-1")} // UpdateMenuRequest | 

	configuration := grabfood.NewConfiguration()
	apiClient := grabfood.NewAPIClient(configuration)
	r, err := apiClient.UpdateMenuRecordAPI.UpdateMenu(context.Background()).ContentType(contentType).Authorization(authorization).UpdateMenuRequest(updateMenuRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `UpdateMenuRecordAPI.UpdateMenu``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiUpdateMenuRequest struct via the builder pattern

Name Type Description Notes
contentType string The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
authorization string Specify the generated authorization token of the bearer type.
updateMenuRequest UpdateMenuRequest

Return type

(empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

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