dodopayments 2.22.0 → 2.23.0

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: 163def2395f779a9e37c434ed82db681beb1604ecfca9e9805408a8748882b14
4
- data.tar.gz: cd58f274a55ce3838d5f779703a1a26127d18381d4ea2f017d841c066ebc238c
3
+ metadata.gz: cad4c970cd5ba2e91f1b33653e3a27453819b606e7102e86deee762ce4aa2644
4
+ data.tar.gz: 565ee66cb3f01d6f407a53961de128f62da49b82adb3cbddc62b346948a5cef9
5
5
  SHA512:
6
- metadata.gz: f124c53ff18ae2919095987fa5567cdd032ebfad926e01480868d98a1df64f760432e6de39a9a23bd6e6505f303b6de90063d80e7714df5bdb4a26a7323999ed
7
- data.tar.gz: b6659504610c0a812ffc0766da56f721864a0aa0eed10b846609881f90d07d50c539386f3c6402175c8ee09261f6dae933288e720b038ef035f00aacf21fce8e
6
+ metadata.gz: f40e2157114f0f727cd01e2efcca91b1f26e18825d97658ef0cb1d3b207eaec1b5c13cce89b6d0aea4e5cd31abd8010d37a67c1b080b690b5e6ec05935b3484b
7
+ data.tar.gz: b02a1a361412eeb20958ba7f620a718897161a63de622350c5ff54bac4d3bc66c911594321ef247ab11dc2f192394a8a0648f68a7b7397ce460ee7fd4154ba85
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.23.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.22.0...v2.23.0) (2026-08-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add addon single_quantity_price and live_tutoring tax category ([531e3b0](https://github.com/dodopayments/dodopayments-ruby/commit/531e3b0e327d01fb8340fb02f9baaadca25723bc))
9
+ * **api:** add addon single_quantity_price and live_tutoring tax category ([a347ee8](https://github.com/dodopayments/dodopayments-ruby/commit/a347ee844bc54bcd9a8c2a82f726b39f488673d7))
10
+
3
11
  ## [2.22.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.21.0...v2.22.0) (2026-07-31)
4
12
 
5
13
 
data/README.md CHANGED
@@ -23,7 +23,7 @@ To use this gem, install via Bundler by adding the following to your application
23
23
  <!-- x-release-please-start-version -->
24
24
 
25
25
  ```ruby
26
- gem "dodopayments", "~> 2.22.0"
26
+ gem "dodopayments", "~> 2.23.0"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -439,6 +439,15 @@ module Dodopayments
439
439
  # @return [Integer]
440
440
  required :quantity, Integer
441
441
 
442
+ # @!attribute single_quantity_price
443
+ # Per-unit price in `currency`, converted and adaptive-priced but pre-tax and
444
+ # pre-discount (both depend on quantity and the rest of the cart). Set even when
445
+ # `quantity` is 0, so the checkout page can price the addon before the buyer has
446
+ # selected any.
447
+ #
448
+ # @return [Integer]
449
+ required :single_quantity_price, Integer
450
+
442
451
  # @!attribute tax_category
443
452
  # Represents the different categories of taxation applicable to various products
444
453
  # and services.
@@ -473,7 +482,7 @@ module Dodopayments
473
482
  # @return [Integer, nil]
474
483
  optional :tax, Integer, nil?: true
475
484
 
476
- # @!method initialize(addon_id:, currency:, discounted_price:, name:, og_currency:, og_price:, quantity:, tax_category:, tax_inclusive:, tax_rate:, description: nil, discount_amount: nil, tax: nil)
485
+ # @!method initialize(addon_id:, currency:, discounted_price:, name:, og_currency:, og_price:, quantity:, single_quantity_price:, tax_category:, tax_inclusive:, tax_rate:, description: nil, discount_amount: nil, tax: nil)
477
486
  # Some parameter documentations has been truncated, see
478
487
  # {Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::Addon} for
479
488
  # more details.
@@ -492,6 +501,8 @@ module Dodopayments
492
501
  #
493
502
  # @param quantity [Integer]
494
503
  #
504
+ # @param single_quantity_price [Integer] Per-unit price in `currency`, converted and adaptive-priced but pre-tax
505
+ #
495
506
  # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
496
507
  #
497
508
  # @param tax_inclusive [Boolean]
@@ -11,6 +11,7 @@ module Dodopayments
11
11
  SAAS = :saas
12
12
  E_BOOK = :e_book
13
13
  EDTECH = :edtech
14
+ LIVE_TUTORING = :live_tutoring
14
15
 
15
16
  # @!method self.values
16
17
  # @return [Array<Symbol>]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.22.0"
4
+ VERSION = "2.23.0"
5
5
  end
@@ -629,6 +629,13 @@ module Dodopayments
629
629
  sig { returns(Integer) }
630
630
  attr_accessor :quantity
631
631
 
632
+ # Per-unit price in `currency`, converted and adaptive-priced but pre-tax and
633
+ # pre-discount (both depend on quantity and the rest of the cart). Set even when
634
+ # `quantity` is 0, so the checkout page can price the addon before the buyer has
635
+ # selected any.
636
+ sig { returns(Integer) }
637
+ attr_accessor :single_quantity_price
638
+
632
639
  # Represents the different categories of taxation applicable to various products
633
640
  # and services.
634
641
  sig { returns(Dodopayments::TaxCategory::TaggedSymbol) }
@@ -660,6 +667,7 @@ module Dodopayments
660
667
  og_currency: Dodopayments::Currency::OrSymbol,
661
668
  og_price: Integer,
662
669
  quantity: Integer,
670
+ single_quantity_price: Integer,
663
671
  tax_category: Dodopayments::TaxCategory::OrSymbol,
664
672
  tax_inclusive: T::Boolean,
665
673
  tax_rate: Integer,
@@ -676,6 +684,11 @@ module Dodopayments
676
684
  og_currency:,
677
685
  og_price:,
678
686
  quantity:,
687
+ # Per-unit price in `currency`, converted and adaptive-priced but pre-tax and
688
+ # pre-discount (both depend on quantity and the rest of the cart). Set even when
689
+ # `quantity` is 0, so the checkout page can price the addon before the buyer has
690
+ # selected any.
691
+ single_quantity_price:,
679
692
  # Represents the different categories of taxation applicable to various products
680
693
  # and services.
681
694
  tax_category:,
@@ -699,6 +712,7 @@ module Dodopayments
699
712
  og_currency: Dodopayments::Currency::TaggedSymbol,
700
713
  og_price: Integer,
701
714
  quantity: Integer,
715
+ single_quantity_price: Integer,
702
716
  tax_category: Dodopayments::TaxCategory::TaggedSymbol,
703
717
  tax_inclusive: T::Boolean,
704
718
  tax_rate: Integer,
@@ -15,6 +15,8 @@ module Dodopayments
15
15
  SAAS = T.let(:saas, Dodopayments::TaxCategory::TaggedSymbol)
16
16
  E_BOOK = T.let(:e_book, Dodopayments::TaxCategory::TaggedSymbol)
17
17
  EDTECH = T.let(:edtech, Dodopayments::TaxCategory::TaggedSymbol)
18
+ LIVE_TUTORING =
19
+ T.let(:live_tutoring, Dodopayments::TaxCategory::TaggedSymbol)
18
20
 
19
21
  sig do
20
22
  override.returns(T::Array[Dodopayments::TaxCategory::TaggedSymbol])
@@ -297,6 +297,7 @@ module Dodopayments
297
297
  og_currency: Dodopayments::Models::currency,
298
298
  og_price: Integer,
299
299
  quantity: Integer,
300
+ single_quantity_price: Integer,
300
301
  tax_category: Dodopayments::Models::tax_category,
301
302
  tax_inclusive: bool,
302
303
  tax_rate: Integer,
@@ -320,6 +321,8 @@ module Dodopayments
320
321
 
321
322
  attr_accessor quantity: Integer
322
323
 
324
+ attr_accessor single_quantity_price: Integer
325
+
323
326
  attr_accessor tax_category: Dodopayments::Models::tax_category
324
327
 
325
328
  attr_accessor tax_inclusive: bool
@@ -340,6 +343,7 @@ module Dodopayments
340
343
  og_currency: Dodopayments::Models::currency,
341
344
  og_price: Integer,
342
345
  quantity: Integer,
346
+ single_quantity_price: Integer,
343
347
  tax_category: Dodopayments::Models::tax_category,
344
348
  tax_inclusive: bool,
345
349
  tax_rate: Integer,
@@ -356,6 +360,7 @@ module Dodopayments
356
360
  og_currency: Dodopayments::Models::currency,
357
361
  og_price: Integer,
358
362
  quantity: Integer,
363
+ single_quantity_price: Integer,
359
364
  tax_category: Dodopayments::Models::tax_category,
360
365
  tax_inclusive: bool,
361
366
  tax_rate: Integer,
@@ -1,6 +1,7 @@
1
1
  module Dodopayments
2
2
  module Models
3
- type tax_category = :digital_products | :saas | :e_book | :edtech
3
+ type tax_category =
4
+ :digital_products | :saas | :e_book | :edtech | :live_tutoring
4
5
 
5
6
  module TaxCategory
6
7
  extend Dodopayments::Internal::Type::Enum
@@ -9,6 +10,7 @@ module Dodopayments
9
10
  SAAS: :saas
10
11
  E_BOOK: :e_book
11
12
  EDTECH: :edtech
13
+ LIVE_TUTORING: :live_tutoring
12
14
 
13
15
  def self?.values: -> ::Array[Dodopayments::Models::tax_category]
14
16
  end
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.22.0
4
+ version: 2.23.0
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-07-31 00:00:00.000000000 Z
11
+ date: 2026-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi