Skip to content

Commit fab1f2e

Browse files
Merge branch 'ml/BP-21748/v102' into 'main'
Release 1.0.2 Closes BP-21748 See merge request grab-transport/mex/store-ops/openapi-sdk/grabfood-api-sdk-go!7
2 parents 14f93ea + 3274e41 commit fab1f2e

8 files changed

+89
-25
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [1.0.2] - 2025-03-04
4+
5+
### Added
6+
- Get orders by orderIDs
7+
8+
### Changed
9+
10+
### Deprecated
11+
12+
[1.0.2]: https://github.com/grab/grabfood-api-sdk-go/releases/tag/v1.0.2
13+
314
## [1.0.1] - 2025-01-13
415

516
### Added

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
55

66
- API version: 1.1.3
7-
- Package version: 1.0.1
7+
- Package version: 1.0.2
88
- Generator version: 7.8.0
99
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1010

api/openapi.yaml

+41-7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ tags:
2323
x-displayName: Go
2424
- name: java
2525
x-displayName: Java
26+
- name: node.js
27+
x-displayName: Node.js
28+
- name: python
29+
x-displayName: Python
30+
- name: php
31+
x-displayName: PHP
2632
- name: get-oauth-grab
2733
x-displayName: Get GrabFood access token
2834
- name: get-oauth-partner-webhook
@@ -937,21 +943,36 @@ paths:
937943
- explode: true
938944
in: query
939945
name: date
940-
required: true
946+
required: false
941947
schema:
942948
$ref: '#/components/schemas/date'
943949
style: form
944-
- description: Specify the page number for the report.
950+
- description: Specify the page number for the report. Required if orderIDs
951+
is not provided.
945952
example: 1
946953
explode: true
947954
in: query
948955
name: page
949-
required: true
956+
required: false
950957
schema:
951958
type: integer
952959
style: form
960+
- description: "List of order IDs. If provided, date and page are not required."
961+
example:
962+
- 123-CYNKLPCVRN5
963+
- 456-PCVRN5CYNKL
964+
explode: true
965+
in: query
966+
name: orderIDs
967+
required: false
968+
schema:
969+
items:
970+
type: string
971+
maxItems: 10
972+
type: array
973+
style: form
953974
responses:
954-
"2xx":
975+
"200":
955976
content:
956977
application/json:
957978
schema:
@@ -962,11 +983,17 @@ paths:
962983
- list-orders
963984
x-codeSamples:
964985
- lang: cURL
965-
label: CLI
986+
label: CLI by date
966987
source: |
967988
curl -X GET \
968989
https://partner-api.grab.com/grabfood/partner/v1/orders?merchantID=1-C3VEJY6CMEEGUE&date=2020-01-20&page=0 \
969990
-H 'Authorization: Bearer <BEARER_TOKEN_HERE>'
991+
- lang: cURL
992+
label: CLI by orderIDs
993+
source: |
994+
curl -X GET \
995+
https://partner-api.grab.com/grabfood/partner/v1/orders?merchantID=1-C3VEJY6CMEEGUE&orderIDs=123-CYNKLPCVRN5&orderIDs=456-PCVRN5CYNKL \
996+
-H 'Authorization: Bearer <BEARER_TOKEN_HERE>'
970997
/partner/v1/orders/{orderID}:
971998
put:
972999
operationId: edit-order
@@ -3600,7 +3627,7 @@ components:
36003627
title: AcceptOrderRequest
36013628
type: object
36023629
date:
3603-
description: The date of your report.
3630+
description: The date of your report. Required if orderIDs is not provided.
36043631
example: 2020-01-20
36053632
title: date
36063633
type: string
@@ -5781,6 +5808,8 @@ components:
57815808
- SGD
57825809
- THB
57835810
- VND
5811+
- KHR
5812+
- MMK
57845813
example: SGD
57855814
maxLength: 3
57865815
type: string
@@ -5794,12 +5823,14 @@ components:
57945823
- S$
57955824
- ฿
57965825
-
5826+
-
5827+
- K
57975828
example: S$
57985829
maxLength: 3
57995830
type: string
58005831
exponent:
58015832
description: |
5802-
The log base 10 of the number of times we have to multiply the major unit to get the minor unit. Should be 0 for VN and 2 for other countries (SG/MY/ID/TH/PH/KH).
5833+
The log base 10 of the number of times we have to multiply the major unit to get the minor unit. Should be 0 for VN and 2 for other countries (`SG`/`MY`/`ID`/`TH`/`PH`/`KH`/`MM`).
58035834
example: 2
58045835
type: integer
58055836
required:
@@ -7721,6 +7752,9 @@ x-tagGroups:
77217752
- sdk-intro
77227753
- go
77237754
- java
7755+
- node.js
7756+
- python
7757+
- php
77247758
- name: Authorisation
77257759
tags:
77267760
- get-oauth-grab

