stigg 0.1.0.pre.alpha.3 → 0.1.0.pre.alpha.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +1 -1
  4. data/lib/stigg/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/stigg/internal/util.rb +1 -1
  6. data/lib/stigg/models/v1/customer_list_resources_params.rb +40 -0
  7. data/lib/stigg/models/v1/customer_list_resources_response.rb +37 -0
  8. data/lib/stigg/models/v1/product_list_products_params.rb +40 -0
  9. data/lib/stigg/models/v1/product_list_products_response.rb +90 -0
  10. data/lib/stigg/models/v1/subscription_import_params.rb +9 -1
  11. data/lib/stigg/models/v1/subscription_provision_response.rb +360 -113
  12. data/lib/stigg/resources/v1/coupons.rb +4 -3
  13. data/lib/stigg/resources/v1/customers/payment_method.rb +4 -2
  14. data/lib/stigg/resources/v1/customers/promotional_entitlements.rb +4 -2
  15. data/lib/stigg/resources/v1/customers.rb +41 -7
  16. data/lib/stigg/resources/v1/events.rb +2 -1
  17. data/lib/stigg/resources/v1/products.rb +43 -0
  18. data/lib/stigg/resources/v1/subscriptions/future_update.rb +3 -2
  19. data/lib/stigg/resources/v1/subscriptions.rb +23 -11
  20. data/lib/stigg/resources/v1/usage.rb +3 -2
  21. data/lib/stigg/resources/v1.rb +4 -0
  22. data/lib/stigg/version.rb +1 -1
  23. data/lib/stigg.rb +5 -0
  24. data/rbi/stigg/internal/util.rbi +1 -1
  25. data/rbi/stigg/models/v1/customer_list_resources_params.rbi +73 -0
  26. data/rbi/stigg/models/v1/customer_list_resources_response.rbi +51 -0
  27. data/rbi/stigg/models/v1/product_list_products_params.rbi +73 -0
  28. data/rbi/stigg/models/v1/product_list_products_response.rbi +140 -0
  29. data/rbi/stigg/models/v1/subscription_import_params.rbi +8 -0
  30. data/rbi/stigg/models/v1/subscription_provision_response.rbi +807 -192
  31. data/rbi/stigg/resources/v1/coupons.rbi +4 -3
  32. data/rbi/stigg/resources/v1/customers/payment_method.rbi +4 -2
  33. data/rbi/stigg/resources/v1/customers/promotional_entitlements.rbi +4 -2
  34. data/rbi/stigg/resources/v1/customers.rbi +39 -7
  35. data/rbi/stigg/resources/v1/events.rbi +2 -1
  36. data/rbi/stigg/resources/v1/products.rbi +38 -0
  37. data/rbi/stigg/resources/v1/subscriptions/future_update.rbi +3 -2
  38. data/rbi/stigg/resources/v1/subscriptions.rbi +23 -10
  39. data/rbi/stigg/resources/v1/usage.rbi +3 -2
  40. data/rbi/stigg/resources/v1.rbi +3 -0
  41. data/sig/stigg/models/v1/customer_list_resources_params.rbs +40 -0
  42. data/sig/stigg/models/v1/customer_list_resources_response.rbs +20 -0
  43. data/sig/stigg/models/v1/product_list_products_params.rbs +40 -0
  44. data/sig/stigg/models/v1/product_list_products_response.rbs +68 -0
  45. data/sig/stigg/models/v1/subscription_import_params.rbs +6 -1
  46. data/sig/stigg/models/v1/subscription_provision_response.rbs +336 -91
  47. data/sig/stigg/resources/v1/customers.rbs +8 -0
  48. data/sig/stigg/resources/v1/products.rbs +16 -0
  49. data/sig/stigg/resources/v1/subscriptions.rbs +1 -0
  50. data/sig/stigg/resources/v1.rbs +2 -0
  51. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8e60f4fdad10d2d4b37e4f5d646accf564f8b280a86e1c9ba46b488138b1f43
4
- data.tar.gz: eb0423ccd6a83e037421ab3e2d78187e6aff8024175a974af11d06d7f9f8a587
3
+ metadata.gz: edba11696ef39d3eab4ba9741b24ee54dfd4237352373f75c18c1279cc9e2328
4
+ data.tar.gz: 257a83f3bf8a74a7ff4a4bad411726abaffde716a6689b2f5cd5fbe79394dc0a
5
5
  SHA512:
