solifyn 1.0.0 → 1.0.5

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.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -7
  3. data/docs/BalanceApi.md +1 -1
  4. data/docs/CheckoutApi.md +1 -1
  5. data/docs/CheckoutLinksApi.md +1 -1
  6. data/docs/CheckoutSessionDetailsDto.md +3 -1
  7. data/docs/CollectionProductDto.md +12 -0
  8. data/docs/CollectionsApi.md +1 -1
  9. data/docs/CustomersApi.md +1 -1
  10. data/docs/DefaultApi.md +285 -1
  11. data/docs/DeveloperApi.md +1 -1
  12. data/docs/DigitalFileApi.md +1 -1
  13. data/docs/DiscordIntegrationApi.md +135 -0
  14. data/docs/DiscordRolesResponseDto.md +24 -0
  15. data/docs/DiscountsApi.md +1 -1
  16. data/docs/DisputesApi.md +1 -1
  17. data/docs/EntitlementGrantResponseDto.md +54 -0
  18. data/docs/EntitlementGrantsApi.md +289 -0
  19. data/docs/GitHubIntegrationApi.md +145 -0
  20. data/docs/GithubReposResponseDto.md +22 -0
  21. data/docs/LicenseApi.md +1 -1
  22. data/docs/LicenseKeysApi.md +1 -1
  23. data/docs/LicenseKeysClientApi.md +1 -1
  24. data/docs/MetersApi.md +1 -1
  25. data/docs/OrdersApi.md +1 -1
  26. data/docs/Product.md +12 -0
  27. data/docs/ProductAddOnsApi.md +1 -1
  28. data/docs/ProductCreate.md +12 -0
  29. data/docs/ProductUpdate.md +12 -0
  30. data/docs/ProductsApi.md +1 -1
  31. data/docs/RefundRequestsApi.md +1 -1
  32. data/docs/RefundsChargebacksApi.md +1 -1
  33. data/docs/SubscriptionsApi.md +1 -1
  34. data/docs/SyncLoginDto.md +18 -0
  35. data/docs/WebhookApi.md +1 -1
  36. data/docs/WebhookEndpointApi.md +55 -10
  37. data/docs/WebhookEntitlementGrantPayload.md +44 -0
  38. data/git_push.sh +2 -2
  39. data/lib/solifyn/api/default_api.rb +248 -0
  40. data/lib/solifyn/api/{partner_api.rb → discord_integration_api.rb} +32 -19
  41. data/lib/solifyn/api/entitlement_grants_api.rb +271 -0
  42. data/lib/solifyn/api/git_hub_integration_api.rb +137 -0
  43. data/lib/solifyn/api/webhook_endpoint_api.rb +9 -9
  44. data/lib/solifyn/configuration.rb +4 -4
  45. data/lib/solifyn/models/checkout_session_details_dto.rb +16 -4
  46. data/lib/solifyn/models/collection_product_dto.rb +115 -1
  47. data/lib/solifyn/models/{payout_method.rb → discord_roles_response_dto.rb} +41 -34
  48. data/lib/solifyn/models/{withdrawal.rb → entitlement_grant_response_dto.rb} +149 -109
  49. data/lib/solifyn/models/{payout_account.rb → github_repos_response_dto.rb} +31 -24
  50. data/lib/solifyn/models/product.rb +115 -1
  51. data/lib/solifyn/models/product_create.rb +77 -1
  52. data/lib/solifyn/models/product_update.rb +77 -1
  53. data/lib/solifyn/models/{payout_method_list.rb → sync_login_dto.rb} +15 -17
  54. data/lib/solifyn/models/{payout_verification.rb → webhook_entitlement_grant_payload.rb} +118 -41
  55. data/lib/solifyn/version.rb +1 -1
  56. data/lib/solifyn.rb +8 -0
  57. data/spec/api/checkout_api_spec.rb +12 -0
  58. data/spec/api/default_api_spec.rb +59 -11
  59. data/spec/api/developer_api_spec.rb +52 -29
  60. data/spec/api/{partner_api_spec.rb → discord_integration_api_spec.rb} +16 -11
  61. data/spec/api/entitlement_grants_api_spec.rb +83 -0
  62. data/spec/api/git_hub_integration_api_spec.rb +58 -0
  63. data/spec/models/checkout_session_details_dto_spec.rb +6 -0
  64. data/spec/models/collection_product_dto_spec.rb +28 -0
  65. data/spec/models/{payout_method_spec.rb → discord_roles_response_dto_spec.rb} +9 -9
  66. data/spec/models/{withdrawal_spec.rb → entitlement_grant_response_dto_spec.rb} +18 -18
  67. data/spec/models/{payout_account_spec.rb → github_repos_response_dto_spec.rb} +8 -8
  68. data/spec/models/order_spec.rb +6 -0
  69. data/spec/models/product_create_spec.rb +28 -0
  70. data/spec/models/product_spec.rb +28 -0
  71. data/spec/models/product_update_spec.rb +28 -0
  72. data/spec/models/{business_create_spec.rb → sync_login_dto_spec.rb} +7 -7
  73. data/spec/models/{business_spec.rb → webhook_entitlement_grant_payload_spec.rb} +17 -53
  74. metadata +162 -254
  75. data/docs/AffiliateApi.md +0 -845
  76. data/docs/BillingApi.md +0 -68
  77. data/docs/BrandsApi.md +0 -286
  78. data/docs/Business.md +0 -56
  79. data/docs/BusinessCreate.md +0 -18
  80. data/docs/BusinessFullCreate.md +0 -26
  81. data/docs/BusinessFullCreateResponse.md +0 -20
  82. data/docs/BusinessesApi.md +0 -350
  83. data/docs/ChatApi.md +0 -246
  84. data/docs/CommunityApi.md +0 -497
  85. data/docs/PartnerApi.md +0 -125
  86. data/docs/PayoutAccessToken.md +0 -20
  87. data/docs/PayoutAccount.md +0 -22
  88. data/docs/PayoutAccountLink.md +0 -20
  89. data/docs/PayoutMethod.md +0 -24
  90. data/docs/PayoutMethodList.md +0 -18
  91. data/docs/PayoutVerification.md +0 -24
  92. data/docs/PayoutVerificationList.md +0 -18
  93. data/docs/PayoutsApi.md +0 -579
  94. data/docs/TicketApi.md +0 -318
  95. data/docs/UserPage.md +0 -26
  96. data/docs/UserProfileThemesApi.md +0 -345
  97. data/docs/UserSettings.md +0 -34
  98. data/docs/UserSettingsUpdate.md +0 -76
  99. data/docs/UserStats.md +0 -20
  100. data/docs/UserTheme.md +0 -26
  101. data/docs/UserThemeUpdate.md +0 -22
  102. data/docs/WhopApiKeysRotation.md +0 -18
  103. data/docs/Withdrawal.md +0 -46
  104. data/docs/WithdrawalCreate.md +0 -22
  105. data/docs/WithdrawalList.md +0 -20
  106. data/lib/solifyn/api/affiliate_api.rb +0 -760
  107. data/lib/solifyn/api/billing_api.rb +0 -77
  108. data/lib/solifyn/api/brands_api.rb +0 -284
  109. data/lib/solifyn/api/businesses_api.rb +0 -338
  110. data/lib/solifyn/api/chat_api.rb +0 -232
  111. data/lib/solifyn/api/community_api.rb +0 -466
  112. data/lib/solifyn/api/payouts_api.rb +0 -520
  113. data/lib/solifyn/api/ticket_api.rb +0 -328
  114. data/lib/solifyn/api/user_profile_themes_api.rb +0 -313
  115. data/lib/solifyn/models/business.rb +0 -482
  116. data/lib/solifyn/models/business_create.rb +0 -241
  117. data/lib/solifyn/models/business_full_create.rb +0 -288
  118. data/lib/solifyn/models/business_full_create_response.rb +0 -239
  119. data/lib/solifyn/models/payout_access_token.rb +0 -239
  120. data/lib/solifyn/models/payout_account_link.rb +0 -239
  121. data/lib/solifyn/models/payout_verification_list.rb +0 -224
  122. data/lib/solifyn/models/user_page.rb +0 -290
  123. data/lib/solifyn/models/user_settings.rb +0 -337
  124. data/lib/solifyn/models/user_settings_update.rb +0 -505
  125. data/lib/solifyn/models/user_stats.rb +0 -241
  126. data/lib/solifyn/models/user_theme.rb +0 -276
  127. data/lib/solifyn/models/user_theme_update.rb +0 -235
  128. data/lib/solifyn/models/whop_api_keys_rotation.rb +0 -222
  129. data/lib/solifyn/models/withdrawal_create.rb +0 -249
  130. data/lib/solifyn/models/withdrawal_list.rb +0 -241
  131. data/spec/api/affiliate_api_spec.rb +0 -165
  132. data/spec/api/billing_api_spec.rb +0 -46
  133. data/spec/api/brands_api_spec.rb +0 -83
  134. data/spec/api/businesses_api_spec.rb +0 -93
  135. data/spec/api/chat_api_spec.rb +0 -72
  136. data/spec/api/community_api_spec.rb +0 -113
  137. data/spec/api/payouts_api_spec.rb +0 -133
  138. data/spec/api/ticket_api_spec.rb +0 -86
  139. data/spec/api/user_profile_themes_api_spec.rb +0 -91
  140. data/spec/models/business_full_create_response_spec.rb +0 -42
  141. data/spec/models/business_full_create_spec.rb +0 -60
  142. data/spec/models/payout_access_token_spec.rb +0 -42
  143. data/spec/models/payout_account_link_spec.rb +0 -42
  144. data/spec/models/payout_method_list_spec.rb +0 -36
  145. data/spec/models/payout_verification_list_spec.rb +0 -36
  146. data/spec/models/payout_verification_spec.rb +0 -54
  147. data/spec/models/user_page_spec.rb +0 -60
  148. data/spec/models/user_settings_spec.rb +0 -84
  149. data/spec/models/user_settings_update_spec.rb +0 -210
  150. data/spec/models/user_stats_spec.rb +0 -42
  151. data/spec/models/user_theme_spec.rb +0 -60
  152. data/spec/models/user_theme_update_spec.rb +0 -48
  153. data/spec/models/whop_api_keys_rotation_spec.rb +0 -36
  154. data/spec/models/withdrawal_create_spec.rb +0 -48
  155. data/spec/models/withdrawal_list_spec.rb +0 -42
