checkout-intents 0.2.0 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ccc0d2eeeb7a1702d337ab33d2fbb8dea3223c39aefc94a9a5460930f808293
4
- data.tar.gz: 7f41dc18f595b8bfa410eda98c4f55ca377db74b28a7336469ca4660513d907c
3
+ metadata.gz: 1981b92e8af474b2da3cac0359327bbff76f910374d079b4a84e23c3104d6874
4
+ data.tar.gz: 6fe1a230fcdd16e00285122ecece2a20c8b6eafd72ddd307a90db1ebd058b848
5
5
  SHA512:
6
- metadata.gz: e2311ef4c1c2be6041830d7512449d65b8d37804ff6d6b160f53c5b82afc66eba8cce0b188cd383e6416dae43b4458785ed725c746686405e21a2f2cba2f4b77
7
- data.tar.gz: 8ef1985d27314dad4a6e30c26e6b3e5e379aed5318114ebe20e2e883661c2ef5d555374853b3346aba8139904da5d6129a9db5f30220fcc0b9aba9aeeea021e0
6
+ metadata.gz: 8f4e7cb546a44bb8c431dc23844bc72c9a4afd6673f0bf6f80240b726a3388c8e31033f6c162725ecdd1f561813c3e89b2c090a9b9250e965ef39c9e66d29ba5
7
+ data.tar.gz: 85139d75fda099b9504f005b38e7388e66c5b66482684359ec911acb0c64a72e33dfc37ba3960718e498733b50eec0fd421ab366d3165788f6a59ea6bbc5bf65
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.2 (2026-01-15)
4
+
5
+ Full Changelog: [v0.2.1...v0.2.2](https://github.com/rye-com/checkout-intents-ruby/compare/v0.2.1...v0.2.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** correctly type quantity as integer ([a85ecbf](https://github.com/rye-com/checkout-intents-ruby/commit/a85ecbf160c0cc4b24dc62357aa5bf47e7f7932a))
10
+
11
+ ## 0.2.1 (2026-01-13)
12
+
13
+ Full Changelog: [v0.2.0...v0.2.1](https://github.com/rye-com/checkout-intents-ruby/compare/v0.2.0...v0.2.1)
14
+
15
+ ### Bug Fixes
16
+
17
+ * **api:** handle optional args ([8ef7d2b](https://github.com/rye-com/checkout-intents-ruby/commit/8ef7d2b96781b484a96a4c6c7cb8fff1c52f5a05))
18
+
3
19
  ## 0.2.0 (2026-01-12)
4
20
 
5
21
  Full Changelog: [v0.1.0...v0.2.0](https://github.com/rye-com/checkout-intents-ruby/compare/v0.1.0...v0.2.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "checkout-intents", "~> 0.2.0"
20
+ gem "checkout-intents", "~> 0.2.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -277,15 +277,17 @@ module CheckoutIntents
277
277
  max_attempts: DEFAULT_MAX_ATTEMPTS,
278
278
  request_options: {}
279
279
  )
280
- intent = create(
280
+ create_params = {
281
281
  buyer: buyer,
282
282
  product_url: product_url,
283
283
  quantity: quantity,
284
- constraints: constraints,
285
- promo_codes: promo_codes,
286
- variant_selections: variant_selections,
287
284
  request_options: request_options
288
- )
285
+ }
286
+ create_params[:constraints] = constraints if constraints
287
+ create_params[:promo_codes] = promo_codes if promo_codes
288
+ create_params[:variant_selections] = variant_selections if variant_selections
289
+
290
+ intent = create(create_params)
289
291
  poll_until_awaiting_confirmation(
290
292
  intent.id,
291
293
  poll_interval: poll_interval,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutIntents
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
@@ -26,7 +26,7 @@ module CheckoutIntents
26
26
  sig { returns(String) }
27
27
  attr_accessor :product_url
28
28
 
29
- sig { returns(Float) }
29
+ sig { returns(Integer) }
30
30
  attr_accessor :quantity
31
31
 
32
32
  sig do
@@ -18,7 +18,7 @@ module CheckoutIntents
18
18
  sig { returns(String) }
19
19
  attr_accessor :product_url
20
20
 
21
- sig { returns(Float) }
21
+ sig { returns(Integer) }
22
22
  attr_accessor :quantity
23
23
 
24
24
  # Optional buyer information, used to pre-fill the checkout form with the buyer's
@@ -23,7 +23,7 @@ module CheckoutIntents
23
23
  sig { returns(String) }
24
24
  attr_accessor :product_url
25
25
 
26
- sig { returns(Float) }
26
+ sig { returns(Integer) }
27
27
  attr_accessor :quantity
28
28
 
29
29
  sig do
@@ -34,7 +34,7 @@ module CheckoutIntents
34
34
  sig { returns(String) }
35
35
  attr_accessor :product_url
36
36
 
37
- sig { returns(Float) }
37
+ sig { returns(Integer) }
38
38
  attr_accessor :quantity
39
39
 
40
40
  sig do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout-intents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout Intents
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-12 00:00:00.000000000 Z
11
+ date: 2026-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi