Skip to content

Commit

Permalink
Merge branch 'upd-model-naming' into 'main'
Browse files Browse the repository at this point in the history
update model naming

See merge request grab-transport/mex/store-ops/openapi-sdk/grabfood-api-sdk-java!2
  • Loading branch information
muhamad-lukman-grab committed Sep 19, 2024
2 parents 6208781 + 0ebab8a commit 5ed9ab4
Show file tree
Hide file tree
Showing 290 changed files with 18,766 additions and 16,861 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ hs_err_pid*
target
.gradle
build

.DS_Store
33 changes: 33 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to Our Project's SDK

We value your input and contributions! We use the [OpenAPI Generator tool](https://openapi-generator.tech) to generate our SDK based on an OpenAPI YAML specification.

If you find an issue with our SDK and want to contribute a fix, follow the guidelines mentioned below:

## Reporting an Issue

1. Notice an issue while using the SDK? Try to determine what's causing it. Was it a particular endpoint, operation, or datatype?

2. Check the YAML specification: Once you've identified the issue, refer to the corresponding definition in the OpenAPI YAML specification file that is included in the SDK. This could be a specific path, operation, parameter, or schema.

3. Describe the current behavior and desired correct behavior.

4. Describe the steps to reproduce this issue.

Please note that due to our open-source process, we don't have a direct way to accept code contributions for the SDK. The SDK is directly generated from our OpenAPI YAML specification file. Hence, you don't need to manually update the SDK. Instead, identify the modifications needed in the OpenAPI YAML specification.

## Submitting a Suggestion

If there's something in the SDK that isn't broken but could be better, you're welcome to share suggestions. Constructive feedback is always appreciated!

When submitting a suggestion:

1. Be clear and concise in your description of the suggestion.

2. Explain why it would be beneficial. Real-life examples, if applicable, can help to illustrate your point.

3. Be patient. Not all suggestions can be incorporated immediately, and it may be necessary for us to research your idea before we can implement it.

Remember, contributions come in many forms, not just in code! Identifying areas for improvement or bringing up issues helps us make the SDK better for everyone.

Thank you for your contributions!
130 changes: 58 additions & 72 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Java API client for grabfood
# Java API client for GrabFood

- API version: 1.1.3

- Build date: 2024-09-10T06:13:57.715918Z[Etc/UTC]

- Generator version: 7.6.0
- Generator version: 7.8.0

For more information, please visit [https://developer.grab.com](https://developer.grab.com)

Expand Down Expand Up @@ -78,6 +76,15 @@ Then manually install the following JARs:

Please follow the [installation](#installation) instruction and execute the following Java code:

In the example below, we start by acquiring an OAuth2 access token. In your applications, it's important to handle OAuth2 tokens efficiently. This means:
- Store the received access token once it's obtained.
- Use this stored access token for as long as it's valid.
- Only request a new access token when the current one has expired.

By following these practices, you minimize the number of requests to the server, making your application more efficient and responsive.

You can usually determine the validity of a token by the `expires_in` attribute in the OAuth2 token response.

```java
import com.grabfood.client.ApiClient;
import com.grabfood.client.ApiException;
Expand All @@ -101,18 +108,18 @@ public class Example {
req.setGrantType("client_credentials");
req.setScope("food.partner_api");

String accessToken = "";

try {
GrabOauthResponse authResp = authInstance.postOauthGrab(contentType, req);
accessToken = authResp.getAccessToken();
// Request a new token only when the previous one has expired.
// Can utilize the `expires_in` from authResp.getExpiresIn() to determine the validity of the token.
ACCESS_TOKEN = authResp.getAccessToken();
} catch (ApiException e) {
System.err.println("Exception when calling GetOauthGrabApi#postOauthGrab");
e.printStackTrace();
}

GetStoreHourApi apiInstance = new GetStoreHourApi(client);
String authorization = "Bearer " + accessToken;
String authorization = "Bearer " + ACCESS_TOKEN;
String merchantID = "1-CYNGRUNGSBCCC";
try {
StoreHourResponse result = apiInstance.getStoreHour(authorization, merchantID);
Expand All @@ -125,9 +132,12 @@ public class Example {
}
```

For handling webhook requests, we provide dedicated models for both requests and responses. Please refer to the list of available models provided below for more details.

## Documentation for API Endpoints

All URIs are relative to *https://partner-api.stg-myteksi.com/grabfood-sandbox*
The base URL for OAuth2 URIs is https://api.grab.com
For other GrabFood partner API endpoints, URIs are relative to https://partner-api.grab.com/grabfood

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
Expand Down Expand Up @@ -164,40 +174,29 @@ Class | Method | HTTP request | Description
- [AcceptOrderRequest](docs/AcceptOrderRequest.md)
- [Address](docs/Address.md)
- [AdvancedPricing](docs/AdvancedPricing.md)
- [BatchUpdateMenuErrorMessage](docs/BatchUpdateMenuErrorMessage.md)
- [BatchUpdateMenuErrorMessageErrorsInner](docs/BatchUpdateMenuErrorMessageErrorsInner.md)
- [BatchUpdateMenuItem](docs/BatchUpdateMenuItem.md)
- [BatchUpdateMenuItemMenuEntitiesInner](docs/BatchUpdateMenuItemMenuEntitiesInner.md)
- [BatchUpdateMenuResponse](docs/BatchUpdateMenuResponse.md)
- [BindMembershipNativeRequest](docs/BindMembershipNativeRequest.md)
- [BindMembershipNativeResponse](docs/BindMembershipNativeResponse.md)
- [Campaigns](docs/Campaigns.md)
- [Campaign](docs/Campaign.md)
- [CampaignConditions](docs/CampaignConditions.md)
- [CampaignDiscount](docs/CampaignDiscount.md)
- [CampaignQuotas](docs/CampaignQuotas.md)
- [CampaignScope](docs/CampaignScope.md)
- [CancelCode](docs/CancelCode.md)
- [CancelOrderFail](docs/CancelOrderFail.md)
- [CancelOrderFail403](docs/CancelOrderFail403.md)
- [CancelOrderLimitType](docs/CancelOrderLimitType.md)
- [CancelOrderRequest](docs/CancelOrderRequest.md)
- [CancelOrderResponse](docs/CancelOrderResponse.md)
- [CancelReasonsInner](docs/CancelReasonsInner.md)
- [CategoriesInner](docs/CategoriesInner.md)
- [CategoriesInnerNameTranslation](docs/CategoriesInnerNameTranslation.md)
- [CancelReason](docs/CancelReason.md)
- [CheckOrderCancelableResponse](docs/CheckOrderCancelableResponse.md)
- [Conditions](docs/Conditions.md)
- [Coordinates](docs/Coordinates.md)
- [CreateCampaignFail](docs/CreateCampaignFail.md)
- [CreateCampaignRequest](docs/CreateCampaignRequest.md)
- [CreateCampaignResponse](docs/CreateCampaignResponse.md)
- [Currency](docs/Currency.md)
- [DayHours](docs/DayHours.md)
- [DineIn](docs/DineIn.md)
- [DineInVoucher400Fail](docs/DineInVoucher400Fail.md)
- [DineInVoucher404Fail](docs/DineInVoucher404Fail.md)
- [Discount](docs/Discount.md)
- [EditOrderItem](docs/EditOrderItem.md)
- [EditOrderRequest](docs/EditOrderRequest.md)
- [EditOrderRequestItemsInner](docs/EditOrderRequestItemsInner.md)
- [Error404](docs/Error404.md)
- [Error409](docs/Error409.md)
- [Error500](docs/Error500.md)
- [FeatureFlags](docs/FeatureFlags.md)
- [FreeItem](docs/FreeItem.md)
- [Error](docs/Error.md)
- [GetDineInVoucherResponse](docs/GetDineInVoucherResponse.md)
- [GetMembershipNativeResponse](docs/GetMembershipNativeResponse.md)
- [GetMembershipNativeResponsePointInfo](docs/GetMembershipNativeResponsePointInfo.md)
Expand All @@ -206,97 +205,84 @@ Class | Method | HTTP request | Description
- [GetMenuNewResponse](docs/GetMenuNewResponse.md)
- [GetMenuOldResponse](docs/GetMenuOldResponse.md)
- [GetRewardNativeRequest](docs/GetRewardNativeRequest.md)
- [GetRewardNativeRequestItemsInner](docs/GetRewardNativeRequestItemsInner.md)
- [GetRewardNativeResponse](docs/GetRewardNativeResponse.md)
- [GrabOauthRequest](docs/GrabOauthRequest.md)
- [GrabOauthResponse](docs/GrabOauthResponse.md)
- [LimitType](docs/LimitType.md)
- [ListCampaignResponse](docs/ListCampaignResponse.md)
- [ListOrdersResponse](docs/ListOrdersResponse.md)
- [MarkOrderFail](docs/MarkOrderFail.md)
- [MarkOrderRequest](docs/MarkOrderRequest.md)
- [MenuItemsInner](docs/MenuItemsInner.md)
- [MenuItemsInnerDescriptionTranslation](docs/MenuItemsInnerDescriptionTranslation.md)
- [MenuModifiersInner](docs/MenuModifiersInner.md)
- [MenuModifiersInnerNameTranslation](docs/MenuModifiersInnerNameTranslation.md)
- [MenuCategory](docs/MenuCategory.md)
- [MenuEntity](docs/MenuEntity.md)
- [MenuEntityError](docs/MenuEntityError.md)
- [MenuItem](docs/MenuItem.md)
- [MenuModifier](docs/MenuModifier.md)
- [MenuSection](docs/MenuSection.md)
- [MenuSectionCategory](docs/MenuSectionCategory.md)
- [MenuSectionCategoryItem](docs/MenuSectionCategoryItem.md)
- [MenuSyncFail](docs/MenuSyncFail.md)
- [MenuSyncSuccess](docs/MenuSyncSuccess.md)
- [MenuSyncFailCategory](docs/MenuSyncFailCategory.md)
- [MenuSyncFailItem](docs/MenuSyncFailItem.md)
- [MenuSyncFailModifier](docs/MenuSyncFailModifier.md)
- [MenuSyncFailModifierGroup](docs/MenuSyncFailModifierGroup.md)
- [MenuSyncFailServiceHours](docs/MenuSyncFailServiceHours.md)
- [MenuSyncResponse](docs/MenuSyncResponse.md)
- [MenuSyncWebhookRequest](docs/MenuSyncWebhookRequest.md)
- [ModifierGroupsInner](docs/ModifierGroupsInner.md)
- [ModifierGroupsInnerNameTranslation](docs/ModifierGroupsInnerNameTranslation.md)
- [ModifierGroup](docs/ModifierGroup.md)
- [NewOrderTimeRequest](docs/NewOrderTimeRequest.md)
- [NewReadyTimeFail](docs/NewReadyTimeFail.md)
- [NotifyMembershipWebviewRequest](docs/NotifyMembershipWebviewRequest.md)
- [OldMenuSectionCategoryItemsInner](docs/OldMenuSectionCategoryItemsInner.md)
- [OldMenuSectionCategoryItemsInnerDescriptionTranslation](docs/OldMenuSectionCategoryItemsInnerDescriptionTranslation.md)
- [OldMenuSectionCategoryItemsInnerNameTranslation](docs/OldMenuSectionCategoryItemsInnerNameTranslation.md)
- [OpenPeriod](docs/OpenPeriod.md)
- [OrderCampaignsInner](docs/OrderCampaignsInner.md)
- [Order](docs/Order.md)
- [OrderCampaign](docs/OrderCampaign.md)
- [OrderDeliveryRequest](docs/OrderDeliveryRequest.md)
- [OrderItemsInner](docs/OrderItemsInner.md)
- [OrderModifiersInner](docs/OrderModifiersInner.md)
- [OrderFeatureFlags](docs/OrderFeatureFlags.md)
- [OrderFreeItem](docs/OrderFreeItem.md)
- [OrderItem](docs/OrderItem.md)
- [OrderItemModifier](docs/OrderItemModifier.md)
- [OrderPrice](docs/OrderPrice.md)
- [OrderPromo](docs/OrderPromo.md)
- [OrderReadyEstimation](docs/OrderReadyEstimation.md)
- [OrderStateRequest](docs/OrderStateRequest.md)
- [Orders](docs/Orders.md)
- [OutOfStockInstruction](docs/OutOfStockInstruction.md)
- [PartnerOauthRequest](docs/PartnerOauthRequest.md)
- [PartnerOauthResponse](docs/PartnerOauthResponse.md)
- [PauseStoreRequest](docs/PauseStoreRequest.md)
- [PromosInner](docs/PromosInner.md)
- [Purchasability](docs/Purchasability.md)
- [Quotas](docs/Quotas.md)
- [Receiver](docs/Receiver.md)
- [RedeemDineInVoucherRequest](docs/RedeemDineInVoucherRequest.md)
- [RedeemDineInVoucherResponse](docs/RedeemDineInVoucherResponse.md)
- [RedeemDineinVoucher500Response](docs/RedeemDineinVoucher500Response.md)
- [RedeemResult](docs/RedeemResult.md)
- [RegisterMembershipNativeRequest](docs/RegisterMembershipNativeRequest.md)
- [RegisterMembershipNativeResponse](docs/RegisterMembershipNativeResponse.md)
- [Scope](docs/Scope.md)
- [SectionsInner](docs/SectionsInner.md)
- [SectionsInnerCategoriesInner](docs/SectionsInnerCategoriesInner.md)
- [SellingTimesInner](docs/SellingTimesInner.md)
- [RewardItem](docs/RewardItem.md)
- [SellingTime](docs/SellingTime.md)
- [ServiceHour](docs/ServiceHour.md)
- [ServiceHours](docs/ServiceHours.md)
- [SpecialOpeningHour](docs/SpecialOpeningHour.md)
- [SpecialOpeningHourMetadata](docs/SpecialOpeningHourMetadata.md)
- [SpecialOpeningHourOpeningHours](docs/SpecialOpeningHourOpeningHours.md)
- [StoreHour](docs/StoreHour.md)
- [StoreHourResponse](docs/StoreHourResponse.md)
- [StoreHourStatusError](docs/StoreHourStatusError.md)
- [StoreStatusResponse](docs/StoreStatusResponse.md)
- [SubmitOrderRequest](docs/SubmitOrderRequest.md)
- [SyncFail](docs/SyncFail.md)
- [SyncFailCategoriesInner](docs/SyncFailCategoriesInner.md)
- [SyncFailCategoryItemsInner](docs/SyncFailCategoryItemsInner.md)
- [SyncFailCategoryItemsInnerModifierGroupsInner](docs/SyncFailCategoryItemsInnerModifierGroupsInner.md)
- [SyncFailCategoryItemsInnerModifierGroupsInnerModifiersInner](docs/SyncFailCategoryItemsInnerModifierGroupsInnerModifiersInner.md)
- [SyncFailServiceHours](docs/SyncFailServiceHours.md)
- [UnbindMembershipNativeRequest](docs/UnbindMembershipNativeRequest.md)
- [UnlinkMembershipWebviewRequest](docs/UnlinkMembershipWebviewRequest.md)
- [UpdateAdvancedPricing](docs/UpdateAdvancedPricing.md)
- [UpdateCampaignRequest](docs/UpdateCampaignRequest.md)
- [UpdateDeliveryHourRequest](docs/UpdateDeliveryHourRequest.md)
- [UpdateDeliveryHourResponse](docs/UpdateDeliveryHourResponse.md)
- [UpdateDineInHourRequest](docs/UpdateDineInHourRequest.md)
- [UpdateDineInHourResponse](docs/UpdateDineInHourResponse.md)
- [UpdateMenuItem](docs/UpdateMenuItem.md)
- [UpdateMenuItemAdvancedPricingsInner](docs/UpdateMenuItemAdvancedPricingsInner.md)
- [UpdateMenuItemPurchasabilitiesInner](docs/UpdateMenuItemPurchasabilitiesInner.md)
- [UpdateMenuModifier](docs/UpdateMenuModifier.md)
- [UpdateMenuNotiRequest](docs/UpdateMenuNotiRequest.md)
- [UpdateMenuNotifRequest](docs/UpdateMenuNotifRequest.md)
- [UpdateMenuRequest](docs/UpdateMenuRequest.md)
- [UpdatePurchasability](docs/UpdatePurchasability.md)
- [UpdateSpecialHourRequest](docs/UpdateSpecialHourRequest.md)
- [UpdateSpecialHourResponse](docs/UpdateSpecialHourResponse.md)
- [Voucher](docs/Voucher.md)
- [VoucherDescriptionInfo](docs/VoucherDescriptionInfo.md)
- [WorkingHour](docs/WorkingHour.md)
- [WorkingHourFri](docs/WorkingHourFri.md)
- [WorkingHourMon](docs/WorkingHourMon.md)
- [WorkingHourSat](docs/WorkingHourSat.md)
- [WorkingHourSun](docs/WorkingHourSun.md)
- [WorkingHourThu](docs/WorkingHourThu.md)
- [WorkingHourTue](docs/WorkingHourTue.md)
- [WorkingHourWed](docs/WorkingHourWed.md)
- [WorkingHourDay](docs/WorkingHourDay.md)


## Recommendation
Expand Down
Loading

0 comments on commit 5ed9ab4

Please sign in to comment.