solifyn 1.0.7 → 1.0.9
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 +5 -4
- data/docs/DefaultApi.md +284 -0
- data/docs/WebhookEntitlementGrantPayload.md +44 -0
- data/lib/solifyn/api/default_api.rb +248 -0
- data/lib/solifyn/models/webhook_entitlement_grant_payload.rb +343 -0
- data/lib/solifyn/version.rb +1 -1
- data/lib/solifyn.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63745af6a98d5384c95312f7a75548d225e4902cadc2ba25239aebeaa62908bc
|
|
4
|
+
data.tar.gz: 3d0f9d8383a1e715c8e45688a28c1e2678280bf209c02a1362041e7860e34df4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8ef8a292b96c8eda21f85d63abbbb121818e6bb96e019a6327bf1f9899f20fbc1ebbb0908916f494163ead3904b4042d271c27d92d2bc1384392c71ef8e03b0
|
|
7
|
+
data.tar.gz: 252a1eed21bc950213caa541a29edb21f46c3fef921885ab1545894c85192e1c896635c10c4d2690b8a48f1bf0a324a484e144de3ee1b77c77d236fdbc1c6d11
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage pr
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 1.0.0
|
|
10
|
-
- Package version: 1.0.
|
|
10
|
+
- Package version: 1.0.9
|
|
11
11
|
- Generator version: 7.10.0
|
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
13
|
|
|
@@ -24,16 +24,16 @@ gem build solifyn.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./solifyn-1.0.
|
|
27
|
+
gem install ./solifyn-1.0.9.gem
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
(for development, run `gem install --dev ./solifyn-1.0.
|
|
30
|
+
(for development, run `gem install --dev ./solifyn-1.0.9.gem` to install the development dependencies)
|
|
31
31
|
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
33
|
|
|
34
34
|
Finally add this to the Gemfile:
|
|
35
35
|
|
|
36
|
-
gem 'solifyn', '~> 1.0.
|
|
36
|
+
gem 'solifyn', '~> 1.0.9'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -336,6 +336,7 @@ Class | Method | HTTP request | Description
|
|
|
336
336
|
- [Solifyn::WebhookDeliveryResponseDto](docs/WebhookDeliveryResponseDto.md)
|
|
337
337
|
- [Solifyn::WebhookDisputePayload](docs/WebhookDisputePayload.md)
|
|
338
338
|
- [Solifyn::WebhookEndpointResponseDto](docs/WebhookEndpointResponseDto.md)
|
|
339
|
+
- [Solifyn::WebhookEntitlementGrantPayload](docs/WebhookEntitlementGrantPayload.md)
|
|
339
340
|
- [Solifyn::WebhookLicensePayload](docs/WebhookLicensePayload.md)
|
|
340
341
|
- [Solifyn::WebhookPaymentPayload](docs/WebhookPaymentPayload.md)
|
|
341
342
|
- [Solifyn::WebhookPaymentPayloadBillingAddress](docs/WebhookPaymentPayloadBillingAddress.md)
|
data/docs/DefaultApi.md
CHANGED
|
@@ -7,6 +7,10 @@ All URIs are relative to *https://api.solifyn.com*
|
|
|
7
7
|
| [**dispute_created_post**](DefaultApi.md#dispute_created_post) | **POST** /dispute.created | Dispute Created |
|
|
8
8
|
| [**dispute_lost_post**](DefaultApi.md#dispute_lost_post) | **POST** /dispute.lost | Dispute Lost |
|
|
9
9
|
| [**dispute_won_post**](DefaultApi.md#dispute_won_post) | **POST** /dispute.won | Dispute Won |
|
|
10
|
+
| [**entitlement_grant_created_post**](DefaultApi.md#entitlement_grant_created_post) | **POST** /entitlement_grant.created | Entitlement Grant Created |
|
|
11
|
+
| [**entitlement_grant_delivered_post**](DefaultApi.md#entitlement_grant_delivered_post) | **POST** /entitlement_grant.delivered | Entitlement Grant Delivered |
|
|
12
|
+
| [**entitlement_grant_failed_post**](DefaultApi.md#entitlement_grant_failed_post) | **POST** /entitlement_grant.failed | Entitlement Grant Failed |
|
|
13
|
+
| [**entitlement_grant_revoked_post**](DefaultApi.md#entitlement_grant_revoked_post) | **POST** /entitlement_grant.revoked | Entitlement Grant Revoked |
|
|
10
14
|
| [**license_created_post**](DefaultApi.md#license_created_post) | **POST** /license.created | License Created |
|
|
11
15
|
| [**license_revoked_post**](DefaultApi.md#license_revoked_post) | **POST** /license.revoked | License Revoked |
|
|
12
16
|
| [**payment_created_post**](DefaultApi.md#payment_created_post) | **POST** /payment.created | Payment Created |
|
|
@@ -229,6 +233,286 @@ nil (empty response body)
|
|
|
229
233
|
- **Accept**: Not defined
|
|
230
234
|
|
|
231
235
|
|
|
236
|
+
## entitlement_grant_created_post
|
|
237
|
+
|
|
238
|
+
> entitlement_grant_created_post(opts)
|
|
239
|
+
|
|
240
|
+
Entitlement Grant Created
|
|
241
|
+
|
|
242
|
+
Occurs when a new entitlement grant is created (e.g., at checkout completion if the product has GitHub access). The collaborator invitation is pending.
|
|
243
|
+
|
|
244
|
+
### Examples
|
|
245
|
+
|
|
246
|
+
```ruby
|
|
247
|
+
require 'time'
|
|
248
|
+
require 'solifyn'
|
|
249
|
+
# setup authorization
|
|
250
|
+
Solifyn.configure do |config|
|
|
251
|
+
# Configure Bearer authorization (API Key): ApiKeyAuth
|
|
252
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
api_instance = Solifyn::DefaultApi.new
|
|
256
|
+
opts = {
|
|
257
|
+
webhook_entitlement_grant_payload: # WebhookEntitlementGrantPayload |
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
begin
|
|
261
|
+
# Entitlement Grant Created
|
|
262
|
+
api_instance.entitlement_grant_created_post(opts)
|
|
263
|
+
rescue Solifyn::ApiError => e
|
|
264
|
+
puts "Error when calling DefaultApi->entitlement_grant_created_post: #{e}"
|
|
265
|
+
end
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Using the entitlement_grant_created_post_with_http_info variant
|
|
269
|
+
|
|
270
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
271
|
+
|
|
272
|
+
> <Array(nil, Integer, Hash)> entitlement_grant_created_post_with_http_info(opts)
|
|
273
|
+
|
|
274
|
+
```ruby
|
|
275
|
+
begin
|
|
276
|
+
# Entitlement Grant Created
|
|
277
|
+
data, status_code, headers = api_instance.entitlement_grant_created_post_with_http_info(opts)
|
|
278
|
+
p status_code # => 2xx
|
|
279
|
+
p headers # => { ... }
|
|
280
|
+
p data # => nil
|
|
281
|
+
rescue Solifyn::ApiError => e
|
|
282
|
+
puts "Error when calling DefaultApi->entitlement_grant_created_post_with_http_info: #{e}"
|
|
283
|
+
end
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### Parameters
|
|
287
|
+
|
|
288
|
+
| Name | Type | Description | Notes |
|
|
289
|
+
| ---- | ---- | ----------- | ----- |
|
|
290
|
+
| **webhook_entitlement_grant_payload** | [**WebhookEntitlementGrantPayload**](WebhookEntitlementGrantPayload.md) | | [optional] |
|
|
291
|
+
|
|
292
|
+
### Return type
|
|
293
|
+
|
|
294
|
+
nil (empty response body)
|
|
295
|
+
|
|
296
|
+
### Authorization
|
|
297
|
+
|
|
298
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
299
|
+
|
|
300
|
+
### HTTP request headers
|
|
301
|
+
|
|
302
|
+
- **Content-Type**: application/json
|
|
303
|
+
- **Accept**: Not defined
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
## entitlement_grant_delivered_post
|
|
307
|
+
|
|
308
|
+
> entitlement_grant_delivered_post(opts)
|
|
309
|
+
|
|
310
|
+
Entitlement Grant Delivered
|
|
311
|
+
|
|
312
|
+
Occurs when the customer successfully connects their GitHub account and the collaborator invitation is successfully delivered.
|
|
313
|
+
|
|
314
|
+
### Examples
|
|
315
|
+
|
|
316
|
+
```ruby
|
|
317
|
+
require 'time'
|
|
318
|
+
require 'solifyn'
|
|
319
|
+
# setup authorization
|
|
320
|
+
Solifyn.configure do |config|
|
|
321
|
+
# Configure Bearer authorization (API Key): ApiKeyAuth
|
|
322
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
api_instance = Solifyn::DefaultApi.new
|
|
326
|
+
opts = {
|
|
327
|
+
webhook_entitlement_grant_payload: # WebhookEntitlementGrantPayload |
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
begin
|
|
331
|
+
# Entitlement Grant Delivered
|
|
332
|
+
api_instance.entitlement_grant_delivered_post(opts)
|
|
333
|
+
rescue Solifyn::ApiError => e
|
|
334
|
+
puts "Error when calling DefaultApi->entitlement_grant_delivered_post: #{e}"
|
|
335
|
+
end
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
#### Using the entitlement_grant_delivered_post_with_http_info variant
|
|
339
|
+
|
|
340
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
341
|
+
|
|
342
|
+
> <Array(nil, Integer, Hash)> entitlement_grant_delivered_post_with_http_info(opts)
|
|
343
|
+
|
|
344
|
+
```ruby
|
|
345
|
+
begin
|
|
346
|
+
# Entitlement Grant Delivered
|
|
347
|
+
data, status_code, headers = api_instance.entitlement_grant_delivered_post_with_http_info(opts)
|
|
348
|
+
p status_code # => 2xx
|
|
349
|
+
p headers # => { ... }
|
|
350
|
+
p data # => nil
|
|
351
|
+
rescue Solifyn::ApiError => e
|
|
352
|
+
puts "Error when calling DefaultApi->entitlement_grant_delivered_post_with_http_info: #{e}"
|
|
353
|
+
end
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### Parameters
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
| ---- | ---- | ----------- | ----- |
|
|
360
|
+
| **webhook_entitlement_grant_payload** | [**WebhookEntitlementGrantPayload**](WebhookEntitlementGrantPayload.md) | | [optional] |
|
|
361
|
+
|
|
362
|
+
### Return type
|
|
363
|
+
|
|
364
|
+
nil (empty response body)
|
|
365
|
+
|
|
366
|
+
### Authorization
|
|
367
|
+
|
|
368
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
369
|
+
|
|
370
|
+
### HTTP request headers
|
|
371
|
+
|
|
372
|
+
- **Content-Type**: application/json
|
|
373
|
+
- **Accept**: Not defined
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
## entitlement_grant_failed_post
|
|
377
|
+
|
|
378
|
+
> entitlement_grant_failed_post(opts)
|
|
379
|
+
|
|
380
|
+
Entitlement Grant Failed
|
|
381
|
+
|
|
382
|
+
Occurs when invitation delivery fails (e.g., if the user GitHub account is flagged or invitation limit is reached).
|
|
383
|
+
|
|
384
|
+
### Examples
|
|
385
|
+
|
|
386
|
+
```ruby
|
|
387
|
+
require 'time'
|
|
388
|
+
require 'solifyn'
|
|
389
|
+
# setup authorization
|
|
390
|
+
Solifyn.configure do |config|
|
|
391
|
+
# Configure Bearer authorization (API Key): ApiKeyAuth
|
|
392
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
api_instance = Solifyn::DefaultApi.new
|
|
396
|
+
opts = {
|
|
397
|
+
webhook_entitlement_grant_payload: # WebhookEntitlementGrantPayload |
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
begin
|
|
401
|
+
# Entitlement Grant Failed
|
|
402
|
+
api_instance.entitlement_grant_failed_post(opts)
|
|
403
|
+
rescue Solifyn::ApiError => e
|
|
404
|
+
puts "Error when calling DefaultApi->entitlement_grant_failed_post: #{e}"
|
|
405
|
+
end
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Using the entitlement_grant_failed_post_with_http_info variant
|
|
409
|
+
|
|
410
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
411
|
+
|
|
412
|
+
> <Array(nil, Integer, Hash)> entitlement_grant_failed_post_with_http_info(opts)
|
|
413
|
+
|
|
414
|
+
```ruby
|
|
415
|
+
begin
|
|
416
|
+
# Entitlement Grant Failed
|
|
417
|
+
data, status_code, headers = api_instance.entitlement_grant_failed_post_with_http_info(opts)
|
|
418
|
+
p status_code # => 2xx
|
|
419
|
+
p headers # => { ... }
|
|
420
|
+
p data # => nil
|
|
421
|
+
rescue Solifyn::ApiError => e
|
|
422
|
+
puts "Error when calling DefaultApi->entitlement_grant_failed_post_with_http_info: #{e}"
|
|
423
|
+
end
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Parameters
|
|
427
|
+
|
|
428
|
+
| Name | Type | Description | Notes |
|
|
429
|
+
| ---- | ---- | ----------- | ----- |
|
|
430
|
+
| **webhook_entitlement_grant_payload** | [**WebhookEntitlementGrantPayload**](WebhookEntitlementGrantPayload.md) | | [optional] |
|
|
431
|
+
|
|
432
|
+
### Return type
|
|
433
|
+
|
|
434
|
+
nil (empty response body)
|
|
435
|
+
|
|
436
|
+
### Authorization
|
|
437
|
+
|
|
438
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
439
|
+
|
|
440
|
+
### HTTP request headers
|
|
441
|
+
|
|
442
|
+
- **Content-Type**: application/json
|
|
443
|
+
- **Accept**: Not defined
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
## entitlement_grant_revoked_post
|
|
447
|
+
|
|
448
|
+
> entitlement_grant_revoked_post(opts)
|
|
449
|
+
|
|
450
|
+
Entitlement Grant Revoked
|
|
451
|
+
|
|
452
|
+
Occurs when the customer access is removed from the repository (manually or automatically via subscription cancel/refund).
|
|
453
|
+
|
|
454
|
+
### Examples
|
|
455
|
+
|
|
456
|
+
```ruby
|
|
457
|
+
require 'time'
|
|
458
|
+
require 'solifyn'
|
|
459
|
+
# setup authorization
|
|
460
|
+
Solifyn.configure do |config|
|
|
461
|
+
# Configure Bearer authorization (API Key): ApiKeyAuth
|
|
462
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
api_instance = Solifyn::DefaultApi.new
|
|
466
|
+
opts = {
|
|
467
|
+
webhook_entitlement_grant_payload: # WebhookEntitlementGrantPayload |
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
begin
|
|
471
|
+
# Entitlement Grant Revoked
|
|
472
|
+
api_instance.entitlement_grant_revoked_post(opts)
|
|
473
|
+
rescue Solifyn::ApiError => e
|
|
474
|
+
puts "Error when calling DefaultApi->entitlement_grant_revoked_post: #{e}"
|
|
475
|
+
end
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
#### Using the entitlement_grant_revoked_post_with_http_info variant
|
|
479
|
+
|
|
480
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
481
|
+
|
|
482
|
+
> <Array(nil, Integer, Hash)> entitlement_grant_revoked_post_with_http_info(opts)
|
|
483
|
+
|
|
484
|
+
```ruby
|
|
485
|
+
begin
|
|
486
|
+
# Entitlement Grant Revoked
|
|
487
|
+
data, status_code, headers = api_instance.entitlement_grant_revoked_post_with_http_info(opts)
|
|
488
|
+
p status_code # => 2xx
|
|
489
|
+
p headers # => { ... }
|
|
490
|
+
p data # => nil
|
|
491
|
+
rescue Solifyn::ApiError => e
|
|
492
|
+
puts "Error when calling DefaultApi->entitlement_grant_revoked_post_with_http_info: #{e}"
|
|
493
|
+
end
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Parameters
|
|
497
|
+
|
|
498
|
+
| Name | Type | Description | Notes |
|
|
499
|
+
| ---- | ---- | ----------- | ----- |
|
|
500
|
+
| **webhook_entitlement_grant_payload** | [**WebhookEntitlementGrantPayload**](WebhookEntitlementGrantPayload.md) | | [optional] |
|
|
501
|
+
|
|
502
|
+
### Return type
|
|
503
|
+
|
|
504
|
+
nil (empty response body)
|
|
505
|
+
|
|
506
|
+
### Authorization
|
|
507
|
+
|
|
508
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
509
|
+
|
|
510
|
+
### HTTP request headers
|
|
511
|
+
|
|
512
|
+
- **Content-Type**: application/json
|
|
513
|
+
- **Accept**: Not defined
|
|
514
|
+
|
|
515
|
+
|
|
232
516
|
## license_created_post
|
|
233
517
|
|
|
234
518
|
> license_created_post(opts)
|
|
@@ -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
|
+
|
|
@@ -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
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Solifyn API
|
|
3
|
+
|
|
4
|
+
#Welcome to the Solifyn API Reference. Leverage our secure endpoints to manage products and issue, validate, and manage software license keys programmatically.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Solifyn
|
|
17
|
+
class WebhookEntitlementGrantPayload
|
|
18
|
+
# The unique entitlement grant ID.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# The business ID context.
|
|
22
|
+
attr_accessor :business_id
|
|
23
|
+
|
|
24
|
+
# The customer ID.
|
|
25
|
+
attr_accessor :customer_id
|
|
26
|
+
|
|
27
|
+
# Associated payment transaction ID.
|
|
28
|
+
attr_accessor :payment_id
|
|
29
|
+
|
|
30
|
+
# The purchased product ID.
|
|
31
|
+
attr_accessor :product_id
|
|
32
|
+
|
|
33
|
+
# The type of entitlement (e.g. GITHUB).
|
|
34
|
+
attr_accessor :type
|
|
35
|
+
|
|
36
|
+
# Target GitHub repository (owner/repo) if type is GITHUB.
|
|
37
|
+
attr_accessor :github_repo
|
|
38
|
+
|
|
39
|
+
# GitHub access permission level if type is GITHUB.
|
|
40
|
+
attr_accessor :github_permission
|
|
41
|
+
|
|
42
|
+
# The connected customer GitHub username.
|
|
43
|
+
attr_accessor :github_username
|
|
44
|
+
|
|
45
|
+
# Delivery status of the collaborator invite (PENDING, DELIVERED, FAILED, REVOKED).
|
|
46
|
+
attr_accessor :status
|
|
47
|
+
|
|
48
|
+
# OAuth URL to redirect the customer to.
|
|
49
|
+
attr_accessor :oauth_url
|
|
50
|
+
|
|
51
|
+
# Error message if invitation delivery failed.
|
|
52
|
+
attr_accessor :error_details
|
|
53
|
+
|
|
54
|
+
attr_accessor :created_at
|
|
55
|
+
|
|
56
|
+
attr_accessor :updated_at
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'id' => :'id',
|
|
62
|
+
:'business_id' => :'businessId',
|
|
63
|
+
:'customer_id' => :'customerId',
|
|
64
|
+
:'payment_id' => :'paymentId',
|
|
65
|
+
:'product_id' => :'productId',
|
|
66
|
+
:'type' => :'type',
|
|
67
|
+
:'github_repo' => :'githubRepo',
|
|
68
|
+
:'github_permission' => :'githubPermission',
|
|
69
|
+
:'github_username' => :'githubUsername',
|
|
70
|
+
:'status' => :'status',
|
|
71
|
+
:'oauth_url' => :'oauthUrl',
|
|
72
|
+
:'error_details' => :'errorDetails',
|
|
73
|
+
:'created_at' => :'createdAt',
|
|
74
|
+
:'updated_at' => :'updatedAt'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'id' => :'String',
|
|
87
|
+
:'business_id' => :'String',
|
|
88
|
+
:'customer_id' => :'String',
|
|
89
|
+
:'payment_id' => :'String',
|
|
90
|
+
:'product_id' => :'String',
|
|
91
|
+
:'type' => :'String',
|
|
92
|
+
:'github_repo' => :'String',
|
|
93
|
+
:'github_permission' => :'String',
|
|
94
|
+
:'github_username' => :'String',
|
|
95
|
+
:'status' => :'String',
|
|
96
|
+
:'oauth_url' => :'String',
|
|
97
|
+
:'error_details' => :'String',
|
|
98
|
+
:'created_at' => :'Time',
|
|
99
|
+
:'updated_at' => :'Time'
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# List of attributes with nullable: true
|
|
104
|
+
def self.openapi_nullable
|
|
105
|
+
Set.new([
|
|
106
|
+
])
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Initializes the object
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
def initialize(attributes = {})
|
|
112
|
+
if (!attributes.is_a?(Hash))
|
|
113
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Solifyn::WebhookEntitlementGrantPayload` initialize method"
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Solifyn::WebhookEntitlementGrantPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
120
|
+
end
|
|
121
|
+
h[k.to_sym] = v
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'id')
|
|
125
|
+
self.id = attributes[:'id']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'business_id')
|
|
129
|
+
self.business_id = attributes[:'business_id']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'customer_id')
|
|
133
|
+
self.customer_id = attributes[:'customer_id']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'payment_id')
|
|
137
|
+
self.payment_id = attributes[:'payment_id']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'product_id')
|
|
141
|
+
self.product_id = attributes[:'product_id']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'type')
|
|
145
|
+
self.type = attributes[:'type']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'github_repo')
|
|
149
|
+
self.github_repo = attributes[:'github_repo']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'github_permission')
|
|
153
|
+
self.github_permission = attributes[:'github_permission']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'github_username')
|
|
157
|
+
self.github_username = attributes[:'github_username']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'status')
|
|
161
|
+
self.status = attributes[:'status']
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'oauth_url')
|
|
165
|
+
self.oauth_url = attributes[:'oauth_url']
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'error_details')
|
|
169
|
+
self.error_details = attributes[:'error_details']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'created_at')
|
|
173
|
+
self.created_at = attributes[:'created_at']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'updated_at')
|
|
177
|
+
self.updated_at = attributes[:'updated_at']
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
182
|
+
# @return Array for valid properties with the reasons
|
|
183
|
+
def list_invalid_properties
|
|
184
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
185
|
+
invalid_properties = Array.new
|
|
186
|
+
invalid_properties
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Check to see if the all the properties in the model are valid
|
|
190
|
+
# @return true if the model is valid
|
|
191
|
+
def valid?
|
|
192
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
193
|
+
true
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Checks equality by comparing each attribute.
|
|
197
|
+
# @param [Object] Object to be compared
|
|
198
|
+
def ==(o)
|
|
199
|
+
return true if self.equal?(o)
|
|
200
|
+
self.class == o.class &&
|
|
201
|
+
id == o.id &&
|
|
202
|
+
business_id == o.business_id &&
|
|
203
|
+
customer_id == o.customer_id &&
|
|
204
|
+
payment_id == o.payment_id &&
|
|
205
|
+
product_id == o.product_id &&
|
|
206
|
+
type == o.type &&
|
|
207
|
+
github_repo == o.github_repo &&
|
|
208
|
+
github_permission == o.github_permission &&
|
|
209
|
+
github_username == o.github_username &&
|
|
210
|
+
status == o.status &&
|
|
211
|
+
oauth_url == o.oauth_url &&
|
|
212
|
+
error_details == o.error_details &&
|
|
213
|
+
created_at == o.created_at &&
|
|
214
|
+
updated_at == o.updated_at
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# @see the `==` method
|
|
218
|
+
# @param [Object] Object to be compared
|
|
219
|
+
def eql?(o)
|
|
220
|
+
self == o
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Calculates hash code according to all attributes.
|
|
224
|
+
# @return [Integer] Hash code
|
|
225
|
+
def hash
|
|
226
|
+
[id, business_id, customer_id, payment_id, product_id, type, github_repo, github_permission, github_username, status, oauth_url, error_details, created_at, updated_at].hash
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Builds the object from hash
|
|
230
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
231
|
+
# @return [Object] Returns the model itself
|
|
232
|
+
def self.build_from_hash(attributes)
|
|
233
|
+
return nil unless attributes.is_a?(Hash)
|
|
234
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
235
|
+
transformed_hash = {}
|
|
236
|
+
openapi_types.each_pair do |key, type|
|
|
237
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
238
|
+
transformed_hash["#{key}"] = nil
|
|
239
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
240
|
+
# check to ensure the input is an array given that the attribute
|
|
241
|
+
# is documented as an array but the input is not
|
|
242
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
243
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
244
|
+
end
|
|
245
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
246
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
new(transformed_hash)
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
# Deserializes the data based on type
|
|
253
|
+
# @param string type Data type
|
|
254
|
+
# @param string value Value to be deserialized
|
|
255
|
+
# @return [Object] Deserialized data
|
|
256
|
+
def self._deserialize(type, value)
|
|
257
|
+
case type.to_sym
|
|
258
|
+
when :Time
|
|
259
|
+
Time.parse(value)
|
|
260
|
+
when :Date
|
|
261
|
+
Date.parse(value)
|
|
262
|
+
when :String
|
|
263
|
+
value.to_s
|
|
264
|
+
when :Integer
|
|
265
|
+
value.to_i
|
|
266
|
+
when :Float
|
|
267
|
+
value.to_f
|
|
268
|
+
when :Boolean
|
|
269
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
270
|
+
true
|
|
271
|
+
else
|
|
272
|
+
false
|
|
273
|
+
end
|
|
274
|
+
when :Object
|
|
275
|
+
# generic object (usually a Hash), return directly
|
|
276
|
+
value
|
|
277
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
278
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
279
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
280
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
281
|
+
k_type = Regexp.last_match[:k_type]
|
|
282
|
+
v_type = Regexp.last_match[:v_type]
|
|
283
|
+
{}.tap do |hash|
|
|
284
|
+
value.each do |k, v|
|
|
285
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
286
|
+
end
|
|
287
|
+
end
|
|
288
|
+
else # model
|
|
289
|
+
# models (e.g. Pet) or oneOf
|
|
290
|
+
klass = Solifyn.const_get(type)
|
|
291
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Returns the string representation of the object
|
|
296
|
+
# @return [String] String presentation of the object
|
|
297
|
+
def to_s
|
|
298
|
+
to_hash.to_s
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
302
|
+
# @return [Hash] Returns the object in the form of hash
|
|
303
|
+
def to_body
|
|
304
|
+
to_hash
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Returns the object in the form of hash
|
|
308
|
+
# @return [Hash] Returns the object in the form of hash
|
|
309
|
+
def to_hash
|
|
310
|
+
hash = {}
|
|
311
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
312
|
+
value = self.send(attr)
|
|
313
|
+
if value.nil?
|
|
314
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
315
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
hash[param] = _to_hash(value)
|
|
319
|
+
end
|
|
320
|
+
hash
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Outputs non-array value in the form of hash
|
|
324
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
325
|
+
# @param [Object] value Any valid value
|
|
326
|
+
# @return [Hash] Returns the value in the form of hash
|
|
327
|
+
def _to_hash(value)
|
|
328
|
+
if value.is_a?(Array)
|
|
329
|
+
value.compact.map { |v| _to_hash(v) }
|
|
330
|
+
elsif value.is_a?(Hash)
|
|
331
|
+
{}.tap do |hash|
|
|
332
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
333
|
+
end
|
|
334
|
+
elsif value.respond_to? :to_hash
|
|
335
|
+
value.to_hash
|
|
336
|
+
else
|
|
337
|
+
value
|
|
338
|
+
end
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
end
|
data/lib/solifyn/version.rb
CHANGED
data/lib/solifyn.rb
CHANGED
|
@@ -146,6 +146,7 @@ require 'solifyn/models/update_webhook_endpoint_dto'
|
|
|
146
146
|
require 'solifyn/models/webhook_delivery_response_dto'
|
|
147
147
|
require 'solifyn/models/webhook_dispute_payload'
|
|
148
148
|
require 'solifyn/models/webhook_endpoint_response_dto'
|
|
149
|
+
require 'solifyn/models/webhook_entitlement_grant_payload'
|
|
149
150
|
require 'solifyn/models/webhook_license_payload'
|
|
150
151
|
require 'solifyn/models/webhook_payment_payload'
|
|
151
152
|
require 'solifyn/models/webhook_payment_payload_billing_address'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solifyn
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Solifyn
|
|
@@ -241,6 +241,7 @@ files:
|
|
|
241
241
|
- docs/WebhookDisputePayload.md
|
|
242
242
|
- docs/WebhookEndpointApi.md
|
|
243
243
|
- docs/WebhookEndpointResponseDto.md
|
|
244
|
+
- docs/WebhookEntitlementGrantPayload.md
|
|
244
245
|
- docs/WebhookLicensePayload.md
|
|
245
246
|
- docs/WebhookPaymentPayload.md
|
|
246
247
|
- docs/WebhookPaymentPayloadBillingAddress.md
|
|
@@ -435,6 +436,7 @@ files:
|
|
|
435
436
|
- lib/solifyn/models/webhook_delivery_response_dto.rb
|
|
436
437
|
- lib/solifyn/models/webhook_dispute_payload.rb
|
|
437
438
|
- lib/solifyn/models/webhook_endpoint_response_dto.rb
|
|
439
|
+
- lib/solifyn/models/webhook_entitlement_grant_payload.rb
|
|
438
440
|
- lib/solifyn/models/webhook_license_payload.rb
|
|
439
441
|
- lib/solifyn/models/webhook_payment_payload.rb
|
|
440
442
|
- lib/solifyn/models/webhook_payment_payload_billing_address.rb
|