@@ -1,6 +1,6 @@
1
1
  # Solifyn::SubscriptionsApi
2
2
 
3
- All URIs are relative to *http://localhost:8000*
3
+ All URIs are relative to *https://api.solifyn.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -0,0 +1,18 @@
1
+ # Solifyn::SyncLoginDto
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **live_token** | **String** | The JWT access token from the Live API server | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'solifyn'
13
+
14
+ instance = Solifyn::SyncLoginDto.new(
15
+ live_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
16
+ )
17
+ ```
18
+
data/docs/WebhookApi.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Solifyn::WebhookApi
2
2
 
3
- All URIs are relative to *http://localhost:8000*
3
+ All URIs are relative to *https://api.solifyn.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -1,6 +1,6 @@
1
1
  # Solifyn::WebhookEndpointApi
2
2
 
3
- All URIs are relative to *http://localhost:8000*
3
+ All URIs are relative to *https://api.solifyn.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
@@ -26,6 +26,11 @@ Create Operational Webhook Endpoint
26
26
  ```ruby
27
27
  require 'time'
28
28
  require 'solifyn'
29
+ # setup authorization
30
+ Solifyn.configure do |config|
31
+ # Configure Bearer authorization (API Key): ApiKeyAuth
32
+ config.access_token = 'YOUR_BEARER_TOKEN'
33
+ end
29
34
 
