Skip to content

Commit a17d57d

Browse files
github-actions[bot]github-actions
andauthored
Add Coupon API Support to Messaging API (#1684)
line/line-openapi#111 # Add Coupon API Support to Messaging API We've supported a set of new APIs that make it possible to create, manage, and deliver coupons via the Messaging API. These features provide functionality similar to what's available through the LINE Official Account Manager interface ([see here](https://www.lycbiz.com/jp/manual/OfficialAccountManager/coupons-create/)), allowing developers to integrate coupon-related workflows into their bots more flexibly. For more details, see the official announcement: [LINE Developers News — Coupon API Released (2025/08/06)](https://developers.line.biz/en/news/2025/08/06/coupon-api/) ## New API Endpoints - `POST /v2/bot/coupon` Create a new coupon. The request includes metadata such as the coupon title, description, image URLs, validity period, reward details(e.g. 1000yen discount), acquisition requirements, time zone, etc. - `GET /v2/bot/coupon` Retrieve a list of coupons associated with the bot. - `GET /v2/bot/coupon/{couponId}` Fetch detailed information about a specific coupon. - `PUT /v2/bot/coupon/{couponId}` Mark a coupon as expired. ## Messaging API Update Message Object now supports a new type: `type=coupon` This allows developers to send coupons directly to users via the Messaging API, similar to sending text, image, or template messages. ## Example Requests ### Create a Coupon ``` POST /v2/bot/coupon Content-Type: application/json ``` #### Request body ```json { "title": "1000 yen off coupon", "acquisitionCondition": { "type": "normal" }, "visibility": "PUBLIC", "startTimestamp": 1672537600, "endTimestamp": 1672624000, "maxUseCountPerTicket": 1, "reward": { "type": "discount", "priceInfo": { "priceInfoType": "fixed", "fixedAmount": 1000 } }, "imageUrl": "https://example.com/coupon_image.png", "barcodeImageUrl": "https://example.com/coupon_barcode.png", "timezone": "ASIA_TOKYO" } ``` #### Response ```json { "couponId": "abc1234" } ``` ### Send a Coupon Message ```json { "to": "<userId>", "messages": [ { "type": "coupon", "couponId": "abc1234" } ] } ``` Co-authored-by: github-actions <[email protected]>
1 parent 062667b commit a17d57d

File tree

52 files changed

+2969
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2969
-1
lines changed

clients/line-bot-messaging-api-client/.openapi-generator/FILES

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
src/main/java/com/linecorp/bot/messaging/client/MessagingApiBlobClient.java
22
src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java
3+
src/main/java/com/linecorp/bot/messaging/model/AcquisitionConditionRequest.java
4+
src/main/java/com/linecorp/bot/messaging/model/AcquisitionConditionResponse.java
35
src/main/java/com/linecorp/bot/messaging/model/Action.java
46
src/main/java/com/linecorp/bot/messaging/model/AgeDemographic.java
57
src/main/java/com/linecorp/bot/messaging/model/AgeDemographicFilter.java
@@ -18,13 +20,44 @@ src/main/java/com/linecorp/bot/messaging/model/CameraAction.java
1820
src/main/java/com/linecorp/bot/messaging/model/CameraRollAction.java
1921
src/main/java/com/linecorp/bot/messaging/model/CarouselColumn.java
2022
src/main/java/com/linecorp/bot/messaging/model/CarouselTemplate.java
23+
src/main/java/com/linecorp/bot/messaging/model/CashBackFixedPriceInfoRequest.java
24+
src/main/java/com/linecorp/bot/messaging/model/CashBackFixedPriceInfoResponse.java
25+
src/main/java/com/linecorp/bot/messaging/model/CashBackPercentagePriceInfoRequest.java
26+
src/main/java/com/linecorp/bot/messaging/model/CashBackPercentagePriceInfoResponse.java
27+
src/main/java/com/linecorp/bot/messaging/model/CashBackPriceInfoRequest.java
28+
src/main/java/com/linecorp/bot/messaging/model/CashBackPriceInfoResponse.java
2129
src/main/java/com/linecorp/bot/messaging/model/ChatReference.java
2230
src/main/java/com/linecorp/bot/messaging/model/ClipboardAction.java
2331
src/main/java/com/linecorp/bot/messaging/model/ClipboardImagemapAction.java
2432
src/main/java/com/linecorp/bot/messaging/model/ConfirmTemplate.java
33+
src/main/java/com/linecorp/bot/messaging/model/CouponCashBackRewardRequest.java
34+
src/main/java/com/linecorp/bot/messaging/model/CouponCashBackRewardResponse.java
35+
src/main/java/com/linecorp/bot/messaging/model/CouponCreateRequest.java
36+
src/main/java/com/linecorp/bot/messaging/model/CouponCreateResponse.java
37+
src/main/java/com/linecorp/bot/messaging/model/CouponDiscountRewardRequest.java
38+
src/main/java/com/linecorp/bot/messaging/model/CouponDiscountRewardResponse.java
39+
src/main/java/com/linecorp/bot/messaging/model/CouponFreeRewardRequest.java
40+
src/main/java/com/linecorp/bot/messaging/model/CouponFreeRewardResponse.java
41+
src/main/java/com/linecorp/bot/messaging/model/CouponGiftRewardRequest.java
42+
src/main/java/com/linecorp/bot/messaging/model/CouponGiftRewardResponse.java
43+
src/main/java/com/linecorp/bot/messaging/model/CouponListResponse.java
44+
src/main/java/com/linecorp/bot/messaging/model/CouponMessage.java
45+
src/main/java/com/linecorp/bot/messaging/model/CouponOthersRewardRequest.java
46+
src/main/java/com/linecorp/bot/messaging/model/CouponOthersRewardResponse.java
47+
src/main/java/com/linecorp/bot/messaging/model/CouponResponse.java
48+
src/main/java/com/linecorp/bot/messaging/model/CouponRewardRequest.java
49+
src/main/java/com/linecorp/bot/messaging/model/CouponRewardResponse.java
2550
src/main/java/com/linecorp/bot/messaging/model/CreateRichMenuAliasRequest.java
2651
src/main/java/com/linecorp/bot/messaging/model/DatetimePickerAction.java
2752
src/main/java/com/linecorp/bot/messaging/model/DemographicFilter.java
53+
src/main/java/com/linecorp/bot/messaging/model/DiscountExplicitPriceInfoRequest.java
54+
src/main/java/com/linecorp/bot/messaging/model/DiscountExplicitPriceInfoResponse.java
55+
src/main/java/com/linecorp/bot/messaging/model/DiscountFixedPriceInfoRequest.java
56+
src/main/java/com/linecorp/bot/messaging/model/DiscountFixedPriceInfoResponse.java
57+
src/main/java/com/linecorp/bot/messaging/model/DiscountPercentagePriceInfoRequest.java
58+
src/main/java/com/linecorp/bot/messaging/model/DiscountPercentagePriceInfoResponse.java
59+
src/main/java/com/linecorp/bot/messaging/model/DiscountPriceInfoRequest.java
60+
src/main/java/com/linecorp/bot/messaging/model/DiscountPriceInfoResponse.java
2861
src/main/java/com/linecorp/bot/messaging/model/Emoji.java
2962
src/main/java/com/linecorp/bot/messaging/model/EmojiSubstitutionObject.java
3063
src/main/java/com/linecorp/bot/messaging/model/ErrorDetail.java
@@ -83,6 +116,8 @@ src/main/java/com/linecorp/bot/messaging/model/IssueLinkTokenResponse.java
83116
src/main/java/com/linecorp/bot/messaging/model/Limit.java
84117
src/main/java/com/linecorp/bot/messaging/model/LocationAction.java
85118
src/main/java/com/linecorp/bot/messaging/model/LocationMessage.java
119+
src/main/java/com/linecorp/bot/messaging/model/LotteryAcquisitionConditionRequest.java
120+
src/main/java/com/linecorp/bot/messaging/model/LotteryAcquisitionConditionResponse.java
86121
src/main/java/com/linecorp/bot/messaging/model/MarkMessagesAsReadRequest.java
87122
src/main/java/com/linecorp/bot/messaging/model/MembersIdsResponse.java
88123
src/main/java/com/linecorp/bot/messaging/model/Membership.java
@@ -93,9 +128,12 @@ src/main/java/com/linecorp/bot/messaging/model/Message.java
93128
src/main/java/com/linecorp/bot/messaging/model/MessageAction.java
94129
src/main/java/com/linecorp/bot/messaging/model/MessageImagemapAction.java
95130
src/main/java/com/linecorp/bot/messaging/model/MessageQuotaResponse.java
131+
src/main/java/com/linecorp/bot/messaging/model/MessagingApiPagerCouponListResponse.java
96132
src/main/java/com/linecorp/bot/messaging/model/MulticastRequest.java
97133
src/main/java/com/linecorp/bot/messaging/model/NarrowcastProgressResponse.java
98134
src/main/java/com/linecorp/bot/messaging/model/NarrowcastRequest.java
135+
src/main/java/com/linecorp/bot/messaging/model/NormalAcquisitionConditionRequest.java
136+
src/main/java/com/linecorp/bot/messaging/model/NormalAcquisitionConditionResponse.java
99137
src/main/java/com/linecorp/bot/messaging/model/NumberOfMessagesResponse.java
100138
src/main/java/com/linecorp/bot/messaging/model/OperatorDemographicFilter.java
101139
src/main/java/com/linecorp/bot/messaging/model/OperatorRecipient.java
@@ -109,6 +147,7 @@ src/main/java/com/linecorp/bot/messaging/model/QuotaConsumptionResponse.java
109147
src/main/java/com/linecorp/bot/messaging/model/QuotaType.java
110148
src/main/java/com/linecorp/bot/messaging/model/Recipient.java
111149
src/main/java/com/linecorp/bot/messaging/model/RedeliveryRecipient.java
150+
src/main/java/com/linecorp/bot/messaging/model/ReferralAcquisitionConditionResponse.java
112151
src/main/java/com/linecorp/bot/messaging/model/ReplyMessageRequest.java
113152
src/main/java/com/linecorp/bot/messaging/model/ReplyMessageResponse.java
114153
src/main/java/com/linecorp/bot/messaging/model/RichMenuAliasListResponse.java
@@ -153,6 +192,14 @@ src/main/java/com/linecorp/bot/messaging/model/TextMessage.java
153192
src/main/java/com/linecorp/bot/messaging/model/TextMessageV2.java
154193
src/main/java/com/linecorp/bot/messaging/model/URIAction.java
155194
src/main/java/com/linecorp/bot/messaging/model/URIImagemapAction.java
195+
src/main/java/com/linecorp/bot/messaging/model/UnknownAcquisitionConditionRequest.java
196+
src/main/java/com/linecorp/bot/messaging/model/UnknownAcquisitionConditionResponse.java
197+
src/main/java/com/linecorp/bot/messaging/model/UnknownCashBackPriceInfoRequest.java
198+
src/main/java/com/linecorp/bot/messaging/model/UnknownCashBackPriceInfoResponse.java
199+
src/main/java/com/linecorp/bot/messaging/model/UnknownCouponRewardRequest.java
200+
src/main/java/com/linecorp/bot/messaging/model/UnknownCouponRewardResponse.java
201+
src/main/java/com/linecorp/bot/messaging/model/UnknownDiscountPriceInfoRequest.java
202+
src/main/java/com/linecorp/bot/messaging/model/UnknownDiscountPriceInfoResponse.java
156203
src/main/java/com/linecorp/bot/messaging/model/UnknownMentionTarget.java
157204
src/main/java/com/linecorp/bot/messaging/model/UnknownSubstitutionObject.java
158205
src/main/java/com/linecorp/bot/messaging/model/UpdateRichMenuAliasRequest.java

clients/line-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/client/MessagingApiClient.java

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
import com.linecorp.bot.client.base.channel.ChannelTokenSupplier;
2626
import com.linecorp.bot.messaging.model.BotInfoResponse;
2727
import com.linecorp.bot.messaging.model.BroadcastRequest;
28+
import com.linecorp.bot.messaging.model.CouponCreateRequest;
29+
import com.linecorp.bot.messaging.model.CouponCreateResponse;
30+
import com.linecorp.bot.messaging.model.CouponResponse;
2831
import com.linecorp.bot.messaging.model.CreateRichMenuAliasRequest;
2932
import com.linecorp.bot.messaging.model.GetAggregationUnitNameListResponse;
3033
import com.linecorp.bot.messaging.model.GetAggregationUnitUsageResponse;
@@ -40,6 +43,7 @@
4043
import com.linecorp.bot.messaging.model.MembersIdsResponse;
4144
import com.linecorp.bot.messaging.model.MembershipListResponse;
4245
import com.linecorp.bot.messaging.model.MessageQuotaResponse;
46+
import com.linecorp.bot.messaging.model.MessagingApiPagerCouponListResponse;
4347
import com.linecorp.bot.messaging.model.MulticastRequest;
4448
import com.linecorp.bot.messaging.model.NarrowcastProgressResponse;
4549
import com.linecorp.bot.messaging.model.NarrowcastRequest;
@@ -70,6 +74,7 @@
7074
import com.linecorp.bot.messaging.model.UserProfileResponse;
7175
import com.linecorp.bot.messaging.model.ValidateMessageRequest;
7276
import java.net.URI;
77+
import java.util.Set;
7378
import java.util.UUID;
7479
import java.util.concurrent.CompletableFuture;
7580
import retrofit2.http.*;
@@ -101,6 +106,27 @@ CompletableFuture<Result<Object>> broadcast(
101106
@DELETE("/v2/bot/user/all/richmenu")
102107
CompletableFuture<Result<Void>> cancelDefaultRichMenu();
103108

109+
/**
110+
* Close coupon
111+
*
112+
* @param couponId (required)
113+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#discontinue-coupon">
114+
* Documentation</a>
115+
*/
116+
@PUT("/v2/bot/coupon/{couponId}/close")
117+
CompletableFuture<Result<Void>> closeCoupon(@Path("couponId") String couponId);
118+
119+
/**
120+
* Create a new coupon. Define coupon details such as type, title, and validity period.
121+
*
122+
* @param couponCreateRequest (optional)
123+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#create-coupon">
124+
* Documentation</a>
125+
*/
126+
@POST("/v2/bot/coupon")
127+
CompletableFuture<Result<CouponCreateResponse>> createCoupon(
128+
@Body CouponCreateRequest couponCreateRequest);
129+
104130
/**
105131
* Create rich menu
106132
*
@@ -178,6 +204,16 @@ CompletableFuture<Result<GetAggregationUnitNameListResponse>> getAggregationUnit
178204
@GET("/v2/bot/info")
179205
CompletableFuture<Result<BotInfoResponse>> getBotInfo();
180206

207+
/**
208+
* Get coupon detail
209+
*
210+
* @param couponId (required)
211+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-coupon">
212+
* Documentation</a>
213+
*/
214+
@GET("/v2/bot/coupon/{couponId}")
215+
CompletableFuture<Result<CouponResponse>> getCouponDetail(@Path("couponId") String couponId);
216+
181217
/**
182218
* Gets the ID of the default rich menu set with the Messaging API.
183219
*
@@ -567,6 +603,21 @@ CompletableFuture<Result<Void>> linkRichMenuIdToUser(
567603
CompletableFuture<Result<Void>> linkRichMenuIdToUsers(
568604
@Body RichMenuBulkLinkRequest richMenuBulkLinkRequest);
569605

606+
/**
607+
* Get a paginated list of coupons.
608+
*
609+
* @param status Filter coupons by their status. (optional)
610+
* @param start Pagination token to retrieve the next page of results. (optional)
611+
* @param limit Maximum number of coupons to return per request. (optional, default to 20)
612+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-coupons-list">
613+
* Documentation</a>
614+
*/
615+
@GET("/v2/bot/coupon")
616+
CompletableFuture<Result<MessagingApiPagerCouponListResponse>> listCoupon(
617+
@Query("status") Set<String> status,
618+
@Query("start") String start,
619+
@Query("limit") Integer limit);
620+
570621
/**
571622
* Mark messages from users as read
572623
*
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonSubTypes;
26+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
27+
28+
/** AcquisitionConditionRequest */
29+
@JsonSubTypes({
30+
@JsonSubTypes.Type(value = LotteryAcquisitionConditionRequest.class, name = "lottery"),
31+
@JsonSubTypes.Type(value = NormalAcquisitionConditionRequest.class, name = "normal"),
32+
})
33+
@JsonTypeInfo(
34+
use = JsonTypeInfo.Id.NAME,
35+
include = JsonTypeInfo.As.PROPERTY,
36+
property = "type",
37+
defaultImpl = UnknownAcquisitionConditionRequest.class,
38+
visible = true)
39+
public interface AcquisitionConditionRequest {}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonSubTypes;
26+
import com.fasterxml.jackson.annotation.JsonTypeInfo;
27+
28+
/** AcquisitionConditionResponse */
29+
@JsonSubTypes({
30+
@JsonSubTypes.Type(value = LotteryAcquisitionConditionResponse.class, name = "lottery"),
31+
@JsonSubTypes.Type(value = NormalAcquisitionConditionResponse.class, name = "normal"),
32+
@JsonSubTypes.Type(value = ReferralAcquisitionConditionResponse.class, name = "referral"),
33+
})
34+
@JsonTypeInfo(
35+
use = JsonTypeInfo.Id.NAME,
36+
include = JsonTypeInfo.As.PROPERTY,
37+
property = "type",
38+
defaultImpl = UnknownAcquisitionConditionResponse.class,
39+
visible = true)
40+
public interface AcquisitionConditionResponse {}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
27+
import com.fasterxml.jackson.annotation.JsonProperty;
28+
import com.fasterxml.jackson.annotation.JsonTypeName;
29+
30+
/** CashBackFixedPriceInfoRequest */
31+
@JsonTypeName("fixed")
32+
@JsonInclude(Include.NON_NULL)
33+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
34+
public record CashBackFixedPriceInfoRequest(
35+
/** Get fixedAmount */
36+
@JsonProperty("fixedAmount") Long fixedAmount) implements CashBackPriceInfoRequest {
37+
38+
public static class Builder {
39+
private Long fixedAmount;
40+
41+
public Builder() {}
42+
43+
public Builder fixedAmount(Long fixedAmount) {
44+
this.fixedAmount = fixedAmount;
45+
return this;
46+
}
47+
48+
public CashBackFixedPriceInfoRequest build() {
49+
return new CashBackFixedPriceInfoRequest(fixedAmount);
50+
}
51+
}
52+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
/*
2+
* Copyright 2023 LINE Corporation
3+
*
4+
* LINE Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
17+
/**
18+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19+
* https://openapi-generator.tech Do not edit the class manually.
20+
*/
21+
package com.linecorp.bot.messaging.model;
22+
23+
24+
25+
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
26+
import com.fasterxml.jackson.annotation.JsonInclude;
27+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
28+
import com.fasterxml.jackson.annotation.JsonProperty;
29+
import com.fasterxml.jackson.annotation.JsonTypeName;
30+
31+
/** CashBackFixedPriceInfoResponse */
32+
@JsonTypeName("fixed")
33+
@JsonInclude(Include.NON_NULL)
34+
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
35+
public record CashBackFixedPriceInfoResponse(
36+
/** Currency code (e.g., JPY, THB, TWD). */
37+
@JsonProperty("currency") Currency currency,
38+
/** Get fixedAmount */
39+
@JsonProperty("fixedAmount") Long fixedAmount)
40+
implements CashBackPriceInfoResponse {
41+
/** Currency code (e.g., JPY, THB, TWD). */
42+
public enum Currency {
43+
@JsonProperty("JPY")
44+
JPY,
45+
@JsonProperty("THB")
46+
THB,
47+
@JsonProperty("TWD")
48+
TWD,
49+
50+
@JsonEnumDefaultValue
51+
UNDEFINED;
52+
}
53+
54+
public static class Builder {
55+
private Currency currency;
56+
private Long fixedAmount;
57+
58+
public Builder() {}
59+
60+
public Builder currency(Currency currency) {
61+
this.currency = currency;
62+
return this;
63+
}
64+
65+
public Builder fixedAmount(Long fixedAmount) {
66+
this.fixedAmount = fixedAmount;
67+
return this;
68+
}
69+
70+
public CashBackFixedPriceInfoResponse build() {
71+
return new CashBackFixedPriceInfoResponse(currency, fixedAmount);
72+
}
73+
}
74+
}

0 commit comments

Comments
 (0)