api_list_orders.go

+26-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configuration.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/Currency.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Code** | **string** | The three-letter ISO currency code. This is the currency that is associated with the payment amount. |
88
**Symbol** | **string** | The currency symbol. |
9-
**Exponent** | **int32** | The log base 10 of the number of times we have to multiply the major unit to get the minor unit. Should be 0 for VN and 2 for other countries (SG/MY/ID/TH/PH/KH). |
9+
**Exponent** | **int32** | The log base 10 of the number of times we have to multiply the major unit to get the minor unit. Should be 0 for VN and 2 for other countries (&#x60;SG&#x60;/&#x60;MY&#x60;/&#x60;ID&#x60;/&#x60;TH&#x60;/&#x60;PH&#x60;/&#x60;KH&#x60;/&#x60;MM&#x60;). |
1010

1111
## Methods
1212

docs/ListOrdersAPI.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Method | HTTP request | Description
1010

1111
## ListOrders
1212

13-
> ListOrdersResponse ListOrders(ctx).Authorization(authorization).MerchantID(merchantID).Date(date).Page(page).Execute()
13+
> ListOrdersResponse ListOrders(ctx).Authorization(authorization).MerchantID(merchantID).Date(date).Page(page).OrderIDs(orderIDs).Execute()
1414
1515
List orders
1616

@@ -29,12 +29,13 @@ import (
2929
func main() {
3030
authorization := "Bearer <ACCESS_TOKEN_HERE>" // string | Specify the generated authorization token of the bearer type.
3131
merchantID := "1-CYNGRUNGSBCCC" // string | The merchant's ID that is in GrabFood's database.
32-
date := "date_example" // string |
33-
page := int32(1) // int32 | Specify the page number for the report.
32+
date := "date_example" // string | (optional)
33+
page := int32(1) // int32 | Specify the page number for the report. Required if orderIDs is not provided. (optional)
34+
orderIDs := []string{"Inner_example"} // []string | List of order IDs. If provided, date and page are not required. (optional)
3435

3536
configuration := grabfood.NewConfiguration()
3637
apiClient := grabfood.NewAPIClient(configuration)
37-
resp, r, err := apiClient.ListOrdersAPI.ListOrders(context.Background()).Authorization(authorization).MerchantID(merchantID).Date(date).Page(page).Execute()
38+
resp, r, err := apiClient.ListOrdersAPI.ListOrders(context.Background()).Authorization(authorization).MerchantID(merchantID).Date(date).Page(page).OrderIDs(orderIDs).Execute()
3839
if err != nil {
3940
fmt.Fprintf(os.Stderr, "Error when calling `ListOrdersAPI.ListOrders``: %v\n", err)
4041
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -58,7 +59,8 @@ Name | Type | Description | Notes
5859
**authorization** | **string** | Specify the generated authorization token of the bearer type. |
5960
**merchantID** | **string** | The merchant&#39;s ID that is in GrabFood&#39;s database. |
6061
**date** | **string** | |
61-
**page** | **int32** | Specify the page number for the report. |
62+
**page** | **int32** | Specify the page number for the report. Required if orderIDs is not provided. |
63+
**orderIDs** | **[]string** | List of order IDs. If provided, date and page are not required. |
6264

6365
### Return type
6466

model_currency.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)