30
35
  api_instance = Solifyn::WebhookEndpointApi.new
31
36
  operational_webhook_endpoint_in_dto = Solifyn::OperationalWebhookEndpointInDto.new({url: 'https://example.com/webhook/'}) # OperationalWebhookEndpointInDto |
@@ -69,7 +74,7 @@ end
69
74
 
70
75
  ### Authorization
71
76
 
72
- No authorization required
77
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
73
78
 
74
79
  ### HTTP request headers
75
80
 
@@ -88,6 +93,11 @@ Delete Operational Webhook Endpoint
88
93
  ```ruby
89
94
  require 'time'
90
95
  require 'solifyn'
96
+ # setup authorization
97
+ Solifyn.configure do |config|
98
+ # Configure Bearer authorization (API Key): ApiKeyAuth
99
+ config.access_token = 'YOUR_BEARER_TOKEN'
100
+ end
91
101
 
92
102
  api_instance = Solifyn::WebhookEndpointApi.new
93
103
  id = 'id_example' # String | The endpoint ID or UID
@@ -130,7 +140,7 @@ nil (empty response body)
130
140
 
131
141
  ### Authorization
132
142
 
133
- No authorization required
143
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
134
144
 
135
145
  ### HTTP request headers
136
146
 
@@ -149,6 +159,11 @@ Get Operational Webhook Endpoint
149
159
  ```ruby
