dodopayments 2.21.0 → 2.22.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 +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/payment.rb +5 -147
- data/lib/dodopayments/models/payment_list_params.rb +6 -2
- data/lib/dodopayments/models/payout_created_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_failed_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_in_progress_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_on_hold_webhook_event.rb +188 -0
- data/lib/dodopayments/models/payout_success_webhook_event.rb +188 -0
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -1
- data/lib/dodopayments/models/webhook_payload.rb +160 -3
- data/lib/dodopayments/models.rb +10 -0
- data/lib/dodopayments/resources/payments.rb +4 -1
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +5 -0
- data/rbi/dodopayments/models/payment.rbi +6 -349
- data/rbi/dodopayments/models/payment_list_params.rbi +4 -2
- data/rbi/dodopayments/models/payout_created_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_failed_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_in_progress_webhook_event.rbi +272 -0
- data/rbi/dodopayments/models/payout_on_hold_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/payout_success_webhook_event.rbi +270 -0
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +2 -5
- data/rbi/dodopayments/models/webhook_payload.rbi +213 -0
- data/rbi/dodopayments/models.rbi +11 -0
- data/rbi/dodopayments/resources/payments.rbi +2 -1
- data/rbi/dodopayments/resources/webhooks.rbi +10 -0
- data/sig/dodopayments/models/payment.rbs +0 -135
- data/sig/dodopayments/models/payout_created_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_failed_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_in_progress_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_on_hold_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/payout_success_webhook_event.rbs +137 -0
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -2
- data/sig/dodopayments/models/webhook_payload.rbs +108 -0
- data/sig/dodopayments/models.rbs +10 -0
- data/sig/dodopayments/resources/webhooks.rbs +10 -0
- metadata +17 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutInProgressWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Dodopayments::Models::PayoutInProgressWebhookEvent::Data]
|
|
15
|
+
required :data, -> { Dodopayments::PayoutInProgressWebhookEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute timestamp
|
|
18
|
+
# The timestamp of when the event occurred
|
|
19
|
+
#
|
|
20
|
+
# @return [Time]
|
|
21
|
+
required :timestamp, Time
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
# The event type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :"payout.in_progress"]
|
|
27
|
+
required :type, const: :"payout.in_progress"
|
|
28
|
+
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"payout.in_progress")
|
|
30
|
+
# @param business_id [String] The business identifier
|
|
31
|
+
#
|
|
32
|
+
# @param data [Dodopayments::Models::PayoutInProgressWebhookEvent::Data]
|
|
33
|
+
#
|
|
34
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, :"payout.in_progress"] The event type
|
|
37
|
+
|
|
38
|
+
# @see Dodopayments::Models::PayoutInProgressWebhookEvent#data
|
|
39
|
+
class Data < Dodopayments::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute amount
|
|
41
|
+
# The total amount of the payout.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
required :amount, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute business_id
|
|
47
|
+
# The unique identifier of the business associated with the payout.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :business_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute chargebacks
|
|
53
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
54
|
+
# release.
|
|
55
|
+
#
|
|
56
|
+
# The total value of chargebacks associated with the payout.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :chargebacks, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute created_at
|
|
62
|
+
# The timestamp when the payout was created, in UTC.
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :created_at, Time
|
|
66
|
+
|
|
67
|
+
# @!attribute currency
|
|
68
|
+
# The currency of the payout, represented as an ISO 4217 currency code.
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
71
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
72
|
+
|
|
73
|
+
# @!attribute fee
|
|
74
|
+
# The fee charged for processing the payout.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :fee, Integer
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method
|
|
80
|
+
# The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :payment_method, String
|
|
84
|
+
|
|
85
|
+
# @!attribute payout_id
|
|
86
|
+
# The unique identifier of the payout.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :payout_id, String
|
|
90
|
+
|
|
91
|
+
# @!attribute refunds
|
|
92
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
93
|
+
# release.
|
|
94
|
+
#
|
|
95
|
+
# The total value of refunds associated with the payout.
|
|
96
|
+
#
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
required :refunds, Integer
|
|
99
|
+
|
|
100
|
+
# @!attribute status
|
|
101
|
+
# The current status of the payout.
|
|
102
|
+
#
|
|
103
|
+
# @return [Symbol, Dodopayments::Models::PayoutInProgressWebhookEvent::Data::Status]
|
|
104
|
+
required :status, enum: -> { Dodopayments::PayoutInProgressWebhookEvent::Data::Status }
|
|
105
|
+
|
|
106
|
+
# @!attribute tax
|
|
107
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
108
|
+
# release.
|
|
109
|
+
#
|
|
110
|
+
# The tax applied to the payout.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
required :tax, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute updated_at
|
|
116
|
+
# The timestamp when the payout was last updated, in UTC.
|
|
117
|
+
#
|
|
118
|
+
# @return [Time]
|
|
119
|
+
required :updated_at, Time
|
|
120
|
+
|
|
121
|
+
# @!attribute name
|
|
122
|
+
# The name of the payout recipient or purpose.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :name, String, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payout_document_url
|
|
128
|
+
# The URL of the document associated with the payout.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :payout_document_url, String, nil?: true
|
|
132
|
+
|
|
133
|
+
# @!attribute remarks
|
|
134
|
+
# Any additional remarks or notes associated with the payout.
|
|
135
|
+
#
|
|
136
|
+
# @return [String, nil]
|
|
137
|
+
optional :remarks, String, nil?: true
|
|
138
|
+
|
|
139
|
+
# @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
|
|
140
|
+
# @param amount [Integer] The total amount of the payout.
|
|
141
|
+
#
|
|
142
|
+
# @param business_id [String] The unique identifier of the business associated with the payout.
|
|
143
|
+
#
|
|
144
|
+
# @param chargebacks [Integer] The total value of chargebacks associated with the payout.
|
|
145
|
+
#
|
|
146
|
+
# @param created_at [Time] The timestamp when the payout was created, in UTC.
|
|
147
|
+
#
|
|
148
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the payout, represented as an ISO 4217 currency code.
|
|
149
|
+
#
|
|
150
|
+
# @param fee [Integer] The fee charged for processing the payout.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_method [String] The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
153
|
+
#
|
|
154
|
+
# @param payout_id [String] The unique identifier of the payout.
|
|
155
|
+
#
|
|
156
|
+
# @param refunds [Integer] The total value of refunds associated with the payout.
|
|
157
|
+
#
|
|
158
|
+
# @param status [Symbol, Dodopayments::Models::PayoutInProgressWebhookEvent::Data::Status] The current status of the payout.
|
|
159
|
+
#
|
|
160
|
+
# @param tax [Integer] The tax applied to the payout.
|
|
161
|
+
#
|
|
162
|
+
# @param updated_at [Time] The timestamp when the payout was last updated, in UTC.
|
|
163
|
+
#
|
|
164
|
+
# @param name [String, nil] The name of the payout recipient or purpose.
|
|
165
|
+
#
|
|
166
|
+
# @param payout_document_url [String, nil] The URL of the document associated with the payout.
|
|
167
|
+
#
|
|
168
|
+
# @param remarks [String, nil] Any additional remarks or notes associated with the payout.
|
|
169
|
+
|
|
170
|
+
# The current status of the payout.
|
|
171
|
+
#
|
|
172
|
+
# @see Dodopayments::Models::PayoutInProgressWebhookEvent::Data#status
|
|
173
|
+
module Status
|
|
174
|
+
extend Dodopayments::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
NOT_INITIATED = :not_initiated
|
|
177
|
+
IN_PROGRESS = :in_progress
|
|
178
|
+
ON_HOLD = :on_hold
|
|
179
|
+
FAILED = :failed
|
|
180
|
+
SUCCESS = :success
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutOnHoldWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Dodopayments::Models::PayoutOnHoldWebhookEvent::Data]
|
|
15
|
+
required :data, -> { Dodopayments::PayoutOnHoldWebhookEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute timestamp
|
|
18
|
+
# The timestamp of when the event occurred
|
|
19
|
+
#
|
|
20
|
+
# @return [Time]
|
|
21
|
+
required :timestamp, Time
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
# The event type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :"payout.on_hold"]
|
|
27
|
+
required :type, const: :"payout.on_hold"
|
|
28
|
+
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"payout.on_hold")
|
|
30
|
+
# @param business_id [String] The business identifier
|
|
31
|
+
#
|
|
32
|
+
# @param data [Dodopayments::Models::PayoutOnHoldWebhookEvent::Data]
|
|
33
|
+
#
|
|
34
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, :"payout.on_hold"] The event type
|
|
37
|
+
|
|
38
|
+
# @see Dodopayments::Models::PayoutOnHoldWebhookEvent#data
|
|
39
|
+
class Data < Dodopayments::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute amount
|
|
41
|
+
# The total amount of the payout.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
required :amount, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute business_id
|
|
47
|
+
# The unique identifier of the business associated with the payout.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :business_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute chargebacks
|
|
53
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
54
|
+
# release.
|
|
55
|
+
#
|
|
56
|
+
# The total value of chargebacks associated with the payout.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :chargebacks, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute created_at
|
|
62
|
+
# The timestamp when the payout was created, in UTC.
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :created_at, Time
|
|
66
|
+
|
|
67
|
+
# @!attribute currency
|
|
68
|
+
# The currency of the payout, represented as an ISO 4217 currency code.
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
71
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
72
|
+
|
|
73
|
+
# @!attribute fee
|
|
74
|
+
# The fee charged for processing the payout.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :fee, Integer
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method
|
|
80
|
+
# The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :payment_method, String
|
|
84
|
+
|
|
85
|
+
# @!attribute payout_id
|
|
86
|
+
# The unique identifier of the payout.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :payout_id, String
|
|
90
|
+
|
|
91
|
+
# @!attribute refunds
|
|
92
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
93
|
+
# release.
|
|
94
|
+
#
|
|
95
|
+
# The total value of refunds associated with the payout.
|
|
96
|
+
#
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
required :refunds, Integer
|
|
99
|
+
|
|
100
|
+
# @!attribute status
|
|
101
|
+
# The current status of the payout.
|
|
102
|
+
#
|
|
103
|
+
# @return [Symbol, Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::Status]
|
|
104
|
+
required :status, enum: -> { Dodopayments::PayoutOnHoldWebhookEvent::Data::Status }
|
|
105
|
+
|
|
106
|
+
# @!attribute tax
|
|
107
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
108
|
+
# release.
|
|
109
|
+
#
|
|
110
|
+
# The tax applied to the payout.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
required :tax, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute updated_at
|
|
116
|
+
# The timestamp when the payout was last updated, in UTC.
|
|
117
|
+
#
|
|
118
|
+
# @return [Time]
|
|
119
|
+
required :updated_at, Time
|
|
120
|
+
|
|
121
|
+
# @!attribute name
|
|
122
|
+
# The name of the payout recipient or purpose.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :name, String, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payout_document_url
|
|
128
|
+
# The URL of the document associated with the payout.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :payout_document_url, String, nil?: true
|
|
132
|
+
|
|
133
|
+
# @!attribute remarks
|
|
134
|
+
# Any additional remarks or notes associated with the payout.
|
|
135
|
+
#
|
|
136
|
+
# @return [String, nil]
|
|
137
|
+
optional :remarks, String, nil?: true
|
|
138
|
+
|
|
139
|
+
# @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
|
|
140
|
+
# @param amount [Integer] The total amount of the payout.
|
|
141
|
+
#
|
|
142
|
+
# @param business_id [String] The unique identifier of the business associated with the payout.
|
|
143
|
+
#
|
|
144
|
+
# @param chargebacks [Integer] The total value of chargebacks associated with the payout.
|
|
145
|
+
#
|
|
146
|
+
# @param created_at [Time] The timestamp when the payout was created, in UTC.
|
|
147
|
+
#
|
|
148
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the payout, represented as an ISO 4217 currency code.
|
|
149
|
+
#
|
|
150
|
+
# @param fee [Integer] The fee charged for processing the payout.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_method [String] The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
153
|
+
#
|
|
154
|
+
# @param payout_id [String] The unique identifier of the payout.
|
|
155
|
+
#
|
|
156
|
+
# @param refunds [Integer] The total value of refunds associated with the payout.
|
|
157
|
+
#
|
|
158
|
+
# @param status [Symbol, Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::Status] The current status of the payout.
|
|
159
|
+
#
|
|
160
|
+
# @param tax [Integer] The tax applied to the payout.
|
|
161
|
+
#
|
|
162
|
+
# @param updated_at [Time] The timestamp when the payout was last updated, in UTC.
|
|
163
|
+
#
|
|
164
|
+
# @param name [String, nil] The name of the payout recipient or purpose.
|
|
165
|
+
#
|
|
166
|
+
# @param payout_document_url [String, nil] The URL of the document associated with the payout.
|
|
167
|
+
#
|
|
168
|
+
# @param remarks [String, nil] Any additional remarks or notes associated with the payout.
|
|
169
|
+
|
|
170
|
+
# The current status of the payout.
|
|
171
|
+
#
|
|
172
|
+
# @see Dodopayments::Models::PayoutOnHoldWebhookEvent::Data#status
|
|
173
|
+
module Status
|
|
174
|
+
extend Dodopayments::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
NOT_INITIATED = :not_initiated
|
|
177
|
+
IN_PROGRESS = :in_progress
|
|
178
|
+
ON_HOLD = :on_hold
|
|
179
|
+
FAILED = :failed
|
|
180
|
+
SUCCESS = :success
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class PayoutSuccessWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
#
|
|
14
|
+
# @return [Dodopayments::Models::PayoutSuccessWebhookEvent::Data]
|
|
15
|
+
required :data, -> { Dodopayments::PayoutSuccessWebhookEvent::Data }
|
|
16
|
+
|
|
17
|
+
# @!attribute timestamp
|
|
18
|
+
# The timestamp of when the event occurred
|
|
19
|
+
#
|
|
20
|
+
# @return [Time]
|
|
21
|
+
required :timestamp, Time
|
|
22
|
+
|
|
23
|
+
# @!attribute type
|
|
24
|
+
# The event type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :"payout.success"]
|
|
27
|
+
required :type, const: :"payout.success"
|
|
28
|
+
|
|
29
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"payout.success")
|
|
30
|
+
# @param business_id [String] The business identifier
|
|
31
|
+
#
|
|
32
|
+
# @param data [Dodopayments::Models::PayoutSuccessWebhookEvent::Data]
|
|
33
|
+
#
|
|
34
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
|
+
#
|
|
36
|
+
# @param type [Symbol, :"payout.success"] The event type
|
|
37
|
+
|
|
38
|
+
# @see Dodopayments::Models::PayoutSuccessWebhookEvent#data
|
|
39
|
+
class Data < Dodopayments::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute amount
|
|
41
|
+
# The total amount of the payout.
|
|
42
|
+
#
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
required :amount, Integer
|
|
45
|
+
|
|
46
|
+
# @!attribute business_id
|
|
47
|
+
# The unique identifier of the business associated with the payout.
|
|
48
|
+
#
|
|
49
|
+
# @return [String]
|
|
50
|
+
required :business_id, String
|
|
51
|
+
|
|
52
|
+
# @!attribute chargebacks
|
|
53
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
54
|
+
# release.
|
|
55
|
+
#
|
|
56
|
+
# The total value of chargebacks associated with the payout.
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :chargebacks, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute created_at
|
|
62
|
+
# The timestamp when the payout was created, in UTC.
|
|
63
|
+
#
|
|
64
|
+
# @return [Time]
|
|
65
|
+
required :created_at, Time
|
|
66
|
+
|
|
67
|
+
# @!attribute currency
|
|
68
|
+
# The currency of the payout, represented as an ISO 4217 currency code.
|
|
69
|
+
#
|
|
70
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
|
71
|
+
required :currency, enum: -> { Dodopayments::Currency }
|
|
72
|
+
|
|
73
|
+
# @!attribute fee
|
|
74
|
+
# The fee charged for processing the payout.
|
|
75
|
+
#
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
required :fee, Integer
|
|
78
|
+
|
|
79
|
+
# @!attribute payment_method
|
|
80
|
+
# The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
81
|
+
#
|
|
82
|
+
# @return [String]
|
|
83
|
+
required :payment_method, String
|
|
84
|
+
|
|
85
|
+
# @!attribute payout_id
|
|
86
|
+
# The unique identifier of the payout.
|
|
87
|
+
#
|
|
88
|
+
# @return [String]
|
|
89
|
+
required :payout_id, String
|
|
90
|
+
|
|
91
|
+
# @!attribute refunds
|
|
92
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
93
|
+
# release.
|
|
94
|
+
#
|
|
95
|
+
# The total value of refunds associated with the payout.
|
|
96
|
+
#
|
|
97
|
+
# @return [Integer]
|
|
98
|
+
required :refunds, Integer
|
|
99
|
+
|
|
100
|
+
# @!attribute status
|
|
101
|
+
# The current status of the payout.
|
|
102
|
+
#
|
|
103
|
+
# @return [Symbol, Dodopayments::Models::PayoutSuccessWebhookEvent::Data::Status]
|
|
104
|
+
required :status, enum: -> { Dodopayments::PayoutSuccessWebhookEvent::Data::Status }
|
|
105
|
+
|
|
106
|
+
# @!attribute tax
|
|
107
|
+
# @deprecated Use the v3 payout breakup endpoints instead. Will be removed in a future
|
|
108
|
+
# release.
|
|
109
|
+
#
|
|
110
|
+
# The tax applied to the payout.
|
|
111
|
+
#
|
|
112
|
+
# @return [Integer]
|
|
113
|
+
required :tax, Integer
|
|
114
|
+
|
|
115
|
+
# @!attribute updated_at
|
|
116
|
+
# The timestamp when the payout was last updated, in UTC.
|
|
117
|
+
#
|
|
118
|
+
# @return [Time]
|
|
119
|
+
required :updated_at, Time
|
|
120
|
+
|
|
121
|
+
# @!attribute name
|
|
122
|
+
# The name of the payout recipient or purpose.
|
|
123
|
+
#
|
|
124
|
+
# @return [String, nil]
|
|
125
|
+
optional :name, String, nil?: true
|
|
126
|
+
|
|
127
|
+
# @!attribute payout_document_url
|
|
128
|
+
# The URL of the document associated with the payout.
|
|
129
|
+
#
|
|
130
|
+
# @return [String, nil]
|
|
131
|
+
optional :payout_document_url, String, nil?: true
|
|
132
|
+
|
|
133
|
+
# @!attribute remarks
|
|
134
|
+
# Any additional remarks or notes associated with the payout.
|
|
135
|
+
#
|
|
136
|
+
# @return [String, nil]
|
|
137
|
+
optional :remarks, String, nil?: true
|
|
138
|
+
|
|
139
|
+
# @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
|
|
140
|
+
# @param amount [Integer] The total amount of the payout.
|
|
141
|
+
#
|
|
142
|
+
# @param business_id [String] The unique identifier of the business associated with the payout.
|
|
143
|
+
#
|
|
144
|
+
# @param chargebacks [Integer] The total value of chargebacks associated with the payout.
|
|
145
|
+
#
|
|
146
|
+
# @param created_at [Time] The timestamp when the payout was created, in UTC.
|
|
147
|
+
#
|
|
148
|
+
# @param currency [Symbol, Dodopayments::Models::Currency] The currency of the payout, represented as an ISO 4217 currency code.
|
|
149
|
+
#
|
|
150
|
+
# @param fee [Integer] The fee charged for processing the payout.
|
|
151
|
+
#
|
|
152
|
+
# @param payment_method [String] The payment method used for the payout (e.g., bank transfer, card, etc.).
|
|
153
|
+
#
|
|
154
|
+
# @param payout_id [String] The unique identifier of the payout.
|
|
155
|
+
#
|
|
156
|
+
# @param refunds [Integer] The total value of refunds associated with the payout.
|
|
157
|
+
#
|
|
158
|
+
# @param status [Symbol, Dodopayments::Models::PayoutSuccessWebhookEvent::Data::Status] The current status of the payout.
|
|
159
|
+
#
|
|
160
|
+
# @param tax [Integer] The tax applied to the payout.
|
|
161
|
+
#
|
|
162
|
+
# @param updated_at [Time] The timestamp when the payout was last updated, in UTC.
|
|
163
|
+
#
|
|
164
|
+
# @param name [String, nil] The name of the payout recipient or purpose.
|
|
165
|
+
#
|
|
166
|
+
# @param payout_document_url [String, nil] The URL of the document associated with the payout.
|
|
167
|
+
#
|
|
168
|
+
# @param remarks [String, nil] Any additional remarks or notes associated with the payout.
|
|
169
|
+
|
|
170
|
+
# The current status of the payout.
|
|
171
|
+
#
|
|
172
|
+
# @see Dodopayments::Models::PayoutSuccessWebhookEvent::Data#status
|
|
173
|
+
module Status
|
|
174
|
+
extend Dodopayments::Internal::Type::Enum
|
|
175
|
+
|
|
176
|
+
NOT_INITIATED = :not_initiated
|
|
177
|
+
IN_PROGRESS = :in_progress
|
|
178
|
+
ON_HOLD = :on_hold
|
|
179
|
+
FAILED = :failed
|
|
180
|
+
SUCCESS = :success
|
|
181
|
+
|
|
182
|
+
# @!method self.values
|
|
183
|
+
# @return [Array<Symbol>]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
end
|
|
@@ -65,6 +65,16 @@ module Dodopayments
|
|
|
65
65
|
|
|
66
66
|
variant :"payment.succeeded", -> { Dodopayments::PaymentSucceededWebhookEvent }
|
|
67
67
|
|
|
68
|
+
variant :"payout.created", -> { Dodopayments::PayoutCreatedWebhookEvent }
|
|
69
|
+
|
|
70
|
+
variant :"payout.failed", -> { Dodopayments::PayoutFailedWebhookEvent }
|
|
71
|
+
|
|
72
|
+
variant :"payout.in_progress", -> { Dodopayments::PayoutInProgressWebhookEvent }
|
|
73
|
+
|
|
74
|
+
variant :"payout.on_hold", -> { Dodopayments::PayoutOnHoldWebhookEvent }
|
|
75
|
+
|
|
76
|
+
variant :"payout.success", -> { Dodopayments::PayoutSuccessWebhookEvent }
|
|
77
|
+
|
|
68
78
|
variant :"refund.failed", -> { Dodopayments::RefundFailedWebhookEvent }
|
|
69
79
|
|
|
70
80
|
variant :"refund.succeeded", -> { Dodopayments::RefundSucceededWebhookEvent }
|
|
@@ -89,7 +99,7 @@ module Dodopayments
|
|
|
89
99
|
variant :"subscription.updated", -> { Dodopayments::SubscriptionUpdatedWebhookEvent }
|
|
90
100
|
|
|
91
101
|
# @!method self.variants
|
|
92
|
-
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
102
|
+
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
93
103
|
end
|
|
94
104
|
end
|
|
95
105
|
end
|
|
@@ -65,6 +65,16 @@ module Dodopayments
|
|
|
65
65
|
|
|
66
66
|
variant :"payment.succeeded", -> { Dodopayments::PaymentSucceededWebhookEvent }
|
|
67
67
|
|
|
68
|
+
variant :"payout.created", -> { Dodopayments::PayoutCreatedWebhookEvent }
|
|
69
|
+
|
|
70
|
+
variant :"payout.failed", -> { Dodopayments::PayoutFailedWebhookEvent }
|
|
71
|
+
|
|
72
|
+
variant :"payout.in_progress", -> { Dodopayments::PayoutInProgressWebhookEvent }
|
|
73
|
+
|
|
74
|
+
variant :"payout.on_hold", -> { Dodopayments::PayoutOnHoldWebhookEvent }
|
|
75
|
+
|
|
76
|
+
variant :"payout.success", -> { Dodopayments::PayoutSuccessWebhookEvent }
|
|
77
|
+
|
|
68
78
|
variant :"refund.failed", -> { Dodopayments::RefundFailedWebhookEvent }
|
|
69
79
|
|
|
70
80
|
variant :"refund.succeeded", -> { Dodopayments::RefundSucceededWebhookEvent }
|
|
@@ -89,7 +99,7 @@ module Dodopayments
|
|
|
89
99
|
variant :"subscription.updated", -> { Dodopayments::SubscriptionUpdatedWebhookEvent }
|
|
90
100
|
|
|
91
101
|
# @!method self.variants
|
|
92
|
-
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
102
|
+
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
93
103
|
end
|
|
94
104
|
end
|
|
95
105
|
end
|
|
@@ -30,7 +30,7 @@ module Dodopayments
|
|
|
30
30
|
SUBSCRIPTION_UPDATED = :"subscription.updated"
|
|
31
31
|
SUBSCRIPTION_UPDATE_PAYMENT_METHOD = :"subscription.update_payment_method"
|
|
32
32
|
LICENSE_KEY_CREATED = :"license_key.created"
|
|
33
|
-
|
|
33
|
+
PAYOUT_CREATED = :"payout.created"
|
|
34
34
|
PAYOUT_ON_HOLD = :"payout.on_hold"
|
|
35
35
|
PAYOUT_IN_PROGRESS = :"payout.in_progress"
|
|
36
36
|
PAYOUT_FAILED = :"payout.failed"
|