Skip to content

Commit 9fd644d

Browse files
committed
Auto-generate wrapper from updated spec
1 parent 9a5e685 commit 9fd644d

File tree

121 files changed

+1840
-108
lines changed

Some content is hidden

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

121 files changed

+1840
-108
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
BuiltByBit API
44
- API version: v2
5-
- Build date: 2026-04-10T04:38:43.920283Z[Etc/UTC]
5+
- Build date: 2026-04-10T10:23:07.418227Z[Etc/UTC]
66

77
All operations not tagged 'free' require an active [Ultimate](https://builtbybit.com/account/ultimate) subscription or invite-only permissions.
88

@@ -146,6 +146,7 @@ Class | Method | HTTP request | Description
146146
*ResourcesCreatorApi* | [**getV2ResourcesCreatorStores**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores
147147
*ResourcesCreatorApi* | [**getV2ResourcesCreatorUpdates**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorUpdates) | **GET** /v2/resources/creator/updates | Fetch a list of your resource's updates
148148
*ResourcesCreatorApi* | [**getV2ResourcesCreatorVersions**](docs/ResourcesCreatorApi.md#getV2ResourcesCreatorVersions) | **GET** /v2/resources/creator/versions | Fetch a list of your resources' versions
149+
*ResourcesCreatorApi* | [**postV2ResourcesCreatorCoupons**](docs/ResourcesCreatorApi.md#postV2ResourcesCreatorCoupons) | **POST** /v2/resources/creator/coupons | Create a new coupon
149150
*ResourcesCreatorApi* | [**postV2ResourcesCreatorUpdate**](docs/ResourcesCreatorApi.md#postV2ResourcesCreatorUpdate) | **POST** /v2/resources/creator/update | Post a resource update
150151
*ResourcesDiscoveryApi* | [**getResourcesDiscoverCategories**](docs/ResourcesDiscoveryApi.md#getResourcesDiscoverCategories) | **GET** /v2/resources/discover/categories | Fetch a list of categories
151152
*ResourcesDiscoveryApi* | [**getResourcesDiscoverResources**](docs/ResourcesDiscoveryApi.md#getResourcesDiscoverResources) | **GET** /v2/resources/discover/resources | Fetch a list of resources
@@ -233,6 +234,9 @@ Class | Method | HTTP request | Description
233234
- [PostV2ResourcesCreatorBatch200ResponseData](docs/PostV2ResourcesCreatorBatch200ResponseData.md)
234235
- [PostV2ResourcesCreatorBatchRequest](docs/PostV2ResourcesCreatorBatchRequest.md)
235236
- [PostV2ResourcesCreatorBatchRequestChangesInner](docs/PostV2ResourcesCreatorBatchRequestChangesInner.md)
237+
- [PostV2ResourcesCreatorCoupons200Response](docs/PostV2ResourcesCreatorCoupons200Response.md)
238+
- [PostV2ResourcesCreatorCoupons200ResponseData](docs/PostV2ResourcesCreatorCoupons200ResponseData.md)
239+
- [PostV2ResourcesCreatorCouponsRequest](docs/PostV2ResourcesCreatorCouponsRequest.md)
236240
- [PostV2ResourcesCreatorUpdate200Response](docs/PostV2ResourcesCreatorUpdate200Response.md)
237241
- [PostV2ResourcesCreatorUpdate200ResponseData](docs/PostV2ResourcesCreatorUpdate200ResponseData.md)
238242
- [PostV2ResourcesCreatorUpdateRequest](docs/PostV2ResourcesCreatorUpdateRequest.md)

api/openapi.yaml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,31 @@ paths:
947947
x-stoplight:
948948
id: w4lgpl86j65rj
949949
x-accepts: application/json
950+
post:
951+
description: This endpoint is currently limited to percent-based coupons with
952+
a maximum discount of 50%.
953+
operationId: post-v2-resources-creator-coupons
954+
requestBody:
955+
content:
956+
application/json:
957+
schema:
958+
$ref: '#/components/schemas/post_v2_resources_creator_coupons_request'
959+
responses:
960+
"200":
961+
content:
962+
application/json:
963+
schema:
964+
$ref: '#/components/schemas/post_v2_resources_creator_coupons_200_response'
965+
description: OK
966+
security:
967+
- token: []
968+
summary: Create a new coupon
969+
tags:
970+
- resources/creator
971+
x-stoplight:
972+
id: ingjrcbpj58sm
973+
x-content-type: application/json
974+
x-accepts: application/json
950975
/v2/health:
951976
get:
952977
operationId: get-v2-health
@@ -8712,6 +8737,144 @@ components:
87128737
data:
87138738
$ref: '#/components/schemas/get_v2_resources_creator_coupons_200_response_data'
87148739
type: object
8740+
post_v2_resources_creator_coupons_request:
8741+
properties:
8742+
type:
8743+
description: Must be 'perecent'.
8744+
example: percent
8745+
type: string
8746+
x-stoplight:
8747+
id: ebpcmy615ngg8
8748+
discount:
8749+
maximum: 50
8750+
minimum: 1
8751+
type: number
8752+
x-stoplight:
8753+
id: xv4k5gf53jfgg
8754+
label:
8755+
description: "The trailing part of the coupon code (without '{user_id}-')."
8756+
example: launch
8757+
maxLength: 15
8758+
minLength: 1
8759+
type: string
8760+
x-stoplight:
8761+
id: s6epsr6fjke92
8762+
do_expiry:
8763+
description: Whether or not to respect the 'expiry_date' field. No expiry
8764+
date is set otherwise.
8765+
type: boolean
8766+
x-stoplight:
8767+
id: pdoc0dnnykh90
8768+
expiry_date:
8769+
type: string
8770+
x-stoplight:
8771+
id: er9x4jaa1t3n9
8772+
limited_uses:
8773+
description: Whether or not to respect the 'max_uses' field. No max use
8774+
limit is set otherwise.
8775+
type: boolean
8776+
x-stoplight:
8777+
id: z6qig1djgvedr
8778+
max_uses:
8779+
type: integer
8780+
x-stoplight:
8781+
id: cn2lm5enh0zp3
8782+
limited_user_uses:
8783+
description: Whether or not to respect the 'max_per_user_uses' field. No
8784+
max uses per user limit is set otherwise.
8785+
type: boolean
8786+
x-stoplight:
8787+
id: vj0j5fib451fo
8788+
max_per_user_uses:
8789+
type: integer
8790+
x-stoplight:
8791+
id: 0spylcl8tvicf
8792+
all_content_types:
8793+
description: "If a content type is included, all of the creator's content\
8794+
\ (of that type) can be used against this coupon.\r\nSupport values include:\
8795+
\ 'resource', 'addon', and 'bundle'"
8796+
items:
8797+
type: string
8798+
x-stoplight:
8799+
id: zit61tfbrfybo
8800+
type: array
8801+
x-stoplight:
8802+
id: pvu73d9h68j7l
8803+
resources:
8804+
description: A comma-separated list of resource IDs which this coupon can
8805+
be used against.
8806+
type: string
8807+
x-stoplight:
8808+
id: uobqm2o7m5ld6
8809+
addons:
8810+
description: A comma-separated list of addon IDs which this coupon can be
8811+
used against.
8812+
type: string
8813+
x-stoplight:
8814+
id: j44atw5c0nq6t
8815+
bundles:
8816+
description: A comma-separated list of bundle IDs which this coupon can
8817+
be used against.
8818+
type: string
8819+
x-stoplight:
8820+
id: wkajbxmye2hz6
8821+
required:
8822+
- discount
8823+
- label
8824+
- type
8825+
type: object
8826+
post_v2_resources_creator_coupons_200_response_data:
8827+
example:
8828+
coupon:
8829+
expires_at: 5
8830+
coupon_id: 0
8831+
max_uses: 2
8832+
user_id: 6
8833+
discount: 1.4658129805029452
8834+
created_at: 5
8835+
active: true
8836+
all_content_types:
8837+
- all_content_types
8838+
- all_content_types
8839+
uses: 9
8840+
label: label
8841+
max_per_user_uses: 7
8842+
percent: true
8843+
properties:
8844+
coupon:
8845+
$ref: '#/components/schemas/Coupon'
8846+
type: object
8847+
x-stoplight:
8848+
id: zh07tlli8qz6u
8849+
post_v2_resources_creator_coupons_200_response:
8850+
example:
8851+
result: success
8852+
data:
8853+
coupon:
8854+
expires_at: 5
8855+
coupon_id: 0
8856+
max_uses: 2
8857+
user_id: 6
8858+
discount: 1.4658129805029452
8859+
created_at: 5
8860+
active: true
8861+
all_content_types:
8862+
- all_content_types
8863+
- all_content_types
8864+
uses: 9
8865+
label: label
8866+
max_per_user_uses: 7
8867+
percent: true
8868+
properties:
8869+
result:
8870+
enum:
8871+
- success
8872+
type: string
8873+
x-stoplight:
8874+
id: w75i7hsxzbudp
8875+
data:
8876+
$ref: '#/components/schemas/post_v2_resources_creator_coupons_200_response_data'
8877+
type: object
87158878
get_v2_health_200_response:
87168879
example:
87178880
result: success
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
# PostV2ResourcesCreatorCoupons200Response
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**result** | [**ResultEnum**](#ResultEnum) | | [optional] |
11+
|**data** | [**PostV2ResourcesCreatorCoupons200ResponseData**](PostV2ResourcesCreatorCoupons200ResponseData.md) | | [optional] |
12+
13+
14+
15+
## Enum: ResultEnum
16+
17+
| Name | Value |
18+
|---- | -----|
19+
| SUCCESS | "success" |
20+
21+
22+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# PostV2ResourcesCreatorCoupons200ResponseData
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**coupon** | [**Coupon**](Coupon.md) | | [optional] |
11+
12+
13+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
3+
# PostV2ResourcesCreatorCouponsRequest
4+
5+
6+
## Properties
7+
8+
| Name | Type | Description | Notes |
9+
|------------ | ------------- | ------------- | -------------|
10+
|**type** | **String** | Must be 'perecent'. | |
11+
|**discount** | **BigDecimal** | | |
12+
|**label** | **String** | The trailing part of the coupon code (without '{user_id}-'). | |
13+
|**doExpiry** | **Boolean** | Whether or not to respect the 'expiry_date' field. No expiry date is set otherwise. | [optional] |
14+
|**expiryDate** | **String** | | [optional] |
15+
|**limitedUses** | **Boolean** | Whether or not to respect the 'max_uses' field. No max use limit is set otherwise. | [optional] |
16+
|**maxUses** | **Integer** | | [optional] |
17+
|**limitedUserUses** | **Boolean** | Whether or not to respect the 'max_per_user_uses' field. No max uses per user limit is set otherwise. | [optional] |
18+
|**maxPerUserUses** | **Integer** | | [optional] |
19+
|**allContentTypes** | **List<String>** | If a content type is included, all of the creator's content (of that type) can be used against this coupon. Support values include: 'resource', 'addon', and 'bundle' | [optional] |
20+
|**resources** | **String** | A comma-separated list of resource IDs which this coupon can be used against. | [optional] |
21+
|**addons** | **String** | A comma-separated list of addon IDs which this coupon can be used against. | [optional] |
22+
|**bundles** | **String** | A comma-separated list of bundle IDs which this coupon can be used against. | [optional] |
23+
24+
25+

docs/ResourcesCreatorApi.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All URIs are relative to *https://api.builtbybit.com*
1515
| [**getV2ResourcesCreatorStores**](ResourcesCreatorApi.md#getV2ResourcesCreatorStores) | **GET** /v2/resources/creator/stores | Fetch a list of your stores |
1616
| [**getV2ResourcesCreatorUpdates**](ResourcesCreatorApi.md#getV2ResourcesCreatorUpdates) | **GET** /v2/resources/creator/updates | Fetch a list of your resource's updates |
1717
| [**getV2ResourcesCreatorVersions**](ResourcesCreatorApi.md#getV2ResourcesCreatorVersions) | **GET** /v2/resources/creator/versions | Fetch a list of your resources' versions |
18+
| [**postV2ResourcesCreatorCoupons**](ResourcesCreatorApi.md#postV2ResourcesCreatorCoupons) | **POST** /v2/resources/creator/coupons | Create a new coupon |
1819
| [**postV2ResourcesCreatorUpdate**](ResourcesCreatorApi.md#postV2ResourcesCreatorUpdate) | **POST** /v2/resources/creator/update | Post a resource update |
1920

2021

@@ -736,6 +737,75 @@ public class Example {
736737
|-------------|-------------|------------------|
737738
| **200** | OK | - |
738739

740+
<a id="postV2ResourcesCreatorCoupons"></a>
741+
# **postV2ResourcesCreatorCoupons**
742+
> PostV2ResourcesCreatorCoupons200Response postV2ResourcesCreatorCoupons(postV2ResourcesCreatorCouponsRequest)
743+
744+
Create a new coupon
745+
746+
This endpoint is currently limited to percent-based coupons with a maximum discount of 50%.
747+
748+
### Example
749+
```java
750+
// Import classes:
751+
import org.openapitools.client.ApiClient;
752+
import org.openapitools.client.ApiException;
753+
import org.openapitools.client.Configuration;
754+
import org.openapitools.client.auth.*;
755+
import org.openapitools.client.models.*;
756+
import org.openapitools.client.api.ResourcesCreatorApi;
757+
758+
public class Example {
759+
public static void main(String[] args) {
760+
ApiClient defaultClient = Configuration.getDefaultApiClient();
761+
defaultClient.setBasePath("https://api.builtbybit.com");
762+
763+
// Configure API key authorization: token
764+
ApiKeyAuth token = (ApiKeyAuth) defaultClient.getAuthentication("token");
765+
token.setApiKey("YOUR API KEY");
766+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
767+
//token.setApiKeyPrefix("Token");
768+
769+
ResourcesCreatorApi apiInstance = new ResourcesCreatorApi(defaultClient);
770+
PostV2ResourcesCreatorCouponsRequest postV2ResourcesCreatorCouponsRequest = new PostV2ResourcesCreatorCouponsRequest(); // PostV2ResourcesCreatorCouponsRequest |
771+
try {
772+
PostV2ResourcesCreatorCoupons200Response result = apiInstance.postV2ResourcesCreatorCoupons(postV2ResourcesCreatorCouponsRequest);
773+
System.out.println(result);
774+
} catch (ApiException e) {
775+
System.err.println("Exception when calling ResourcesCreatorApi#postV2ResourcesCreatorCoupons");
776+
System.err.println("Status code: " + e.getCode());
777+
System.err.println("Reason: " + e.getResponseBody());
778+
System.err.println("Response headers: " + e.getResponseHeaders());
779+
e.printStackTrace();
780+
}
781+
}
782+
}
783+
```
784+
785+
### Parameters
786+
787+
| Name | Type | Description | Notes |
788+
|------------- | ------------- | ------------- | -------------|
789+
| **postV2ResourcesCreatorCouponsRequest** | [**PostV2ResourcesCreatorCouponsRequest**](PostV2ResourcesCreatorCouponsRequest.md)| | [optional] |
790+
791+
### Return type
792+
793+
[**PostV2ResourcesCreatorCoupons200Response**](PostV2ResourcesCreatorCoupons200Response.md)
794+
795+
### Authorization
796+
797+
[token](../README.md#token)
798+
799+
### HTTP request headers
800+
801+
- **Content-Type**: application/json
802+
- **Accept**: application/json
803+
804+
### HTTP response details
805+
| Status code | Description | Response headers |
806+
|-------------|-------------|------------------|
807+
| **200** | OK | - |
808+
739809
<a id="postV2ResourcesCreatorUpdate"></a>
740810
# **postV2ResourcesCreatorUpdate**
741811
> PostV2ResourcesCreatorUpdate200Response postV2ResourcesCreatorUpdate(postV2ResourcesCreatorUpdateRequest)

src/main/java/org/openapitools/client/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* <p>ApiException class.</p>
2222
*/
2323
@SuppressWarnings("serial")
24-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T04:38:43.920283Z[Etc/UTC]")
24+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T10:23:07.418227Z[Etc/UTC]")
2525
public class ApiException extends Exception {
2626
private int code = 0;
2727
private Map<String, List<String>> responseHeaders = null;

src/main/java/org/openapitools/client/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package org.openapitools.client;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T04:38:43.920283Z[Etc/UTC]")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T10:23:07.418227Z[Etc/UTC]")
1717
public class Configuration {
1818
public static final String VERSION = "v2";
1919

src/main/java/org/openapitools/client/JSON.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
166166
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorBatch200ResponseData.CustomTypeAdapterFactory());
167167
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorBatchRequest.CustomTypeAdapterFactory());
168168
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorBatchRequestChangesInner.CustomTypeAdapterFactory());
169+
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorCoupons200Response.CustomTypeAdapterFactory());
170+
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorCoupons200ResponseData.CustomTypeAdapterFactory());
171+
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorCouponsRequest.CustomTypeAdapterFactory());
169172
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorUpdate200Response.CustomTypeAdapterFactory());
170173
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorUpdate200ResponseData.CustomTypeAdapterFactory());
171174
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PostV2ResourcesCreatorUpdateRequest.CustomTypeAdapterFactory());

src/main/java/org/openapitools/client/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package org.openapitools.client;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T04:38:43.920283Z[Etc/UTC]")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-04-10T10:23:07.418227Z[Etc/UTC]")
1717
public class Pair {
1818
private String name = "";
1919
private String value = "";

0 commit comments

Comments
 (0)