150
160
  require 'time'
151
161
  require 'solifyn'
162
+ # setup authorization
163
+ Solifyn.configure do |config|
164
+ # Configure Bearer authorization (API Key): ApiKeyAuth
165
+ config.access_token = 'YOUR_BEARER_TOKEN'
166
+ end
152
167
 
153
168
  api_instance = Solifyn::WebhookEndpointApi.new
154
169
  id = 'id_example' # String | The endpoint ID or UID
@@ -192,7 +207,7 @@ end
192
207
 
193
208
  ### Authorization
194
209
 
195
- No authorization required
210
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
196
211
 
197
212
  ### HTTP request headers
198
213
 
@@ -211,6 +226,11 @@ Get Operational Webhook Endpoint Headers
211
226
  ```ruby
212
227
  require 'time'
213
228
  require 'solifyn'
229
+ # setup authorization
230
+ Solifyn.configure do |config|
231
+ # Configure Bearer authorization (API Key): ApiKeyAuth
232
+ config.access_token = 'YOUR_BEARER_TOKEN'
233
+ end
214
234
 
215
235
  api_instance = Solifyn::WebhookEndpointApi.new
216
236
  id = 'id_example' # String | The endpoint ID or UID
@@ -254,7 +274,7 @@ end
254
274
 
255
275
  ### Authorization
256
276
 
257
- No authorization required
277
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
258
278
 
259
279
  ### HTTP request headers
260
280
 
@@ -273,6 +293,11 @@ Get Operational Webhook Endpoint Secret
273
293
  ```ruby
274
294
  require 'time'
275
295
  require 'solifyn'
296
+ # setup authorization
297
+ Solifyn.configure do |config|
298
+ # Configure Bearer authorization (API Key): ApiKeyAuth
299
+ config.access_token = 'YOUR_BEARER_TOKEN'
300
+ end
276
301
 
277
302
  api_instance = Solifyn::WebhookEndpointApi.new
278
303
  id = 'id_example' # String | The endpoint ID or UID
@@ -316,7 +341,7 @@ end
316
341
 
317
342
  ### Authorization
318
343
 
319
- No authorization required
344
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
320
345
 
321
346
  ### HTTP request headers
322
347
 
@@ -335,6 +360,11 @@ List Operational Webhook Endpoints
335
360
  ```ruby
336
361
  require 'time'
337
362
  require 'solifyn'
363
+ # setup authorization
364
+ Solifyn.configure do |config|
365
+ # Configure Bearer authorization (API Key): ApiKeyAuth
366
+ config.access_token = 'YOUR_BEARER_TOKEN'
367
+ end
338
368
 
339
369
  api_instance = Solifyn::WebhookEndpointApi.new
340
370
 
@@ -375,7 +405,7 @@ This endpoint does not need any parameter.
375
405
 
376
406
  ### Authorization
377
407
 
378
- No authorization required
408
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
379
409
 
380
410
  ### HTTP request headers
381
411
 
@@ -394,6 +424,11 @@ Rotate Operational Webhook Endpoint Secret
394
424
  ```ruby
395
425
  require 'time'
396
426
  require 'solifyn'
427
+ # setup authorization
428
+ Solifyn.configure do |config|
429
+ # Configure Bearer authorization (API Key): ApiKeyAuth
430
+ config.access_token = 'YOUR_BEARER_TOKEN'
431
+ end
397
432
 
398
433
  api_instance = Solifyn::WebhookEndpointApi.new
399
434
  id = 'id_example' # String | The endpoint ID or UID
@@ -438,7 +473,7 @@ nil (empty response body)
438
473
 
439
474
  ### Authorization
440
475
 
441
- No authorization required
476
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
442
477
 
443
478
  ### HTTP request headers
444
479
 
