dodopayments 1.69.0 → 1.71.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 +26 -0
- data/README.md +10 -1
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/checkout_session_response.rb +8 -8
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +9 -18
- data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_expired_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_lost_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_opened_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_won_webhook_event.rb +3 -28
- data/lib/dodopayments/models/license_key_created_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment.rb +9 -1
- data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_create_params.rb +11 -1
- data/lib/dodopayments/models/payment_failed_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_method_types.rb +98 -13
- data/lib/dodopayments/models/payment_processing_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +3 -28
- data/lib/dodopayments/models/refund_failed_webhook_event.rb +3 -28
- data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +3 -28
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_create_params.rb +11 -1
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -28
- data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +3 -1
- data/lib/dodopayments/resources/subscriptions.rb +3 -1
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +3 -3
- data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +13 -9
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +6 -9
- data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment.rbi +8 -0
- data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
- data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/payment_method_types.rbi +186 -18
- data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +6 -92
- data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -0
- data/rbi/dodopayments/resources/payments.rbi +5 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +5 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +5 -5
- data/sig/dodopayments/models/customer_retrieve_payment_methods_response.rbs +5 -0
- data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_method_types.rbs +196 -26
- data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -35
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +1 -0
- metadata +2 -2
|
@@ -10,10 +10,10 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Response struct representing subscription details
|
|
14
14
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
15
|
+
# @return [Dodopayments::Models::Subscription]
|
|
16
|
+
required :data, -> { Dodopayments::Subscription }
|
|
17
17
|
|
|
18
18
|
# @!attribute timestamp
|
|
19
19
|
# The timestamp of when the event occurred
|
|
@@ -30,36 +30,12 @@ module Dodopayments
|
|
|
30
30
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
33
|
+
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, Dodopayments::Models::SubscriptionFailedWebhookEvent::Type] The event type
|
|
38
38
|
|
|
39
|
-
# @see Dodopayments::Models::SubscriptionFailedWebhookEvent#data
|
|
40
|
-
class Data < Dodopayments::Models::Subscription
|
|
41
|
-
# @!attribute payload_type
|
|
42
|
-
# The type of payload in the data field
|
|
43
|
-
#
|
|
44
|
-
# @return [Symbol, Dodopayments::Models::SubscriptionFailedWebhookEvent::Data::PayloadType, nil]
|
|
45
|
-
optional :payload_type, enum: -> { Dodopayments::SubscriptionFailedWebhookEvent::Data::PayloadType }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(payload_type: nil)
|
|
48
|
-
# Event-specific data
|
|
49
|
-
#
|
|
50
|
-
# @param payload_type [Symbol, Dodopayments::Models::SubscriptionFailedWebhookEvent::Data::PayloadType] The type of payload in the data field
|
|
51
|
-
|
|
52
|
-
# The type of payload in the data field
|
|
53
|
-
module PayloadType
|
|
54
|
-
extend Dodopayments::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
SUBSCRIPTION = :Subscription
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
39
|
# The event type
|
|
64
40
|
#
|
|
65
41
|
# @see Dodopayments::Models::SubscriptionFailedWebhookEvent#type
|
|
@@ -10,10 +10,10 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Response struct representing subscription details
|
|
14
14
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
15
|
+
# @return [Dodopayments::Models::Subscription]
|
|
16
|
+
required :data, -> { Dodopayments::Subscription }
|
|
17
17
|
|
|
18
18
|
# @!attribute timestamp
|
|
19
19
|
# The timestamp of when the event occurred
|
|
@@ -30,36 +30,12 @@ module Dodopayments
|
|
|
30
30
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
33
|
+
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Type] The event type
|
|
38
38
|
|
|
39
|
-
# @see Dodopayments::Models::SubscriptionOnHoldWebhookEvent#data
|
|
40
|
-
class Data < Dodopayments::Models::Subscription
|
|
41
|
-
# @!attribute payload_type
|
|
42
|
-
# The type of payload in the data field
|
|
43
|
-
#
|
|
44
|
-
# @return [Symbol, Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data::PayloadType, nil]
|
|
45
|
-
optional :payload_type, enum: -> { Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(payload_type: nil)
|
|
48
|
-
# Event-specific data
|
|
49
|
-
#
|
|
50
|
-
# @param payload_type [Symbol, Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data::PayloadType] The type of payload in the data field
|
|
51
|
-
|
|
52
|
-
# The type of payload in the data field
|
|
53
|
-
module PayloadType
|
|
54
|
-
extend Dodopayments::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
SUBSCRIPTION = :Subscription
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
39
|
# The event type
|
|
64
40
|
#
|
|
65
41
|
# @see Dodopayments::Models::SubscriptionOnHoldWebhookEvent#type
|
|
@@ -10,10 +10,10 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Response struct representing subscription details
|
|
14
14
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
15
|
+
# @return [Dodopayments::Models::Subscription]
|
|
16
|
+
required :data, -> { Dodopayments::Subscription }
|
|
17
17
|
|
|
18
18
|
# @!attribute timestamp
|
|
19
19
|
# The timestamp of when the event occurred
|
|
@@ -30,36 +30,12 @@ module Dodopayments
|
|
|
30
30
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
33
|
+
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Type] The event type
|
|
38
38
|
|
|
39
|
-
# @see Dodopayments::Models::SubscriptionPlanChangedWebhookEvent#data
|
|
40
|
-
class Data < Dodopayments::Models::Subscription
|
|
41
|
-
# @!attribute payload_type
|
|
42
|
-
# The type of payload in the data field
|
|
43
|
-
#
|
|
44
|
-
# @return [Symbol, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data::PayloadType, nil]
|
|
45
|
-
optional :payload_type, enum: -> { Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(payload_type: nil)
|
|
48
|
-
# Event-specific data
|
|
49
|
-
#
|
|
50
|
-
# @param payload_type [Symbol, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data::PayloadType] The type of payload in the data field
|
|
51
|
-
|
|
52
|
-
# The type of payload in the data field
|
|
53
|
-
module PayloadType
|
|
54
|
-
extend Dodopayments::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
SUBSCRIPTION = :Subscription
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
39
|
# The event type
|
|
64
40
|
#
|
|
65
41
|
# @see Dodopayments::Models::SubscriptionPlanChangedWebhookEvent#type
|
|
@@ -10,10 +10,10 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Response struct representing subscription details
|
|
14
14
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
15
|
+
# @return [Dodopayments::Models::Subscription]
|
|
16
|
+
required :data, -> { Dodopayments::Subscription }
|
|
17
17
|
|
|
18
18
|
# @!attribute timestamp
|
|
19
19
|
# The timestamp of when the event occurred
|
|
@@ -30,36 +30,12 @@ module Dodopayments
|
|
|
30
30
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
33
|
+
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, Dodopayments::Models::SubscriptionRenewedWebhookEvent::Type] The event type
|
|
38
38
|
|
|
39
|
-
# @see Dodopayments::Models::SubscriptionRenewedWebhookEvent#data
|
|
40
|
-
class Data < Dodopayments::Models::Subscription
|
|
41
|
-
# @!attribute payload_type
|
|
42
|
-
# The type of payload in the data field
|
|
43
|
-
#
|
|
44
|
-
# @return [Symbol, Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data::PayloadType, nil]
|
|
45
|
-
optional :payload_type, enum: -> { Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(payload_type: nil)
|
|
48
|
-
# Event-specific data
|
|
49
|
-
#
|
|
50
|
-
# @param payload_type [Symbol, Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data::PayloadType] The type of payload in the data field
|
|
51
|
-
|
|
52
|
-
# The type of payload in the data field
|
|
53
|
-
module PayloadType
|
|
54
|
-
extend Dodopayments::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
SUBSCRIPTION = :Subscription
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
39
|
# The event type
|
|
64
40
|
#
|
|
65
41
|
# @see Dodopayments::Models::SubscriptionRenewedWebhookEvent#type
|
|
@@ -10,10 +10,10 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Response struct representing subscription details
|
|
14
14
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
15
|
+
# @return [Dodopayments::Models::Subscription]
|
|
16
|
+
required :data, -> { Dodopayments::Subscription }
|
|
17
17
|
|
|
18
18
|
# @!attribute timestamp
|
|
19
19
|
# The timestamp of when the event occurred
|
|
@@ -30,36 +30,12 @@ module Dodopayments
|
|
|
30
30
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
31
|
# @param business_id [String] The business identifier
|
|
32
32
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
33
|
+
# @param data [Dodopayments::Models::Subscription] Response struct representing subscription details
|
|
34
34
|
#
|
|
35
35
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
36
|
#
|
|
37
37
|
# @param type [Symbol, Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Type] The event type
|
|
38
38
|
|
|
39
|
-
# @see Dodopayments::Models::SubscriptionUpdatedWebhookEvent#data
|
|
40
|
-
class Data < Dodopayments::Models::Subscription
|
|
41
|
-
# @!attribute payload_type
|
|
42
|
-
# The type of payload in the data field
|
|
43
|
-
#
|
|
44
|
-
# @return [Symbol, Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::PayloadType, nil]
|
|
45
|
-
optional :payload_type, enum: -> { Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(payload_type: nil)
|
|
48
|
-
# Event-specific data
|
|
49
|
-
#
|
|
50
|
-
# @param payload_type [Symbol, Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::PayloadType] The type of payload in the data field
|
|
51
|
-
|
|
52
|
-
# The type of payload in the data field
|
|
53
|
-
module PayloadType
|
|
54
|
-
extend Dodopayments::Internal::Type::Enum
|
|
55
|
-
|
|
56
|
-
SUBSCRIPTION = :Subscription
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
39
|
# The event type
|
|
64
40
|
#
|
|
65
41
|
# @see Dodopayments::Models::SubscriptionUpdatedWebhookEvent#type
|
|
@@ -6,7 +6,7 @@ module Dodopayments
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Dodopayments::Models::CheckoutSessionCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# @overload create(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, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
|
|
9
|
+
# @overload create(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, payment_method_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param product_cart [Array<Dodopayments::Models::CheckoutSessionRequest::ProductCart>]
|
|
12
12
|
#
|
|
@@ -32,6 +32,8 @@ module Dodopayments
|
|
|
32
32
|
#
|
|
33
33
|
# @param minimal_address [Boolean] If true, only zipcode is required when confirm is true; other address fields rem
|
|
34
34
|
#
|
|
35
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this checkout session.
|
|
36
|
+
#
|
|
35
37
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
36
38
|
#
|
|
37
39
|
# @param short_link [Boolean] If true, returns a shortened checkout URL.
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for the payment
|
|
14
14
|
#
|
|
@@ -28,6 +28,8 @@ module Dodopayments
|
|
|
28
28
|
#
|
|
29
29
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
30
30
|
#
|
|
31
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this payment.
|
|
32
|
+
#
|
|
31
33
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
32
34
|
#
|
|
33
35
|
# @param return_url [String, nil] Optional URL to redirect the customer after payment.
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
|
|
14
14
|
#
|
|
@@ -36,6 +36,8 @@ module Dodopayments
|
|
|
36
36
|
#
|
|
37
37
|
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
|
38
38
|
#
|
|
39
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this subscription.
|
|
40
|
+
#
|
|
39
41
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
40
42
|
#
|
|
41
43
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -55,12 +55,11 @@ require_relative "dodopayments/client"
|
|
|
55
55
|
require_relative "dodopayments/internal/cursor_page_pagination"
|
|
56
56
|
require_relative "dodopayments/internal/default_page_number_pagination"
|
|
57
57
|
require_relative "dodopayments/models/checkout_session_request"
|
|
58
|
-
require_relative "dodopayments/models/dispute"
|
|
59
58
|
require_relative "dodopayments/models/license_key"
|
|
60
|
-
require_relative "dodopayments/models/
|
|
59
|
+
require_relative "dodopayments/models/get_dispute"
|
|
61
60
|
require_relative "dodopayments/models/refund"
|
|
62
61
|
require_relative "dodopayments/models/subscription"
|
|
63
|
-
require_relative "dodopayments/models/
|
|
62
|
+
require_relative "dodopayments/models/payment"
|
|
64
63
|
require_relative "dodopayments/models/add_meter_to_price"
|
|
65
64
|
require_relative "dodopayments/models/addon_cart_response_item"
|
|
66
65
|
require_relative "dodopayments/models/addon_create_params"
|
|
@@ -112,6 +111,7 @@ require_relative "dodopayments/models/discount_list_params"
|
|
|
112
111
|
require_relative "dodopayments/models/discount_retrieve_params"
|
|
113
112
|
require_relative "dodopayments/models/discount_type"
|
|
114
113
|
require_relative "dodopayments/models/discount_update_params"
|
|
114
|
+
require_relative "dodopayments/models/dispute"
|
|
115
115
|
require_relative "dodopayments/models/dispute_accepted_webhook_event"
|
|
116
116
|
require_relative "dodopayments/models/dispute_accepted_webhook_event"
|
|
117
117
|
require_relative "dodopayments/models/dispute_cancelled_webhook_event"
|
|
@@ -115,6 +115,11 @@ module Dodopayments
|
|
|
115
115
|
sig { params(minimal_address: T::Boolean).void }
|
|
116
116
|
attr_writer :minimal_address
|
|
117
117
|
|
|
118
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
119
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
120
|
+
sig { returns(T.nilable(String)) }
|
|
121
|
+
attr_accessor :payment_method_id
|
|
122
|
+
|
|
118
123
|
# The url to redirect after payment failure or success.
|
|
119
124
|
sig { returns(T.nilable(String)) }
|
|
120
125
|
attr_accessor :return_url
|
|
@@ -177,6 +182,7 @@ module Dodopayments
|
|
|
177
182
|
force_3ds: T.nilable(T::Boolean),
|
|
178
183
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
179
184
|
minimal_address: T::Boolean,
|
|
185
|
+
payment_method_id: T.nilable(String),
|
|
180
186
|
return_url: T.nilable(String),
|
|
181
187
|
short_link: T::Boolean,
|
|
182
188
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -216,6 +222,9 @@ module Dodopayments
|
|
|
216
222
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
217
223
|
# remain optional
|
|
218
224
|
minimal_address: nil,
|
|
225
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
226
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
227
|
+
payment_method_id: nil,
|
|
219
228
|
# The url to redirect after payment failure or success.
|
|
220
229
|
return_url: nil,
|
|
221
230
|
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
@@ -250,6 +259,7 @@ module Dodopayments
|
|
|
250
259
|
force_3ds: T.nilable(T::Boolean),
|
|
251
260
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
252
261
|
minimal_address: T::Boolean,
|
|
262
|
+
payment_method_id: T.nilable(String),
|
|
253
263
|
return_url: T.nilable(String),
|
|
254
264
|
short_link: T::Boolean,
|
|
255
265
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -11,28 +11,32 @@ module Dodopayments
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Checkout url
|
|
15
|
-
sig { returns(String) }
|
|
16
|
-
attr_accessor :checkout_url
|
|
17
|
-
|
|
18
14
|
# The ID of the created checkout session
|
|
19
15
|
sig { returns(String) }
|
|
20
16
|
attr_accessor :session_id
|
|
21
17
|
|
|
18
|
+
# Checkout url (None when payment_method_id is provided)
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_accessor :checkout_url
|
|
21
|
+
|
|
22
22
|
sig do
|
|
23
|
-
params(
|
|
23
|
+
params(session_id: String, checkout_url: T.nilable(String)).returns(
|
|
24
24
|
T.attached_class
|
|
25
25
|
)
|
|
26
26
|
end
|
|
27
27
|
def self.new(
|
|
28
|
-
# Checkout url
|
|
29
|
-
checkout_url:,
|
|
30
28
|
# The ID of the created checkout session
|
|
31
|
-
session_id
|
|
29
|
+
session_id:,
|
|
30
|
+
# Checkout url (None when payment_method_id is provided)
|
|
31
|
+
checkout_url: nil
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
sig
|
|
35
|
+
sig do
|
|
36
|
+
override.returns(
|
|
37
|
+
{ session_id: String, checkout_url: T.nilable(String) }
|
|
38
|
+
)
|
|
39
|
+
end
|
|
36
40
|
def to_hash
|
|
37
41
|
end
|
|
38
42
|
end
|
|
@@ -53,9 +53,6 @@ module Dodopayments
|
|
|
53
53
|
)
|
|
54
54
|
end
|
|
55
55
|
|
|
56
|
-
# PaymentMethod enum from hyperswitch
|
|
57
|
-
#
|
|
58
|
-
# https://github.com/juspay/hyperswitch/blob/ecd05d53c99ae701ac94893ec632a3988afe3238/crates/common_enums/src/enums.rs#L2097
|
|
59
56
|
sig do
|
|
60
57
|
returns(
|
|
61
58
|
Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::PaymentMethod::TaggedSymbol
|
|
@@ -112,9 +109,6 @@ module Dodopayments
|
|
|
112
109
|
).returns(T.attached_class)
|
|
113
110
|
end
|
|
114
111
|
def self.new(
|
|
115
|
-
# PaymentMethod enum from hyperswitch
|
|
116
|
-
#
|
|
117
|
-
# https://github.com/juspay/hyperswitch/blob/ecd05d53c99ae701ac94893ec632a3988afe3238/crates/common_enums/src/enums.rs#L2097
|
|
118
112
|
payment_method:,
|
|
119
113
|
payment_method_id:,
|
|
120
114
|
card: nil,
|
|
@@ -144,9 +138,6 @@ module Dodopayments
|
|
|
144
138
|
def to_hash
|
|
145
139
|
end
|
|
146
140
|
|
|
147
|
-
# PaymentMethod enum from hyperswitch
|
|
148
|
-
#
|
|
149
|
-
# https://github.com/juspay/hyperswitch/blob/ecd05d53c99ae701ac94893ec632a3988afe3238/crates/common_enums/src/enums.rs#L2097
|
|
150
141
|
module PaymentMethod
|
|
151
142
|
extend Dodopayments::Internal::Type::Enum
|
|
152
143
|
|
|
@@ -255,6 +246,9 @@ module Dodopayments
|
|
|
255
246
|
)
|
|
256
247
|
end
|
|
257
248
|
|
|
249
|
+
sig { returns(T.nilable(String)) }
|
|
250
|
+
attr_accessor :card_holder_name
|
|
251
|
+
|
|
258
252
|
# ISO country code alpha2 variant
|
|
259
253
|
sig { returns(T.nilable(Dodopayments::CountryCode::TaggedSymbol)) }
|
|
260
254
|
attr_accessor :card_issuing_country
|
|
@@ -276,6 +270,7 @@ module Dodopayments
|
|
|
276
270
|
|
|
277
271
|
sig do
|
|
278
272
|
params(
|
|
273
|
+
card_holder_name: T.nilable(String),
|
|
279
274
|
card_issuing_country:
|
|
280
275
|
T.nilable(Dodopayments::CountryCode::OrSymbol),
|
|
281
276
|
card_network: T.nilable(String),
|
|
@@ -286,6 +281,7 @@ module Dodopayments
|
|
|
286
281
|
).returns(T.attached_class)
|
|
287
282
|
end
|
|
288
283
|
def self.new(
|
|
284
|
+
card_holder_name: nil,
|
|
289
285
|
# ISO country code alpha2 variant
|
|
290
286
|
card_issuing_country: nil,
|
|
291
287
|
card_network: nil,
|
|
@@ -299,6 +295,7 @@ module Dodopayments
|
|
|
299
295
|
sig do
|
|
300
296
|
override.returns(
|
|
301
297
|
{
|
|
298
|
+
card_holder_name: T.nilable(String),
|
|
302
299
|
card_issuing_country:
|
|
303
300
|
T.nilable(Dodopayments::CountryCode::TaggedSymbol),
|
|
304
301
|
card_network: T.nilable(String),
|
|
@@ -15,15 +15,10 @@ module Dodopayments
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :business_id
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
sig { returns(Dodopayments::DisputeAcceptedWebhookEvent::Data) }
|
|
18
|
+
sig { returns(Dodopayments::Dispute) }
|
|
20
19
|
attr_reader :data
|
|
21
20
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
data: Dodopayments::DisputeAcceptedWebhookEvent::Data::OrHash
|
|
25
|
-
).void
|
|
26
|
-
end
|
|
21
|
+
sig { params(data: Dodopayments::Dispute::OrHash).void }
|
|
27
22
|
attr_writer :data
|
|
28
23
|
|
|
29
24
|
# The timestamp of when the event occurred
|
|
@@ -39,7 +34,7 @@ module Dodopayments
|
|
|
39
34
|
sig do
|
|
40
35
|
params(
|
|
41
36
|
business_id: String,
|
|
42
|
-
data: Dodopayments::
|
|
37
|
+
data: Dodopayments::Dispute::OrHash,
|
|
43
38
|
timestamp: Time,
|
|
44
39
|
type: Dodopayments::DisputeAcceptedWebhookEvent::Type::OrSymbol
|
|
45
40
|
).returns(T.attached_class)
|
|
@@ -47,7 +42,6 @@ module Dodopayments
|
|
|
47
42
|
def self.new(
|
|
48
43
|
# The business identifier
|
|
49
44
|
business_id:,
|
|
50
|
-
# Event-specific data
|
|
51
45
|
data:,
|
|
52
46
|
# The timestamp of when the event occurred
|
|
53
47
|
timestamp:,
|
|
@@ -60,7 +54,7 @@ module Dodopayments
|
|
|
60
54
|
override.returns(
|
|
61
55
|
{
|
|
62
56
|
business_id: String,
|
|
63
|
-
data: Dodopayments::
|
|
57
|
+
data: Dodopayments::Dispute,
|
|
64
58
|
timestamp: Time,
|
|
65
59
|
type: Dodopayments::DisputeAcceptedWebhookEvent::Type::TaggedSymbol
|
|
66
60
|
}
|
|
@@ -69,88 +63,6 @@ module Dodopayments
|
|
|
69
63
|
def to_hash
|
|
70
64
|
end
|
|
71
65
|
|
|
72
|
-
class Data < Dodopayments::Models::Dispute
|
|
73
|
-
OrHash =
|
|
74
|
-
T.type_alias do
|
|
75
|
-
T.any(
|
|
76
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data,
|
|
77
|
-
Dodopayments::Internal::AnyHash
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# The type of payload in the data field
|
|
82
|
-
sig do
|
|
83
|
-
returns(
|
|
84
|
-
T.nilable(
|
|
85
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
86
|
-
)
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
attr_reader :payload_type
|
|
90
|
-
|
|
91
|
-
sig do
|
|
92
|
-
params(
|
|
93
|
-
payload_type:
|
|
94
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::OrSymbol
|
|
95
|
-
).void
|
|
96
|
-
end
|
|
97
|
-
attr_writer :payload_type
|
|
98
|
-
|
|
99
|
-
# Event-specific data
|
|
100
|
-
sig do
|
|
101
|
-
params(
|
|
102
|
-
payload_type:
|
|
103
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::OrSymbol
|
|
104
|
-
).returns(T.attached_class)
|
|
105
|
-
end
|
|
106
|
-
def self.new(
|
|
107
|
-
# The type of payload in the data field
|
|
108
|
-
payload_type: nil
|
|
109
|
-
)
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
sig do
|
|
113
|
-
override.returns(
|
|
114
|
-
{
|
|
115
|
-
payload_type:
|
|
116
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
117
|
-
}
|
|
118
|
-
)
|
|
119
|
-
end
|
|
120
|
-
def to_hash
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
# The type of payload in the data field
|
|
124
|
-
module PayloadType
|
|
125
|
-
extend Dodopayments::Internal::Type::Enum
|
|
126
|
-
|
|
127
|
-
TaggedSymbol =
|
|
128
|
-
T.type_alias do
|
|
129
|
-
T.all(
|
|
130
|
-
Symbol,
|
|
131
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType
|
|
132
|
-
)
|
|
133
|
-
end
|
|
134
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
135
|
-
|
|
136
|
-
DISPUTE =
|
|
137
|
-
T.let(
|
|
138
|
-
:Dispute,
|
|
139
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
sig do
|
|
143
|
-
override.returns(
|
|
144
|
-
T::Array[
|
|
145
|
-
Dodopayments::DisputeAcceptedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
146
|
-
]
|
|
147
|
-
)
|
|
148
|
-
end
|
|
149
|
-
def self.values
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
|
|
154
66
|
# The event type
|
|
155
67
|
module Type
|
|
156
68
|
extend Dodopayments::Internal::Type::Enum
|