growsurf-ruby 0.6.1 → 0.8.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 +15 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/campaign_reward_list_response.rb +21 -0
- data/lib/growsurf_ruby/models/campaign/delete_reward_response.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rb +28 -0
- data/lib/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +130 -0
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_response.rb +81 -0
- data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +19 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +166 -0
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +189 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +182 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +82 -0
- data/lib/growsurf_ruby/models/campaign_update_params.rb +112 -0
- data/lib/growsurf_ruby/models.rb +4 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +98 -3
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +191 -0
- data/lib/growsurf_ruby/resources/campaign.rb +105 -0
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +12 -0
- data/rbi/growsurf_ruby/models/campaign/campaign_reward_list_response.rbi +41 -0
- data/rbi/growsurf_ruby/models/campaign/delete_reward_response.rbi +38 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +234 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbi +131 -0
- data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +24 -1
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +252 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +330 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +281 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +143 -0
- data/rbi/growsurf_ruby/models/campaign_update_params.rbi +193 -0
- data/rbi/growsurf_ruby/models.rbi +4 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +94 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +200 -0
- data/rbi/growsurf_ruby/resources/campaign.rbi +99 -0
- data/sig/growsurf_ruby/models/campaign/campaign_reward_list_response.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/delete_reward_response.rbs +17 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_params.rbs +30 -0
- data/sig/growsurf_ruby/models/campaign/participant_cancel_delayed_referral_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +151 -0
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_response.rbs +75 -0
- data/sig/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbs +7 -1
- data/sig/growsurf_ruby/models/campaign/reward.rbs +131 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +192 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +182 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +88 -0
- data/sig/growsurf_ruby/models/campaign_update_params.rbs +119 -0
- data/sig/growsurf_ruby/models.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +28 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +70 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +35 -0
- metadata +38 -2
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantRefundTransactionParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
OrHash =
|
|
11
|
+
T.type_alias do
|
|
12
|
+
T.any(
|
|
13
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams,
|
|
14
|
+
GrowsurfRuby::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :participant_id_or_email
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
returns(
|
|
26
|
+
T.nilable(
|
|
27
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::OrSymbol
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
attr_reader :amendment_type
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
amendment_type:
|
|
36
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::OrSymbol
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
attr_writer :amendment_type
|
|
40
|
+
|
|
41
|
+
sig { returns(T.nilable(Integer)) }
|
|
42
|
+
attr_reader :amount
|
|
43
|
+
|
|
44
|
+
sig { params(amount: Integer).void }
|
|
45
|
+
attr_writer :amount
|
|
46
|
+
|
|
47
|
+
sig { returns(T.nilable(Integer)) }
|
|
48
|
+
attr_reader :amount_refunded
|
|
49
|
+
|
|
50
|
+
sig { params(amount_refunded: Integer).void }
|
|
51
|
+
attr_writer :amount_refunded
|
|
52
|
+
|
|
53
|
+
sig { returns(T.nilable(String)) }
|
|
54
|
+
attr_reader :charge_id
|
|
55
|
+
|
|
56
|
+
sig { params(charge_id: String).void }
|
|
57
|
+
attr_writer :charge_id
|
|
58
|
+
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_reader :currency
|
|
61
|
+
|
|
62
|
+
sig { params(currency: String).void }
|
|
63
|
+
attr_writer :currency
|
|
64
|
+
|
|
65
|
+
sig { returns(T.nilable(String)) }
|
|
66
|
+
attr_reader :description
|
|
67
|
+
|
|
68
|
+
sig { params(description: String).void }
|
|
69
|
+
attr_writer :description
|
|
70
|
+
|
|
71
|
+
sig { returns(T.nilable(String)) }
|
|
72
|
+
attr_reader :external_id
|
|
73
|
+
|
|
74
|
+
sig { params(external_id: String).void }
|
|
75
|
+
attr_writer :external_id
|
|
76
|
+
|
|
77
|
+
sig { returns(T.nilable(String)) }
|
|
78
|
+
attr_reader :invoice_id
|
|
79
|
+
|
|
80
|
+
sig { params(invoice_id: String).void }
|
|
81
|
+
attr_writer :invoice_id
|
|
82
|
+
|
|
83
|
+
sig { returns(T.nilable(String)) }
|
|
84
|
+
attr_reader :order_id
|
|
85
|
+
|
|
86
|
+
sig { params(order_id: String).void }
|
|
87
|
+
attr_writer :order_id
|
|
88
|
+
|
|
89
|
+
sig { returns(T.nilable(String)) }
|
|
90
|
+
attr_reader :payment_id
|
|
91
|
+
|
|
92
|
+
sig { params(payment_id: String).void }
|
|
93
|
+
attr_writer :payment_id
|
|
94
|
+
|
|
95
|
+
sig { returns(T.nilable(String)) }
|
|
96
|
+
attr_reader :payment_intent_id
|
|
97
|
+
|
|
98
|
+
sig { params(payment_intent_id: String).void }
|
|
99
|
+
attr_writer :payment_intent_id
|
|
100
|
+
|
|
101
|
+
sig { returns(T.nilable(Integer)) }
|
|
102
|
+
attr_reader :refund_amount
|
|
103
|
+
|
|
104
|
+
sig { params(refund_amount: Integer).void }
|
|
105
|
+
attr_writer :refund_amount
|
|
106
|
+
|
|
107
|
+
sig { returns(T.nilable(String)) }
|
|
108
|
+
attr_reader :refund_id
|
|
109
|
+
|
|
110
|
+
sig { params(refund_id: String).void }
|
|
111
|
+
attr_writer :refund_id
|
|
112
|
+
|
|
113
|
+
sig { returns(T.nilable(String)) }
|
|
114
|
+
attr_reader :refund_status
|
|
115
|
+
|
|
116
|
+
sig { params(refund_status: String).void }
|
|
117
|
+
attr_writer :refund_status
|
|
118
|
+
|
|
119
|
+
sig { returns(T.nilable(String)) }
|
|
120
|
+
attr_reader :transaction_id
|
|
121
|
+
|
|
122
|
+
sig { params(transaction_id: String).void }
|
|
123
|
+
attr_writer :transaction_id
|
|
124
|
+
|
|
125
|
+
sig do
|
|
126
|
+
params(
|
|
127
|
+
id: String,
|
|
128
|
+
participant_id_or_email: String,
|
|
129
|
+
amendment_type:
|
|
130
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::OrSymbol,
|
|
131
|
+
amount: Integer,
|
|
132
|
+
amount_refunded: Integer,
|
|
133
|
+
charge_id: String,
|
|
134
|
+
currency: String,
|
|
135
|
+
description: String,
|
|
136
|
+
external_id: String,
|
|
137
|
+
invoice_id: String,
|
|
138
|
+
order_id: String,
|
|
139
|
+
payment_id: String,
|
|
140
|
+
payment_intent_id: String,
|
|
141
|
+
refund_amount: Integer,
|
|
142
|
+
refund_id: String,
|
|
143
|
+
refund_status: String,
|
|
144
|
+
transaction_id: String,
|
|
145
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
146
|
+
).returns(T.attached_class)
|
|
147
|
+
end
|
|
148
|
+
def self.new(
|
|
149
|
+
id:,
|
|
150
|
+
participant_id_or_email:,
|
|
151
|
+
amendment_type: nil,
|
|
152
|
+
amount: nil,
|
|
153
|
+
amount_refunded: nil,
|
|
154
|
+
charge_id: nil,
|
|
155
|
+
currency: nil,
|
|
156
|
+
description: nil,
|
|
157
|
+
external_id: nil,
|
|
158
|
+
invoice_id: nil,
|
|
159
|
+
order_id: nil,
|
|
160
|
+
payment_id: nil,
|
|
161
|
+
payment_intent_id: nil,
|
|
162
|
+
refund_amount: nil,
|
|
163
|
+
refund_id: nil,
|
|
164
|
+
refund_status: nil,
|
|
165
|
+
transaction_id: nil,
|
|
166
|
+
request_options: {}
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
sig do
|
|
171
|
+
override.returns(
|
|
172
|
+
{
|
|
173
|
+
id: String,
|
|
174
|
+
participant_id_or_email: String,
|
|
175
|
+
amendment_type:
|
|
176
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::OrSymbol,
|
|
177
|
+
amount: Integer,
|
|
178
|
+
amount_refunded: Integer,
|
|
179
|
+
charge_id: String,
|
|
180
|
+
currency: String,
|
|
181
|
+
description: String,
|
|
182
|
+
external_id: String,
|
|
183
|
+
invoice_id: String,
|
|
184
|
+
order_id: String,
|
|
185
|
+
payment_id: String,
|
|
186
|
+
payment_intent_id: String,
|
|
187
|
+
refund_amount: Integer,
|
|
188
|
+
refund_id: String,
|
|
189
|
+
refund_status: String,
|
|
190
|
+
transaction_id: String,
|
|
191
|
+
request_options: GrowsurfRuby::RequestOptions
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
def to_hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
module AmendmentType
|
|
199
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
200
|
+
|
|
201
|
+
TaggedSymbol =
|
|
202
|
+
T.type_alias do
|
|
203
|
+
T.all(
|
|
204
|
+
Symbol,
|
|
205
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType
|
|
206
|
+
)
|
|
207
|
+
end
|
|
208
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
209
|
+
|
|
210
|
+
REFUND =
|
|
211
|
+
T.let(
|
|
212
|
+
:REFUND,
|
|
213
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::TaggedSymbol
|
|
214
|
+
)
|
|
215
|
+
CHARGEBACK =
|
|
216
|
+
T.let(
|
|
217
|
+
:CHARGEBACK,
|
|
218
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::TaggedSymbol
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
sig do
|
|
222
|
+
override.returns(
|
|
223
|
+
T::Array[
|
|
224
|
+
GrowsurfRuby::Campaign::ParticipantRefundTransactionParams::AmendmentType::TaggedSymbol
|
|
225
|
+
]
|
|
226
|
+
)
|
|
227
|
+
end
|
|
228
|
+
def self.values
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantRefundTransactionResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :adjusted
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
returns(
|
|
20
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::TaggedSymbol
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
attr_accessor :amendment_type
|
|
24
|
+
|
|
25
|
+
sig { returns(Integer) }
|
|
26
|
+
attr_accessor :deleted
|
|
27
|
+
|
|
28
|
+
sig { returns(Integer) }
|
|
29
|
+
attr_accessor :matched
|
|
30
|
+
|
|
31
|
+
sig { returns(T::Array[String]) }
|
|
32
|
+
attr_accessor :matching_commission_ids
|
|
33
|
+
|
|
34
|
+
sig { returns(String) }
|
|
35
|
+
attr_accessor :message
|
|
36
|
+
|
|
37
|
+
sig { returns(Integer) }
|
|
38
|
+
attr_accessor :reversed
|
|
39
|
+
|
|
40
|
+
sig { returns(T::Boolean) }
|
|
41
|
+
attr_accessor :success
|
|
42
|
+
|
|
43
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
44
|
+
attr_reader :not_found
|
|
45
|
+
|
|
46
|
+
sig { params(not_found: T::Boolean).void }
|
|
47
|
+
attr_writer :not_found
|
|
48
|
+
|
|
49
|
+
sig do
|
|
50
|
+
params(
|
|
51
|
+
adjusted: Integer,
|
|
52
|
+
amendment_type:
|
|
53
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::OrSymbol,
|
|
54
|
+
deleted: Integer,
|
|
55
|
+
matched: Integer,
|
|
56
|
+
matching_commission_ids: T::Array[String],
|
|
57
|
+
message: String,
|
|
58
|
+
reversed: Integer,
|
|
59
|
+
success: T::Boolean,
|
|
60
|
+
not_found: T::Boolean
|
|
61
|
+
).returns(T.attached_class)
|
|
62
|
+
end
|
|
63
|
+
def self.new(
|
|
64
|
+
adjusted:,
|
|
65
|
+
amendment_type:,
|
|
66
|
+
deleted:,
|
|
67
|
+
matched:,
|
|
68
|
+
matching_commission_ids:,
|
|
69
|
+
message:,
|
|
70
|
+
reversed:,
|
|
71
|
+
success:,
|
|
72
|
+
not_found: nil
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
sig do
|
|
77
|
+
override.returns(
|
|
78
|
+
{
|
|
79
|
+
adjusted: Integer,
|
|
80
|
+
amendment_type:
|
|
81
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::TaggedSymbol,
|
|
82
|
+
deleted: Integer,
|
|
83
|
+
matched: Integer,
|
|
84
|
+
matching_commission_ids: T::Array[String],
|
|
85
|
+
message: String,
|
|
86
|
+
reversed: Integer,
|
|
87
|
+
success: T::Boolean,
|
|
88
|
+
not_found: T::Boolean
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
def to_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
module AmendmentType
|
|
96
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
97
|
+
|
|
98
|
+
TaggedSymbol =
|
|
99
|
+
T.type_alias do
|
|
100
|
+
T.all(
|
|
101
|
+
Symbol,
|
|
102
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
106
|
+
|
|
107
|
+
REFUND =
|
|
108
|
+
T.let(
|
|
109
|
+
:REFUND,
|
|
110
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::TaggedSymbol
|
|
111
|
+
)
|
|
112
|
+
CHARGEBACK =
|
|
113
|
+
T.let(
|
|
114
|
+
:CHARGEBACK,
|
|
115
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::TaggedSymbol
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
sig do
|
|
119
|
+
override.returns(
|
|
120
|
+
T::Array[
|
|
121
|
+
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse::AmendmentType::TaggedSymbol
|
|
122
|
+
]
|
|
123
|
+
)
|
|
124
|
+
end
|
|
125
|
+
def self.values
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -21,14 +21,36 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :participant_id_or_email
|
|
23
23
|
|
|
24
|
+
# Number of whole days to hold referral credit before it is awarded. Useful for
|
|
25
|
+
# honoring a refund window before crediting a referrer. Omit this field to award
|
|
26
|
+
# credit immediately. The credit is awarded automatically once the delay elapses,
|
|
27
|
+
# and can be cancelled before then with the Cancel delayed referral trigger
|
|
28
|
+
# request.
|
|
29
|
+
sig { returns(T.nilable(Integer)) }
|
|
30
|
+
attr_reader :delay_in_days
|
|
31
|
+
|
|
32
|
+
sig { params(delay_in_days: Integer).void }
|
|
33
|
+
attr_writer :delay_in_days
|
|
34
|
+
|
|
24
35
|
sig do
|
|
25
36
|
params(
|
|
26
37
|
id: String,
|
|
27
38
|
participant_id_or_email: String,
|
|
39
|
+
delay_in_days: Integer,
|
|
28
40
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
29
41
|
).returns(T.attached_class)
|
|
30
42
|
end
|
|
31
|
-
def self.new(
|
|
43
|
+
def self.new(
|
|
44
|
+
id:,
|
|
45
|
+
participant_id_or_email:,
|
|
46
|
+
# Number of whole days to hold referral credit before it is awarded. Useful for
|
|
47
|
+
# honoring a refund window before crediting a referrer. Omit this field to award
|
|
48
|
+
# credit immediately. The credit is awarded automatically once the delay elapses,
|
|
49
|
+
# and can be cancelled before then with the Cancel delayed referral trigger
|
|
50
|
+
# request.
|
|
51
|
+
delay_in_days: nil,
|
|
52
|
+
request_options: {}
|
|
53
|
+
)
|
|
32
54
|
end
|
|
33
55
|
|
|
34
56
|
sig do
|
|
@@ -36,6 +58,7 @@ module GrowsurfRuby
|
|
|
36
58
|
{
|
|
37
59
|
id: String,
|
|
38
60
|
participant_id_or_email: String,
|
|
61
|
+
delay_in_days: Integer,
|
|
39
62
|
request_options: GrowsurfRuby::RequestOptions
|
|
40
63
|
}
|
|
41
64
|
)
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class Reward < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
GrowsurfRuby::Models::Campaign::Reward,
|
|
11
|
+
GrowsurfRuby::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
sig { returns(T::Boolean) }
|
|
19
|
+
attr_accessor :is_unlimited
|
|
20
|
+
|
|
21
|
+
# Shallow custom metadata object.
|
|
22
|
+
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
23
|
+
attr_accessor :metadata
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
returns(GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol)
|
|
27
|
+
end
|
|
28
|
+
attr_accessor :type
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(GrowsurfRuby::CommissionStructure)) }
|
|
31
|
+
attr_reader :commission_structure
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
commission_structure:
|
|
36
|
+
T.nilable(GrowsurfRuby::CommissionStructure::OrHash)
|
|
37
|
+
).void
|
|
38
|
+
end
|
|
39
|
+
attr_writer :commission_structure
|
|
40
|
+
|
|
41
|
+
sig { returns(T.nilable(Integer)) }
|
|
42
|
+
attr_accessor :conversions_required
|
|
43
|
+
|
|
44
|
+
sig { returns(T.nilable(String)) }
|
|
45
|
+
attr_accessor :coupon_code
|
|
46
|
+
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :description
|
|
49
|
+
|
|
50
|
+
sig { returns(T.nilable(String)) }
|
|
51
|
+
attr_accessor :image_url
|
|
52
|
+
|
|
53
|
+
# `-1` represents an unlimited reward in REST responses.
|
|
54
|
+
sig { returns(T.nilable(Integer)) }
|
|
55
|
+
attr_accessor :limit
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
returns(
|
|
59
|
+
T.nilable(
|
|
60
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
attr_accessor :limit_duration
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
attr_accessor :next_milestone_prefix
|
|
68
|
+
|
|
69
|
+
sig { returns(T.nilable(String)) }
|
|
70
|
+
attr_accessor :next_milestone_suffix
|
|
71
|
+
|
|
72
|
+
sig { returns(T.nilable(Integer)) }
|
|
73
|
+
attr_accessor :number_of_winners
|
|
74
|
+
|
|
75
|
+
sig { returns(T.nilable(Integer)) }
|
|
76
|
+
attr_accessor :order
|
|
77
|
+
|
|
78
|
+
sig { returns(T.nilable(String)) }
|
|
79
|
+
attr_accessor :referral_description
|
|
80
|
+
|
|
81
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
82
|
+
attr_reader :referred_reward_upfront
|
|
83
|
+
|
|
84
|
+
sig { params(referred_reward_upfront: T::Boolean).void }
|
|
85
|
+
attr_writer :referred_reward_upfront
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
id: String,
|
|
90
|
+
is_unlimited: T::Boolean,
|
|
91
|
+
metadata: T::Hash[Symbol, T.anything],
|
|
92
|
+
type: GrowsurfRuby::Models::Campaign::Reward::Type::OrSymbol,
|
|
93
|
+
commission_structure:
|
|
94
|
+
T.nilable(GrowsurfRuby::CommissionStructure::OrHash),
|
|
95
|
+
conversions_required: T.nilable(Integer),
|
|
96
|
+
coupon_code: T.nilable(String),
|
|
97
|
+
description: T.nilable(String),
|
|
98
|
+
image_url: T.nilable(String),
|
|
99
|
+
limit: T.nilable(Integer),
|
|
100
|
+
limit_duration:
|
|
101
|
+
T.nilable(
|
|
102
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::OrSymbol
|
|
103
|
+
),
|
|
104
|
+
next_milestone_prefix: T.nilable(String),
|
|
105
|
+
next_milestone_suffix: T.nilable(String),
|
|
106
|
+
number_of_winners: T.nilable(Integer),
|
|
107
|
+
order: T.nilable(Integer),
|
|
108
|
+
referral_description: T.nilable(String),
|
|
109
|
+
referred_reward_upfront: T::Boolean
|
|
110
|
+
).returns(T.attached_class)
|
|
111
|
+
end
|
|
112
|
+
def self.new(
|
|
113
|
+
id:,
|
|
114
|
+
is_unlimited:,
|
|
115
|
+
# Shallow custom metadata object.
|
|
116
|
+
metadata:,
|
|
117
|
+
type:,
|
|
118
|
+
commission_structure: nil,
|
|
119
|
+
conversions_required: nil,
|
|
120
|
+
coupon_code: nil,
|
|
121
|
+
description: nil,
|
|
122
|
+
image_url: nil,
|
|
123
|
+
# `-1` represents an unlimited reward in REST responses.
|
|
124
|
+
limit: nil,
|
|
125
|
+
limit_duration: nil,
|
|
126
|
+
next_milestone_prefix: nil,
|
|
127
|
+
next_milestone_suffix: nil,
|
|
128
|
+
number_of_winners: nil,
|
|
129
|
+
order: nil,
|
|
130
|
+
referral_description: nil,
|
|
131
|
+
referred_reward_upfront: nil
|
|
132
|
+
)
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
sig do
|
|
136
|
+
override.returns(
|
|
137
|
+
{
|
|
138
|
+
id: String,
|
|
139
|
+
is_unlimited: T::Boolean,
|
|
140
|
+
metadata: T::Hash[Symbol, T.anything],
|
|
141
|
+
type: GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol,
|
|
142
|
+
commission_structure:
|
|
143
|
+
T.nilable(GrowsurfRuby::CommissionStructure),
|
|
144
|
+
conversions_required: T.nilable(Integer),
|
|
145
|
+
coupon_code: T.nilable(String),
|
|
146
|
+
description: T.nilable(String),
|
|
147
|
+
image_url: T.nilable(String),
|
|
148
|
+
limit: T.nilable(Integer),
|
|
149
|
+
limit_duration:
|
|
150
|
+
T.nilable(
|
|
151
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
152
|
+
),
|
|
153
|
+
next_milestone_prefix: T.nilable(String),
|
|
154
|
+
next_milestone_suffix: T.nilable(String),
|
|
155
|
+
number_of_winners: T.nilable(Integer),
|
|
156
|
+
order: T.nilable(Integer),
|
|
157
|
+
referral_description: T.nilable(String),
|
|
158
|
+
referred_reward_upfront: T::Boolean
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
def to_hash
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
module Type
|
|
166
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
167
|
+
|
|
168
|
+
TaggedSymbol =
|
|
169
|
+
T.type_alias do
|
|
170
|
+
T.all(Symbol, GrowsurfRuby::Models::Campaign::Reward::Type)
|
|
171
|
+
end
|
|
172
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
173
|
+
|
|
174
|
+
SINGLE_SIDED =
|
|
175
|
+
T.let(
|
|
176
|
+
:SINGLE_SIDED,
|
|
177
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
178
|
+
)
|
|
179
|
+
DOUBLE_SIDED =
|
|
180
|
+
T.let(
|
|
181
|
+
:DOUBLE_SIDED,
|
|
182
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
183
|
+
)
|
|
184
|
+
MILESTONE =
|
|
185
|
+
T.let(
|
|
186
|
+
:MILESTONE,
|
|
187
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
188
|
+
)
|
|
189
|
+
LEADERBOARD =
|
|
190
|
+
T.let(
|
|
191
|
+
:LEADERBOARD,
|
|
192
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
193
|
+
)
|
|
194
|
+
AFFILIATE =
|
|
195
|
+
T.let(
|
|
196
|
+
:AFFILIATE,
|
|
197
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
sig do
|
|
201
|
+
override.returns(
|
|
202
|
+
T::Array[
|
|
203
|
+
GrowsurfRuby::Models::Campaign::Reward::Type::TaggedSymbol
|
|
204
|
+
]
|
|
205
|
+
)
|
|
206
|
+
end
|
|
207
|
+
def self.values
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
module LimitDuration
|
|
212
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
213
|
+
|
|
214
|
+
TaggedSymbol =
|
|
215
|
+
T.type_alias do
|
|
216
|
+
T.all(
|
|
217
|
+
Symbol,
|
|
218
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration
|
|
219
|
+
)
|
|
220
|
+
end
|
|
221
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
222
|
+
|
|
223
|
+
IN_TOTAL =
|
|
224
|
+
T.let(
|
|
225
|
+
:IN_TOTAL,
|
|
226
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
227
|
+
)
|
|
228
|
+
PER_MONTH =
|
|
229
|
+
T.let(
|
|
230
|
+
:PER_MONTH,
|
|
231
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
232
|
+
)
|
|
233
|
+
PER_YEAR =
|
|
234
|
+
T.let(
|
|
235
|
+
:PER_YEAR,
|
|
236
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
sig do
|
|
240
|
+
override.returns(
|
|
241
|
+
T::Array[
|
|
242
|
+
GrowsurfRuby::Models::Campaign::Reward::LimitDuration::TaggedSymbol
|
|
243
|
+
]
|
|
244
|
+
)
|
|
245
|
+
end
|
|
246
|
+
def self.values
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
end
|