solifyn 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/Brand.md +2 -2
- data/docs/CheckoutLinkResponseDto.md +3 -3
- data/docs/CollectionDetailResponseDto.md +3 -3
- data/docs/CollectionProductDto.md +11 -5
- data/docs/CollectionResponseDto.md +3 -3
- data/docs/CreateCustomerDto.md +1 -1
- data/docs/CreateMeterDto.md +1 -1
- data/docs/CreateWebhookEndpointDto.md +1 -1
- data/docs/CustomerResponseDto.md +3 -3
- data/docs/CustomerSharedInviteResponseDto.md +1 -1
- data/docs/DefaultApi.md +1214 -0
- data/docs/DeveloperApi.md +1 -1
- data/docs/DiscordIntegrationApi.md +135 -0
- data/docs/DiscordRolesResponseDto.md +24 -0
- data/docs/Dispute.md +3 -3
- data/docs/EntitlementGrantResponseDto.md +13 -5
- data/docs/Invoice.md +1 -1
- data/docs/MeterDetailResponseDto.md +3 -3
- data/docs/MeterIngestEventDto.md +1 -1
- data/docs/MeterIngestResponseDto.md +1 -1
- data/docs/MeterResponseDto.md +3 -3
- data/docs/MeterUsageEventDto.md +3 -3
- data/docs/OperationalWebhookEndpointHeadersInDto.md +1 -1
- data/docs/OperationalWebhookEndpointHeadersResponseDto.md +2 -2
- data/docs/OperationalWebhookEndpointInDto.md +2 -2
- data/docs/OperationalWebhookEndpointResponseDto.md +2 -2
- data/docs/OperationalWebhookEndpointUpdateDto.md +2 -2
- data/docs/Order.md +2 -2
- data/docs/OrderRefund.md +1 -1
- data/docs/Product.md +11 -5
- data/docs/ProductCreate.md +8 -2
- data/docs/ProductUpdate.md +8 -2
- data/docs/Refund.md +5 -5
- data/docs/Subscription.md +4 -4
- data/docs/UpdateCustomerDto.md +1 -1
- data/docs/UpdateMeterDto.md +1 -1
- data/docs/UpdateWebhookEndpointDto.md +1 -1
- data/docs/WebhookDeliveryResponseDto.md +1 -1
- data/docs/WebhookEndpointApi.md +1 -1
- data/docs/WebhookEndpointResponseDto.md +1 -1
- data/docs/WebhookEntitlementGrantPayload.md +5 -5
- data/lib/solifyn/api/default_api.rb +1076 -0
- data/lib/solifyn/api/discord_integration_api.rb +137 -0
- data/lib/solifyn/models/addon.rb +10 -2
- data/lib/solifyn/models/brand.rb +0 -6
- data/lib/solifyn/models/brand_create.rb +5 -6
- data/lib/solifyn/models/brand_update.rb +5 -6
- data/lib/solifyn/models/checkout_link_response_dto.rb +0 -12
- data/lib/solifyn/models/checkout_session_details_dto.rb +0 -1
- data/lib/solifyn/models/collection_detail_response_dto.rb +0 -2
- data/lib/solifyn/models/collection_product_dto.rb +132 -18
- data/lib/solifyn/models/collection_response_dto.rb +0 -2
- data/lib/solifyn/models/customer_response_dto.rb +0 -6
- data/lib/solifyn/models/discord_roles_response_dto.rb +273 -0
- data/lib/solifyn/models/discount.rb +10 -2
- data/lib/solifyn/models/discount_create.rb +0 -3
- data/lib/solifyn/models/discount_update.rb +0 -3
- data/lib/solifyn/models/dispute.rb +0 -10
- data/lib/solifyn/models/dispute_evidence_dto.rb +0 -4
- data/lib/solifyn/models/entitlement_grant_response_dto.rb +41 -1
- data/lib/solifyn/models/instance.rb +20 -4
- data/lib/solifyn/models/license.rb +40 -8
- data/lib/solifyn/models/license_sub_dto.rb +15 -3
- data/lib/solifyn/models/meter_detail_response_dto.rb +0 -4
- data/lib/solifyn/models/meter_response_dto.rb +0 -4
- data/lib/solifyn/models/meter_usage_event_dto.rb +0 -1
- data/lib/solifyn/models/product.rb +132 -18
- data/lib/solifyn/models/product_create.rb +33 -3
- data/lib/solifyn/models/product_sub_dto.rb +5 -1
- data/lib/solifyn/models/product_update.rb +33 -3
- data/lib/solifyn/models/refund.rb +0 -5
- data/lib/solifyn/models/resolved_addon.rb +5 -1
- data/lib/solifyn/models/subscription.rb +35 -10
- data/lib/solifyn/models/subscription_detail.rb +5 -1
- data/lib/solifyn/models/webhook_dispute_payload.rb +0 -5
- data/lib/solifyn/models/webhook_entitlement_grant_payload.rb +0 -6
- data/lib/solifyn/models/webhook_license_payload.rb +40 -8
- data/lib/solifyn/models/webhook_payment_payload.rb +0 -40
- data/lib/solifyn/models/webhook_refund_payload.rb +0 -4
- data/lib/solifyn/models/webhook_subscription_payload.rb +0 -9
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +2 -0
- data/spec/api/default_api_spec.rb +239 -0
- data/spec/api/discord_integration_api_spec.rb +58 -0
- data/spec/models/discord_roles_response_dto_spec.rb +54 -0
- metadata +145 -133
data/docs/DeveloperApi.md
CHANGED
|
@@ -91,7 +91,7 @@ require 'time'
|
|
|
91
91
|
require 'solifyn'
|
|
92
92
|
|
|
93
93
|
api_instance = Solifyn::DeveloperApi.new
|
|
94
|
-
create_webhook_endpoint_dto = Solifyn::CreateWebhookEndpointDto.new({url: 'https://api.example.com/webhooks', events: [
|
|
94
|
+
create_webhook_endpoint_dto = Solifyn::CreateWebhookEndpointDto.new({url: 'https://api.example.com/webhooks', events: [payment.created, payment.succeeded]}) # CreateWebhookEndpointDto |
|
|
95
95
|
|
|
96
96
|
begin
|
|
97
97
|
# Create Webhook Endpoint
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Solifyn::DiscordIntegrationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.solifyn.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**discord_get_install_url**](DiscordIntegrationApi.md#discord_get_install_url) | **GET** /v1/discord/install | Get Discord Bot Installation URL |
|
|
8
|
+
| [**discord_list_roles**](DiscordIntegrationApi.md#discord_list_roles) | **GET** /v1/discord/roles | List Guild Discord Roles |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## discord_get_install_url
|
|
12
|
+
|
|
13
|
+
> discord_get_install_url(opts)
|
|
14
|
+
|
|
15
|
+
Get Discord Bot Installation URL
|
|
16
|
+
|
|
17
|
+
Generates the URL to invite the system-wide Discord Bot onto the merchant's Discord server.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'solifyn'
|
|
24
|
+
|
|
25
|
+
api_instance = Solifyn::DiscordIntegrationApi.new
|
|
26
|
+
opts = {
|
|
27
|
+
product_id: 'product_id_example' # String | Optional Product ID to redirect back to after installation
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
begin
|
|
31
|
+
# Get Discord Bot Installation URL
|
|
32
|
+
api_instance.discord_get_install_url(opts)
|
|
33
|
+
rescue Solifyn::ApiError => e
|
|
34
|
+
puts "Error when calling DiscordIntegrationApi->discord_get_install_url: #{e}"
|
|
35
|
+
end
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Using the discord_get_install_url_with_http_info variant
|
|
39
|
+
|
|
40
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
41
|
+
|
|
42
|
+
> <Array(nil, Integer, Hash)> discord_get_install_url_with_http_info(opts)
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
begin
|
|
46
|
+
# Get Discord Bot Installation URL
|
|
47
|
+
data, status_code, headers = api_instance.discord_get_install_url_with_http_info(opts)
|
|
48
|
+
p status_code # => 2xx
|
|
49
|
+
p headers # => { ... }
|
|
50
|
+
p data # => nil
|
|
51
|
+
rescue Solifyn::ApiError => e
|
|
52
|
+
puts "Error when calling DiscordIntegrationApi->discord_get_install_url_with_http_info: #{e}"
|
|
53
|
+
end
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Parameters
|
|
57
|
+
|
|
58
|
+
| Name | Type | Description | Notes |
|
|
59
|
+
| ---- | ---- | ----------- | ----- |
|
|
60
|
+
| **product_id** | **String** | Optional Product ID to redirect back to after installation | [optional] |
|
|
61
|
+
|
|
62
|
+
### Return type
|
|
63
|
+
|
|
64
|
+
nil (empty response body)
|
|
65
|
+
|
|
66
|
+
### Authorization
|
|
67
|
+
|
|
68
|
+
No authorization required
|
|
69
|
+
|
|
70
|
+
### HTTP request headers
|
|
71
|
+
|
|
72
|
+
- **Content-Type**: Not defined
|
|
73
|
+
- **Accept**: Not defined
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## discord_list_roles
|
|
77
|
+
|
|
78
|
+
> <Array<DiscordRolesResponseDto>> discord_list_roles
|
|
79
|
+
|
|
80
|
+
List Guild Discord Roles
|
|
81
|
+
|
|
82
|
+
Retrieves all roles available in the connected merchant's Discord server/guild.
|
|
83
|
+
|
|
84
|
+
### Examples
|
|
85
|
+
|
|
86
|
+
```ruby
|
|
87
|
+
require 'time'
|
|
88
|
+
require 'solifyn'
|
|
89
|
+
|
|
90
|
+
api_instance = Solifyn::DiscordIntegrationApi.new
|
|
91
|
+
|
|
92
|
+
begin
|
|
93
|
+
# List Guild Discord Roles
|
|
94
|
+
result = api_instance.discord_list_roles
|
|
95
|
+
p result
|
|
96
|
+
rescue Solifyn::ApiError => e
|
|
97
|
+
puts "Error when calling DiscordIntegrationApi->discord_list_roles: #{e}"
|
|
98
|
+
end
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
#### Using the discord_list_roles_with_http_info variant
|
|
102
|
+
|
|
103
|
+
This returns an Array which contains the response data, status code and headers.
|
|
104
|
+
|
|
105
|
+
> <Array(<Array<DiscordRolesResponseDto>>, Integer, Hash)> discord_list_roles_with_http_info
|
|
106
|
+
|
|
107
|
+
```ruby
|
|
108
|
+
begin
|
|
109
|
+
# List Guild Discord Roles
|
|
110
|
+
data, status_code, headers = api_instance.discord_list_roles_with_http_info
|
|
111
|
+
p status_code # => 2xx
|
|
112
|
+
p headers # => { ... }
|
|
113
|
+
p data # => <Array<DiscordRolesResponseDto>>
|
|
114
|
+
rescue Solifyn::ApiError => e
|
|
115
|
+
puts "Error when calling DiscordIntegrationApi->discord_list_roles_with_http_info: #{e}"
|
|
116
|
+
end
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Parameters
|
|
120
|
+
|
|
121
|
+
This endpoint does not need any parameter.
|
|
122
|
+
|
|
123
|
+
### Return type
|
|
124
|
+
|
|
125
|
+
[**Array<DiscordRolesResponseDto>**](DiscordRolesResponseDto.md)
|
|
126
|
+
|
|
127
|
+
### Authorization
|
|
128
|
+
|
|
129
|
+
No authorization required
|
|
130
|
+
|
|
131
|
+
### HTTP request headers
|
|
132
|
+
|
|
133
|
+
- **Content-Type**: Not defined
|
|
134
|
+
- **Accept**: application/json
|
|
135
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Solifyn::DiscordRolesResponseDto
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The Discord Role ID | |
|
|
8
|
+
| **name** | **String** | The Discord Role Name | |
|
|
9
|
+
| **position** | **Float** | The position of the role in the server hierarchy | |
|
|
10
|
+
| **color** | **Float** | The color of the role (hex integer code) | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'solifyn'
|
|
16
|
+
|
|
17
|
+
instance = Solifyn::DiscordRolesResponseDto.new(
|
|
18
|
+
id: 876543210987654321,
|
|
19
|
+
name: VIP Member,
|
|
20
|
+
position: 3,
|
|
21
|
+
color: 3447003
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/Dispute.md
CHANGED
|
@@ -39,7 +39,7 @@ instance = Solifyn::Dispute.new(
|
|
|
39
39
|
status: warning_needs_response,
|
|
40
40
|
reason: Product not received,
|
|
41
41
|
editable: true,
|
|
42
|
-
needs_response_by: 2025-01-01T12:00Z,
|
|
42
|
+
needs_response_by: 2025-01-01T12:00:00Z,
|
|
43
43
|
visa_rdr: false,
|
|
44
44
|
billing_address: 123 Main St, New York, NY,
|
|
45
45
|
customer_name: John Doe,
|
|
@@ -51,8 +51,8 @@ instance = Solifyn::Dispute.new(
|
|
|
51
51
|
evidence: null,
|
|
52
52
|
payment_id: pay_123,
|
|
53
53
|
business_id: biz_123,
|
|
54
|
-
created_at: 2025-01-01T12:00Z,
|
|
55
|
-
updated_at: 2025-01-01T12:00Z
|
|
54
|
+
created_at: 2025-01-01T12:00:00Z,
|
|
55
|
+
updated_at: 2025-01-01T12:00:00Z
|
|
56
56
|
)
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
| **github_repo** | **String** | Target GitHub repository (owner/repo) if type is GITHUB. | [optional] |
|
|
14
14
|
| **github_permission** | **String** | GitHub access permission level if type is GITHUB. | [optional] |
|
|
15
15
|
| **github_username** | **String** | The connected customer GitHub username. | [optional] |
|
|
16
|
+
| **discord_guild_id** | **String** | Target Discord Guild ID if type is DISCORD. | [optional] |
|
|
17
|
+
| **discord_role_id** | **String** | Target Discord Role ID if type is DISCORD. | [optional] |
|
|
18
|
+
| **discord_username** | **String** | The connected customer Discord username. | [optional] |
|
|
19
|
+
| **discord_user_id** | **String** | The connected customer Discord user ID. | [optional] |
|
|
16
20
|
| **status** | **String** | Delivery status of the collaborator invite (PENDING, DELIVERED, FAILED, REVOKED). | |
|
|
17
21
|
| **oauth_url** | **String** | OAuth URL to redirect the customer to. | [optional] |
|
|
18
22
|
| **error_details** | **String** | Error message if invitation delivery failed. | [optional] |
|
|
@@ -26,15 +30,19 @@
|
|
|
26
30
|
require 'solifyn'
|
|
27
31
|
|
|
28
32
|
instance = Solifyn::EntitlementGrantResponseDto.new(
|
|
29
|
-
id:
|
|
30
|
-
business_id:
|
|
31
|
-
customer_id:
|
|
32
|
-
payment_id:
|
|
33
|
-
product_id:
|
|
33
|
+
id: grant_123456,
|
|
34
|
+
business_id: biz_123456,
|
|
35
|
+
customer_id: cust_123456,
|
|
36
|
+
payment_id: pay_123456,
|
|
37
|
+
product_id: prod_123456,
|
|
34
38
|
type: GITHUB,
|
|
35
39
|
github_repo: solifyn/premium-app,
|
|
36
40
|
github_permission: pull,
|
|
37
41
|
github_username: octocat,
|
|
42
|
+
discord_guild_id: 123456789012345678,
|
|
43
|
+
discord_role_id: 876543210987654321,
|
|
44
|
+
discord_username: discorduser#1234,
|
|
45
|
+
discord_user_id: 112233445566778899,
|
|
38
46
|
status: PENDING,
|
|
39
47
|
oauth_url: https://github.com/login/oauth/authorize...,
|
|
40
48
|
error_details: Permission denied,
|
data/docs/Invoice.md
CHANGED
|
@@ -33,10 +33,10 @@ instance = Solifyn::MeterDetailResponseDto.new(
|
|
|
33
33
|
aggregation_type: COUNT,
|
|
34
34
|
aggregation_key: tokens,
|
|
35
35
|
unit: requests,
|
|
36
|
-
filters: {
|
|
36
|
+
filters: {event_type=premium, region=asia},
|
|
37
37
|
archived: false,
|
|
38
|
-
created_at: 2026-05-23T10:
|
|
39
|
-
updated_at: 2026-05-23T10:
|
|
38
|
+
created_at: 2026-05-23T10:00:00.000Z,
|
|
39
|
+
updated_at: 2026-05-23T10:00:00.000Z,
|
|
40
40
|
usage_events: null,
|
|
41
41
|
total_usage_events: 1284
|
|
42
42
|
)
|
data/docs/MeterIngestEventDto.md
CHANGED
|
@@ -21,7 +21,7 @@ instance = Solifyn::MeterIngestEventDto.new(
|
|
|
21
21
|
customer_id: cus_8n7m6l5k4j3h2g1f0e9d8c,
|
|
22
22
|
event_name: api.request,
|
|
23
23
|
value: 1,
|
|
24
|
-
metadata: {
|
|
24
|
+
metadata: {plan=enterprise, region=asia-southeast-1},
|
|
25
25
|
timestamp: 2026-05-23T10:00:00.000Z
|
|
26
26
|
)
|
|
27
27
|
```
|
|
@@ -16,7 +16,7 @@ require 'solifyn'
|
|
|
16
16
|
instance = Solifyn::MeterIngestResponseDto.new(
|
|
17
17
|
processed: 5,
|
|
18
18
|
failed: 1,
|
|
19
|
-
errors: [{
|
|
19
|
+
errors: [{event=evt_9Y3kP4qR7tU1vW2xZ5aB6c, error=Meter not found}]
|
|
20
20
|
)
|
|
21
21
|
```
|
|
22
22
|
|
data/docs/MeterResponseDto.md
CHANGED
|
@@ -31,10 +31,10 @@ instance = Solifyn::MeterResponseDto.new(
|
|
|
31
31
|
aggregation_type: COUNT,
|
|
32
32
|
aggregation_key: tokens,
|
|
33
33
|
unit: requests,
|
|
34
|
-
filters: {
|
|
34
|
+
filters: {event_type=premium, region=asia},
|
|
35
35
|
archived: false,
|
|
36
|
-
created_at: 2026-05-23T10:
|
|
37
|
-
updated_at: 2026-05-23T10:
|
|
36
|
+
created_at: 2026-05-23T10:00:00.000Z,
|
|
37
|
+
updated_at: 2026-05-23T10:00:00.000Z
|
|
38
38
|
)
|
|
39
39
|
```
|
|
40
40
|
|
data/docs/MeterUsageEventDto.md
CHANGED
|
@@ -22,9 +22,9 @@ instance = Solifyn::MeterUsageEventDto.new(
|
|
|
22
22
|
meter_id: mtr_8Z1aB2cD3eF4gH5iJ6kL7m,
|
|
23
23
|
customer_id: cus_8n7m6l5k4j3h2g1f0e9d8c,
|
|
24
24
|
value: 1,
|
|
25
|
-
metadata: {
|
|
26
|
-
timestamp: 2026-05-23T10:
|
|
27
|
-
processed_at: 2026-05-23T10:00:
|
|
25
|
+
metadata: {plan=enterprise, region=asia-southeast-1},
|
|
26
|
+
timestamp: 2026-05-23T10:00:00.000Z,
|
|
27
|
+
processed_at: 2026-05-23T10:00:01.000Z
|
|
28
28
|
)
|
|
29
29
|
```
|
|
30
30
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
require 'solifyn'
|
|
14
14
|
|
|
15
15
|
instance = Solifyn::OperationalWebhookEndpointHeadersResponseDto.new(
|
|
16
|
-
headers: {
|
|
17
|
-
sensitive: [
|
|
16
|
+
headers: {X-Example=123, X-Foobar=Bar},
|
|
17
|
+
sensitive: [Authorization]
|
|
18
18
|
)
|
|
19
19
|
```
|
|
20
20
|
|
|
@@ -22,8 +22,8 @@ instance = Solifyn::OperationalWebhookEndpointInDto.new(
|
|
|
22
22
|
url: https://example.com/webhook/,
|
|
23
23
|
description: Production monitoring endpoint,
|
|
24
24
|
disabled: false,
|
|
25
|
-
filter_types: [
|
|
26
|
-
metadata: {
|
|
25
|
+
filter_types: [message.attempt.failing, message.attempt.exhausted],
|
|
26
|
+
metadata: {environment=production},
|
|
27
27
|
secret: whsec_C2FVsBQIhrscChlQIMV+b5sSYspob7oD,
|
|
28
28
|
throttle_rate: 5,
|
|
29
29
|
uid: monitoring-prod-endpoint
|
|
@@ -26,8 +26,8 @@ instance = Solifyn::OperationalWebhookEndpointResponseDto.new(
|
|
|
26
26
|
url: https://example.com/webhook/,
|
|
27
27
|
description: Production monitoring endpoint,
|
|
28
28
|
disabled: false,
|
|
29
|
-
filter_types: [
|
|
30
|
-
metadata: {
|
|
29
|
+
filter_types: [message.attempt.failing],
|
|
30
|
+
metadata: {environment=production},
|
|
31
31
|
throttle_rate: 0,
|
|
32
32
|
uid: monitoring-prod-endpoint,
|
|
33
33
|
created_at: 2026-05-30T14:11:29.071Z,
|
|
@@ -21,8 +21,8 @@ instance = Solifyn::OperationalWebhookEndpointUpdateDto.new(
|
|
|
21
21
|
url: https://example.com/new-webhook/,
|
|
22
22
|
description: Updated monitoring endpoint,
|
|
23
23
|
disabled: true,
|
|
24
|
-
filter_types: [
|
|
25
|
-
metadata: {
|
|
24
|
+
filter_types: [message.attempt.failing, message.attempt.exhausted, endpoint.disabled],
|
|
25
|
+
metadata: {environment=staging},
|
|
26
26
|
throttle_rate: 10,
|
|
27
27
|
uid: monitoring-updated-endpoint
|
|
28
28
|
)
|
data/docs/Order.md
CHANGED
|
@@ -48,8 +48,8 @@ instance = Solifyn::Order.new(
|
|
|
48
48
|
amount_after_fees: 2750,
|
|
49
49
|
currency: usd,
|
|
50
50
|
status: paid,
|
|
51
|
-
created_at: 2026-05-22T08:00Z,
|
|
52
|
-
paid_at: 2026-05-22T08:
|
|
51
|
+
created_at: 2026-05-22T08:00:00Z,
|
|
52
|
+
paid_at: 2026-05-22T08:05:00Z,
|
|
53
53
|
payment_method: card,
|
|
54
54
|
card_last_four: 4242,
|
|
55
55
|
card_network: visa,
|
data/docs/OrderRefund.md
CHANGED
data/docs/Product.md
CHANGED
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
| **has_github_access** | **Boolean** | Whether the product includes GitHub repository access. | |
|
|
20
20
|
| **github_repo** | **String** | GitHub repository to grant access to (format: owner/repo). | |
|
|
21
21
|
| **github_permission** | **String** | GitHub collaborator permission level. | |
|
|
22
|
+
| **has_discord_access** | **Boolean** | Whether the product includes Discord role access. | |
|
|
23
|
+
| **discord_guild_id** | **String** | Discord Guild (Server) ID to grant access to. | |
|
|
24
|
+
| **discord_role_id** | **String** | Discord Role ID to assign to the user. | |
|
|
22
25
|
| **is_tax_inclusive** | **Boolean** | Whether the product price already includes applicable sales taxes. | |
|
|
23
26
|
| **billing_period** | **Integer** | The subscription billing cycle interval in days (for subscription products). | |
|
|
24
27
|
| **trial_period_days** | **Integer** | Trial duration in days for subscription products. | |
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
require 'solifyn'
|
|
48
51
|
|
|
49
52
|
instance = Solifyn::Product.new(
|
|
50
|
-
id:
|
|
53
|
+
id: prod_9z8x7c6v5b4n,
|
|
51
54
|
name: Enterprise SaaS Plan,
|
|
52
55
|
price: 99,
|
|
53
56
|
currency: USD,
|
|
@@ -62,20 +65,23 @@ instance = Solifyn::Product.new(
|
|
|
62
65
|
has_github_access: false,
|
|
63
66
|
github_repo: solifyn/premium-app,
|
|
64
67
|
github_permission: pull,
|
|
68
|
+
has_discord_access: false,
|
|
69
|
+
discord_guild_id: 123456789012345678,
|
|
70
|
+
discord_role_id: 876543210987654321,
|
|
65
71
|
is_tax_inclusive: false,
|
|
66
72
|
billing_period: null,
|
|
67
73
|
trial_period_days: null,
|
|
68
74
|
expiration_days: null,
|
|
69
75
|
statement_descriptor: SOLIFYN*SAAS,
|
|
70
76
|
pay_what_you_want: false,
|
|
71
|
-
metadata: {
|
|
72
|
-
custom_fields: [{
|
|
77
|
+
metadata: {tier=enterprise, department=engineering},
|
|
78
|
+
custom_fields: [{id=57aa2241-eae4-43dc-b9ae-36069b84b2da, name=Discord Username, order=0, required=true, field_type=text, placeholder=e.g. your_discord#1234}, {id=c86da32a-a967-457c-815b-c3440294d70b, name=Company Name, order=1, required=false, field_type=text, placeholder=e.g. Acme Corp (Optional)}],
|
|
73
79
|
stock: null,
|
|
74
80
|
activation_limit: 5,
|
|
75
81
|
is_listed: true,
|
|
76
82
|
is_free: false,
|
|
77
|
-
created_at: 2026-05-18T12:
|
|
78
|
-
updated_at: 2026-05-18T12:
|
|
83
|
+
created_at: 2026-05-18T12:00:00.000Z,
|
|
84
|
+
updated_at: 2026-05-18T12:00:00.000Z,
|
|
79
85
|
is_permanently_deleted: false,
|
|
80
86
|
brand_id: brd_4e29285b8sdf34ff51e07d4,
|
|
81
87
|
digital_link: null,
|
data/docs/ProductCreate.md
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
| **has_github_access** | **Boolean** | Whether the purchase includes GitHub repository access. | [optional][default to false] |
|
|
17
17
|
| **github_repo** | **String** | GitHub repository to grant access to (format: owner/repo). | [optional] |
|
|
18
18
|
| **github_permission** | **String** | GitHub collaborator permission level. | [optional] |
|
|
19
|
+
| **has_discord_access** | **Boolean** | Whether the purchase includes Discord server role access. | [optional][default to false] |
|
|
20
|
+
| **discord_guild_id** | **String** | Discord Guild (Server) ID to grant access to. | [optional] |
|
|
21
|
+
| **discord_role_id** | **String** | Discord Role ID to assign to the user. | [optional] |
|
|
19
22
|
| **is_tax_inclusive** | **Boolean** | Whether tax is included in the base price. | [optional][default to false] |
|
|
20
23
|
| **activation_limit** | **Integer** | Maximum concurrent activated instances allowed per license key. | [optional] |
|
|
21
24
|
| **brand_id** | **String** | Brand id for the product, if not provided will default to primary brand. | [optional] |
|
|
@@ -49,6 +52,9 @@ instance = Solifyn::ProductCreate.new(
|
|
|
49
52
|
has_github_access: false,
|
|
50
53
|
github_repo: solifyn/premium-app,
|
|
51
54
|
github_permission: pull,
|
|
55
|
+
has_discord_access: false,
|
|
56
|
+
discord_guild_id: 123456789012345678,
|
|
57
|
+
discord_role_id: 876543210987654321,
|
|
52
58
|
is_tax_inclusive: false,
|
|
53
59
|
activation_limit: null,
|
|
54
60
|
brand_id: brd_4e29285b8sdf34ff51e07d4,
|
|
@@ -57,8 +63,8 @@ instance = Solifyn::ProductCreate.new(
|
|
|
57
63
|
expiration_days: null,
|
|
58
64
|
statement_descriptor: SOLIFYN*SAAS,
|
|
59
65
|
pay_what_you_want: false,
|
|
60
|
-
metadata: {
|
|
61
|
-
custom_fields: [{
|
|
66
|
+
metadata: {internal_id=12345, campaign=summer_sale},
|
|
67
|
+
custom_fields: [{id=57aa2241-eae4-43dc-b9ae-36069b84b2da, name=Discord Username, order=0, required=true, field_type=text, placeholder=e.g. your_discord#1234}, {id=c86da32a-a967-457c-815b-c3440294d70b, name=Company Name, order=1, required=false, field_type=text, placeholder=e.g. Acme Corp (Optional)}],
|
|
62
68
|
stock: 100,
|
|
63
69
|
is_listed: true,
|
|
64
70
|
is_free: false,
|
data/docs/ProductUpdate.md
CHANGED
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
| **has_github_access** | **Boolean** | Whether the purchase includes GitHub repository access. | [optional][default to false] |
|
|
17
17
|
| **github_repo** | **String** | GitHub repository to grant access to (format: owner/repo). | [optional] |
|
|
18
18
|
| **github_permission** | **String** | GitHub collaborator permission level. | [optional] |
|
|
19
|
+
| **has_discord_access** | **Boolean** | Whether the purchase includes Discord server role access. | [optional][default to false] |
|
|
20
|
+
| **discord_guild_id** | **String** | Discord Guild (Server) ID to grant access to. | [optional] |
|
|
21
|
+
| **discord_role_id** | **String** | Discord Role ID to assign to the user. | [optional] |
|
|
19
22
|
| **is_tax_inclusive** | **Boolean** | Whether tax is included in the base price. | [optional][default to false] |
|
|
20
23
|
| **activation_limit** | **Integer** | Maximum concurrent activated instances allowed per license key. | [optional] |
|
|
21
24
|
| **brand_id** | **String** | Brand id for the product, if not provided will default to primary brand. | [optional] |
|
|
@@ -49,6 +52,9 @@ instance = Solifyn::ProductUpdate.new(
|
|
|
49
52
|
has_github_access: false,
|
|
50
53
|
github_repo: solifyn/premium-app,
|
|
51
54
|
github_permission: pull,
|
|
55
|
+
has_discord_access: false,
|
|
56
|
+
discord_guild_id: 123456789012345678,
|
|
57
|
+
discord_role_id: 876543210987654321,
|
|
52
58
|
is_tax_inclusive: false,
|
|
53
59
|
activation_limit: null,
|
|
54
60
|
brand_id: brd_4e29285b8sdf34ff51e07d4,
|
|
@@ -57,8 +63,8 @@ instance = Solifyn::ProductUpdate.new(
|
|
|
57
63
|
expiration_days: null,
|
|
58
64
|
statement_descriptor: SOLIFYN*SAAS,
|
|
59
65
|
pay_what_you_want: false,
|
|
60
|
-
metadata: {
|
|
61
|
-
custom_fields: [{
|
|
66
|
+
metadata: {internal_id=12345, campaign=summer_sale},
|
|
67
|
+
custom_fields: [{id=57aa2241-eae4-43dc-b9ae-36069b84b2da, name=Discord Username, order=0, required=true, field_type=text, placeholder=e.g. your_discord#1234}, {id=c86da32a-a967-457c-815b-c3440294d70b, name=Company Name, order=1, required=false, field_type=text, placeholder=e.g. Acme Corp (Optional)}],
|
|
62
68
|
stock: 100,
|
|
63
69
|
is_listed: true,
|
|
64
70
|
is_free: false,
|
data/docs/Refund.md
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
require 'solifyn'
|
|
25
25
|
|
|
26
26
|
instance = Solifyn::Refund.new(
|
|
27
|
-
id:
|
|
27
|
+
id: ref_123,
|
|
28
28
|
whop_id: rf_xyz123,
|
|
29
29
|
idempotency_key: idemp_abc123,
|
|
30
30
|
amount: 10.5,
|
|
@@ -33,10 +33,10 @@ instance = Solifyn::Refund.new(
|
|
|
33
33
|
provider: stripe,
|
|
34
34
|
reason: requested_by_customer,
|
|
35
35
|
reference_value: ARN123456789,
|
|
36
|
-
payment_id:
|
|
37
|
-
provider_created_at: 2025-01-01T12:00Z,
|
|
38
|
-
created_at: 2025-01-01T12:00Z,
|
|
39
|
-
updated_at: 2025-01-01T12:00Z
|
|
36
|
+
payment_id: pay_123,
|
|
37
|
+
provider_created_at: 2025-01-01T12:00:00Z,
|
|
38
|
+
created_at: 2025-01-01T12:00:00Z,
|
|
39
|
+
updated_at: 2025-01-01T12:00:00Z
|
|
40
40
|
)
|
|
41
41
|
```
|
|
42
42
|
|
data/docs/Subscription.md
CHANGED
|
@@ -39,9 +39,9 @@ require 'solifyn'
|
|
|
39
39
|
instance = Solifyn::Subscription.new(
|
|
40
40
|
id: mem_123,
|
|
41
41
|
status: active,
|
|
42
|
-
created_at: 2025-01-01T12:
|
|
43
|
-
joined_at: 2025-01-01T12:
|
|
44
|
-
updated_at: 2025-01-01T12:
|
|
42
|
+
created_at: 2025-01-01T12:00:00.000Z,
|
|
43
|
+
joined_at: 2025-01-01T12:00:00.000Z,
|
|
44
|
+
updated_at: 2025-01-01T12:00:00.000Z,
|
|
45
45
|
manage_url: https://example.com/billing/manage/mber_123,
|
|
46
46
|
member: null,
|
|
47
47
|
user: null,
|
|
@@ -57,7 +57,7 @@ instance = Solifyn::Subscription.new(
|
|
|
57
57
|
promo_code: null,
|
|
58
58
|
product: null,
|
|
59
59
|
license_key: null,
|
|
60
|
-
metadata: {
|
|
60
|
+
metadata: {is_usage_based=false},
|
|
61
61
|
payment_collection_paused: false,
|
|
62
62
|
checkout_configuration_id: ch_123,
|
|
63
63
|
price: 99,
|
data/docs/UpdateCustomerDto.md
CHANGED
data/docs/UpdateMeterDto.md
CHANGED
|
@@ -25,7 +25,7 @@ instance = Solifyn::UpdateMeterDto.new(
|
|
|
25
25
|
aggregation_type: COUNT,
|
|
26
26
|
aggregation_key: tokens,
|
|
27
27
|
unit: requests,
|
|
28
|
-
filters: {
|
|
28
|
+
filters: {event_type=premium, region=asia},
|
|
29
29
|
enable_filtering: false
|
|
30
30
|
)
|
|
31
31
|
```
|
|
@@ -17,7 +17,7 @@ require 'solifyn'
|
|
|
17
17
|
instance = Solifyn::UpdateWebhookEndpointDto.new(
|
|
18
18
|
url: https://api.example.com/new-webhooks,
|
|
19
19
|
description: Updated payment listener,
|
|
20
|
-
events: [
|
|
20
|
+
events: [payment.created, payment.succeeded, refund.succeeded],
|
|
21
21
|
status: ACTIVE
|
|
22
22
|
)
|
|
23
23
|
```
|
|
@@ -23,7 +23,7 @@ instance = Solifyn::WebhookDeliveryResponseDto.new(
|
|
|
23
23
|
id: dlv_12345,
|
|
24
24
|
endpoint_id: ep_12345,
|
|
25
25
|
event: payment.succeeded,
|
|
26
|
-
payload: {
|
|
26
|
+
payload: {type=payment.succeeded, data={}},
|
|
27
27
|
response_status: 200,
|
|
28
28
|
response_body: {"success":true},
|
|
29
29
|
duration_ms: 120,
|
data/docs/WebhookEndpointApi.md
CHANGED
|
@@ -569,7 +569,7 @@ end
|
|
|
569
569
|
|
|
570
570
|
api_instance = Solifyn::WebhookEndpointApi.new
|
|
571
571
|
id = 'id_example' # String | The endpoint ID or UID
|
|
572
|
-
operational_webhook_endpoint_headers_in_dto = Solifyn::OperationalWebhookEndpointHeadersInDto.new({headers: {
|
|
572
|
+
operational_webhook_endpoint_headers_in_dto = Solifyn::OperationalWebhookEndpointHeadersInDto.new({headers: {X-Example=123, X-Foobar=Bar}}) # OperationalWebhookEndpointHeadersInDto |
|
|
573
573
|
|
|
574
574
|
begin
|
|
575
575
|
# Set Operational Webhook Endpoint Headers
|
|
@@ -23,7 +23,7 @@ instance = Solifyn::WebhookEndpointResponseDto.new(
|
|
|
23
23
|
id: ep_12345,
|
|
24
24
|
url: https://api.example.com/webhooks,
|
|
25
25
|
description: Primary payment listener,
|
|
26
|
-
events: [
|
|
26
|
+
events: [payment.created, payment.succeeded],
|
|
27
27
|
status: ACTIVE,
|
|
28
28
|
masked_secret: whsec_Ab...xyz,
|
|
29
29
|
secret: whsec_AbCDeFGhiJKlMnOpQrStUvWxYz123456,
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
require 'solifyn'
|
|
26
26
|
|
|
27
27
|
instance = Solifyn::WebhookEntitlementGrantPayload.new(
|
|
28
|
-
id:
|
|
29
|
-
business_id:
|
|
30
|
-
customer_id:
|
|
31
|
-
payment_id:
|
|
32
|
-
product_id:
|
|
28
|
+
id: grant_123456,
|
|
29
|
+
business_id: biz_123456,
|
|
30
|
+
customer_id: cust_123456,
|
|
31
|
+
payment_id: pay_123456,
|
|
32
|
+
product_id: prod_123456,
|
|
33
33
|
type: GITHUB,
|
|
34
34
|
github_repo: solifyn/premium-app,
|
|
35
35
|
github_permission: pull,
|