dodopayments 2.20.1 → 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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/checkout_session_preview_response.rb +30 -4
  5. data/lib/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rb +4 -2
  6. data/lib/dodopayments/models/discount.rb +95 -3
  7. data/lib/dodopayments/models/discount_create_params.rb +110 -3
  8. data/lib/dodopayments/models/discount_list_params.rb +7 -2
  9. data/lib/dodopayments/models/discount_type.rb +1 -0
  10. data/lib/dodopayments/models/discount_update_params.rb +108 -3
  11. data/lib/dodopayments/models/payment.rb +4 -2
  12. data/lib/dodopayments/models/payment_list_params.rb +169 -3
  13. data/lib/dodopayments/models/payment_method_types.rb +0 -1
  14. data/lib/dodopayments/models/payout_created_webhook_event.rb +188 -0
  15. data/lib/dodopayments/models/payout_failed_webhook_event.rb +188 -0
  16. data/lib/dodopayments/models/payout_in_progress_webhook_event.rb +188 -0
  17. data/lib/dodopayments/models/payout_on_hold_webhook_event.rb +188 -0
  18. data/lib/dodopayments/models/payout_success_webhook_event.rb +188 -0
  19. data/lib/dodopayments/models/price.rb +19 -1
  20. data/lib/dodopayments/models/subscription.rb +11 -1
  21. data/lib/dodopayments/models/subscription_create_response.rb +10 -1
  22. data/lib/dodopayments/models/subscription_list_response.rb +11 -1
  23. data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
  24. data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
  25. data/lib/dodopayments/models/webhook_event_type.rb +1 -1
  26. data/lib/dodopayments/models/webhook_payload.rb +160 -3
  27. data/lib/dodopayments/models.rb +10 -0
  28. data/lib/dodopayments/resources/credit_entitlements/balances.rb +1 -1
  29. data/lib/dodopayments/resources/discounts.rb +24 -5
  30. data/lib/dodopayments/resources/payments.rb +7 -2
  31. data/lib/dodopayments/resources/webhooks.rb +2 -2
  32. data/lib/dodopayments/version.rb +1 -1
  33. data/lib/dodopayments.rb +5 -0
  34. data/rbi/dodopayments/models/checkout_session_preview_response.rbi +33 -5
  35. data/rbi/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbi +6 -2
  36. data/rbi/dodopayments/models/discount.rbi +151 -2
  37. data/rbi/dodopayments/models/discount_create_params.rbi +197 -2
  38. data/rbi/dodopayments/models/discount_list_params.rbi +6 -2
  39. data/rbi/dodopayments/models/discount_type.rbi +1 -0
  40. data/rbi/dodopayments/models/discount_update_params.rbi +193 -2
  41. data/rbi/dodopayments/models/payment.rbi +6 -2
  42. data/rbi/dodopayments/models/payment_list_params.rbi +331 -2
  43. data/rbi/dodopayments/models/payment_method_types.rbi +0 -1
  44. data/rbi/dodopayments/models/payout_created_webhook_event.rbi +270 -0
  45. data/rbi/dodopayments/models/payout_failed_webhook_event.rbi +270 -0
  46. data/rbi/dodopayments/models/payout_in_progress_webhook_event.rbi +272 -0
  47. data/rbi/dodopayments/models/payout_on_hold_webhook_event.rbi +270 -0
  48. data/rbi/dodopayments/models/payout_success_webhook_event.rbi +270 -0
  49. data/rbi/dodopayments/models/price.rbi +20 -0
  50. data/rbi/dodopayments/models/subscription.rbi +15 -3
  51. data/rbi/dodopayments/models/subscription_create_response.rbi +13 -3
  52. data/rbi/dodopayments/models/subscription_list_response.rbi +15 -3
  53. data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
  54. data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
  55. data/rbi/dodopayments/models/webhook_event_type.rbi +2 -5
  56. data/rbi/dodopayments/models/webhook_payload.rbi +213 -0
  57. data/rbi/dodopayments/models.rbi +11 -0
  58. data/rbi/dodopayments/resources/credit_entitlements/balances.rbi +3 -1
  59. data/rbi/dodopayments/resources/discounts.rbi +57 -3
  60. data/rbi/dodopayments/resources/payments.rbi +5 -1
  61. data/rbi/dodopayments/resources/webhooks.rbi +10 -0
  62. data/sig/dodopayments/models/checkout_session_preview_response.rbs +13 -3
  63. data/sig/dodopayments/models/discount.rbs +69 -0
  64. data/sig/dodopayments/models/discount_create_params.rbs +69 -0
  65. data/sig/dodopayments/models/discount_type.rbs +2 -1
  66. data/sig/dodopayments/models/discount_update_params.rbs +69 -0
  67. data/sig/dodopayments/models/payment_list_params.rbs +308 -0
  68. data/sig/dodopayments/models/payment_method_types.rbs +0 -2
  69. data/sig/dodopayments/models/payout_created_webhook_event.rbs +137 -0
  70. data/sig/dodopayments/models/payout_failed_webhook_event.rbs +137 -0
  71. data/sig/dodopayments/models/payout_in_progress_webhook_event.rbs +137 -0
  72. data/sig/dodopayments/models/payout_on_hold_webhook_event.rbs +137 -0
  73. data/sig/dodopayments/models/payout_success_webhook_event.rbs +137 -0
  74. data/sig/dodopayments/models/price.rbs +10 -0
  75. data/sig/dodopayments/models/subscription.rbs +8 -3
  76. data/sig/dodopayments/models/subscription_create_response.rbs +8 -3
  77. data/sig/dodopayments/models/subscription_list_response.rbs +8 -3
  78. data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
  79. data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
  80. data/sig/dodopayments/models/webhook_event_type.rbs +2 -2
  81. data/sig/dodopayments/models/webhook_payload.rbs +108 -0
  82. data/sig/dodopayments/models.rbs +10 -0
  83. data/sig/dodopayments/resources/discounts.rbs +8 -0
  84. data/sig/dodopayments/resources/payments.rbs +1 -0
  85. data/sig/dodopayments/resources/webhooks.rbs +10 -0
  86. metadata +17 -2
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_created_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.created"
9
+ }
10
+
11
+ class PayoutCreatedWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutCreatedWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.created"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.created"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutCreatedWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.created"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutCreatedWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_failed_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutFailedWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.failed"
9
+ }
10
+
11
+ class PayoutFailedWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutFailedWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.failed"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutFailedWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.failed"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutFailedWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.failed"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutFailedWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutFailedWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutFailedWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutFailedWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutFailedWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_in_progress_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutInProgressWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.in_progress"
9
+ }
10
+
11
+ class PayoutInProgressWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutInProgressWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.in_progress"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutInProgressWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.in_progress"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutInProgressWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.in_progress"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutInProgressWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutInProgressWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutInProgressWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutInProgressWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutInProgressWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_on_hold_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutOnHoldWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.on_hold"
9
+ }
10
+
11
+ class PayoutOnHoldWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutOnHoldWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.on_hold"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutOnHoldWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.on_hold"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutOnHoldWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.on_hold"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutOnHoldWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,137 @@
1
+ module Dodopayments
2
+ module Models
3
+ type payout_success_webhook_event =
4
+ {
5
+ business_id: String,
6
+ data: Dodopayments::PayoutSuccessWebhookEvent::Data,
7
+ timestamp: Time,
8
+ type: :"payout.success"
9
+ }
10
+
11
+ class PayoutSuccessWebhookEvent < Dodopayments::Internal::Type::BaseModel
12
+ attr_accessor business_id: String
13
+
14
+ attr_accessor data: Dodopayments::PayoutSuccessWebhookEvent::Data
15
+
16
+ attr_accessor timestamp: Time
17
+
18
+ attr_accessor type: :"payout.success"
19
+
20
+ def initialize: (
21
+ business_id: String,
22
+ data: Dodopayments::PayoutSuccessWebhookEvent::Data,
23
+ timestamp: Time,
24
+ ?type: :"payout.success"
25
+ ) -> void
26
+
27
+ def to_hash: -> {
28
+ business_id: String,
29
+ data: Dodopayments::PayoutSuccessWebhookEvent::Data,
30
+ timestamp: Time,
31
+ type: :"payout.success"
32
+ }
33
+
34
+ type data =
35
+ {
36
+ amount: Integer,
37
+ business_id: String,
38
+ chargebacks: Integer,
39
+ created_at: Time,
40
+ currency: Dodopayments::Models::currency,
41
+ fee: Integer,
42
+ payment_method: String,
43
+ payout_id: String,
44
+ refunds: Integer,
45
+ status: Dodopayments::Models::PayoutSuccessWebhookEvent::Data::status,
46
+ tax: Integer,
47
+ updated_at: Time,
48
+ name: String?,
49
+ payout_document_url: String?,
50
+ remarks: String?
51
+ }
52
+
53
+ class Data < Dodopayments::Internal::Type::BaseModel
54
+ attr_accessor amount: Integer
55
+
56
+ attr_accessor business_id: String
57
+
58
+ attr_accessor chargebacks: Integer
59
+
60
+ attr_accessor created_at: Time
61
+
62
+ attr_accessor currency: Dodopayments::Models::currency
63
+
64
+ attr_accessor fee: Integer
65
+
66
+ attr_accessor payment_method: String
67
+
68
+ attr_accessor payout_id: String
69
+
70
+ attr_accessor refunds: Integer
71
+
72
+ attr_accessor status: Dodopayments::Models::PayoutSuccessWebhookEvent::Data::status
73
+
74
+ attr_accessor tax: Integer
75
+
76
+ attr_accessor updated_at: Time
77
+
78
+ attr_accessor name: String?
79
+
80
+ attr_accessor payout_document_url: String?
81
+
82
+ attr_accessor remarks: String?
83
+
84
+ def initialize: (
85
+ amount: Integer,
86
+ business_id: String,
87
+ chargebacks: Integer,
88
+ created_at: Time,
89
+ currency: Dodopayments::Models::currency,
90
+ fee: Integer,
91
+ payment_method: String,
92
+ payout_id: String,
93
+ refunds: Integer,
94
+ status: Dodopayments::Models::PayoutSuccessWebhookEvent::Data::status,
95
+ tax: Integer,
96
+ updated_at: Time,
97
+ ?name: String?,
98
+ ?payout_document_url: String?,
99
+ ?remarks: String?
100
+ ) -> void
101
+
102
+ def to_hash: -> {
103
+ amount: Integer,
104
+ business_id: String,
105
+ chargebacks: Integer,
106
+ created_at: Time,
107
+ currency: Dodopayments::Models::currency,
108
+ fee: Integer,
109
+ payment_method: String,
110
+ payout_id: String,
111
+ refunds: Integer,
112
+ status: Dodopayments::Models::PayoutSuccessWebhookEvent::Data::status,
113
+ tax: Integer,
114
+ updated_at: Time,
115
+ name: String?,
116
+ payout_document_url: String?,
117
+ remarks: String?
118
+ }
119
+
120
+ type status =
121
+ :not_initiated | :in_progress | :on_hold | :failed | :success
122
+
123
+ module Status
124
+ extend Dodopayments::Internal::Type::Enum
125
+
126
+ NOT_INITIATED: :not_initiated
127
+ IN_PROGRESS: :in_progress
128
+ ON_HOLD: :on_hold
129
+ FAILED: :failed
130
+ SUCCESS: :success
131
+
132
+ def self?.values: -> ::Array[Dodopayments::Models::PayoutSuccessWebhookEvent::Data::status]
133
+ end
134
+ end
135
+ end
136
+ end
137
+ end