@@ -457,6 +492,11 @@ Update Operational Webhook Endpoint
457
492
  ```ruby
458
493
  require 'time'
459
494
  require 'solifyn'
495
+ # setup authorization
496
+ Solifyn.configure do |config|
497
+ # Configure Bearer authorization (API Key): ApiKeyAuth
498
+ config.access_token = 'YOUR_BEARER_TOKEN'
499
+ end
460
500
 
461
501
  api_instance = Solifyn::WebhookEndpointApi.new
462
502
  id = 'id_example' # String | The endpoint ID or UID
@@ -502,7 +542,7 @@ end
502
542
 
503
543
  ### Authorization
504
544
 
505
- No authorization required
545
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
506
546
 
507
547
  ### HTTP request headers
508
548
 
@@ -521,6 +561,11 @@ Set Operational Webhook Endpoint Headers
521
561
  ```ruby
522
562
  require 'time'
523
563
  require 'solifyn'
564
+ # setup authorization
565
+ Solifyn.configure do |config|
566
+ # Configure Bearer authorization (API Key): ApiKeyAuth
567
+ config.access_token = 'YOUR_BEARER_TOKEN'
568
+ end
524
569
 
525
570
  api_instance = Solifyn::WebhookEndpointApi.new
526
571
  id = 'id_example' # String | The endpoint ID or UID
@@ -565,7 +610,7 @@ nil (empty response body)
565
610
 
566
611
  ### Authorization
567
612
 
568
- No authorization required
613
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
569
614
 
570
615
  ### HTTP request headers
571
616
 
@@ -0,0 +1,44 @@
1
+ # Solifyn::WebhookEntitlementGrantPayload
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The unique entitlement grant ID. | [optional] |
8
+ | **business_id** | **String** | The business ID context. | [optional] |
9
+ | **customer_id** | **String** | The customer ID. | [optional] |
10
+ | **payment_id** | **String** | Associated payment transaction ID. | [optional] |
11
+ | **product_id** | **String** | The purchased product ID. | [optional] |
12
+ | **type** | **String** | The type of entitlement (e.g. GITHUB). | [optional] |
13
+ | **github_repo** | **String** | Target GitHub repository (owner/repo) if type is GITHUB. | [optional] |
14
+ | **github_permission** | **String** | GitHub access permission level if type is GITHUB. | [optional] |
15
+ | **github_username** | **String** | The connected customer GitHub username. | [optional] |
16
+ | **status** | **String** | Delivery status of the collaborator invite (PENDING, DELIVERED, FAILED, REVOKED). | [optional] |
17
+ | **oauth_url** | **String** | OAuth URL to redirect the customer to. | [optional] |
18
+ | **error_details** | **String** | Error message if invitation delivery failed. | [optional] |
19
+ | **created_at** | **Time** | | [optional] |
20
+ | **updated_at** | **Time** | | [optional] |
21
+
22
+ ## Example
23
+
24
+ ```ruby
25
+ require 'solifyn'
26
+
27
+ instance = Solifyn::WebhookEntitlementGrantPayload.new(
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
+ type: GITHUB,
34
+ github_repo: solifyn/premium-app,
35
+ github_permission: pull,
36
+ github_username: octocat,
37
+ status: PENDING,
38
+ oauth_url: https://github.com/login/oauth/authorize...,
39
+ error_details: Permission denied,
40
+ created_at: null,
41
+ updated_at: null
42
+ )
43
+ ```
44
+
data/git_push.sh CHANGED
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
14
14
  fi
15
15
 
16
16
  if [ "$git_user_id" = "" ]; then
17
- git_user_id="GIT_USER_ID"
17
+ git_user_id="solifyn"
18
18
  echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
19
  fi
20
20
 
21
21
  if [ "$git_repo_id" = "" ]; then
22
- git_repo_id="GIT_REPO_ID"
22
+ git_repo_id="solifyn-ruby"
23
23
  echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
24
  fi
25
25
 
@@ -205,6 +205,254 @@ module Solifyn
205
205
  return data, status_code, headers
206
206
  end
207
207
 