6
- metadata.gz: f2a1589cf8dc649e0d0cbadd3d2b3d4722b062d9da08c4b435052c2e457fcbfbaeb92b0a9ae110a02a2692fdfae37fc2ca80ba2b9e6d80cadedd19a487d66d10
7
- data.tar.gz: 6abfbdeca00d4e2a8269c0afd32ef00ddc785d710e38ff7d49787539dceee459e9ac0c094d06c0df6cbace4b59e8725f420c6c9ee43ce24683fb9e845ba18ff4
6
+ metadata.gz: 0fbe6f9d33bca2cfc5ad6f0f18cf8fc470ac30ab92dd32d5d16f0e33743c3165264390fdf7248b7dad4e24768cd20ab6577c338a98e623619a5dfea829b8a73c
7
+ data.tar.gz: 7978f7b53a81d5d2ef691039d1e5339de3edb7a931360083ad7a07411e292c4290ce8810278e936e60abbfa6d3555ccdad920ca6274d234c4ef072f7866a91c0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.4 (2026-02-08)
4
+
5
+ Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([be82837](https://github.com/stiggio/stigg-ruby/commit/be828376f59cdc953328db6686a68f8b9759451f))
10
+ * **api:** api update ([6eba42a](https://github.com/stiggio/stigg-ruby/commit/6eba42a20f428acbd6883681ac5ee11d8a14ff49))
11
+ * **api:** api update ([6bce992](https://github.com/stiggio/stigg-ruby/commit/6bce9926ff821e5a0bca13e55bad8c0ab3aa2e47))
12
+ * **api:** manual updates ([36853c8](https://github.com/stiggio/stigg-ruby/commit/36853c8baeac42420cd16d77fb7a1deecd202419))
13
+ * **api:** manual updates ([687e40e](https://github.com/stiggio/stigg-ruby/commit/687e40ec3f6e37f92942320c4e1f5289b03acf7a))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **client:** always add content-length to post body, even when empty ([b0dfc8b](https://github.com/stiggio/stigg-ruby/commit/b0dfc8b9bcec28580c67453ad50ad05a059e870a))
19
+ * **client:** loosen json header parsing ([818129e](https://github.com/stiggio/stigg-ruby/commit/818129efdba328937836f3e1b5e473a17562bbe1))
20
+
21
+
22
+ ### Chores
23
+
24
+ * **docs:** remove www prefix ([3d79132](https://github.com/stiggio/stigg-ruby/commit/3d7913276fe7a991830af80837e1bb78255930d2))
25
+
3
26
  ## 0.1.0-alpha.3 (2026-01-29)
4
27
 
5
28
  Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/stiggio/stigg-ruby/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "stigg", "~> 0.1.0.pre.alpha.3"
18
+ gem "stigg", "~> 0.1.0.pre.alpha.4"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -75,7 +75,7 @@ module Stigg
75
75
 
76
76
  case body
77
77
  in nil
78
- nil
78
+ req["content-length"] ||= 0 unless req["transfer-encoding"]
79
79
  in String
80
80
  req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
81
81
  req.body_stream = Stigg::Internal::Util::ReadIOAdapter.new(body, &blk)
@@ -485,7 +485,7 @@ module Stigg
485
485
  end
486
486
 
487
487
  # @type [Regexp]
488
- JSON_CONTENT = %r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}
488
+ JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
489
489
  # @type [Regexp]
490
490
  JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
491
491
 
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#list_resources
7
+ class CustomerListResourcesParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute after
12
+ # Return items that come after this cursor
13
+ #
14
+ # @return [String, nil]
15
+ optional :after, String
16
+
17
+ # @!attribute before
18
+ # Return items that come before this cursor
19
+ #
20
+ # @return [String, nil]
21
+ optional :before, String
22
+
23
+ # @!attribute limit
24
+ # Maximum number of items to return
25
+ #
26
+ # @return [Integer, nil]
27
+ optional :limit, Integer
28
+
29
+ # @!method initialize(after: nil, before: nil, limit: nil, request_options: {})
30
+ # @param after [String] Return items that come after this cursor
31
+ #
32
+ # @param before [String] Return items that come before this cursor
33
+ #
34
+ # @param limit [Integer] Maximum number of items to return
35
+ #
36
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Customers#list_resources
7
+ class CustomerListResourcesResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # Resource slug
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute created_at
15
+ # Timestamp of when the record was created
16
+ #
17
+ # @return [Time]
18
+ required :created_at, Time, api_name: :createdAt
19
+
20
+ # @!attribute updated_at
21
+ # Timestamp of when the record was last updated
22
+ #
23
+ # @return [Time]
24
+ required :updated_at, Time, api_name: :updatedAt
25
+
26
+ # @!method initialize(id:, created_at:, updated_at:)
27
+ # Resource object that belongs to a customer
28
+ #
29
+ # @param id [String] Resource slug
30
+ #
31
+ # @param created_at [Time] Timestamp of when the record was created
32
+ #
33
+ # @param updated_at [Time] Timestamp of when the record was last updated
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Products#list_products
7
+ class ProductListProductsParams < Stigg::Internal::Type::BaseModel
8
+ extend Stigg::Internal::Type::RequestParameters::Converter
9
+ include Stigg::Internal::Type::RequestParameters
10
+
11
+ # @!attribute after
12
+ # Return items that come after this cursor
13
+ #
14
+ # @return [String, nil]
15
+ optional :after, String
16
+
17
+ # @!attribute before
18
+ # Return items that come before this cursor
19
+ #
20
+ # @return [String, nil]
21
+ optional :before, String
22
+
23
+ # @!attribute limit
24
+ # Maximum number of items to return
25
+ #
26
+ # @return [Integer, nil]
27
+ optional :limit, Integer
28
+
29
+ # @!method initialize(after: nil, before: nil, limit: nil, request_options: {})
30
+ # @param after [String] Return items that come after this cursor
31
+ #
32
+ # @param before [String] Return items that come before this cursor
33
+ #
34
+ # @param limit [Integer] Maximum number of items to return
35
+ #
36
+ # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stigg
4
+ module Models
5
+ module V1
6
+ # @see Stigg::Resources::V1::Products#list_products
7
+ class ProductListProductsResponse < Stigg::Internal::Type::BaseModel
8
+ # @!attribute id
9
+ # The unique identifier for the entity
10
+ #
11
+ # @return [String]
12
+ required :id, String
13
+
14
+ # @!attribute created_at
15
+ # Timestamp of when the record was created
16
+ #
17
+ # @return [Time]
18
+ required :created_at, Time, api_name: :createdAt
19
+
20
+ # @!attribute description
21
+ # Description of the product
22
+ #
23
+ # @return [String, nil]
24
+ required :description, String, nil?: true
25
+
26
+ # @!attribute display_name
27
+ # Display name of the product
28
+ #
29
+ # @return [String]
30
+ required :display_name, String, api_name: :displayName
31
+
32
+ # @!attribute metadata
33
+ # Metadata associated with the entity
34
+ #
35
+ # @return [Hash{Symbol=>String}]
36
+ required :metadata, Stigg::Internal::Type::HashOf[String]
37
+
38
+ # @!attribute multiple_subscriptions
39
+ # Indicates if multiple subscriptions to this product are allowed
40
+ #
41
+ # @return [Boolean]
42
+ required :multiple_subscriptions, Stigg::Internal::Type::Boolean, api_name: :multipleSubscriptions
43
+
44
+ # @!attribute status
45
+ # The status of the product
46
+ #
47
+ # @return [Symbol, Stigg::Models::V1::ProductListProductsResponse::Status]
48
+ required :status, enum: -> { Stigg::Models::V1::ProductListProductsResponse::Status }
49
+
50
+ # @!attribute updated_at
51
+ # Timestamp of when the record was last updated
52
+ #
53
+ # @return [Time]
54
+ required :updated_at, Time, api_name: :updatedAt
55
+
56
+ # @!method initialize(id:, created_at:, description:, display_name:, metadata:, multiple_subscriptions:, status:, updated_at:)
57
+ # Product configuration object
58
+ #
59
+ # @param id [String] The unique identifier for the entity
60
+ #
61
+ # @param created_at [Time] Timestamp of when the record was created
62
+ #
63
+ # @param description [String, nil] Description of the product
64
+ #
65
+ # @param display_name [String] Display name of the product
66
+ #
67
+ # @param metadata [Hash{Symbol=>String}] Metadata associated with the entity
68
+ #
69
+ # @param multiple_subscriptions [Boolean] Indicates if multiple subscriptions to this product are allowed
70
+ #
71
+ # @param status [Symbol, Stigg::Models::V1::ProductListProductsResponse::Status] The status of the product
72
+ #
73
+ # @param updated_at [Time] Timestamp of when the record was last updated
74
+
75
+ # The status of the product
76
+ #
77
+ # @see Stigg::Models::V1::ProductListProductsResponse#status
78
+ module Status
79
+ extend Stigg::Internal::Type::Enum
80
+
81
+ PUBLISHED = :PUBLISHED
82
+ ARCHIVED = :ARCHIVED
83
+
84
+ # @!method self.values
85
+ # @return [Array<Symbol>]
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -15,9 +15,17 @@ module Stigg
15
15
  required :subscriptions,
16
16
  -> { Stigg::Internal::Type::ArrayOf[Stigg::V1::SubscriptionImportParams::Subscription] }
17
17
 
18
- # @!method initialize(subscriptions:, request_options: {})
18
+ # @!attribute integration_id
19
+ # Integration ID to use for importing subscriptions
20
+ #
21
+ # @return [String, nil]
22
+ optional :integration_id, String, api_name: :integrationId, nil?: true
23
+
24
+ # @!method initialize(subscriptions:, integration_id: nil, request_options: {})
19
25
  # @param subscriptions [Array<Stigg::Models::V1::SubscriptionImportParams::Subscription>] List of subscription objects to import
20
26
  #
27
+ # @param integration_id [String, nil] Integration ID to use for importing subscriptions
28
+ #
21
29
  # @param request_options [Stigg::RequestOptions, Hash{Symbol=>Object}]
22
30
 
23
31
  class Subscription < Stigg::Internal::Type::BaseModel