-
Notifications
You must be signed in to change notification settings - Fork 948
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Codes are generated by openapi generator (#1283)
We're excited to announce that the Membership API is now available in the Messaging API. With this update, our SDK also supports the use of this API. For more details, check out the announcement: https://developers.line.biz/en/news/2024/03/28/re-release-endpoints-for-membership Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
7919852
commit 9d6c276
Showing
9 changed files
with
532 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...ent/src/main/java/com/linecorp/bot/messaging/model/GetMembershipSubscriptionResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/* | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/** | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech Do not edit the class manually. | ||
*/ | ||
package com.linecorp.bot.messaging.model; | ||
|
||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
/** | ||
* A user's membership subscription status | ||
* | ||
* @see <a | ||
* href="https://developers.line.biz/en/reference/messaging-api/#get-a-users-membership-subscription-status"> | ||
* Documentation</a> | ||
*/ | ||
@JsonInclude(Include.NON_NULL) | ||
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") | ||
public record GetMembershipSubscriptionResponse( | ||
/** List of subscription information */ | ||
@JsonProperty("subscriptions") List<Subscription> subscriptions) { | ||
|
||
public static class Builder { | ||
private List<Subscription> subscriptions; | ||
|
||
public Builder(List<Subscription> subscriptions) { | ||
|
||
this.subscriptions = subscriptions; | ||
} | ||
|
||
public GetMembershipSubscriptionResponse build() { | ||
return new GetMembershipSubscriptionResponse(subscriptions); | ||
} | ||
} | ||
} |
128 changes: 128 additions & 0 deletions
128
...e-bot-messaging-api-client/src/main/java/com/linecorp/bot/messaging/model/Membership.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
/* | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/** | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech Do not edit the class manually. | ||
*/ | ||
package com.linecorp.bot.messaging.model; | ||
|
||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
/** Membership */ | ||
@JsonInclude(Include.NON_NULL) | ||
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") | ||
public record Membership( | ||
/** Membership plan ID. */ | ||
@JsonProperty("membershipId") Integer membershipId, | ||
/** Membership plan name. */ | ||
@JsonProperty("title") String title, | ||
/** Membership plan description. */ | ||
@JsonProperty("description") String description, | ||
/** List of membership plan perks. */ | ||
@JsonProperty("benefits") List<String> benefits, | ||
/** Monthly fee for membership plan. (e.g. 1500.00) */ | ||
@JsonProperty("price") Double price, | ||
/** The currency of membership.price. */ | ||
@JsonProperty("currency") Currency currency, | ||
/** Number of members subscribed to the membership plan. */ | ||
@JsonProperty("memberCount") Integer memberCount, | ||
/** The upper limit of members who can subscribe. If no upper limit is set, it will be null. */ | ||
@JsonProperty("memberLimit") Integer memberLimit, | ||
/** Payment method for users who subscribe to a membership plan. */ | ||
@JsonProperty("isInAppPurchase") Boolean isInAppPurchase, | ||
/** Membership plan status. */ | ||
@JsonProperty("isPublished") Boolean isPublished) { | ||
|
||
/** The currency of membership.price. */ | ||
public enum Currency { | ||
@JsonProperty("JPY") | ||
JPY, | ||
@JsonProperty("TWD") | ||
TWD, | ||
@JsonProperty("THB") | ||
THB, | ||
|
||
@JsonEnumDefaultValue | ||
UNDEFINED; | ||
} | ||
|
||
public static class Builder { | ||
private Integer membershipId; | ||
private String title; | ||
private String description; | ||
private List<String> benefits; | ||
private Double price; | ||
private Currency currency; | ||
private Integer memberCount; | ||
private Integer memberLimit; | ||
private Boolean isInAppPurchase; | ||
private Boolean isPublished; | ||
|
||
public Builder( | ||
Integer membershipId, | ||
String title, | ||
String description, | ||
List<String> benefits, | ||
Double price, | ||
Currency currency, | ||
Integer memberCount, | ||
Integer memberLimit, | ||
Boolean isInAppPurchase, | ||
Boolean isPublished) { | ||
|
||
this.membershipId = membershipId; | ||
|
||
this.title = title; | ||
|
||
this.description = description; | ||
|
||
this.benefits = benefits; | ||
|
||
this.price = price; | ||
|
||
this.currency = currency; | ||
|
||
this.memberCount = memberCount; | ||
|
||
this.memberLimit = memberLimit; | ||
|
||
this.isInAppPurchase = isInAppPurchase; | ||
|
||
this.isPublished = isPublished; | ||
} | ||
|
||
public Membership build() { | ||
return new Membership( | ||
membershipId, | ||
title, | ||
description, | ||
benefits, | ||
price, | ||
currency, | ||
memberCount, | ||
memberLimit, | ||
isInAppPurchase, | ||
isPublished); | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...ing-api-client/src/main/java/com/linecorp/bot/messaging/model/MembershipListResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright 2023 LINE Corporation | ||
* | ||
* LINE Corporation licenses this file to you under the Apache License, | ||
* version 2.0 (the "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/** | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech Do not edit the class manually. | ||
*/ | ||
package com.linecorp.bot.messaging.model; | ||
|
||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
/** List of memberships */ | ||
@JsonInclude(Include.NON_NULL) | ||
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator") | ||
public record MembershipListResponse( | ||
/** List of membership information */ | ||
@JsonProperty("memberships") List<Membership> memberships) { | ||
|
||
public static class Builder { | ||
private List<Membership> memberships; | ||
|
||
public Builder(List<Membership> memberships) { | ||
|
||
this.memberships = memberships; | ||
} | ||
|
||
public MembershipListResponse build() { | ||
return new MembershipListResponse(memberships); | ||
} | ||
} | ||
} |
Oops, something went wrong.