208
+ # Entitlement Grant Created
209
+ # Occurs when a new entitlement grant is created (e.g., at checkout completion if the product has GitHub access). The collaborator invitation is pending.
210
+ # @param [Hash] opts the optional parameters
211
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
212
+ # @return [nil]
213
+ def entitlement_grant_created_post(opts = {})
214
+ entitlement_grant_created_post_with_http_info(opts)
215
+ nil
216
+ end
217
+
218
+ # Entitlement Grant Created
219
+ # Occurs when a new entitlement grant is created (e.g., at checkout completion if the product has GitHub access). The collaborator invitation is pending.
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
222
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
223
+ def entitlement_grant_created_post_with_http_info(opts = {})
224
+ if @api_client.config.debugging
225
+ @api_client.config.logger.debug 'Calling API: DefaultApi.entitlement_grant_created_post ...'
226
+ end
227
+ # resource path
228
+ local_var_path = '/entitlement_grant.created'
229
+
230
+ # query parameters
231
+ query_params = opts[:query_params] || {}
232
+
233
+ # header parameters
234
+ header_params = opts[:header_params] || {}
235
+ # HTTP header 'Content-Type'
236
+ content_type = @api_client.select_header_content_type(['application/json'])
237
+ if !content_type.nil?
238
+ header_params['Content-Type'] = content_type
239
+ end
240
+
241
+ # form parameters
242
+ form_params = opts[:form_params] || {}
243
+
244
+ # http body (model)
245
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_entitlement_grant_payload'])
246
+
247
+ # return_type
248
+ return_type = opts[:debug_return_type]
249
+
250
+ # auth_names
251
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"DefaultApi.entitlement_grant_created_post",
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: DefaultApi#entitlement_grant_created_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # Entitlement Grant Delivered
271
+ # Occurs when the customer successfully connects their GitHub account and the collaborator invitation is successfully delivered.
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
274
+ # @return [nil]
275
+ def entitlement_grant_delivered_post(opts = {})
276
+ entitlement_grant_delivered_post_with_http_info(opts)
277
+ nil
278
+ end
279
+
280
+ # Entitlement Grant Delivered
281
+ # Occurs when the customer successfully connects their GitHub account and the collaborator invitation is successfully delivered.
282
+ # @param [Hash] opts the optional parameters
283
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
284
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
285
+ def entitlement_grant_delivered_post_with_http_info(opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: DefaultApi.entitlement_grant_delivered_post ...'
288
+ end
289
+ # resource path
290
+ local_var_path = '/entitlement_grant.delivered'
291
+
292
+ # query parameters
293
+ query_params = opts[:query_params] || {}
294
+
295
+ # header parameters
296
+ header_params = opts[:header_params] || {}
297
+ # HTTP header 'Content-Type'
298
+ content_type = @api_client.select_header_content_type(['application/json'])
299
+ if !content_type.nil?
300
+ header_params['Content-Type'] = content_type
301
+ end
302
+
303
+ # form parameters
304
+ form_params = opts[:form_params] || {}
305
+
306
+ # http body (model)
307
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_entitlement_grant_payload'])
308
+
309
+ # return_type
310
+ return_type = opts[:debug_return_type]
311
+
312
+ # auth_names
313
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
314
+
315
+ new_options = opts.merge(
316
+ :operation => :"DefaultApi.entitlement_grant_delivered_post",
317
+ :header_params => header_params,
318
+ :query_params => query_params,
319
+ :form_params => form_params,
320
+ :body => post_body,
321
+ :auth_names => auth_names,
322
+ :return_type => return_type
323
+ )
324
+
325
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug "API called: DefaultApi#entitlement_grant_delivered_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
328
+ end
329
+ return data, status_code, headers
330
+ end
331
+
332
+ # Entitlement Grant Failed
333
+ # Occurs when invitation delivery fails (e.g., if the user GitHub account is flagged or invitation limit is reached).
334
+ # @param [Hash] opts the optional parameters
335
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
336
+ # @return [nil]
337
+ def entitlement_grant_failed_post(opts = {})
338
+ entitlement_grant_failed_post_with_http_info(opts)
339
+ nil
340
+ end
341
+
342
+ # Entitlement Grant Failed
343
+ # Occurs when invitation delivery fails (e.g., if the user GitHub account is flagged or invitation limit is reached).
344
+ # @param [Hash] opts the optional parameters
345
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
346
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
347
+ def entitlement_grant_failed_post_with_http_info(opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: DefaultApi.entitlement_grant_failed_post ...'
350
+ end
351
+ # resource path
352
+ local_var_path = '/entitlement_grant.failed'
353
+
354
+ # query parameters
355
+ query_params = opts[:query_params] || {}
356
+
357
+ # header parameters
358
+ header_params = opts[:header_params] || {}
359
+ # HTTP header 'Content-Type'
360
+ content_type = @api_client.select_header_content_type(['application/json'])
361
+ if !content_type.nil?
362
+ header_params['Content-Type'] = content_type
363
+ end
364
+
365
+ # form parameters
366
+ form_params = opts[:form_params] || {}
367
+
368
+ # http body (model)
369
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_entitlement_grant_payload'])
370
+
371
+ # return_type
372
+ return_type = opts[:debug_return_type]
373
+
374
+ # auth_names
375
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
376
+
377
+ new_options = opts.merge(
378
+ :operation => :"DefaultApi.entitlement_grant_failed_post",
379
+ :header_params => header_params,
380
+ :query_params => query_params,
381
+ :form_params => form_params,
382
+ :body => post_body,
383
+ :auth_names => auth_names,
384
+ :return_type => return_type
385
+ )
386
+
387
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug "API called: DefaultApi#entitlement_grant_failed_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
390
+ end
391
+ return data, status_code, headers
392
+ end
393
+
394
+ # Entitlement Grant Revoked
395
+ # Occurs when the customer access is removed from the repository (manually or automatically via subscription cancel/refund).
396
+ # @param [Hash] opts the optional parameters
397
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
398
+ # @return [nil]
399
+ def entitlement_grant_revoked_post(opts = {})
400
+ entitlement_grant_revoked_post_with_http_info(opts)
401
+ nil
402
+ end
403
+
404
+ # Entitlement Grant Revoked
405
+ # Occurs when the customer access is removed from the repository (manually or automatically via subscription cancel/refund).
406
+ # @param [Hash] opts the optional parameters
407
+ # @option opts [WebhookEntitlementGrantPayload] :webhook_entitlement_grant_payload
408
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
409
+ def entitlement_grant_revoked_post_with_http_info(opts = {})
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug 'Calling API: DefaultApi.entitlement_grant_revoked_post ...'
412
+ end
413
+ # resource path
414
+ local_var_path = '/entitlement_grant.revoked'
415
+
416
+ # query parameters
417
+ query_params = opts[:query_params] || {}
418
+
419
+ # header parameters
420
+ header_params = opts[:header_params] || {}
421
+ # HTTP header 'Content-Type'
422
+ content_type = @api_client.select_header_content_type(['application/json'])
423
+ if !content_type.nil?
424
+ header_params['Content-Type'] = content_type
425
+ end
426
+
427
+ # form parameters
428
+ form_params = opts[:form_params] || {}
429
+
430
+ # http body (model)
431
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'webhook_entitlement_grant_payload'])
432
+
433
+ # return_type
434
+ return_type = opts[:debug_return_type]
435
+
436
+ # auth_names
437
+ auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
438
+
439
+ new_options = opts.merge(
440
+ :operation => :"DefaultApi.entitlement_grant_revoked_post",
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => return_type
447
+ )
448
+
449
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug "API called: DefaultApi#entitlement_grant_revoked_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
+ end
453
+ return data, status_code, headers
454
+ end
455
+
208
456
  # License Created
