dodopayments 2.9.0 → 2.10.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 +23 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/transport/base_client.rb +2 -0
- data/lib/dodopayments/internal/type/union.rb +21 -7
- data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +4 -16
- data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/checkout_session_request.rb +15 -2
- data/lib/dodopayments/models/credit_added_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_deducted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_manual_adjustment_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_charged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rolled_over_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rollover_forfeited_webhook_event.rb +4 -16
- data/lib/dodopayments/models/digital_product_delivery.rb +14 -7
- data/lib/dodopayments/models/digital_product_delivery_file.rb +12 -5
- data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_lost_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_opened_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_won_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement.rb +31 -20
- data/lib/dodopayments/models/entitlement_create_params.rb +3 -3
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_update_params.rb +3 -3
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +50 -32
- data/lib/dodopayments/models/entitlements/file_upload_response.rb +3 -3
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +14 -9
- data/lib/dodopayments/models/integration_config.rb +70 -27
- data/lib/dodopayments/models/integration_config_response.rb +88 -48
- data/lib/dodopayments/models/license_key_created_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment.rb +153 -3
- data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_create_params.rb +15 -3
- data/lib/dodopayments/models/payment_create_response.rb +14 -3
- data/lib/dodopayments/models/payment_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_processing_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payout_list_response.rb +6 -3
- data/lib/dodopayments/models/price.rb +20 -48
- data/lib/dodopayments/models/product.rb +6 -8
- data/lib/dodopayments/models/product_create_params.rb +3 -3
- data/lib/dodopayments/models/product_entitlement_summary.rb +5 -5
- data/lib/dodopayments/models/product_item_req.rb +42 -1
- data/lib/dodopayments/models/product_update_params.rb +3 -3
- data/lib/dodopayments/models/refund_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription.rb +153 -5
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_create_params.rb +15 -3
- data/lib/dodopayments/models/subscription_create_response.rb +14 -3
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_list_response.rb +36 -5
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +21 -49
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +12 -30
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -16
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/update_subscription_plan_req.rb +17 -6
- data/lib/dodopayments/models/webhook_event_type.rb +3 -0
- data/lib/dodopayments/models/webhook_payload.rb +57 -143
- data/lib/dodopayments/resources/checkout_sessions.rb +8 -4
- data/lib/dodopayments/resources/entitlements/files.rb +3 -10
- data/lib/dodopayments/resources/entitlements/grants.rb +2 -4
- data/lib/dodopayments/resources/entitlements.rb +2 -2
- data/lib/dodopayments/resources/payments.rb +4 -2
- data/lib/dodopayments/resources/subscriptions.rb +12 -6
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/checkout_session_request.rbi +14 -0
- data/rbi/dodopayments/models/credit_added_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_deducted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_manual_adjustment_webhook_event.rbi +4 -39
- data/rbi/dodopayments/models/credit_overage_charged_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_rolled_over_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_rollover_forfeited_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/digital_product_delivery.rbi +15 -5
- data/rbi/dodopayments/models/digital_product_delivery_file.rbi +11 -0
- data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/entitlement.rbi +35 -20
- data/rbi/dodopayments/models/entitlement_create_params.rbi +8 -5
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +8 -39
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_update_params.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +54 -20
- data/rbi/dodopayments/models/entitlements/file_upload_response.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +10 -4
- data/rbi/dodopayments/models/integration_config.rbi +141 -26
- data/rbi/dodopayments/models/integration_config_response.rbi +153 -38
- data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/payment.rbi +170 -2
- data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_create_params.rbi +14 -2
- data/rbi/dodopayments/models/payment_create_response.rbi +12 -2
- data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/price.rbi +18 -90
- data/rbi/dodopayments/models/product.rbi +4 -8
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +8 -8
- data/rbi/dodopayments/models/product_item_req.rbi +74 -3
- data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -31
- data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/subscription.rbi +173 -4
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_create_params.rbi +14 -2
- data/rbi/dodopayments/models/subscription_create_response.rbi +12 -2
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_list_response.rbi +67 -4
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +18 -123
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +12 -96
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +18 -8
- data/rbi/dodopayments/models/webhook_event_type.rbi +15 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +48 -466
- data/rbi/dodopayments/resources/checkout_sessions.rbi +12 -0
- data/rbi/dodopayments/resources/entitlements/files.rbi +3 -10
- data/rbi/dodopayments/resources/entitlements/grants.rbi +2 -4
- data/rbi/dodopayments/resources/entitlements.rbi +4 -4
- data/rbi/dodopayments/resources/payments.rbi +6 -1
- data/rbi/dodopayments/resources/subscriptions.rbi +22 -9
- data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/credit_added_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_deducted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_manual_adjustment_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_charged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rolled_over_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rollover_forfeited_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement.rbs +8 -10
- data/sig/dodopayments/models/entitlement_create_params.rbs +6 -4
- data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +4 -11
- data/sig/dodopayments/models/integration_config.rbs +28 -4
- data/sig/dodopayments/models/integration_config_response.rbs +28 -9
- data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment.rbs +97 -0
- data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_create_response.rbs +5 -0
- data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/price.rbs +15 -45
- data/sig/dodopayments/models/product_item_req.rbs +27 -3
- data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription.rbs +97 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_create_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_list_response.rbs +24 -0
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +15 -45
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +8 -48
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +6 -0
- data/sig/dodopayments/models/webhook_payload.rbs +50 -213
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/entitlements.rbs +1 -1
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +3 -0
- metadata +2 -2
|
@@ -45,144 +45,94 @@ module Dodopayments
|
|
|
45
45
|
module Data
|
|
46
46
|
extend Dodopayments::Internal::Type::Union
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
discriminator :payload_type
|
|
49
|
+
|
|
50
|
+
variant :Payment, -> { Dodopayments::WebhookPayload::Data::Payment }
|
|
49
51
|
|
|
50
52
|
# Response struct representing subscription details
|
|
51
|
-
variant -> { Dodopayments::WebhookPayload::Data::Subscription }
|
|
53
|
+
variant :Subscription, -> { Dodopayments::WebhookPayload::Data::Subscription }
|
|
52
54
|
|
|
53
|
-
variant -> { Dodopayments::WebhookPayload::Data::Refund }
|
|
55
|
+
variant :Refund, -> { Dodopayments::WebhookPayload::Data::Refund }
|
|
54
56
|
|
|
55
|
-
variant -> { Dodopayments::WebhookPayload::Data::Dispute }
|
|
57
|
+
variant :Dispute, -> { Dodopayments::WebhookPayload::Data::Dispute }
|
|
56
58
|
|
|
57
|
-
variant -> { Dodopayments::WebhookPayload::Data::LicenseKey }
|
|
59
|
+
variant :LicenseKey, -> { Dodopayments::WebhookPayload::Data::LicenseKey }
|
|
58
60
|
|
|
59
61
|
# Response for a ledger entry
|
|
60
|
-
variant -> { Dodopayments::WebhookPayload::Data::CreditLedgerEntry }
|
|
62
|
+
variant :CreditLedgerEntry, -> { Dodopayments::WebhookPayload::Data::CreditLedgerEntry }
|
|
61
63
|
|
|
62
|
-
variant -> { Dodopayments::WebhookPayload::Data::CreditBalanceLow }
|
|
64
|
+
variant :CreditBalanceLow, -> { Dodopayments::WebhookPayload::Data::CreditBalanceLow }
|
|
63
65
|
|
|
64
|
-
variant -> { Dodopayments::WebhookPayload::Data::AbandonedCheckout }
|
|
66
|
+
variant :AbandonedCheckout, -> { Dodopayments::WebhookPayload::Data::AbandonedCheckout }
|
|
65
67
|
|
|
66
|
-
variant -> { Dodopayments::WebhookPayload::Data::DunningAttempt }
|
|
68
|
+
variant :DunningAttempt, -> { Dodopayments::WebhookPayload::Data::DunningAttempt }
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
# Detailed view of a single entitlement grant: who it's for, its
|
|
71
|
+
# lifecycle state, and any integration-specific delivery payload.
|
|
72
|
+
variant :EntitlementGrant, -> { Dodopayments::WebhookPayload::Data::EntitlementGrant }
|
|
69
73
|
|
|
70
74
|
class Payment < Dodopayments::Models::Payment
|
|
71
75
|
# @!attribute payload_type
|
|
72
76
|
#
|
|
73
|
-
# @return [Symbol,
|
|
74
|
-
required :payload_type,
|
|
75
|
-
|
|
76
|
-
# @!method initialize(payload_type:)
|
|
77
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::Payment::PayloadType]
|
|
78
|
-
|
|
79
|
-
module PayloadType
|
|
80
|
-
extend Dodopayments::Internal::Type::Enum
|
|
81
|
-
|
|
82
|
-
PAYMENT = :Payment
|
|
77
|
+
# @return [Symbol, :Payment]
|
|
78
|
+
required :payload_type, const: :Payment
|
|
83
79
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
end
|
|
80
|
+
# @!method initialize(payload_type: :Payment)
|
|
81
|
+
# @param payload_type [Symbol, :Payment]
|
|
87
82
|
end
|
|
88
83
|
|
|
89
84
|
class Subscription < Dodopayments::Models::Subscription
|
|
90
85
|
# @!attribute payload_type
|
|
91
86
|
#
|
|
92
|
-
# @return [Symbol,
|
|
93
|
-
required :payload_type,
|
|
87
|
+
# @return [Symbol, :Subscription]
|
|
88
|
+
required :payload_type, const: :Subscription
|
|
94
89
|
|
|
95
|
-
# @!method initialize(payload_type:)
|
|
90
|
+
# @!method initialize(payload_type: :Subscription)
|
|
96
91
|
# Response struct representing subscription details
|
|
97
92
|
#
|
|
98
|
-
# @param payload_type [Symbol,
|
|
99
|
-
|
|
100
|
-
module PayloadType
|
|
101
|
-
extend Dodopayments::Internal::Type::Enum
|
|
102
|
-
|
|
103
|
-
SUBSCRIPTION = :Subscription
|
|
104
|
-
|
|
105
|
-
# @!method self.values
|
|
106
|
-
# @return [Array<Symbol>]
|
|
107
|
-
end
|
|
93
|
+
# @param payload_type [Symbol, :Subscription]
|
|
108
94
|
end
|
|
109
95
|
|
|
110
96
|
class Refund < Dodopayments::Models::Refund
|
|
111
97
|
# @!attribute payload_type
|
|
112
98
|
#
|
|
113
|
-
# @return [Symbol,
|
|
114
|
-
required :payload_type,
|
|
115
|
-
|
|
116
|
-
# @!method initialize(payload_type:)
|
|
117
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::Refund::PayloadType]
|
|
118
|
-
|
|
119
|
-
module PayloadType
|
|
120
|
-
extend Dodopayments::Internal::Type::Enum
|
|
99
|
+
# @return [Symbol, :Refund]
|
|
100
|
+
required :payload_type, const: :Refund
|
|
121
101
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
# @!method self.values
|
|
125
|
-
# @return [Array<Symbol>]
|
|
126
|
-
end
|
|
102
|
+
# @!method initialize(payload_type: :Refund)
|
|
103
|
+
# @param payload_type [Symbol, :Refund]
|
|
127
104
|
end
|
|
128
105
|
|
|
129
106
|
class Dispute < Dodopayments::Models::GetDispute
|
|
130
107
|
# @!attribute payload_type
|
|
131
108
|
#
|
|
132
|
-
# @return [Symbol,
|
|
133
|
-
required :payload_type,
|
|
134
|
-
|
|
135
|
-
# @!method initialize(payload_type:)
|
|
136
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::Dispute::PayloadType]
|
|
109
|
+
# @return [Symbol, :Dispute]
|
|
110
|
+
required :payload_type, const: :Dispute
|
|
137
111
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
DISPUTE = :Dispute
|
|
142
|
-
|
|
143
|
-
# @!method self.values
|
|
144
|
-
# @return [Array<Symbol>]
|
|
145
|
-
end
|
|
112
|
+
# @!method initialize(payload_type: :Dispute)
|
|
113
|
+
# @param payload_type [Symbol, :Dispute]
|
|
146
114
|
end
|
|
147
115
|
|
|
148
116
|
class LicenseKey < Dodopayments::Models::LicenseKey
|
|
149
117
|
# @!attribute payload_type
|
|
150
118
|
#
|
|
151
|
-
# @return [Symbol,
|
|
152
|
-
required :payload_type,
|
|
153
|
-
|
|
154
|
-
# @!method initialize(payload_type:)
|
|
155
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::LicenseKey::PayloadType]
|
|
156
|
-
|
|
157
|
-
module PayloadType
|
|
158
|
-
extend Dodopayments::Internal::Type::Enum
|
|
119
|
+
# @return [Symbol, :LicenseKey]
|
|
120
|
+
required :payload_type, const: :LicenseKey
|
|
159
121
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
# @!method self.values
|
|
163
|
-
# @return [Array<Symbol>]
|
|
164
|
-
end
|
|
122
|
+
# @!method initialize(payload_type: :LicenseKey)
|
|
123
|
+
# @param payload_type [Symbol, :LicenseKey]
|
|
165
124
|
end
|
|
166
125
|
|
|
167
126
|
class CreditLedgerEntry < Dodopayments::Models::CreditEntitlements::CreditLedgerEntry
|
|
168
127
|
# @!attribute payload_type
|
|
169
128
|
#
|
|
170
|
-
# @return [Symbol,
|
|
171
|
-
required :payload_type,
|
|
129
|
+
# @return [Symbol, :CreditLedgerEntry]
|
|
130
|
+
required :payload_type, const: :CreditLedgerEntry
|
|
172
131
|
|
|
173
|
-
# @!method initialize(payload_type:)
|
|
132
|
+
# @!method initialize(payload_type: :CreditLedgerEntry)
|
|
174
133
|
# Response for a ledger entry
|
|
175
134
|
#
|
|
176
|
-
# @param payload_type [Symbol,
|
|
177
|
-
|
|
178
|
-
module PayloadType
|
|
179
|
-
extend Dodopayments::Internal::Type::Enum
|
|
180
|
-
|
|
181
|
-
CREDIT_LEDGER_ENTRY = :CreditLedgerEntry
|
|
182
|
-
|
|
183
|
-
# @!method self.values
|
|
184
|
-
# @return [Array<Symbol>]
|
|
185
|
-
end
|
|
135
|
+
# @param payload_type [Symbol, :CreditLedgerEntry]
|
|
186
136
|
end
|
|
187
137
|
|
|
188
138
|
class CreditBalanceLow < Dodopayments::Internal::Type::BaseModel
|
|
@@ -208,8 +158,8 @@ module Dodopayments
|
|
|
208
158
|
|
|
209
159
|
# @!attribute payload_type
|
|
210
160
|
#
|
|
211
|
-
# @return [Symbol,
|
|
212
|
-
required :payload_type,
|
|
161
|
+
# @return [Symbol, :CreditBalanceLow]
|
|
162
|
+
required :payload_type, const: :CreditBalanceLow
|
|
213
163
|
|
|
214
164
|
# @!attribute subscription_credits_amount
|
|
215
165
|
#
|
|
@@ -231,26 +181,16 @@ module Dodopayments
|
|
|
231
181
|
# @return [Integer]
|
|
232
182
|
required :threshold_percent, Integer
|
|
233
183
|
|
|
234
|
-
# @!method initialize(available_balance:, credit_entitlement_id:, credit_entitlement_name:, customer_id:,
|
|
184
|
+
# @!method initialize(available_balance:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:, payload_type: :CreditBalanceLow)
|
|
235
185
|
# @param available_balance [String]
|
|
236
186
|
# @param credit_entitlement_id [String]
|
|
237
187
|
# @param credit_entitlement_name [String]
|
|
238
188
|
# @param customer_id [String]
|
|
239
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::CreditBalanceLow::PayloadType]
|
|
240
189
|
# @param subscription_credits_amount [String]
|
|
241
190
|
# @param subscription_id [String]
|
|
242
191
|
# @param threshold_amount [String]
|
|
243
192
|
# @param threshold_percent [Integer]
|
|
244
|
-
|
|
245
|
-
# @see Dodopayments::Models::WebhookPayload::Data::CreditBalanceLow#payload_type
|
|
246
|
-
module PayloadType
|
|
247
|
-
extend Dodopayments::Internal::Type::Enum
|
|
248
|
-
|
|
249
|
-
CREDIT_BALANCE_LOW = :CreditBalanceLow
|
|
250
|
-
|
|
251
|
-
# @!method self.values
|
|
252
|
-
# @return [Array<Symbol>]
|
|
253
|
-
end
|
|
193
|
+
# @param payload_type [Symbol, :CreditBalanceLow]
|
|
254
194
|
end
|
|
255
195
|
|
|
256
196
|
class AbandonedCheckout < Dodopayments::Internal::Type::BaseModel
|
|
@@ -272,8 +212,8 @@ module Dodopayments
|
|
|
272
212
|
|
|
273
213
|
# @!attribute payload_type
|
|
274
214
|
#
|
|
275
|
-
# @return [Symbol,
|
|
276
|
-
required :payload_type,
|
|
215
|
+
# @return [Symbol, :AbandonedCheckout]
|
|
216
|
+
required :payload_type, const: :AbandonedCheckout
|
|
277
217
|
|
|
278
218
|
# @!attribute payment_id
|
|
279
219
|
#
|
|
@@ -290,14 +230,14 @@ module Dodopayments
|
|
|
290
230
|
# @return [String, nil]
|
|
291
231
|
optional :recovered_payment_id, String, nil?: true
|
|
292
232
|
|
|
293
|
-
# @!method initialize(abandoned_at:, abandonment_reason:, customer_id:,
|
|
233
|
+
# @!method initialize(abandoned_at:, abandonment_reason:, customer_id:, payment_id:, status:, recovered_payment_id: nil, payload_type: :AbandonedCheckout)
|
|
294
234
|
# @param abandoned_at [Time]
|
|
295
235
|
# @param abandonment_reason [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason]
|
|
296
236
|
# @param customer_id [String]
|
|
297
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::PayloadType]
|
|
298
237
|
# @param payment_id [String]
|
|
299
238
|
# @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::Status]
|
|
300
239
|
# @param recovered_payment_id [String, nil]
|
|
240
|
+
# @param payload_type [Symbol, :AbandonedCheckout]
|
|
301
241
|
|
|
302
242
|
# @see Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout#abandonment_reason
|
|
303
243
|
module AbandonmentReason
|
|
@@ -310,16 +250,6 @@ module Dodopayments
|
|
|
310
250
|
# @return [Array<Symbol>]
|
|
311
251
|
end
|
|
312
252
|
|
|
313
|
-
# @see Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout#payload_type
|
|
314
|
-
module PayloadType
|
|
315
|
-
extend Dodopayments::Internal::Type::Enum
|
|
316
|
-
|
|
317
|
-
ABANDONED_CHECKOUT = :AbandonedCheckout
|
|
318
|
-
|
|
319
|
-
# @!method self.values
|
|
320
|
-
# @return [Array<Symbol>]
|
|
321
|
-
end
|
|
322
|
-
|
|
323
253
|
# @see Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout#status
|
|
324
254
|
module Status
|
|
325
255
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -348,8 +278,8 @@ module Dodopayments
|
|
|
348
278
|
|
|
349
279
|
# @!attribute payload_type
|
|
350
280
|
#
|
|
351
|
-
# @return [Symbol,
|
|
352
|
-
required :payload_type,
|
|
281
|
+
# @return [Symbol, :DunningAttempt]
|
|
282
|
+
required :payload_type, const: :DunningAttempt
|
|
353
283
|
|
|
354
284
|
# @!attribute status
|
|
355
285
|
#
|
|
@@ -371,24 +301,14 @@ module Dodopayments
|
|
|
371
301
|
# @return [String, nil]
|
|
372
302
|
optional :payment_id, String, nil?: true
|
|
373
303
|
|
|
374
|
-
# @!method initialize(created_at:, customer_id:,
|
|
304
|
+
# @!method initialize(created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil, payload_type: :DunningAttempt)
|
|
375
305
|
# @param created_at [Time]
|
|
376
306
|
# @param customer_id [String]
|
|
377
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::PayloadType]
|
|
378
307
|
# @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::Status]
|
|
379
308
|
# @param subscription_id [String]
|
|
380
309
|
# @param trigger_state [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::TriggerState]
|
|
381
310
|
# @param payment_id [String, nil]
|
|
382
|
-
|
|
383
|
-
# @see Dodopayments::Models::WebhookPayload::Data::DunningAttempt#payload_type
|
|
384
|
-
module PayloadType
|
|
385
|
-
extend Dodopayments::Internal::Type::Enum
|
|
386
|
-
|
|
387
|
-
DUNNING_ATTEMPT = :DunningAttempt
|
|
388
|
-
|
|
389
|
-
# @!method self.values
|
|
390
|
-
# @return [Array<Symbol>]
|
|
391
|
-
end
|
|
311
|
+
# @param payload_type [Symbol, :DunningAttempt]
|
|
392
312
|
|
|
393
313
|
# @see Dodopayments::Models::WebhookPayload::Data::DunningAttempt#status
|
|
394
314
|
module Status
|
|
@@ -417,20 +337,14 @@ module Dodopayments
|
|
|
417
337
|
class EntitlementGrant < Dodopayments::Models::Entitlements::EntitlementGrant
|
|
418
338
|
# @!attribute payload_type
|
|
419
339
|
#
|
|
420
|
-
# @return [Symbol,
|
|
421
|
-
required :payload_type,
|
|
422
|
-
|
|
423
|
-
# @!method initialize(payload_type:)
|
|
424
|
-
# @param payload_type [Symbol, Dodopayments::Models::WebhookPayload::Data::EntitlementGrant::PayloadType]
|
|
425
|
-
|
|
426
|
-
module PayloadType
|
|
427
|
-
extend Dodopayments::Internal::Type::Enum
|
|
428
|
-
|
|
429
|
-
ENTITLEMENT_GRANT = :EntitlementGrant
|
|
340
|
+
# @return [Symbol, :EntitlementGrant]
|
|
341
|
+
required :payload_type, const: :EntitlementGrant
|
|
430
342
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
343
|
+
# @!method initialize(payload_type: :EntitlementGrant)
|
|
344
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
345
|
+
# and any integration-specific delivery payload.
|
|
346
|
+
#
|
|
347
|
+
# @param payload_type [Symbol, :EntitlementGrant]
|
|
434
348
|
end
|
|
435
349
|
|
|
436
350
|
# @!method self.variants
|
|
@@ -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, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
9
|
+
# @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param product_cart [Array<Dodopayments::Models::ProductItemReq>]
|
|
12
12
|
#
|
|
@@ -26,7 +26,9 @@ module Dodopayments
|
|
|
26
26
|
#
|
|
27
27
|
# @param customization [Dodopayments::Models::CheckoutSessionCustomization] Customization for the checkout session page
|
|
28
28
|
#
|
|
29
|
-
# @param discount_code [String, nil]
|
|
29
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
30
|
+
#
|
|
31
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order. Max 20.
|
|
30
32
|
#
|
|
31
33
|
# @param feature_flags [Dodopayments::Models::CheckoutSessionFlags]
|
|
32
34
|
#
|
|
@@ -88,7 +90,7 @@ module Dodopayments
|
|
|
88
90
|
# Some parameter documentations has been truncated, see
|
|
89
91
|
# {Dodopayments::Models::CheckoutSessionPreviewParams} for more details.
|
|
90
92
|
#
|
|
91
|
-
# @overload preview(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
93
|
+
# @overload preview(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil, request_options: {})
|
|
92
94
|
#
|
|
93
95
|
# @param product_cart [Array<Dodopayments::Models::ProductItemReq>]
|
|
94
96
|
#
|
|
@@ -108,7 +110,9 @@ module Dodopayments
|
|
|
108
110
|
#
|
|
109
111
|
# @param customization [Dodopayments::Models::CheckoutSessionCustomization] Customization for the checkout session page
|
|
110
112
|
#
|
|
111
|
-
# @param discount_code [String, nil]
|
|
113
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
114
|
+
#
|
|
115
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order. Max 20.
|
|
112
116
|
#
|
|
113
117
|
# @param feature_flags [Dodopayments::Models::CheckoutSessionFlags]
|
|
114
118
|
#
|
|
@@ -4,14 +4,11 @@ module Dodopayments
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Entitlements
|
|
6
6
|
class Files
|
|
7
|
-
#
|
|
8
|
-
# Engine (force=true) and atomically removes the `file_id` from the entitlement's
|
|
9
|
-
# `integration_config.digital_file_ids` JSONB array. EE delete happens first; if
|
|
10
|
-
# it fails we surface the error and leave local state untouched.
|
|
7
|
+
# Detach a previously-attached file from a `digital_files` entitlement.
|
|
11
8
|
#
|
|
12
9
|
# @overload delete(file_id, id:, request_options: {})
|
|
13
10
|
#
|
|
14
|
-
# @param file_id [String]
|
|
11
|
+
# @param file_id [String] Identifier of the attached file
|
|
15
12
|
#
|
|
16
13
|
# @param id [String] Entitlement Id
|
|
17
14
|
#
|
|
@@ -34,11 +31,7 @@ module Dodopayments
|
|
|
34
31
|
)
|
|
35
32
|
end
|
|
36
33
|
|
|
37
|
-
#
|
|
38
|
-
# (`POST /api/digital-files/dodo/files/upload`) and appends the returned `file_id`
|
|
39
|
-
# to the entitlement's `integration_config.digital_file_ids` using a JSONB array
|
|
40
|
-
# append. Compensates EE-side on local DB write failure (best-effort delete of the
|
|
41
|
-
# just-uploaded file).
|
|
34
|
+
# Attach a file to a `digital_files` entitlement. Per-file size cap: 500 MiB.
|
|
42
35
|
#
|
|
43
36
|
# @overload upload(id, request_options: {})
|
|
44
37
|
#
|
|
@@ -36,10 +36,8 @@ module Dodopayments
|
|
|
36
36
|
)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# already-revoked grant returns 200 with current state. The revocation reason is
|
|
42
|
-
# always set to "manual" for API-initiated revocations.
|
|
39
|
+
# Revoke a single grant. Idempotent: re-revoking an already-revoked grant returns
|
|
40
|
+
# the grant in its current state.
|
|
43
41
|
#
|
|
44
42
|
# @overload revoke(grant_id, id:, request_options: {})
|
|
45
43
|
#
|
|
@@ -21,7 +21,7 @@ module Dodopayments
|
|
|
21
21
|
#
|
|
22
22
|
# @param description [String, nil] Optional description
|
|
23
23
|
#
|
|
24
|
-
# @param metadata [Hash{Symbol=>String}
|
|
24
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the entitlement
|
|
25
25
|
#
|
|
26
26
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
27
27
|
#
|
|
@@ -70,7 +70,7 @@ module Dodopayments
|
|
|
70
70
|
#
|
|
71
71
|
# @param description [String, nil]
|
|
72
72
|
#
|
|
73
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil]
|
|
73
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil] Integration-specific configuration supplied when creating or updating
|
|
74
74
|
#
|
|
75
75
|
# @param metadata [Hash{Symbol=>String}, nil]
|
|
76
76
|
#
|
|
@@ -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:, adaptive_currency_fees_inclusive: nil, 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, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: 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
|
#
|
|
@@ -22,7 +22,9 @@ module Dodopayments
|
|
|
22
22
|
#
|
|
23
23
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
24
24
|
#
|
|
25
|
-
# @param discount_code [String, nil]
|
|
25
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
26
|
+
#
|
|
27
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
26
28
|
#
|
|
27
29
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
|
|
28
30
|
#
|
|
@@ -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, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: 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, discount_codes: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: 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
|
#
|
|
@@ -24,7 +24,9 @@ module Dodopayments
|
|
|
24
24
|
#
|
|
25
25
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
26
26
|
#
|
|
27
|
-
# @param discount_code [String, nil]
|
|
27
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
28
|
+
#
|
|
29
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
28
30
|
#
|
|
29
31
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this subscription
|
|
30
32
|
#
|
|
@@ -192,7 +194,7 @@ module Dodopayments
|
|
|
192
194
|
# Some parameter documentations has been truncated, see
|
|
193
195
|
# {Dodopayments::Models::SubscriptionChangePlanParams} for more details.
|
|
194
196
|
#
|
|
195
|
-
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
197
|
+
# @overload change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
196
198
|
#
|
|
197
199
|
# @param subscription_id [String] Subscription Id
|
|
198
200
|
#
|
|
@@ -206,7 +208,9 @@ module Dodopayments
|
|
|
206
208
|
#
|
|
207
209
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
208
210
|
#
|
|
209
|
-
# @param discount_code [String, nil]
|
|
211
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
212
|
+
#
|
|
213
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply to the new plan. Max 20.
|
|
210
214
|
#
|
|
211
215
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
212
216
|
#
|
|
@@ -268,7 +272,7 @@ module Dodopayments
|
|
|
268
272
|
# Some parameter documentations has been truncated, see
|
|
269
273
|
# {Dodopayments::Models::SubscriptionPreviewChangePlanParams} for more details.
|
|
270
274
|
#
|
|
271
|
-
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
275
|
+
# @overload preview_change_plan(subscription_id, product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil, request_options: {})
|
|
272
276
|
#
|
|
273
277
|
# @param subscription_id [String] Subscription Id
|
|
274
278
|
#
|
|
@@ -282,7 +286,9 @@ module Dodopayments
|
|
|
282
286
|
#
|
|
283
287
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
284
288
|
#
|
|
285
|
-
# @param discount_code [String, nil]
|
|
289
|
+
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
290
|
+
#
|
|
291
|
+
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply to the new plan. Max 20.
|
|
286
292
|
#
|
|
287
293
|
# @param effective_at [Symbol, Dodopayments::Models::UpdateSubscriptionPlanReq::EffectiveAt] When to apply the plan change.
|
|
288
294
|
#
|
data/lib/dodopayments/version.rb
CHANGED
|
@@ -33,11 +33,7 @@ module Dodopayments
|
|
|
33
33
|
attr_accessor :timestamp
|
|
34
34
|
|
|
35
35
|
# The event type
|
|
36
|
-
sig
|
|
37
|
-
returns(
|
|
38
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type::TaggedSymbol
|
|
39
|
-
)
|
|
40
|
-
end
|
|
36
|
+
sig { returns(Symbol) }
|
|
41
37
|
attr_accessor :type
|
|
42
38
|
|
|
43
39
|
sig do
|
|
@@ -46,8 +42,7 @@ module Dodopayments
|
|
|
46
42
|
data:
|
|
47
43
|
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::OrHash,
|
|
48
44
|
timestamp: Time,
|
|
49
|
-
type:
|
|
50
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type::OrSymbol
|
|
45
|
+
type: Symbol
|
|
51
46
|
).returns(T.attached_class)
|
|
52
47
|
end
|
|
53
48
|
def self.new(
|
|
@@ -59,7 +54,7 @@ module Dodopayments
|
|
|
59
54
|
# The timestamp of when the event occurred
|
|
60
55
|
timestamp:,
|
|
61
56
|
# The event type
|
|
62
|
-
type:
|
|
57
|
+
type: :"abandoned_checkout.detected"
|
|
63
58
|
)
|
|
64
59
|
end
|
|
65
60
|
|
|
@@ -69,8 +64,7 @@ module Dodopayments
|
|
|
69
64
|
business_id: String,
|
|
70
65
|
data: Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data,
|
|
71
66
|
timestamp: Time,
|
|
72
|
-
type:
|
|
73
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type::TaggedSymbol
|
|
67
|
+
type: Symbol
|
|
74
68
|
}
|
|
75
69
|
)
|
|
76
70
|
end
|
|
@@ -236,36 +230,6 @@ module Dodopayments
|
|
|
236
230
|
end
|
|
237
231
|
end
|
|
238
232
|
end
|
|
239
|
-
|
|
240
|
-
# The event type
|
|
241
|
-
module Type
|
|
242
|
-
extend Dodopayments::Internal::Type::Enum
|
|
243
|
-
|
|
244
|
-
TaggedSymbol =
|
|
245
|
-
T.type_alias do
|
|
246
|
-
T.all(
|
|
247
|
-
Symbol,
|
|
248
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type
|
|
249
|
-
)
|
|
250
|
-
end
|
|
251
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
252
|
-
|
|
253
|
-
ABANDONED_CHECKOUT_DETECTED =
|
|
254
|
-
T.let(
|
|
255
|
-
:"abandoned_checkout.detected",
|
|
256
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type::TaggedSymbol
|
|
257
|
-
)
|
|
258
|
-
|
|
259
|
-
sig do
|
|
260
|
-
override.returns(
|
|
261
|
-
T::Array[
|
|
262
|
-
Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type::TaggedSymbol
|
|
263
|
-
]
|
|
264
|
-
)
|
|
265
|
-
end
|
|
266
|
-
def self.values
|
|
267
|
-
end
|
|
268
|
-
end
|
|
269
233
|
end
|
|
270
234
|
end
|
|
271
235
|
end
|