dodopayments 1.61.6 → 1.66.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 +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/type/union.rb +7 -9
- data/lib/dodopayments/models/billing_address.rb +18 -18
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_params.rb +63 -0
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +388 -0
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +76 -0
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models.rb +4 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
- data/lib/dodopayments/resources/subscriptions.rb +31 -0
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +4 -0
- data/rbi/dodopayments/models/billing_address.rbi +20 -20
- data/rbi/dodopayments/models/checkout_session_request.rbi +13 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_params.rbi +118 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +633 -0
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +185 -0
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +2 -1
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +2 -1
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models.rbi +6 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -0
- data/rbi/dodopayments/resources/webhooks.rbi +4 -2
- data/sig/dodopayments/models/billing_address.rbs +17 -17
- data/sig/dodopayments/models/checkout_session_request.rbs +7 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_params.rbs +54 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +356 -0
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +76 -0
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models.rbs +4 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +9 -0
- data/sig/dodopayments/resources/webhooks.rbs +4 -2
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0941dd898c79a72b7f81f3d3f5aa8527a390fc143e7e724491f47cadbb166bdb'
|
|
4
|
+
data.tar.gz: 8dd29cb14f5a2bf600175bcc087cb81d2ba777f02fae0bc87454f1080e486a3b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0eed93cc1ac1e28912bb8c9b0050db1984b87de08c39fda3231858663f7dabb46b74d9765a42deee8f2835e09662ba6221f7cf986b1a5b9b1ff222166d7fa4f
|
|
7
|
+
data.tar.gz: c3a221873724e7bd198d94675eaeda38538a30d6fdc9a987adb469ed8c056e3491c9cfdffb6ff3ca26a2a41f1200c7534d0df76c7e26f3f92b939edc212755e0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.66.0 (2025-12-08)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.61.7...v1.66.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.61.7...v1.66.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated openapi spec to v1.66.1 ([b7f15c5](https://github.com/dodopayments/dodopayments-ruby/commit/b7f15c5801d7d6e2523a11e5ca2d0c807c202e89))
|
|
10
|
+
|
|
11
|
+
## 1.61.7 (2025-12-03)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.61.6...v1.61.7](https://github.com/dodopayments/dodopayments-ruby/compare/v1.61.6...v1.61.7)
|
|
14
|
+
|
|
15
|
+
### Chores
|
|
16
|
+
|
|
17
|
+
* **internal:** codegen related update ([bb2f57b](https://github.com/dodopayments/dodopayments-ruby/commit/bb2f57bef749534bcbe159f2e5bf351510c7c4f7))
|
|
18
|
+
|
|
3
19
|
## 1.61.6 (2025-11-21)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v1.61.5...v1.61.6](https://github.com/dodopayments/dodopayments-ruby/compare/v1.61.5...v1.61.6)
|
data/README.md
CHANGED
|
@@ -6,16 +6,14 @@ module Dodopayments
|
|
|
6
6
|
# @api private
|
|
7
7
|
#
|
|
8
8
|
# @example
|
|
9
|
-
# # `
|
|
10
|
-
# case
|
|
11
|
-
# when Dodopayments::
|
|
12
|
-
# puts(
|
|
13
|
-
# when Dodopayments::
|
|
14
|
-
# puts(
|
|
15
|
-
# when Dodopayments::DisputeChallengedWebhookEvent
|
|
16
|
-
# puts(unsafe_unwrap_webhook_event.timestamp)
|
|
9
|
+
# # `customer_request` is a `Dodopayments::CustomerRequest`
|
|
10
|
+
# case customer_request
|
|
11
|
+
# when Dodopayments::AttachExistingCustomer
|
|
12
|
+
# puts(customer_request.customer_id)
|
|
13
|
+
# when Dodopayments::NewCustomer
|
|
14
|
+
# puts(customer_request.email)
|
|
17
15
|
# else
|
|
18
|
-
# puts(
|
|
16
|
+
# puts(customer_request)
|
|
19
17
|
# end
|
|
20
18
|
module Union
|
|
21
19
|
include Dodopayments::Internal::Type::Converter
|
|
@@ -3,46 +3,46 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Models
|
|
5
5
|
class BillingAddress < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
# @!attribute city
|
|
7
|
-
# City name
|
|
8
|
-
#
|
|
9
|
-
# @return [String]
|
|
10
|
-
required :city, String
|
|
11
|
-
|
|
12
6
|
# @!attribute country
|
|
13
7
|
# Two-letter ISO country code (ISO 3166-1 alpha-2)
|
|
14
8
|
#
|
|
15
9
|
# @return [Symbol, Dodopayments::Models::CountryCode]
|
|
16
10
|
required :country, enum: -> { Dodopayments::CountryCode }
|
|
17
11
|
|
|
12
|
+
# @!attribute city
|
|
13
|
+
# City name
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :city, String, nil?: true
|
|
17
|
+
|
|
18
18
|
# @!attribute state
|
|
19
19
|
# State or province name
|
|
20
20
|
#
|
|
21
|
-
# @return [String]
|
|
22
|
-
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
optional :state, String, nil?: true
|
|
23
23
|
|
|
24
24
|
# @!attribute street
|
|
25
25
|
# Street address including house number and unit/apartment if applicable
|
|
26
26
|
#
|
|
27
|
-
# @return [String]
|
|
28
|
-
|
|
27
|
+
# @return [String, nil]
|
|
28
|
+
optional :street, String, nil?: true
|
|
29
29
|
|
|
30
30
|
# @!attribute zipcode
|
|
31
31
|
# Postal code or ZIP code
|
|
32
32
|
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :zipcode, String, nil?: true
|
|
35
35
|
|
|
36
|
-
# @!method initialize(
|
|
37
|
-
# @param city [String] City name
|
|
38
|
-
#
|
|
36
|
+
# @!method initialize(country:, city: nil, state: nil, street: nil, zipcode: nil)
|
|
39
37
|
# @param country [Symbol, Dodopayments::Models::CountryCode] Two-letter ISO country code (ISO 3166-1 alpha-2)
|
|
40
38
|
#
|
|
41
|
-
# @param
|
|
39
|
+
# @param city [String, nil] City name
|
|
40
|
+
#
|
|
41
|
+
# @param state [String, nil] State or province name
|
|
42
42
|
#
|
|
43
|
-
# @param street [String] Street address including house number and unit/apartment if applicable
|
|
43
|
+
# @param street [String, nil] Street address including house number and unit/apartment if applicable
|
|
44
44
|
#
|
|
45
|
-
# @param zipcode [String] Postal code or ZIP code
|
|
45
|
+
# @param zipcode [String, nil] Postal code or ZIP code
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
@@ -76,6 +76,13 @@ module Dodopayments
|
|
|
76
76
|
# @return [Hash{Symbol=>String}, nil]
|
|
77
77
|
optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true
|
|
78
78
|
|
|
79
|
+
# @!attribute minimal_address
|
|
80
|
+
# If true, only zipcode is required when confirm is true; other address fields
|
|
81
|
+
# remain optional
|
|
82
|
+
#
|
|
83
|
+
# @return [Boolean, nil]
|
|
84
|
+
optional :minimal_address, Dodopayments::Internal::Type::Boolean
|
|
85
|
+
|
|
79
86
|
# @!attribute return_url
|
|
80
87
|
# The url to redirect after payment failure or success.
|
|
81
88
|
#
|
|
@@ -93,7 +100,7 @@ module Dodopayments
|
|
|
93
100
|
# @return [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
94
101
|
optional :subscription_data, -> { Dodopayments::CheckoutSessionRequest::SubscriptionData }, nil?: true
|
|
95
102
|
|
|
96
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil)
|
|
103
|
+
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil)
|
|
97
104
|
# Some parameter documentations has been truncated, see
|
|
98
105
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
99
106
|
#
|
|
@@ -119,6 +126,8 @@ module Dodopayments
|
|
|
119
126
|
#
|
|
120
127
|
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the payment. Defaults to empty if not provid
|
|
121
128
|
#
|
|
129
|
+
# @param minimal_address [Boolean] If true, only zipcode is required when confirm is true; other address fields rem
|
|
130
|
+
#
|
|
122
131
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
123
132
|
#
|
|
124
133
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer False by default
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Subscriptions#preview_change_plan
|
|
6
|
+
class SubscriptionPreviewChangePlanParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute product_id
|
|
11
|
+
# Unique identifier of the product to subscribe to
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :product_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute proration_billing_mode
|
|
17
|
+
# Proration Billing Mode
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanParams::ProrationBillingMode]
|
|
20
|
+
required :proration_billing_mode,
|
|
21
|
+
enum: -> { Dodopayments::SubscriptionPreviewChangePlanParams::ProrationBillingMode }
|
|
22
|
+
|
|
23
|
+
# @!attribute quantity
|
|
24
|
+
# Number of units to subscribe for. Must be at least 1.
|
|
25
|
+
#
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
required :quantity, Integer
|
|
28
|
+
|
|
29
|
+
# @!attribute addons
|
|
30
|
+
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
31
|
+
# addons
|
|
32
|
+
#
|
|
33
|
+
# @return [Array<Dodopayments::Models::AttachAddon>, nil]
|
|
34
|
+
optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!method initialize(product_id:, proration_billing_mode:, quantity:, addons: nil, request_options: {})
|
|
37
|
+
# Some parameter documentations has been truncated, see
|
|
38
|
+
# {Dodopayments::Models::SubscriptionPreviewChangePlanParams} for more details.
|
|
39
|
+
#
|
|
40
|
+
# @param product_id [String] Unique identifier of the product to subscribe to
|
|
41
|
+
#
|
|
42
|
+
# @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanParams::ProrationBillingMode] Proration Billing Mode
|
|
43
|
+
#
|
|
44
|
+
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
|
45
|
+
#
|
|
46
|
+
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
47
|
+
#
|
|
48
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
49
|
+
|
|
50
|
+
# Proration Billing Mode
|
|
51
|
+
module ProrationBillingMode
|
|
52
|
+
extend Dodopayments::Internal::Type::Enum
|
|
53
|
+
|
|
54
|
+
PRORATED_IMMEDIATELY = :prorated_immediately
|
|
55
|
+
FULL_IMMEDIATELY = :full_immediately
|
|
56
|
+
DIFFERENCE_IMMEDIATELY = :difference_immediately
|
|
57
|
+
|
|
58
|
+
# @!method self.values
|
|
59
|
+
# @return [Array<Symbol>]
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Subscriptions#preview_change_plan
|
|
6
|
+
class SubscriptionPreviewChangePlanResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute immediate_charge
|
|
8
|
+
#
|
|
9
|
+
# @return [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge]
|
|
10
|
+
required :immediate_charge,
|
|
11
|
+
-> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge }
|
|
12
|
+
|
|
13
|
+
# @!attribute new_plan
|
|
14
|
+
# Response struct representing subscription details
|
|
15
|
+
#
|
|
16
|
+
# @return [Dodopayments::Models::Subscription]
|
|
17
|
+
required :new_plan, -> { Dodopayments::Subscription }
|
|
18
|
+
|
|
19
|
+
# @!method initialize(immediate_charge:, new_plan:)
|
|
20
|
+
# @param immediate_charge [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge]
|
|
21
|
+
#
|
|
22
|
+
# @param new_plan [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
23
|
+
|
|
24
|
+
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse#immediate_charge
|
|
25
|
+
class ImmediateCharge < Dodopayments::Internal::Type::BaseModel
|
|
26
|
+
# @!attribute line_items
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2>]
|
|
29
|
+
required :line_items,
|
|
30
|
+
-> { Dodopayments::Internal::Type::ArrayOf[union: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem] }
|
|
31
|
+
|
|
32
|
+
# @!attribute summary
|
|
33
|
+
#
|
|
34
|
+
# @return [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary]
|
|
35
|
+
required :summary,
|
|
36
|
+
-> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary }
|
|
37
|
+
|
|
38
|
+
# @!method initialize(line_items:, summary:)
|
|
39
|
+
# @param line_items [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2>]
|
|
40
|
+
# @param summary [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary]
|
|
41
|
+
|
|
42
|
+
module LineItem
|
|
43
|
+
extend Dodopayments::Internal::Type::Union
|
|
44
|
+
|
|
45
|
+
variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0 }
|
|
46
|
+
|
|
47
|
+
variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1 }
|
|
48
|
+
|
|
49
|
+
variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2 }
|
|
50
|
+
|
|
51
|
+
class UnionMember0 < Dodopayments::Internal::Type::BaseModel
|
|
52
|
+
# @!attribute id
|
|
53
|
+
#
|
|
54
|
+
# @return [String]
|
|
55
|
+
required :id, String
|
|
56
|
+
|
|
57
|
+
# @!attribute currency
|
|
58
|
+
#
|
|
59
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
60
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
61
|
+
|
|
62
|
+
# @!attribute product_id
|
|
63
|
+
#
|
|
64
|
+
# @return [String]
|
|
65
|
+
required :product_id, String
|
|
66
|
+
|
|
67
|
+
# @!attribute proration_factor
|
|
68
|
+
#
|
|
69
|
+
# @return [Float]
|
|
70
|
+
required :proration_factor, Float
|
|
71
|
+
|
|
72
|
+
# @!attribute quantity
|
|
73
|
+
#
|
|
74
|
+
# @return [Integer]
|
|
75
|
+
required :quantity, Integer
|
|
76
|
+
|
|
77
|
+
# @!attribute tax_inclusive
|
|
78
|
+
#
|
|
79
|
+
# @return [Boolean]
|
|
80
|
+
required :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
|
81
|
+
|
|
82
|
+
# @!attribute type
|
|
83
|
+
#
|
|
84
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type]
|
|
85
|
+
required :type,
|
|
86
|
+
enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type }
|
|
87
|
+
|
|
88
|
+
# @!attribute unit_price
|
|
89
|
+
#
|
|
90
|
+
# @return [Integer]
|
|
91
|
+
required :unit_price, Integer
|
|
92
|
+
|
|
93
|
+
# @!attribute description
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :description, String, nil?: true
|
|
97
|
+
|
|
98
|
+
# @!attribute name
|
|
99
|
+
#
|
|
100
|
+
# @return [String, nil]
|
|
101
|
+
optional :name, String, nil?: true
|
|
102
|
+
|
|
103
|
+
# @!attribute tax
|
|
104
|
+
#
|
|
105
|
+
# @return [Integer, nil]
|
|
106
|
+
optional :tax, Integer, nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute tax_rate
|
|
109
|
+
#
|
|
110
|
+
# @return [Float, nil]
|
|
111
|
+
optional :tax_rate, Float, nil?: true
|
|
112
|
+
|
|
113
|
+
# @!method initialize(id:, currency:, product_id:, proration_factor:, quantity:, tax_inclusive:, type:, unit_price:, description: nil, name: nil, tax: nil, tax_rate: nil)
|
|
114
|
+
# @param id [String]
|
|
115
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
116
|
+
# @param product_id [String]
|
|
117
|
+
# @param proration_factor [Float]
|
|
118
|
+
# @param quantity [Integer]
|
|
119
|
+
# @param tax_inclusive [Boolean]
|
|
120
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type]
|
|
121
|
+
# @param unit_price [Integer]
|
|
122
|
+
# @param description [String, nil]
|
|
123
|
+
# @param name [String, nil]
|
|
124
|
+
# @param tax [Integer, nil]
|
|
125
|
+
# @param tax_rate [Float, nil]
|
|
126
|
+
|
|
127
|
+
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0#type
|
|
128
|
+
module Type
|
|
129
|
+
extend Dodopayments::Internal::Type::Enum
|
|
130
|
+
|
|
131
|
+
SUBSCRIPTION = :subscription
|
|
132
|
+
|
|
133
|
+
# @!method self.values
|
|
134
|
+
# @return [Array<Symbol>]
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
class UnionMember1 < Dodopayments::Internal::Type::BaseModel
|
|
139
|
+
# @!attribute id
|
|
140
|
+
#
|
|
141
|
+
# @return [String]
|
|
142
|
+
required :id, String
|
|
143
|
+
|
|
144
|
+
# @!attribute currency
|
|
145
|
+
#
|
|
146
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
147
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
148
|
+
|
|
149
|
+
# @!attribute name
|
|
150
|
+
#
|
|
151
|
+
# @return [String]
|
|
152
|
+
required :name, String
|
|
153
|
+
|
|
154
|
+
# @!attribute proration_factor
|
|
155
|
+
#
|
|
156
|
+
# @return [Float]
|
|
157
|
+
required :proration_factor, Float
|
|
158
|
+
|
|
159
|
+
# @!attribute quantity
|
|
160
|
+
#
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
required :quantity, Integer
|
|
163
|
+
|
|
164
|
+
# @!attribute tax_category
|
|
165
|
+
# Represents the different categories of taxation applicable to various products
|
|
166
|
+
# and services.
|
|
167
|
+
#
|
|
168
|
+
# @return [Symbol, Dodopayments::Models::TaxCategory]
|
|
169
|
+
required :tax_category, enum: -> { Dodopayments::TaxCategory }
|
|
170
|
+
|
|
171
|
+
# @!attribute tax_inclusive
|
|
172
|
+
#
|
|
173
|
+
# @return [Boolean]
|
|
174
|
+
required :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
|
175
|
+
|
|
176
|
+
# @!attribute tax_rate
|
|
177
|
+
#
|
|
178
|
+
# @return [Float]
|
|
179
|
+
required :tax_rate, Float
|
|
180
|
+
|
|
181
|
+
# @!attribute type
|
|
182
|
+
#
|
|
183
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type]
|
|
184
|
+
required :type,
|
|
185
|
+
enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type }
|
|
186
|
+
|
|
187
|
+
# @!attribute unit_price
|
|
188
|
+
#
|
|
189
|
+
# @return [Integer]
|
|
190
|
+
required :unit_price, Integer
|
|
191
|
+
|
|
192
|
+
# @!attribute description
|
|
193
|
+
#
|
|
194
|
+
# @return [String, nil]
|
|
195
|
+
optional :description, String, nil?: true
|
|
196
|
+
|
|
197
|
+
# @!attribute tax
|
|
198
|
+
#
|
|
199
|
+
# @return [Integer, nil]
|
|
200
|
+
optional :tax, Integer, nil?: true
|
|
201
|
+
|
|
202
|
+
# @!method initialize(id:, currency:, name:, proration_factor:, quantity:, tax_category:, tax_inclusive:, tax_rate:, type:, unit_price:, description: nil, tax: nil)
|
|
203
|
+
# Some parameter documentations has been truncated, see
|
|
204
|
+
# {Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1}
|
|
205
|
+
# for more details.
|
|
206
|
+
#
|
|
207
|
+
# @param id [String]
|
|
208
|
+
#
|
|
209
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
210
|
+
#
|
|
211
|
+
# @param name [String]
|
|
212
|
+
#
|
|
213
|
+
# @param proration_factor [Float]
|
|
214
|
+
#
|
|
215
|
+
# @param quantity [Integer]
|
|
216
|
+
#
|
|
217
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
|
|
218
|
+
#
|
|
219
|
+
# @param tax_inclusive [Boolean]
|
|
220
|
+
#
|
|
221
|
+
# @param tax_rate [Float]
|
|
222
|
+
#
|
|
223
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type]
|
|
224
|
+
#
|
|
225
|
+
# @param unit_price [Integer]
|
|
226
|
+
#
|
|
227
|
+
# @param description [String, nil]
|
|
228
|
+
#
|
|
229
|
+
# @param tax [Integer, nil]
|
|
230
|
+
|
|
231
|
+
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1#type
|
|
232
|
+
module Type
|
|
233
|
+
extend Dodopayments::Internal::Type::Enum
|
|
234
|
+
|
|
235
|
+
ADDON = :addon
|
|
236
|
+
|
|
237
|
+
# @!method self.values
|
|
238
|
+
# @return [Array<Symbol>]
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
class UnionMember2 < Dodopayments::Internal::Type::BaseModel
|
|
243
|
+
# @!attribute id
|
|
244
|
+
#
|
|
245
|
+
# @return [String]
|
|
246
|
+
required :id, String
|
|
247
|
+
|
|
248
|
+
# @!attribute chargeable_units
|
|
249
|
+
#
|
|
250
|
+
# @return [String]
|
|
251
|
+
required :chargeable_units, String
|
|
252
|
+
|
|
253
|
+
# @!attribute currency
|
|
254
|
+
#
|
|
255
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
256
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
257
|
+
|
|
258
|
+
# @!attribute free_threshold
|
|
259
|
+
#
|
|
260
|
+
# @return [Integer]
|
|
261
|
+
required :free_threshold, Integer
|
|
262
|
+
|
|
263
|
+
# @!attribute name
|
|
264
|
+
#
|
|
265
|
+
# @return [String]
|
|
266
|
+
required :name, String
|
|
267
|
+
|
|
268
|
+
# @!attribute price_per_unit
|
|
269
|
+
#
|
|
270
|
+
# @return [String]
|
|
271
|
+
required :price_per_unit, String
|
|
272
|
+
|
|
273
|
+
# @!attribute subtotal
|
|
274
|
+
#
|
|
275
|
+
# @return [Integer]
|
|
276
|
+
required :subtotal, Integer
|
|
277
|
+
|
|
278
|
+
# @!attribute tax_inclusive
|
|
279
|
+
#
|
|
280
|
+
# @return [Boolean]
|
|
281
|
+
required :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
|
282
|
+
|
|
283
|
+
# @!attribute tax_rate
|
|
284
|
+
#
|
|
285
|
+
# @return [Float]
|
|
286
|
+
required :tax_rate, Float
|
|
287
|
+
|
|
288
|
+
# @!attribute type
|
|
289
|
+
#
|
|
290
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type]
|
|
291
|
+
required :type,
|
|
292
|
+
enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type }
|
|
293
|
+
|
|
294
|
+
# @!attribute units_consumed
|
|
295
|
+
#
|
|
296
|
+
# @return [String]
|
|
297
|
+
required :units_consumed, String
|
|
298
|
+
|
|
299
|
+
# @!attribute description
|
|
300
|
+
#
|
|
301
|
+
# @return [String, nil]
|
|
302
|
+
optional :description, String, nil?: true
|
|
303
|
+
|
|
304
|
+
# @!attribute tax
|
|
305
|
+
#
|
|
306
|
+
# @return [Integer, nil]
|
|
307
|
+
optional :tax, Integer, nil?: true
|
|
308
|
+
|
|
309
|
+
# @!method initialize(id:, chargeable_units:, currency:, free_threshold:, name:, price_per_unit:, subtotal:, tax_inclusive:, tax_rate:, type:, units_consumed:, description: nil, tax: nil)
|
|
310
|
+
# @param id [String]
|
|
311
|
+
# @param chargeable_units [String]
|
|
312
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
313
|
+
# @param free_threshold [Integer]
|
|
314
|
+
# @param name [String]
|
|
315
|
+
# @param price_per_unit [String]
|
|
316
|
+
# @param subtotal [Integer]
|
|
317
|
+
# @param tax_inclusive [Boolean]
|
|
318
|
+
# @param tax_rate [Float]
|
|
319
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type]
|
|
320
|
+
# @param units_consumed [String]
|
|
321
|
+
# @param description [String, nil]
|
|
322
|
+
# @param tax [Integer, nil]
|
|
323
|
+
|
|
324
|
+
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2#type
|
|
325
|
+
module Type
|
|
326
|
+
extend Dodopayments::Internal::Type::Enum
|
|
327
|
+
|
|
328
|
+
METER = :meter
|
|
329
|
+
|
|
330
|
+
# @!method self.values
|
|
331
|
+
# @return [Array<Symbol>]
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# @!method self.variants
|
|
336
|
+
# @return [Array(Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2)]
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge#summary
|
|
340
|
+
class Summary < Dodopayments::Internal::Type::BaseModel
|
|
341
|
+
# @!attribute currency
|
|
342
|
+
#
|
|
343
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
344
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
345
|
+
|
|
346
|
+
# @!attribute customer_credits
|
|
347
|
+
#
|
|
348
|
+
# @return [Integer]
|
|
349
|
+
required :customer_credits, Integer
|
|
350
|
+
|
|
351
|
+
# @!attribute settlement_amount
|
|
352
|
+
#
|
|
353
|
+
# @return [Integer]
|
|
354
|
+
required :settlement_amount, Integer
|
|
355
|
+
|
|
356
|
+
# @!attribute settlement_currency
|
|
357
|
+
#
|
|
358
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
359
|
+
required :settlement_currency, enum: -> { Dodopayments::Currency }
|
|
360
|
+
|
|
361
|
+
# @!attribute total_amount
|
|
362
|
+
#
|
|
363
|
+
# @return [Integer]
|
|
364
|
+
required :total_amount, Integer
|
|
365
|
+
|
|
366
|
+
# @!attribute settlement_tax
|
|
367
|
+
#
|
|
368
|
+
# @return [Integer, nil]
|
|
369
|
+
optional :settlement_tax, Integer, nil?: true
|
|
370
|
+
|
|
371
|
+
# @!attribute tax
|
|
372
|
+
#
|
|
373
|
+
# @return [Integer, nil]
|
|
374
|
+
optional :tax, Integer, nil?: true
|
|
375
|
+
|
|
376
|
+
# @!method initialize(currency:, customer_credits:, settlement_amount:, settlement_currency:, total_amount:, settlement_tax: nil, tax: nil)
|
|
377
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
|
378
|
+
# @param customer_credits [Integer]
|
|
379
|
+
# @param settlement_amount [Integer]
|
|
380
|
+
# @param settlement_currency [Symbol, Dodopayments::Models::Currency]
|
|
381
|
+
# @param total_amount [Integer]
|
|
382
|
+
# @param settlement_tax [Integer, nil]
|
|
383
|
+
# @param tax [Integer, nil]
|
|
384
|
+
end
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
end
|
|
388
|
+
end
|