209
457
  # Occurs when a new software license key is created or assigned to a customer purchase.
210
458
  # @param [Hash] opts the optional parameters
@@ -13,30 +13,37 @@ Generator version: 7.10.0
13
13
  require 'cgi'
14
14
 
15
15
  module Solifyn
16
- class PartnerApi
16
+ class DiscordIntegrationApi
17
17
  attr_accessor :api_client
18
18
 
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Get Discord Bot Installation URL
23
+ # Generates the URL to invite the system-wide Discord Bot onto the merchant's Discord server.
22
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :product_id Optional Product ID to redirect back to after installation
23
26
  # @return [nil]
24
- def partner_controller_get_partner_commissions(opts = {})
25
- partner_controller_get_partner_commissions_with_http_info(opts)
27
+ def discord_get_install_url(opts = {})
28
+ discord_get_install_url_with_http_info(opts)
26
29
  nil
27
30
  end
28
31
 
32
+ # Get Discord Bot Installation URL
33
+ # Generates the URL to invite the system-wide Discord Bot onto the merchant&#39;s Discord server.
29
34
  # @param [Hash] opts the optional parameters
35
+ # @option opts [String] :product_id Optional Product ID to redirect back to after installation
30
36
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
31
- def partner_controller_get_partner_commissions_with_http_info(opts = {})
37
+ def discord_get_install_url_with_http_info(opts = {})
32
38
  if @api_client.config.debugging
33
- @api_client.config.logger.debug 'Calling API: PartnerApi.partner_controller_get_partner_commissions ...'
39
+ @api_client.config.logger.debug 'Calling API: DiscordIntegrationApi.discord_get_install_url ...'
34
40
  end
