growsurf-ruby 1.20.1 → 1.21.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 +14 -0
- data/README.md +1 -1
- data/lib/growsurf_ruby/models/campaign/create.rb +13 -1
- data/lib/growsurf_ruby/models/campaign/delete_reward_group_response.rb +16 -0
- data/lib/growsurf_ruby/models/campaign/participant.rb +22 -1
- data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb +1 -1
- data/lib/growsurf_ruby/models/campaign/participant_bulk_move_params.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/participant_bulk_move_response.rb +57 -0
- data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +2 -2
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +3 -3
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +9 -1
- data/lib/growsurf_ruby/models/campaign/participant_send_invites_params.rb +1 -7
- data/lib/growsurf_ruby/models/campaign/participant_send_invites_response.rb +11 -1
- data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +1 -1
- data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +12 -1
- data/lib/growsurf_ruby/models/campaign/reward.rb +10 -1
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +12 -1
- data/lib/growsurf_ruby/models/campaign/reward_group.rb +46 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_create_params.rb +18 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_delete_params.rb +14 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_list_response.rb +13 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_retrieve_params.rb +14 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_source.rb +23 -0
- data/lib/growsurf_ruby/models/campaign/reward_group_update_params.rb +21 -0
- data/lib/growsurf_ruby/models/campaign/reward_list_params.rb +18 -0
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +14 -3
- data/lib/growsurf_ruby/models/campaign/webhook_test_response.rb +2 -2
- data/lib/growsurf_ruby/models/campaign_list_participants_params.rb +10 -1
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +12 -1
- data/lib/growsurf_ruby/resources/campaign/groups.rb +103 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +51 -15
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +19 -6
- data/lib/growsurf_ruby/resources/campaign.rb +9 -2
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +12 -0
- data/rbi/growsurf_ruby/models/campaign/create.rbi +11 -0
- data/rbi/growsurf_ruby/models/campaign/delete_reward_group_response.rbi +39 -0
- data/rbi/growsurf_ruby/models/campaign/participant.rbi +26 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -6
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_move_params.rbi +41 -0
- data/rbi/growsurf_ruby/models/campaign/participant_bulk_move_response.rbi +172 -0
- data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +8 -0
- data/rbi/growsurf_ruby/models/campaign/participant_send_invites_params.rbi +0 -6
- data/rbi/growsurf_ruby/models/campaign/participant_send_invites_response.rbi +22 -3
- data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +10 -0
- data/rbi/growsurf_ruby/models/campaign/reward.rbi +8 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +10 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group.rbi +109 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_create_params.rbi +40 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_delete_params.rbi +37 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_list_response.rbi +27 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_retrieve_params.rbi +37 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_source.rbi +36 -0
- data/rbi/growsurf_ruby/models/campaign/reward_group_update_params.rbi +48 -0
- data/rbi/growsurf_ruby/models/campaign/reward_list_params.rbi +43 -0
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +12 -2
- data/rbi/growsurf_ruby/models/campaign/webhook_test_response.rbi +2 -2
- data/rbi/growsurf_ruby/models/campaign_list_participants_params.rbi +13 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +24 -0
- data/rbi/growsurf_ruby/resources/campaign/groups.rbi +93 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +39 -9
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +13 -2
- data/rbi/growsurf_ruby/resources/campaign.rbi +8 -0
- data/sig/growsurf_ruby/models/campaign/create.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/delete_reward_group_response.rbs +16 -0
- data/sig/growsurf_ruby/models/campaign/participant.rbs +10 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs +4 -6
- data/sig/growsurf_ruby/models/campaign/participant_bulk_move_params.rbs +24 -0
- data/sig/growsurf_ruby/models/campaign/participant_bulk_move_response.rbs +89 -0
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/participant_send_invites_params.rbs +1 -6
- data/sig/growsurf_ruby/models/campaign/participant_send_invites_response.rbs +14 -3
- data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/reward.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign/reward_group.rbs +55 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_create_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_delete_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_list_response.rbs +13 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_retrieve_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_source.rbs +18 -0
- data/sig/growsurf_ruby/models/campaign/reward_group_update_params.rbs +25 -0
- data/sig/growsurf_ruby/models/campaign/reward_list_params.rbs +23 -0
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +5 -0
- data/sig/growsurf_ruby/models/campaign_list_participants_params.rbs +7 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +9 -0
- data/sig/growsurf_ruby/resources/campaign/groups.rbs +42 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +9 -1
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +3 -0
- data/sig/growsurf_ruby/resources/campaign.rbs +3 -0
- metadata +38 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class DeleteRewardGroupResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(DeleteRewardGroupResponse, GrowsurfRuby::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :id
|
|
14
|
+
|
|
15
|
+
sig { returns(Integer) }
|
|
16
|
+
attr_accessor :moved_to_default
|
|
17
|
+
|
|
18
|
+
sig { returns(T::Boolean) }
|
|
19
|
+
attr_accessor :success
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(id: String, moved_to_default: Integer, success: T::Boolean).returns(
|
|
23
|
+
T.attached_class
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
def self.new(id:, moved_to_default:, success:)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig do
|
|
30
|
+
override.returns(
|
|
31
|
+
{ id: String, moved_to_default: Integer, success: T::Boolean }
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def to_hash
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -94,6 +94,20 @@ module GrowsurfRuby
|
|
|
94
94
|
end
|
|
95
95
|
attr_writer :fraud_risk_level
|
|
96
96
|
|
|
97
|
+
# The participant's group (`grp_…`), or `null` for Default. Their new referrals
|
|
98
|
+
# earn this group's rewards.
|
|
99
|
+
sig { returns(T.nilable(String)) }
|
|
100
|
+
attr_accessor :group_id
|
|
101
|
+
|
|
102
|
+
# How the participant got into their group. `null` when no group placement was
|
|
103
|
+
# ever made.
|
|
104
|
+
sig do
|
|
105
|
+
returns(
|
|
106
|
+
T.nilable(GrowsurfRuby::Campaign::RewardGroupSource::TaggedSymbol)
|
|
107
|
+
)
|
|
108
|
+
end
|
|
109
|
+
attr_accessor :group_source
|
|
110
|
+
|
|
97
111
|
sig { returns(T.nilable(Integer)) }
|
|
98
112
|
attr_reader :impression_count
|
|
99
113
|
|
|
@@ -331,6 +345,9 @@ module GrowsurfRuby
|
|
|
331
345
|
first_name: T.nilable(String),
|
|
332
346
|
fraud_reason_code: String,
|
|
333
347
|
fraud_risk_level: GrowsurfRuby::Campaign::FraudRiskLevel::OrSymbol,
|
|
348
|
+
group_id: T.nilable(String),
|
|
349
|
+
group_source:
|
|
350
|
+
T.nilable(GrowsurfRuby::Campaign::RewardGroupSource::OrSymbol),
|
|
334
351
|
impression_count: Integer,
|
|
335
352
|
invite_count: Integer,
|
|
336
353
|
ip_address: T.nilable(String),
|
|
@@ -390,6 +407,10 @@ module GrowsurfRuby
|
|
|
390
407
|
first_name: nil,
|
|
391
408
|
fraud_reason_code: nil,
|
|
392
409
|
fraud_risk_level: nil,
|
|
410
|
+
# The participant's group (`grp_…`), or `null` for Default.
|
|
411
|
+
group_id: nil,
|
|
412
|
+
# How the participant got into their group.
|
|
413
|
+
group_source: nil,
|
|
393
414
|
impression_count: nil,
|
|
394
415
|
invite_count: nil,
|
|
395
416
|
ip_address: nil,
|
|
@@ -459,6 +480,11 @@ module GrowsurfRuby
|
|
|
459
480
|
fraud_reason_code: String,
|
|
460
481
|
fraud_risk_level:
|
|
461
482
|
GrowsurfRuby::Campaign::FraudRiskLevel::TaggedSymbol,
|
|
483
|
+
group_id: T.nilable(String),
|
|
484
|
+
group_source:
|
|
485
|
+
T.nilable(
|
|
486
|
+
GrowsurfRuby::Campaign::RewardGroupSource::TaggedSymbol
|
|
487
|
+
),
|
|
462
488
|
impression_count: Integer,
|
|
463
489
|
invite_count: Integer,
|
|
464
490
|
ip_address: T.nilable(String),
|
|
@@ -127,10 +127,7 @@ module GrowsurfRuby
|
|
|
127
127
|
|
|
128
128
|
# The resolved participant's email address. Present on `DELETED` rows.
|
|
129
129
|
sig { returns(T.nilable(String)) }
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
sig { params(email: String).void }
|
|
133
|
-
attr_writer :email
|
|
130
|
+
attr_accessor :email
|
|
134
131
|
|
|
135
132
|
# Human-readable detail for `NOT_FOUND`, `DUPLICATE`, and `ERROR` rows.
|
|
136
133
|
sig { returns(T.nilable(String)) }
|
|
@@ -153,7 +150,7 @@ module GrowsurfRuby
|
|
|
153
150
|
index: Integer,
|
|
154
151
|
status:
|
|
155
152
|
GrowsurfRuby::Campaign::ParticipantBulkDeleteResponse::Result::Status::OrSymbol,
|
|
156
|
-
email: String,
|
|
153
|
+
email: T.nilable(String),
|
|
157
154
|
message: String,
|
|
158
155
|
participant_id: String
|
|
159
156
|
).returns(T.attached_class)
|
|
@@ -185,7 +182,7 @@ module GrowsurfRuby
|
|
|
185
182
|
index: Integer,
|
|
186
183
|
status:
|
|
187
184
|
GrowsurfRuby::Campaign::ParticipantBulkDeleteResponse::Result::Status::TaggedSymbol,
|
|
188
|
-
email: String,
|
|
185
|
+
email: T.nilable(String),
|
|
189
186
|
message: String,
|
|
190
187
|
participant_id: String
|
|
191
188
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantBulkMoveParams < 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(ParticipantBulkMoveParams, GrowsurfRuby::Internal::AnyHash)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
sig { returns(T::Array[String]) }
|
|
19
|
+
attr_accessor :participants
|
|
20
|
+
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :group_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
participants: T::Array[String],
|
|
28
|
+
group_id: T.nilable(String),
|
|
29
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(id:, participants:, group_id:, request_options: {})
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { override.returns(T::Hash[Symbol, T.anything]) }
|
|
36
|
+
def to_hash
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class ParticipantBulkMoveResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(ParticipantBulkMoveResponse, GrowsurfRuby::Internal::AnyHash)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
sig { returns(T::Array[Result]) }
|
|
13
|
+
attr_accessor :results
|
|
14
|
+
|
|
15
|
+
sig { returns(Summary) }
|
|
16
|
+
attr_reader :summary
|
|
17
|
+
|
|
18
|
+
sig { params(summary: Summary::OrHash).void }
|
|
19
|
+
attr_writer :summary
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
results: T::Array[Result::OrHash],
|
|
24
|
+
summary: Summary::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(results:, summary:)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig { override.returns({ results: T::Array[Result], summary: Summary }) }
|
|
31
|
+
def to_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
class Result < GrowsurfRuby::Internal::Type::BaseModel
|
|
35
|
+
OrHash =
|
|
36
|
+
T.type_alias { T.any(Result, GrowsurfRuby::Internal::AnyHash) }
|
|
37
|
+
|
|
38
|
+
sig { returns(String) }
|
|
39
|
+
attr_accessor :identifier
|
|
40
|
+
|
|
41
|
+
sig { returns(Integer) }
|
|
42
|
+
attr_accessor :index
|
|
43
|
+
|
|
44
|
+
sig { returns(Status::TaggedSymbol) }
|
|
45
|
+
attr_accessor :status
|
|
46
|
+
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :email
|
|
49
|
+
|
|
50
|
+
sig { returns(T.nilable(String)) }
|
|
51
|
+
attr_reader :message
|
|
52
|
+
|
|
53
|
+
sig { params(message: String).void }
|
|
54
|
+
attr_writer :message
|
|
55
|
+
|
|
56
|
+
sig { returns(T.nilable(String)) }
|
|
57
|
+
attr_reader :participant_id
|
|
58
|
+
|
|
59
|
+
sig { params(participant_id: String).void }
|
|
60
|
+
attr_writer :participant_id
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
params(
|
|
64
|
+
identifier: String,
|
|
65
|
+
index: Integer,
|
|
66
|
+
status: Status::OrSymbol,
|
|
67
|
+
email: T.nilable(String),
|
|
68
|
+
message: String,
|
|
69
|
+
participant_id: String
|
|
70
|
+
).returns(T.attached_class)
|
|
71
|
+
end
|
|
72
|
+
def self.new(
|
|
73
|
+
identifier:,
|
|
74
|
+
index:,
|
|
75
|
+
status:,
|
|
76
|
+
email: nil,
|
|
77
|
+
message: nil,
|
|
78
|
+
participant_id: nil
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
sig do
|
|
83
|
+
override.returns(
|
|
84
|
+
{
|
|
85
|
+
identifier: String,
|
|
86
|
+
index: Integer,
|
|
87
|
+
status: Status::TaggedSymbol,
|
|
88
|
+
email: T.nilable(String),
|
|
89
|
+
message: String,
|
|
90
|
+
participant_id: String
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
end
|
|
94
|
+
def to_hash
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
module Status
|
|
98
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
99
|
+
|
|
100
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Status) }
|
|
101
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
102
|
+
MOVED = T.let(:MOVED, TaggedSymbol)
|
|
103
|
+
NOT_FOUND = T.let(:NOT_FOUND, TaggedSymbol)
|
|
104
|
+
DUPLICATE = T.let(:DUPLICATE, TaggedSymbol)
|
|
105
|
+
ERROR = T.let(:ERROR, TaggedSymbol)
|
|
106
|
+
sig { override.returns(T::Array[TaggedSymbol]) }
|
|
107
|
+
def self.values
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
class Summary < GrowsurfRuby::Internal::Type::BaseModel
|
|
113
|
+
OrHash =
|
|
114
|
+
T.type_alias { T.any(Summary, GrowsurfRuby::Internal::AnyHash) }
|
|
115
|
+
|
|
116
|
+
sig { returns(Integer) }
|
|
117
|
+
attr_accessor :duplicate_count
|
|
118
|
+
|
|
119
|
+
sig { returns(Integer) }
|
|
120
|
+
attr_accessor :error_count
|
|
121
|
+
|
|
122
|
+
sig { returns(T.nilable(String)) }
|
|
123
|
+
attr_accessor :group_id
|
|
124
|
+
|
|
125
|
+
sig { returns(Integer) }
|
|
126
|
+
attr_accessor :moved_count
|
|
127
|
+
|
|
128
|
+
sig { returns(Integer) }
|
|
129
|
+
attr_accessor :not_found_count
|
|
130
|
+
|
|
131
|
+
sig { returns(Integer) }
|
|
132
|
+
attr_accessor :total
|
|
133
|
+
|
|
134
|
+
sig do
|
|
135
|
+
params(
|
|
136
|
+
duplicate_count: Integer,
|
|
137
|
+
error_count: Integer,
|
|
138
|
+
group_id: T.nilable(String),
|
|
139
|
+
moved_count: Integer,
|
|
140
|
+
not_found_count: Integer,
|
|
141
|
+
total: Integer
|
|
142
|
+
).returns(T.attached_class)
|
|
143
|
+
end
|
|
144
|
+
def self.new(
|
|
145
|
+
duplicate_count:,
|
|
146
|
+
error_count:,
|
|
147
|
+
group_id:,
|
|
148
|
+
moved_count:,
|
|
149
|
+
not_found_count:,
|
|
150
|
+
total:
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
sig do
|
|
155
|
+
override.returns(
|
|
156
|
+
{
|
|
157
|
+
duplicate_count: Integer,
|
|
158
|
+
error_count: Integer,
|
|
159
|
+
group_id: T.nilable(String),
|
|
160
|
+
moved_count: Integer,
|
|
161
|
+
not_found_count: Integer,
|
|
162
|
+
total: Integer
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
def to_hash
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
@@ -21,7 +21,7 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :participant_id_or_email
|
|
23
23
|
|
|
24
|
-
# HTML body for a free-form email. You can personalize it with dynamic text,
|
|
24
|
+
# HTML body for a free-form email. When `settings.design.layoutMode` is `INLINE`, include `{{emailFooter}}` in the body; `{{emailHeader}}` is optional. You can personalize it with dynamic text,
|
|
25
25
|
# inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See
|
|
26
26
|
# [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
27
27
|
sig { returns(T.nilable(String)) }
|
|
@@ -77,7 +77,7 @@ module GrowsurfRuby
|
|
|
77
77
|
def self.new(
|
|
78
78
|
id:,
|
|
79
79
|
participant_id_or_email:,
|
|
80
|
-
# HTML body for a free-form email. You can personalize it with dynamic text,
|
|
80
|
+
# HTML body for a free-form email. When `settings.design.layoutMode` is `INLINE`, include `{{emailFooter}}` in the body; `{{emailHeader}}` is optional. You can personalize it with dynamic text,
|
|
81
81
|
# inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See
|
|
82
82
|
# [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
83
83
|
body: nil,
|
|
@@ -21,7 +21,7 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(String) }
|
|
22
22
|
attr_accessor :participant_id_or_email
|
|
23
23
|
|
|
24
|
-
# The payout provider the participant should confirm a destination for.
|
|
24
|
+
# The payout provider the participant should confirm a destination for. `VENMO` uses a confirmed email and is available only when connected PayPal Payouts and payout-email confirmation are enabled in a USD program. Venmo recipients must be in the United States.
|
|
25
25
|
sig do
|
|
26
26
|
returns(
|
|
27
27
|
GrowsurfRuby::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider::TaggedSymbol
|
|
@@ -41,7 +41,7 @@ module GrowsurfRuby
|
|
|
41
41
|
def self.new(
|
|
42
42
|
id:,
|
|
43
43
|
participant_id_or_email:,
|
|
44
|
-
# The payout provider the participant should confirm a destination for.
|
|
44
|
+
# The payout provider the participant should confirm a destination for. `VENMO` uses a confirmed email and is available only when connected PayPal Payouts and payout-email confirmation are enabled in a USD program. Venmo recipients must be in the United States.
|
|
45
45
|
provider:,
|
|
46
46
|
request_options: {}
|
|
47
47
|
)
|
|
@@ -77,6 +77,11 @@ module GrowsurfRuby
|
|
|
77
77
|
sig { params(fulfilled_at: T.nilable(Integer)).void }
|
|
78
78
|
attr_writer :fulfilled_at
|
|
79
79
|
|
|
80
|
+
# The group whose reward this is (`grp_…`), saved when it was earned. `null` for
|
|
81
|
+
# Default and for rewards earned before groups existed.
|
|
82
|
+
sig { returns(T.nilable(String)) }
|
|
83
|
+
attr_accessor :group_id
|
|
84
|
+
|
|
80
85
|
sig { returns(T.nilable(T::Boolean)) }
|
|
81
86
|
attr_reader :is_available
|
|
82
87
|
|
|
@@ -136,6 +141,7 @@ module GrowsurfRuby
|
|
|
136
141
|
T.nilable(GrowsurfRuby::CommissionStructure::OrHash),
|
|
137
142
|
currency_iso: T.nilable(String),
|
|
138
143
|
fulfilled_at: T.nilable(Integer),
|
|
144
|
+
group_id: T.nilable(String),
|
|
139
145
|
is_available: T::Boolean,
|
|
140
146
|
is_fulfilled: T::Boolean,
|
|
141
147
|
is_referrer: T::Boolean,
|
|
@@ -158,6 +164,7 @@ module GrowsurfRuby
|
|
|
158
164
|
commission_structure: nil,
|
|
159
165
|
currency_iso: nil,
|
|
160
166
|
fulfilled_at: nil,
|
|
167
|
+
group_id: nil,
|
|
161
168
|
is_available: nil,
|
|
162
169
|
is_fulfilled: nil,
|
|
163
170
|
is_referrer: nil,
|
|
@@ -187,6 +194,7 @@ module GrowsurfRuby
|
|
|
187
194
|
T.nilable(GrowsurfRuby::CommissionStructure),
|
|
188
195
|
currency_iso: T.nilable(String),
|
|
189
196
|
fulfilled_at: T.nilable(Integer),
|
|
197
|
+
group_id: T.nilable(String),
|
|
190
198
|
is_available: T::Boolean,
|
|
191
199
|
is_fulfilled: T::Boolean,
|
|
192
200
|
is_referrer: T::Boolean,
|
|
@@ -27,16 +27,12 @@ module GrowsurfRuby
|
|
|
27
27
|
sig { returns(String) }
|
|
28
28
|
attr_accessor :message_text
|
|
29
29
|
|
|
30
|
-
sig { returns(String) }
|
|
31
|
-
attr_accessor :subject_text
|
|
32
|
-
|
|
33
30
|
sig do
|
|
34
31
|
params(
|
|
35
32
|
id: String,
|
|
36
33
|
participant_id_or_email: String,
|
|
37
34
|
email_addresses: T::Array[String],
|
|
38
35
|
message_text: String,
|
|
39
|
-
subject_text: String,
|
|
40
36
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
41
37
|
).returns(T.attached_class)
|
|
42
38
|
end
|
|
@@ -45,7 +41,6 @@ module GrowsurfRuby
|
|
|
45
41
|
participant_id_or_email:,
|
|
46
42
|
email_addresses:,
|
|
47
43
|
message_text:,
|
|
48
|
-
subject_text:,
|
|
49
44
|
request_options: {}
|
|
50
45
|
)
|
|
51
46
|
end
|
|
@@ -57,7 +52,6 @@ module GrowsurfRuby
|
|
|
57
52
|
participant_id_or_email: String,
|
|
58
53
|
email_addresses: T::Array[String],
|
|
59
54
|
message_text: String,
|
|
60
|
-
subject_text: String,
|
|
61
55
|
request_options: GrowsurfRuby::RequestOptions
|
|
62
56
|
}
|
|
63
57
|
)
|
|
@@ -21,19 +21,38 @@ module GrowsurfRuby
|
|
|
21
21
|
sig { returns(T::Boolean) }
|
|
22
22
|
attr_accessor :success
|
|
23
23
|
|
|
24
|
+
# Human-readable detail for the result. Empty when there is nothing to add.
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :message
|
|
27
|
+
|
|
28
|
+
sig { params(message: String).void }
|
|
29
|
+
attr_writer :message
|
|
30
|
+
|
|
24
31
|
sig do
|
|
25
32
|
params(
|
|
26
33
|
invites_sent: Integer,
|
|
27
34
|
message_type: String,
|
|
28
|
-
success: T::Boolean
|
|
35
|
+
success: T::Boolean,
|
|
36
|
+
message: String
|
|
29
37
|
).returns(T.attached_class)
|
|
30
38
|
end
|
|
31
|
-
def self.new(
|
|
39
|
+
def self.new(
|
|
40
|
+
invites_sent:,
|
|
41
|
+
message_type:,
|
|
42
|
+
success:,
|
|
43
|
+
# Human-readable detail for the result. Empty when there is nothing to add.
|
|
44
|
+
message: nil
|
|
45
|
+
)
|
|
32
46
|
end
|
|
33
47
|
|
|
34
48
|
sig do
|
|
35
49
|
override.returns(
|
|
36
|
-
{
|
|
50
|
+
{
|
|
51
|
+
invites_sent: Integer,
|
|
52
|
+
message_type: String,
|
|
53
|
+
success: T::Boolean,
|
|
54
|
+
message: String
|
|
55
|
+
}
|
|
37
56
|
)
|
|
38
57
|
end
|
|
39
58
|
def to_hash
|
|
@@ -25,7 +25,7 @@ module GrowsurfRuby
|
|
|
25
25
|
# honoring a refund window before crediting a referrer. Omit this field to award
|
|
26
26
|
# credit immediately. The credit is awarded automatically once the delay elapses,
|
|
27
27
|
# and can be cancelled before then with the Cancel delayed referral trigger
|
|
28
|
-
# request.
|
|
28
|
+
# request. From `0` to `90`; `0` awards credit immediately.
|
|
29
29
|
sig { returns(T.nilable(Integer)) }
|
|
30
30
|
attr_reader :delay_in_days
|
|
31
31
|
|
|
@@ -47,7 +47,7 @@ module GrowsurfRuby
|
|
|
47
47
|
# honoring a refund window before crediting a referrer. Omit this field to award
|
|
48
48
|
# credit immediately. The credit is awarded automatically once the delay elapses,
|
|
49
49
|
# and can be cancelled before then with the Cancel delayed referral trigger
|
|
50
|
-
# request.
|
|
50
|
+
# request. From `0` to `90`; `0` awards credit immediately.
|
|
51
51
|
delay_in_days: nil,
|
|
52
52
|
request_options: {}
|
|
53
53
|
)
|
|
@@ -53,6 +53,13 @@ module GrowsurfRuby
|
|
|
53
53
|
sig { params(first_name: String).void }
|
|
54
54
|
attr_writer :first_name
|
|
55
55
|
|
|
56
|
+
# Moves the participant to this group (`grp_…`), or to Default with `null`. This is
|
|
57
|
+
# a manual placement, so the groups' email and domain rules do not override it
|
|
58
|
+
# later. The move applies to new referrals only; rewards already earned keep their
|
|
59
|
+
# amounts. An ID that is not a group in this program returns `400`.
|
|
60
|
+
sig { returns(T.nilable(String)) }
|
|
61
|
+
attr_accessor :group_id
|
|
62
|
+
|
|
56
63
|
# The language of the participant's portal and program emails. Must be one of the
|
|
57
64
|
# program's languages (see `languages` in the program options). Send the base
|
|
58
65
|
# language or `null` to use the program's base language.
|
|
@@ -123,6 +130,7 @@ module GrowsurfRuby
|
|
|
123
130
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
124
131
|
email: String,
|
|
125
132
|
first_name: String,
|
|
133
|
+
group_id: T.nilable(String),
|
|
126
134
|
language: T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol),
|
|
127
135
|
last_name: String,
|
|
128
136
|
metadata: T::Hash[Symbol, T.anything],
|
|
@@ -144,6 +152,7 @@ module GrowsurfRuby
|
|
|
144
152
|
affiliate_status: nil,
|
|
145
153
|
email: nil,
|
|
146
154
|
first_name: nil,
|
|
155
|
+
group_id: nil,
|
|
147
156
|
# The language of the participant's portal and program emails. Must be one of the
|
|
148
157
|
# program's languages (see `languages` in the program options). Send the base
|
|
149
158
|
# language or `null` to use the program's base language.
|
|
@@ -171,6 +180,7 @@ module GrowsurfRuby
|
|
|
171
180
|
GrowsurfRuby::Campaign::ParticipantUpdateParams::AffiliateStatus::OrSymbol,
|
|
172
181
|
email: String,
|
|
173
182
|
first_name: String,
|
|
183
|
+
group_id: T.nilable(String),
|
|
174
184
|
language: T.nilable(GrowsurfRuby::Campaign::Language::OrSymbol),
|
|
175
185
|
last_name: String,
|
|
176
186
|
metadata: T::Hash[Symbol, T.anything],
|
|
@@ -65,6 +65,11 @@ module GrowsurfRuby
|
|
|
65
65
|
sig { returns(T.nilable(String)) }
|
|
66
66
|
attr_accessor :image_url
|
|
67
67
|
|
|
68
|
+
# The group this reward belongs to (`grp_…`), or `null` for Default. A participant
|
|
69
|
+
# earns only their own group's rewards.
|
|
70
|
+
sig { returns(T.nilable(String)) }
|
|
71
|
+
attr_accessor :group_id
|
|
72
|
+
|
|
68
73
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
69
74
|
# image.
|
|
70
75
|
sig do
|
|
@@ -172,6 +177,7 @@ module GrowsurfRuby
|
|
|
172
177
|
GrowsurfRuby::Models::Campaign::Reward::Event::OrSymbol
|
|
173
178
|
),
|
|
174
179
|
image_url: T.nilable(String),
|
|
180
|
+
group_id: T.nilable(String),
|
|
175
181
|
image_icon_key:
|
|
176
182
|
T.nilable(
|
|
177
183
|
GrowsurfRuby::Models::Campaign::Reward::ImageIconKey::OrSymbol
|
|
@@ -212,6 +218,7 @@ module GrowsurfRuby
|
|
|
212
218
|
# Rewards return `CONVERSION`.
|
|
213
219
|
event: nil,
|
|
214
220
|
image_url: nil,
|
|
221
|
+
group_id: nil,
|
|
215
222
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
216
223
|
# image.
|
|
217
224
|
image_icon_key: nil,
|
|
@@ -263,6 +270,7 @@ module GrowsurfRuby
|
|
|
263
270
|
GrowsurfRuby::Models::Campaign::Reward::Event::TaggedSymbol
|
|
264
271
|
),
|
|
265
272
|
image_url: T.nilable(String),
|
|
273
|
+
group_id: T.nilable(String),
|
|
266
274
|
image_icon_key:
|
|
267
275
|
T.nilable(
|
|
268
276
|
GrowsurfRuby::Models::Campaign::Reward::ImageIconKey::TaggedSymbol
|
|
@@ -80,6 +80,13 @@ module GrowsurfRuby
|
|
|
80
80
|
sig { params(image_url: T.nilable(String)).void }
|
|
81
81
|
attr_writer :image_url
|
|
82
82
|
|
|
83
|
+
# The group this reward belongs to (`grp_…`), or `null` for Default. A participant
|
|
84
|
+
# earns only their own group's rewards.
|
|
85
|
+
# `LEADERBOARD` rewards apply to the whole program and cannot be in a group. An ID
|
|
86
|
+
# that is not a group in this program returns `400`.
|
|
87
|
+
sig { returns(T.nilable(String)) }
|
|
88
|
+
attr_accessor :group_id
|
|
89
|
+
|
|
83
90
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
84
91
|
# image. Participant pages draw this icon in your program's accent color. Also set
|
|
85
92
|
# `imageUrl` to the icon's image so the iOS and Android SDKs can show it. Sending
|
|
@@ -255,6 +262,7 @@ module GrowsurfRuby
|
|
|
255
262
|
event:
|
|
256
263
|
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
|
|
257
264
|
image_url: T.nilable(String),
|
|
265
|
+
group_id: T.nilable(String),
|
|
258
266
|
image_icon_key:
|
|
259
267
|
T.nilable(
|
|
260
268
|
GrowsurfRuby::Models::Campaign::RewardCreateParams::ImageIconKey::OrSymbol
|
|
@@ -294,6 +302,7 @@ module GrowsurfRuby
|
|
|
294
302
|
# `MILESTONE` rewards. When omitted, it defaults to `CONVERSION`.
|
|
295
303
|
event: nil,
|
|
296
304
|
image_url: nil,
|
|
305
|
+
group_id: nil,
|
|
297
306
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
298
307
|
# image. Participant pages draw this icon in your program's accent color. Also set
|
|
299
308
|
# `imageUrl` to the icon's image so the iOS and Android SDKs can show it. Sending
|
|
@@ -361,6 +370,7 @@ module GrowsurfRuby
|
|
|
361
370
|
event:
|
|
362
371
|
GrowsurfRuby::Models::Campaign::RewardCreateParams::Event::OrSymbol,
|
|
363
372
|
image_url: T.nilable(String),
|
|
373
|
+
group_id: T.nilable(String),
|
|
364
374
|
image_icon_key:
|
|
365
375
|
T.nilable(
|
|
366
376
|
GrowsurfRuby::Models::Campaign::RewardCreateParams::ImageIconKey::OrSymbol
|