dodopayments 2.6.0 → 2.7.1
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/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/util.rb +3 -1
- data/lib/dodopayments/models/license_key.rb +33 -10
- data/lib/dodopayments/models/license_key_create_params.rb +54 -0
- data/lib/dodopayments/models/license_key_list_params.rb +20 -1
- data/lib/dodopayments/models/product.rb +228 -1
- data/lib/dodopayments/models/product_create_params.rb +15 -1
- data/lib/dodopayments/models/product_list_response.rb +225 -1
- data/lib/dodopayments/models/product_update_params.rb +16 -1
- data/lib/dodopayments/models/webhook_event_type.rb +4 -0
- data/lib/dodopayments/models/webhook_payload.rb +176 -3
- data/lib/dodopayments/models.rb +2 -0
- data/lib/dodopayments/resources/license_keys.rb +37 -1
- data/lib/dodopayments/resources/products.rb +6 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +1 -0
- data/rbi/dodopayments/models/license_key.rbi +39 -8
- data/rbi/dodopayments/models/license_key_create_params.rbi +78 -0
- data/rbi/dodopayments/models/license_key_list_params.rbi +44 -0
- data/rbi/dodopayments/models/product.rbi +425 -0
- data/rbi/dodopayments/models/product_create_params.rbi +8 -0
- data/rbi/dodopayments/models/product_list_response.rbi +436 -0
- data/rbi/dodopayments/models/product_update_params.rbi +10 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +20 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +267 -4
- data/rbi/dodopayments/models.rbi +2 -0
- data/rbi/dodopayments/resources/license_keys.rbi +28 -0
- data/rbi/dodopayments/resources/products.rbi +7 -0
- data/sig/dodopayments/models/license_key.rbs +21 -5
- data/sig/dodopayments/models/license_key_create_params.rbs +46 -0
- data/sig/dodopayments/models/license_key_list_params.rbs +20 -0
- data/sig/dodopayments/models/product.rbs +206 -0
- data/sig/dodopayments/models/product_create_params.rbs +5 -0
- data/sig/dodopayments/models/product_list_response.rbs +206 -0
- data/sig/dodopayments/models/product_update_params.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +8 -0
- data/sig/dodopayments/models/webhook_payload.rbs +158 -0
- data/sig/dodopayments/models.rbs +2 -0
- data/sig/dodopayments/resources/license_keys.rbs +10 -0
- data/sig/dodopayments/resources/products.rbs +2 -0
- metadata +5 -2
|
@@ -41,6 +41,7 @@ module Dodopayments
|
|
|
41
41
|
| Dodopayments::WebhookPayload::Data::CreditBalanceLow
|
|
42
42
|
| Dodopayments::WebhookPayload::Data::AbandonedCheckout
|
|
43
43
|
| Dodopayments::WebhookPayload::Data::DunningAttempt
|
|
44
|
+
| Dodopayments::WebhookPayload::Data::EntitlementGrant
|
|
44
45
|
|
|
45
46
|
module Data
|
|
46
47
|
extend Dodopayments::Internal::Type::Union
|
|
@@ -461,6 +462,163 @@ module Dodopayments
|
|
|
461
462
|
end
|
|
462
463
|
end
|
|
463
464
|
|
|
465
|
+
type entitlement_grant =
|
|
466
|
+
{
|
|
467
|
+
id: String,
|
|
468
|
+
business_id: String,
|
|
469
|
+
created_at: Time,
|
|
470
|
+
customer_id: String,
|
|
471
|
+
entitlement_id: String,
|
|
472
|
+
external_id: String,
|
|
473
|
+
payload_type: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::payload_type,
|
|
474
|
+
status: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::status,
|
|
475
|
+
updated_at: Time,
|
|
476
|
+
delivered_at: Time?,
|
|
477
|
+
error_code: String?,
|
|
478
|
+
error_message: String?,
|
|
479
|
+
license_key: String?,
|
|
480
|
+
license_key_activations_limit: Integer?,
|
|
481
|
+
license_key_activations_used: Integer?,
|
|
482
|
+
license_key_expires_at: Time?,
|
|
483
|
+
license_key_status: String?,
|
|
484
|
+
metadata: top,
|
|
485
|
+
oauth_expires_at: Time?,
|
|
486
|
+
oauth_url: String?,
|
|
487
|
+
payment_id: String?,
|
|
488
|
+
revocation_reason: String?,
|
|
489
|
+
revoked_at: Time?,
|
|
490
|
+
subscription_id: String?
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
class EntitlementGrant < Dodopayments::Internal::Type::BaseModel
|
|
494
|
+
attr_accessor id: String
|
|
495
|
+
|
|
496
|
+
attr_accessor business_id: String
|
|
497
|
+
|
|
498
|
+
attr_accessor created_at: Time
|
|
499
|
+
|
|
500
|
+
attr_accessor customer_id: String
|
|
501
|
+
|
|
502
|
+
attr_accessor entitlement_id: String
|
|
503
|
+
|
|
504
|
+
attr_accessor external_id: String
|
|
505
|
+
|
|
506
|
+
attr_accessor payload_type: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::payload_type
|
|
507
|
+
|
|
508
|
+
attr_accessor status: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::status
|
|
509
|
+
|
|
510
|
+
attr_accessor updated_at: Time
|
|
511
|
+
|
|
512
|
+
attr_accessor delivered_at: Time?
|
|
513
|
+
|
|
514
|
+
attr_accessor error_code: String?
|
|
515
|
+
|
|
516
|
+
attr_accessor error_message: String?
|
|
517
|
+
|
|
518
|
+
attr_accessor license_key: String?
|
|
519
|
+
|
|
520
|
+
attr_accessor license_key_activations_limit: Integer?
|
|
521
|
+
|
|
522
|
+
attr_accessor license_key_activations_used: Integer?
|
|
523
|
+
|
|
524
|
+
attr_accessor license_key_expires_at: Time?
|
|
525
|
+
|
|
526
|
+
attr_accessor license_key_status: String?
|
|
527
|
+
|
|
528
|
+
attr_reader metadata: top?
|
|
529
|
+
|
|
530
|
+
def metadata=: (top) -> top
|
|
531
|
+
|
|
532
|
+
attr_accessor oauth_expires_at: Time?
|
|
533
|
+
|
|
534
|
+
attr_accessor oauth_url: String?
|
|
535
|
+
|
|
536
|
+
attr_accessor payment_id: String?
|
|
537
|
+
|
|
538
|
+
attr_accessor revocation_reason: String?
|
|
539
|
+
|
|
540
|
+
attr_accessor revoked_at: Time?
|
|
541
|
+
|
|
542
|
+
attr_accessor subscription_id: String?
|
|
543
|
+
|
|
544
|
+
def initialize: (
|
|
545
|
+
id: String,
|
|
546
|
+
business_id: String,
|
|
547
|
+
created_at: Time,
|
|
548
|
+
customer_id: String,
|
|
549
|
+
entitlement_id: String,
|
|
550
|
+
external_id: String,
|
|
551
|
+
payload_type: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::payload_type,
|
|
552
|
+
status: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::status,
|
|
553
|
+
updated_at: Time,
|
|
554
|
+
?delivered_at: Time?,
|
|
555
|
+
?error_code: String?,
|
|
556
|
+
?error_message: String?,
|
|
557
|
+
?license_key: String?,
|
|
558
|
+
?license_key_activations_limit: Integer?,
|
|
559
|
+
?license_key_activations_used: Integer?,
|
|
560
|
+
?license_key_expires_at: Time?,
|
|
561
|
+
?license_key_status: String?,
|
|
562
|
+
?metadata: top,
|
|
563
|
+
?oauth_expires_at: Time?,
|
|
564
|
+
?oauth_url: String?,
|
|
565
|
+
?payment_id: String?,
|
|
566
|
+
?revocation_reason: String?,
|
|
567
|
+
?revoked_at: Time?,
|
|
568
|
+
?subscription_id: String?
|
|
569
|
+
) -> void
|
|
570
|
+
|
|
571
|
+
def to_hash: -> {
|
|
572
|
+
id: String,
|
|
573
|
+
business_id: String,
|
|
574
|
+
created_at: Time,
|
|
575
|
+
customer_id: String,
|
|
576
|
+
entitlement_id: String,
|
|
577
|
+
external_id: String,
|
|
578
|
+
payload_type: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::payload_type,
|
|
579
|
+
status: Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::status,
|
|
580
|
+
updated_at: Time,
|
|
581
|
+
delivered_at: Time?,
|
|
582
|
+
error_code: String?,
|
|
583
|
+
error_message: String?,
|
|
584
|
+
license_key: String?,
|
|
585
|
+
license_key_activations_limit: Integer?,
|
|
586
|
+
license_key_activations_used: Integer?,
|
|
587
|
+
license_key_expires_at: Time?,
|
|
588
|
+
license_key_status: String?,
|
|
589
|
+
metadata: top,
|
|
590
|
+
oauth_expires_at: Time?,
|
|
591
|
+
oauth_url: String?,
|
|
592
|
+
payment_id: String?,
|
|
593
|
+
revocation_reason: String?,
|
|
594
|
+
revoked_at: Time?,
|
|
595
|
+
subscription_id: String?
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
type payload_type = :EntitlementGrant
|
|
599
|
+
|
|
600
|
+
module PayloadType
|
|
601
|
+
extend Dodopayments::Internal::Type::Enum
|
|
602
|
+
|
|
603
|
+
ENTITLEMENT_GRANT: :EntitlementGrant
|
|
604
|
+
|
|
605
|
+
def self?.values: -> ::Array[Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::payload_type]
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
type status = :Pending | :Delivered | :Failed | :Revoked
|
|
609
|
+
|
|
610
|
+
module Status
|
|
611
|
+
extend Dodopayments::Internal::Type::Enum
|
|
612
|
+
|
|
613
|
+
PENDING: :Pending
|
|
614
|
+
DELIVERED: :Delivered
|
|
615
|
+
FAILED: :Failed
|
|
616
|
+
REVOKED: :Revoked
|
|
617
|
+
|
|
618
|
+
def self?.values: -> ::Array[Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::status]
|
|
619
|
+
end
|
|
620
|
+
end
|
|
621
|
+
|
|
464
622
|
def self?.variants: -> ::Array[Dodopayments::Models::WebhookPayload::data]
|
|
465
623
|
end
|
|
466
624
|
end
|
data/sig/dodopayments/models.rbs
CHANGED
|
@@ -205,6 +205,8 @@ module Dodopayments
|
|
|
205
205
|
|
|
206
206
|
class LicenseKeyCreatedWebhookEvent = Dodopayments::Models::LicenseKeyCreatedWebhookEvent
|
|
207
207
|
|
|
208
|
+
class LicenseKeyCreateParams = Dodopayments::Models::LicenseKeyCreateParams
|
|
209
|
+
|
|
208
210
|
class LicenseKeyDuration = Dodopayments::Models::LicenseKeyDuration
|
|
209
211
|
|
|
210
212
|
class LicenseKeyInstance = Dodopayments::Models::LicenseKeyInstance
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
module Dodopayments
|
|
2
2
|
module Resources
|
|
3
3
|
class LicenseKeys
|
|
4
|
+
def create: (
|
|
5
|
+
customer_id: String,
|
|
6
|
+
key: String,
|
|
7
|
+
product_id: String,
|
|
8
|
+
?activations_limit: Integer?,
|
|
9
|
+
?expires_at: Time?,
|
|
10
|
+
?request_options: Dodopayments::request_opts
|
|
11
|
+
) -> Dodopayments::LicenseKey
|
|
12
|
+
|
|
4
13
|
def retrieve: (
|
|
5
14
|
String id,
|
|
6
15
|
?request_options: Dodopayments::request_opts
|
|
@@ -21,6 +30,7 @@ module Dodopayments
|
|
|
21
30
|
?page_number: Integer,
|
|
22
31
|
?page_size: Integer,
|
|
23
32
|
?product_id: String,
|
|
33
|
+
?source: Dodopayments::Models::LicenseKeyListParams::source,
|
|
24
34
|
?status: Dodopayments::Models::LicenseKeyListParams::status,
|
|
25
35
|
?request_options: Dodopayments::request_opts
|
|
26
36
|
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::LicenseKey]
|
|
@@ -14,6 +14,7 @@ module Dodopayments
|
|
|
14
14
|
?credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
15
15
|
?description: String?,
|
|
16
16
|
?digital_product_delivery: Dodopayments::ProductCreateParams::DigitalProductDelivery?,
|
|
17
|
+
?entitlement_ids: ::Array[String]?,
|
|
17
18
|
?license_key_activation_message: String?,
|
|
18
19
|
?license_key_activations_limit: Integer?,
|
|
19
20
|
?license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
@@ -34,6 +35,7 @@ module Dodopayments
|
|
|
34
35
|
?credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
35
36
|
?description: String?,
|
|
36
37
|
?digital_product_delivery: Dodopayments::ProductUpdateParams::DigitalProductDelivery?,
|
|
38
|
+
?entitlement_ids: ::Array[String]?,
|
|
37
39
|
?image_id: String?,
|
|
38
40
|
?license_key_activation_message: String?,
|
|
39
41
|
?license_key_activations_limit: Integer?,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dodopayments
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.7.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dodo Payments
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -211,6 +211,7 @@ files:
|
|
|
211
211
|
- lib/dodopayments/models/license_activate_response.rb
|
|
212
212
|
- lib/dodopayments/models/license_deactivate_params.rb
|
|
213
213
|
- lib/dodopayments/models/license_key.rb
|
|
214
|
+
- lib/dodopayments/models/license_key_create_params.rb
|
|
214
215
|
- lib/dodopayments/models/license_key_created_webhook_event.rb
|
|
215
216
|
- lib/dodopayments/models/license_key_duration.rb
|
|
216
217
|
- lib/dodopayments/models/license_key_instance.rb
|
|
@@ -522,6 +523,7 @@ files:
|
|
|
522
523
|
- rbi/dodopayments/models/license_activate_response.rbi
|
|
523
524
|
- rbi/dodopayments/models/license_deactivate_params.rbi
|
|
524
525
|
- rbi/dodopayments/models/license_key.rbi
|
|
526
|
+
- rbi/dodopayments/models/license_key_create_params.rbi
|
|
525
527
|
- rbi/dodopayments/models/license_key_created_webhook_event.rbi
|
|
526
528
|
- rbi/dodopayments/models/license_key_duration.rbi
|
|
527
529
|
- rbi/dodopayments/models/license_key_instance.rbi
|
|
@@ -832,6 +834,7 @@ files:
|
|
|
832
834
|
- sig/dodopayments/models/license_activate_response.rbs
|
|
833
835
|
- sig/dodopayments/models/license_deactivate_params.rbs
|
|
834
836
|
- sig/dodopayments/models/license_key.rbs
|
|
837
|
+
- sig/dodopayments/models/license_key_create_params.rbs
|
|
835
838
|
- sig/dodopayments/models/license_key_created_webhook_event.rbs
|
|
836
839
|
- sig/dodopayments/models/license_key_duration.rbs
|
|
837
840
|
- sig/dodopayments/models/license_key_instance.rbs
|