35
41
  # resource path
36
- local_var_path = '/v1/partner/commissions'
42
+ local_var_path = '/v1/discord/install'
37
43
 
38
44
  # query parameters
39
45
  query_params = opts[:query_params] || {}
46
+ query_params[:'productId'] = opts[:'product_id'] if !opts[:'product_id'].nil?
40
47
 
41
48
  # header parameters
42
49
  header_params = opts[:header_params] || {}
@@ -54,7 +61,7 @@ module Solifyn
54
61
  auth_names = opts[:debug_auth_names] || []
55
62
 
56
63
  new_options = opts.merge(
57
- :operation => :"PartnerApi.partner_controller_get_partner_commissions",
64
+ :operation => :"DiscordIntegrationApi.discord_get_install_url",
58
65
  :header_params => header_params,
59
66
  :query_params => query_params,
60
67
  :form_params => form_params,
@@ -65,32 +72,38 @@ module Solifyn
65
72
 
66
73
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
67
74
  if @api_client.config.debugging
68
- @api_client.config.logger.debug "API called: PartnerApi#partner_controller_get_partner_commissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ @api_client.config.logger.debug "API called: DiscordIntegrationApi#discord_get_install_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
69
76
  end
70
77
  return data, status_code, headers
71
78
  end
72
79
 
80
+ # List Guild Discord Roles
81
+ # Retrieves all roles available in the connected merchant's Discord server/guild.
73
82
  # @param [Hash] opts the optional parameters
74
- # @return [nil]
75
- def partner_controller_get_partner_stats(opts = {})
76
- partner_controller_get_partner_stats_with_http_info(opts)
77
- nil
83
+ # @return [Array<DiscordRolesResponseDto>]
84
+ def discord_list_roles(opts = {})
85
+ data, _status_code, _headers = discord_list_roles_with_http_info(opts)
86
+ data
78
87
  end
79
88
 
89
+ # List Guild Discord Roles
90
+ # Retrieves all roles available in the connected merchant&#39;s Discord server/guild.
80
91
  # @param [Hash] opts the optional parameters
81
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
82
- def partner_controller_get_partner_stats_with_http_info(opts = {})
92
+ # @return [Array<(Array<DiscordRolesResponseDto>, Integer, Hash)>] Array<DiscordRolesResponseDto> data, response status code and response headers
93
+ def discord_list_roles_with_http_info(opts = {})
83
94
  if @api_client.config.debugging
84
- @api_client.config.logger.debug 'Calling API: PartnerApi.partner_controller_get_partner_stats ...'
95
+ @api_client.config.logger.debug 'Calling API: DiscordIntegrationApi.discord_list_roles ...'
85
96
  end
86
97
  # resource path
87
- local_var_path = '/v1/partner/stats'
98
+ local_var_path = '/v1/discord/roles'
88
99
 
89
100
  # query parameters
90
101
  query_params = opts[:query_params] || {}
91
102
 
92
103
  # header parameters
93
104
  header_params = opts[:header_params] || {}
105
+ # HTTP header 'Accept' (if needed)
106
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
94
107
 
95
108
  # form parameters
96
109
  form_params = opts[:form_params] || {}
@@ -99,13 +112,13 @@ module Solifyn
99
112
  post_body = opts[:debug_body]
100
113
 
101
114
  # return_type
102
- return_type = opts[:debug_return_type]
115
+ return_type = opts[:debug_return_type] || 'Array<DiscordRolesResponseDto>'
103
116
 
104
117
  # auth_names
105
118
  auth_names = opts[:debug_auth_names] || []
106
119
 
107
120
  new_options = opts.merge(
108
- :operation => :"PartnerApi.partner_controller_get_partner_stats",
121
+ :operation => :"DiscordIntegrationApi.discord_list_roles",
109
122
  :header_params => header_params,
110
123
  :query_params => query_params,
111
124
  :form_params => form_params,
@@ -116,7 +129,7 @@ module Solifyn
116
129
 
117
130
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
118
131
  if @api_client.config.debugging
119
- @api_client.config.logger.debug "API called: PartnerApi#partner_controller_get_partner_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
132
+ @api_client.config.logger.debug "API called: DiscordIntegrationApi#discord_list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
120
133
  end
121
134
  return data, status_code, headers
122
135
  end