Skip to content

Commit e5c8cae

Browse files
Generate Ruby Backend SDK (#55)
Co-authored-by: kylemac <[email protected]>
1 parent d603b9a commit e5c8cae

File tree

13 files changed

+566
-20
lines changed

13 files changed

+566
-20
lines changed

.generated/.openapi-generator/FILES

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ docs/InstanceRestrictions.md
9191
docs/InstanceSettingsApi.md
9292
docs/Invitation.md
9393
docs/InvitationsApi.md
94+
docs/InviteWaitlistEntryRequest.md
9495
docs/JWKS.md
9596
docs/JWKSApi.md
9697
docs/JWKSEcdsaPrivateKey.md
@@ -344,6 +345,7 @@ lib/clerk-http-client/models/identification_link.rb
344345
lib/clerk-http-client/models/instance.rb
345346
lib/clerk-http-client/models/instance_restrictions.rb
346347
lib/clerk-http-client/models/invitation.rb
348+
lib/clerk-http-client/models/invite_waitlist_entry_request.rb
347349
lib/clerk-http-client/models/jwks.rb
348350
lib/clerk-http-client/models/jwks_ecdsa_private_key.rb
349351
lib/clerk-http-client/models/jwks_ecdsa_public_key.rb
@@ -462,7 +464,5 @@ lib/clerk-http-client/models/verify_totp_request.rb
462464
lib/clerk-http-client/models/waitlist_entry.rb
463465
lib/clerk-http-client/models/web3_wallet.rb
464466
lib/clerk-http-client/models/web3_wallet_verification.rb
465-
spec/api/billing_api_spec.rb
466-
spec/models/commerce_subscription_next_payment_spec.rb
467-
spec/models/commerce_subscription_spec.rb
467+
spec/models/invite_waitlist_entry_request_spec.rb
468468
spec/spec_helper.rb

.generated/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ Class | Method | HTTP request | Description
195195
*Clerk::SDK.users* | [**verify_password**](docs/UsersApi.md#verify_password) | **POST** /users/{user_id}/verify_password | Verify the password of a user
196196
*Clerk::SDK.users* | [**verify_totp**](docs/UsersApi.md#verify_totp) | **POST** /users/{user_id}/verify_totp | Verify a TOTP or backup code for a user
197197
*Clerk::SDK.waitlist_entries* | [**create_waitlist_entry**](docs/WaitlistEntriesApi.md#create_waitlist_entry) | **POST** /waitlist_entries | Create a waitlist entry
198+
*Clerk::SDK.waitlist_entries* | [**invite_waitlist_entry**](docs/WaitlistEntriesApi.md#invite_waitlist_entry) | **POST** /waitlist_entries/{waitlist_entry_id}/invite | Invite a waitlist entry
198199
*Clerk::SDK.waitlist_entries* | [**list_waitlist_entries**](docs/WaitlistEntriesApi.md#list_waitlist_entries) | **GET** /waitlist_entries | List all waitlist entries
200+
*Clerk::SDK.waitlist_entries* | [**reject_waitlist_entry**](docs/WaitlistEntriesApi.md#reject_waitlist_entry) | **POST** /waitlist_entries/{waitlist_entry_id}/reject | Reject a waitlist entry
199201
*Clerk::SDK.webhooks* | [**create_svix_app**](docs/WebhooksApi.md#create_svix_app) | **POST** /webhooks/svix | Create a Svix app
200202
*Clerk::SDK.webhooks* | [**delete_svix_app**](docs/WebhooksApi.md#delete_svix_app) | **DELETE** /webhooks/svix | Delete a Svix app
201203
*Clerk::SDK.webhooks* | [**generate_svix_auth_url**](docs/WebhooksApi.md#generate_svix_auth_url) | **POST** /webhooks/svix_url | Create a Svix Dashboard URL
@@ -276,6 +278,7 @@ Class | Method | HTTP request | Description
276278
- [ClerkHttpClient::Instance](docs/Instance.md)
277279
- [ClerkHttpClient::InstanceRestrictions](docs/InstanceRestrictions.md)
278280
- [ClerkHttpClient::Invitation](docs/Invitation.md)
281+
- [ClerkHttpClient::InviteWaitlistEntryRequest](docs/InviteWaitlistEntryRequest.md)
279282
- [ClerkHttpClient::JWKS](docs/JWKS.md)
280283
- [ClerkHttpClient::JWKSEcdsaPrivateKey](docs/JWKSEcdsaPrivateKey.md)
281284
- [ClerkHttpClient::JWKSEcdsaPublicKey](docs/JWKSEcdsaPublicKey.md)

.generated/docs/CommerceApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ opts = {
184184
payer_type: 'user', # String | Filter subscription items by payer type
185185
plan_id: 'plan_id_example', # String | Filter subscription items by plan ID
186186
include_free: true, # Boolean | Whether to include free plan subscription items
187-
query: 'query_example' # String | Search query to filter subscription items
187+
query: 'query_example' # String | Search query to filter subscription items by email, user first name, user last name, or organization name. Supports partial matching.
188188
}
189189

190190
begin
@@ -225,7 +225,7 @@ end
225225
| **payer_type** | **String** | Filter subscription items by payer type | [optional] |
226226
| **plan_id** | **String** | Filter subscription items by plan ID | [optional] |
227227
| **include_free** | **Boolean** | Whether to include free plan subscription items | [optional][default to false] |
228-
| **query** | **String** | Search query to filter subscription items | [optional] |
228+
| **query** | **String** | Search query to filter subscription items by email, user first name, user last name, or organization name. Supports partial matching. | [optional] |
229229

230230
### Return type
231231

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ClerkHttpClient::InviteWaitlistEntryRequest
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ---- | ---- | ----------- | ----- |
7+
| **ignore_existing** | **Boolean** | Whether an invitation should be created if there is already an existing invitation for this email address, or it&#39;s claimed by another user. | [optional][default to false] |
8+
9+
## Example
10+
11+
```ruby
12+
require 'clerk-http-client'
13+
14+
instance = ClerkHttpClient::InviteWaitlistEntryRequest.new(
15+
ignore_existing: null
16+
)
17+
```
18+

.generated/docs/VerificationSaml.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
| **object** | **String** | | [optional] |
88
| **status** | **String** | | |
99
| **strategy** | **String** | | |
10-
| **external_verification_redirect_url** | **String** | | |
10+
| **external_verification_redirect_url** | **String** | | [optional] |
1111
| **error** | [**VerificationFromOauthError**](VerificationFromOauthError.md) | | [optional] |
12-
| **expire_at** | **Integer** | | |
12+
| **expire_at** | **Integer** | | [optional] |
1313
| **attempts** | **Integer** | | |
1414
| **verified_at_client** | **String** | | [optional] |
1515

.generated/docs/WaitlistEntriesApi.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ All URIs are relative to *https://api.clerk.com/v1*
55
| Method | HTTP request | Description |
66
| ------ | ------------ | ----------- |
77
| [**create_waitlist_entry**](WaitlistEntriesApi.md#create_waitlist_entry) | **POST** /waitlist_entries | Create a waitlist entry |
8+
| [**invite_waitlist_entry**](WaitlistEntriesApi.md#invite_waitlist_entry) | **POST** /waitlist_entries/{waitlist_entry_id}/invite | Invite a waitlist entry |
89
| [**list_waitlist_entries**](WaitlistEntriesApi.md#list_waitlist_entries) | **GET** /waitlist_entries | List all waitlist entries |
10+
| [**reject_waitlist_entry**](WaitlistEntriesApi.md#reject_waitlist_entry) | **POST** /waitlist_entries/{waitlist_entry_id}/reject | Reject a waitlist entry |
911

1012

1113
## create_waitlist_entry
@@ -78,6 +80,78 @@ end
7880
- **Accept**: application/json
7981

8082

83+
## invite_waitlist_entry
84+
85+
> <WaitlistEntry> invite_waitlist_entry(waitlist_entry_id, opts)
86+
87+
Invite a waitlist entry
88+
89+
Send an invite to the email address in a waitlist entry.
90+
91+
### Examples
92+
93+
```ruby
94+
require 'time'
95+
require 'clerk'
96+
97+
## Setup
98+
Clerk.configure do |config|
99+
config.secret_key = 'sk_test_xxxxxxxxx'
100+
end
101+
102+
waitlist_entry_id = 'waitlist_entry_id_example' # String | The ID of the waitlist entry to invite
103+
opts = {
104+
invite_waitlist_entry_request: ClerkHttpClient::InviteWaitlistEntryRequest.new # InviteWaitlistEntryRequest |
105+
}
106+
107+
begin
108+
# Invite a waitlist entry
109+
result = Clerk::SDK.waitlist_entries.invite_waitlist_entry(waitlist_entry_id, opts)
110+
p result
111+
rescue ClerkHttpClient::ApiError => e
112+
puts "Error when calling Clerk::SDK.waitlist_entries->invite_waitlist_entry: #{e}"
113+
end
114+
```
115+
116+
#### Using the `invite_waitlist_entry_with_http_info variant
117+
118+
This returns an Array which contains the response data, status code and headers.
119+
120+
> <Array(<WaitlistEntry>, Integer, Hash)> invite_waitlist_entry_with_http_info(waitlist_entry_id, opts)
121+
122+
```ruby
123+
begin
124+
# Invite a waitlist entry
125+
data, status_code, headers = Clerk::SDK.waitlist_entries.invite_waitlist_entry_with_http_info(waitlist_entry_id, opts)
126+
p status_code # => 2xx
127+
p headers # => { ... }
128+
p data # => <WaitlistEntry>
129+
rescue ClerkHttpClient::ApiError => e
130+
puts "Error when calling Clerk::SDK.waitlist_entries->invite_waitlist_entry_with_http_info: #{e}"
131+
end
132+
```
133+
134+
### Parameters
135+
136+
| Name | Type | Description | Notes |
137+
| ---- | ---- | ----------- | ----- |
138+
| **waitlist_entry_id** | **String** | The ID of the waitlist entry to invite | |
139+
| **invite_waitlist_entry_request** | [**InviteWaitlistEntryRequest**](InviteWaitlistEntryRequest.md) | | [optional] |
140+
141+
### Return type
142+
143+
[**WaitlistEntry**](WaitlistEntry.md)
144+
145+
### Authorization
146+
147+
[bearerAuth](../README.md#bearerAuth)
148+
149+
### HTTP request headers
150+
151+
- **Content-Type**: application/json
152+
- **Accept**: application/json
153+
154+
81155
## list_waitlist_entries
82156

83157
> <ListWaitlistEntries200Response> list_waitlist_entries(opts)
@@ -155,3 +229,71 @@ end
155229
- **Content-Type**: Not defined
156230
- **Accept**: application/json
157231

232+
233+
## reject_waitlist_entry
234+
235+
> <WaitlistEntry> reject_waitlist_entry(waitlist_entry_id)
236+
237+
Reject a waitlist entry
238+
239+
Reject a waitlist entry.
240+
241+
### Examples
242+
243+
```ruby
244+
require 'time'
245+
require 'clerk'
246+
247+
## Setup
248+
Clerk.configure do |config|
249+
config.secret_key = 'sk_test_xxxxxxxxx'
250+
end
251+
252+
waitlist_entry_id = 'waitlist_entry_id_example' # String | The ID of the waitlist entry to reject
253+
254+
begin
255+
# Reject a waitlist entry
256+
result = Clerk::SDK.waitlist_entries.reject_waitlist_entry(waitlist_entry_id)
257+
p result
258+
rescue ClerkHttpClient::ApiError => e
259+
puts "Error when calling Clerk::SDK.waitlist_entries->reject_waitlist_entry: #{e}"
260+
end
261+
```
262+
263+
#### Using the `reject_waitlist_entry_with_http_info variant
264+
265+
This returns an Array which contains the response data, status code and headers.
266+
267+
> <Array(<WaitlistEntry>, Integer, Hash)> reject_waitlist_entry_with_http_info(waitlist_entry_id)
268+
269+
```ruby
270+
begin
271+
# Reject a waitlist entry
272+
data, status_code, headers = Clerk::SDK.waitlist_entries.reject_waitlist_entry_with_http_info(waitlist_entry_id)
273+
p status_code # => 2xx
274+
p headers # => { ... }
275+
p data # => <WaitlistEntry>
276+
rescue ClerkHttpClient::ApiError => e
277+
puts "Error when calling Clerk::SDK.waitlist_entries->reject_waitlist_entry_with_http_info: #{e}"
278+
end
279+
```
280+
281+
### Parameters
282+
283+
| Name | Type | Description | Notes |
284+
| ---- | ---- | ----------- | ----- |
285+
| **waitlist_entry_id** | **String** | The ID of the waitlist entry to reject | |
286+
287+
### Return type
288+
289+
[**WaitlistEntry**](WaitlistEntry.md)
290+
291+
### Authorization
292+
293+
[bearerAuth](../README.md#bearerAuth)
294+
295+
### HTTP request headers
296+
297+
- **Content-Type**: Not defined
298+
- **Accept**: application/json
299+

.generated/lib/clerk-http-client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
ClerkHttpClient.autoload :Instance, 'clerk-http-client/models/instance'
9191
ClerkHttpClient.autoload :InstanceRestrictions, 'clerk-http-client/models/instance_restrictions'
9292
ClerkHttpClient.autoload :Invitation, 'clerk-http-client/models/invitation'
93+
ClerkHttpClient.autoload :InviteWaitlistEntryRequest, 'clerk-http-client/models/invite_waitlist_entry_request'
9394
ClerkHttpClient.autoload :JWKS, 'clerk-http-client/models/jwks'
9495
ClerkHttpClient.autoload :JWKSEcdsaPrivateKey, 'clerk-http-client/models/jwks_ecdsa_private_key'
9596
ClerkHttpClient.autoload :JWKSEcdsaPublicKey, 'clerk-http-client/models/jwks_ecdsa_public_key'

.generated/lib/clerk-http-client/api/commerce_api.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def get_commerce_plan_list_with_http_info(opts = {})
184184
# @option opts [String] :payer_type Filter subscription items by payer type
185185
# @option opts [String] :plan_id Filter subscription items by plan ID
186186
# @option opts [Boolean] :include_free Whether to include free plan subscription items (default to false)
187-
# @option opts [String] :query Search query to filter subscription items
187+
# @option opts [String] :query Search query to filter subscription items by email, user first name, user last name, or organization name. Supports partial matching.
188188
# @return [PaginatedCommerceSubscriptionItemResponse]
189189

190190
def get_commerce_subscription_item_list(opts = {})
@@ -202,7 +202,7 @@ def get_commerce_subscription_item_list(opts = {})
202202
# @option opts [String] :payer_type Filter subscription items by payer type
203203
# @option opts [String] :plan_id Filter subscription items by plan ID
204204
# @option opts [Boolean] :include_free Whether to include free plan subscription items (default to false)
205-
# @option opts [String] :query Search query to filter subscription items
205+
# @option opts [String] :query Search query to filter subscription items by email, user first name, user last name, or organization name. Supports partial matching.
206206
# @return [Array<(PaginatedCommerceSubscriptionItemResponse, Integer, Hash)>] PaginatedCommerceSubscriptionItemResponse data, response status code and response headers
207207
# GET
208208
def get_commerce_subscription_item_list_with_http_info(opts = {})

0 commit comments

Comments
 (0)