growsurf-ruby 1.4.0 → 1.5.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 +22 -0
- data/README.md +10 -7
- data/lib/growsurf_ruby/internal/transport/base_client.rb +6 -1
- data/lib/growsurf_ruby/internal/type/base_model.rb +26 -0
- data/lib/growsurf_ruby/internal/type/base_page.rb +6 -0
- data/lib/growsurf_ruby/models/account_create_response.rb +3 -3
- data/lib/growsurf_ruby/models/analytics_availability.rb +16 -0
- data/lib/growsurf_ruby/models/analytics_unavailable_reason.rb +20 -0
- data/lib/growsurf_ruby/models/campaign/delete_program_resource_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/integration.rb +69 -0
- data/lib/growsurf_ruby/models/campaign/integration_list_response.rb +24 -0
- data/lib/growsurf_ruby/models/campaign/participant_activation_analytics.rb +75 -0
- data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +11 -0
- data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +17 -17
- data/lib/growsurf_ruby/models/campaign/participant_record_transaction_params.rb +9 -1
- data/lib/growsurf_ruby/models/campaign/participant_refund_transaction_params.rb +17 -1
- data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +8 -8
- data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +4 -3
- data/lib/growsurf_ruby/models/campaign/participant_reward.rb +15 -3
- data/lib/growsurf_ruby/models/campaign/program_resource.rb +51 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_create_params.rb +32 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_delete_params.rb +14 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_list_response.rb +12 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_update_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_result.rb +33 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket.rb +26 -0
- data/lib/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rb +17 -0
- data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +9 -8
- data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +9 -8
- data/lib/growsurf_ruby/models/campaign.rb +3 -1
- data/lib/growsurf_ruby/models/campaign_activation_analytics_response.rb +186 -0
- data/lib/growsurf_ruby/models/campaign_create_params.rb +37 -1
- data/lib/growsurf_ruby/models/campaign_engagement_analytics.rb +174 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rb +35 -0
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +37 -4
- data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +3 -0
- data/lib/growsurf_ruby/models/commission_structure.rb +4 -1
- data/lib/growsurf_ruby/models/participant_commission_list.rb +5 -5
- data/lib/growsurf_ruby/models/participant_payout_list.rb +5 -5
- data/lib/growsurf_ruby/models.rb +7 -0
- data/lib/growsurf_ruby/resources/account.rb +17 -11
- data/lib/growsurf_ruby/resources/campaign/design.rb +11 -5
- data/lib/growsurf_ruby/resources/campaign/emails.rb +2 -1
- data/lib/growsurf_ruby/resources/campaign/integrations.rb +41 -0
- data/lib/growsurf_ruby/resources/campaign/participant.rb +25 -24
- data/lib/growsurf_ruby/resources/campaign/program_resources.rb +112 -0
- data/lib/growsurf_ruby/resources/campaign/rewards.rb +6 -4
- data/lib/growsurf_ruby/resources/campaign.rb +53 -7
- data/lib/growsurf_ruby/resources/team.rb +7 -5
- data/lib/growsurf_ruby/version.rb +1 -1
- data/lib/growsurf_ruby.rb +19 -0
- data/rbi/growsurf_ruby/internal/type/base_model.rbi +10 -0
- data/rbi/growsurf_ruby/internal/type/base_page.rbi +3 -0
- data/rbi/growsurf_ruby/models/analytics_availability.rbi +19 -0
- data/rbi/growsurf_ruby/models/analytics_unavailable_reason.rbi +23 -0
- data/rbi/growsurf_ruby/models/campaign/delete_program_resource_response.rbi +33 -0
- data/rbi/growsurf_ruby/models/campaign/integration.rbi +93 -0
- data/rbi/growsurf_ruby/models/campaign/integration_list_response.rbi +46 -0
- data/rbi/growsurf_ruby/models/campaign/participant_activation_analytics.rbi +133 -0
- data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -0
- data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +17 -23
- data/rbi/growsurf_ruby/models/campaign/participant_record_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbi +18 -0
- data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +7 -9
- data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +24 -6
- data/rbi/growsurf_ruby/models/campaign/program_resource.rbi +186 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_create_params.rbi +95 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_delete_params.rbi +37 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_list_response.rbi +29 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_update_params.rbi +105 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_result.rbi +94 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbi +57 -0
- data/rbi/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbi +53 -0
- data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +33 -24
- data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +33 -24
- data/rbi/growsurf_ruby/models/campaign.rbi +6 -3
- data/rbi/growsurf_ruby/models/campaign_activation_analytics_response.rbi +325 -0
- data/rbi/growsurf_ruby/models/campaign_create_params.rbi +91 -0
- data/rbi/growsurf_ruby/models/campaign_engagement_analytics.rbi +369 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbi +59 -0
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +56 -3
- data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +27 -7
- data/rbi/growsurf_ruby/models/commission_structure.rbi +3 -1
- data/rbi/growsurf_ruby/models/participant_commission_list.rbi +15 -15
- data/rbi/growsurf_ruby/models/participant_payout_list.rbi +15 -15
- data/rbi/growsurf_ruby/models.rbi +7 -0
- data/rbi/growsurf_ruby/resources/account.rbi +9 -6
- data/rbi/growsurf_ruby/resources/campaign/design.rbi +32 -4
- data/rbi/growsurf_ruby/resources/campaign/emails.rbi +2 -1
- data/rbi/growsurf_ruby/resources/campaign/integrations.rbi +35 -0
- data/rbi/growsurf_ruby/resources/campaign/participant.rbi +27 -18
- data/rbi/growsurf_ruby/resources/campaign/program_resources.rbi +116 -0
- data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +21 -16
- data/rbi/growsurf_ruby/resources/campaign.rbi +53 -5
- data/rbi/growsurf_ruby/resources/team.rbi +7 -5
- data/sig/growsurf_ruby/internal/type/base_model.rbs +6 -0
- data/sig/growsurf_ruby/internal/type/base_page.rbs +2 -0
- data/sig/growsurf_ruby/models/analytics_availability.rbs +15 -0
- data/sig/growsurf_ruby/models/analytics_unavailable_reason.rbs +26 -0
- data/sig/growsurf_ruby/models/campaign/delete_program_resource_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/integration.rbs +47 -0
- data/sig/growsurf_ruby/models/campaign/integration_list_response.rbs +20 -0
- data/sig/growsurf_ruby/models/campaign/participant_activation_analytics.rbs +96 -0
- data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +22 -1
- data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +17 -22
- data/sig/growsurf_ruby/models/campaign/participant_record_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_refund_transaction_params.rbs +15 -1
- data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +8 -10
- data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +22 -8
- data/sig/growsurf_ruby/models/campaign/program_resource.rbs +94 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_create_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_delete_params.rbs +22 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_list_response.rbs +14 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_update_params.rbs +48 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_result.rbs +58 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/program_resource_upload_ticket_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +34 -34
- data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +34 -34
- data/sig/growsurf_ruby/models/campaign.rbs +7 -5
- data/sig/growsurf_ruby/models/campaign_activation_analytics_response.rbs +202 -0
- data/sig/growsurf_ruby/models/campaign_create_params.rbs +29 -0
- data/sig/growsurf_ruby/models/campaign_engagement_analytics.rbs +186 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_activation_analytics_params.rbs +45 -0
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_params.rbs +30 -1
- data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +21 -3
- data/sig/growsurf_ruby/models/participant_commission_list.rbs +20 -20
- data/sig/growsurf_ruby/models/participant_payout_list.rbs +20 -20
- data/sig/growsurf_ruby/models.rbs +6 -0
- data/sig/growsurf_ruby/resources/campaign/design.rbs +19 -0
- data/sig/growsurf_ruby/resources/campaign/integrations.rbs +14 -0
- data/sig/growsurf_ruby/resources/campaign/participant.rbs +4 -0
- data/sig/growsurf_ruby/resources/campaign/program_resources.rbs +58 -0
- data/sig/growsurf_ruby/resources/campaign/rewards.rbs +12 -12
- data/sig/growsurf_ruby/resources/campaign.rbs +17 -0
- metadata +59 -2
|
@@ -32,6 +32,18 @@ module GrowsurfRuby
|
|
|
32
32
|
sig { returns(Integer) }
|
|
33
33
|
attr_accessor :start_date
|
|
34
34
|
|
|
35
|
+
sig do
|
|
36
|
+
returns(T.nilable(GrowsurfRuby::Models::CampaignEngagementAnalytics))
|
|
37
|
+
end
|
|
38
|
+
attr_reader :engagement
|
|
39
|
+
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
engagement: GrowsurfRuby::Models::CampaignEngagementAnalytics::OrHash
|
|
43
|
+
).void
|
|
44
|
+
end
|
|
45
|
+
attr_writer :engagement
|
|
46
|
+
|
|
35
47
|
# Present only when `include` contains `previousPeriod`.
|
|
36
48
|
sig do
|
|
37
49
|
returns(
|
|
@@ -115,6 +127,7 @@ module GrowsurfRuby
|
|
|
115
127
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Analytics::OrHash,
|
|
116
128
|
end_date: Integer,
|
|
117
129
|
start_date: Integer,
|
|
130
|
+
engagement: GrowsurfRuby::Models::CampaignEngagementAnalytics::OrHash,
|
|
118
131
|
previous_period:
|
|
119
132
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::PreviousPeriod::OrHash,
|
|
120
133
|
rates:
|
|
@@ -131,6 +144,8 @@ module GrowsurfRuby
|
|
|
131
144
|
analytics:,
|
|
132
145
|
end_date:,
|
|
133
146
|
start_date:,
|
|
147
|
+
# Present only when `include` contains `engagement`.
|
|
148
|
+
engagement: nil,
|
|
134
149
|
# Present only when `include` contains `previousPeriod`.
|
|
135
150
|
previous_period: nil,
|
|
136
151
|
# Present only when `include` contains `rates`.
|
|
@@ -150,6 +165,7 @@ module GrowsurfRuby
|
|
|
150
165
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::Analytics,
|
|
151
166
|
end_date: Integer,
|
|
152
167
|
start_date: Integer,
|
|
168
|
+
engagement: GrowsurfRuby::Models::CampaignEngagementAnalytics,
|
|
153
169
|
previous_period:
|
|
154
170
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsResponse::PreviousPeriod,
|
|
155
171
|
rates:
|
|
@@ -1386,16 +1402,20 @@ module GrowsurfRuby
|
|
|
1386
1402
|
|
|
1387
1403
|
# Reward counts grouped by review and fulfillment status.
|
|
1388
1404
|
sig do
|
|
1389
|
-
params(
|
|
1405
|
+
params(
|
|
1406
|
+
completed: Integer,
|
|
1407
|
+
unapproved: Integer,
|
|
1408
|
+
unfulfilled: Integer
|
|
1409
|
+
).returns(T.attached_class)
|
|
1390
1410
|
end
|
|
1391
|
-
def self.new(
|
|
1392
|
-
completed: nil,
|
|
1393
|
-
unapproved: nil,
|
|
1394
|
-
unfulfilled: nil
|
|
1395
|
-
)
|
|
1411
|
+
def self.new(completed: nil, unapproved: nil, unfulfilled: nil)
|
|
1396
1412
|
end
|
|
1397
1413
|
|
|
1398
|
-
sig
|
|
1414
|
+
sig do
|
|
1415
|
+
override.returns(
|
|
1416
|
+
{ completed: Integer, unapproved: Integer, unfulfilled: Integer }
|
|
1417
|
+
)
|
|
1418
|
+
end
|
|
1399
1419
|
def to_hash
|
|
1400
1420
|
end
|
|
1401
1421
|
end
|
|
@@ -26,7 +26,9 @@ module GrowsurfRuby
|
|
|
26
26
|
sig { returns(T.nilable(Integer)) }
|
|
27
27
|
attr_accessor :duration_in_months
|
|
28
28
|
|
|
29
|
-
# The event that generates a commission.
|
|
29
|
+
# The event that generates a commission. `CLICK` and `LEAD` require `FIXED` with
|
|
30
|
+
# a positive `amount`; `amountISO` defaults to the program currency when omitted.
|
|
31
|
+
# `SALE` supports `FIXED` or `PERCENT`. Missing legacy values read as `SALE`.
|
|
30
32
|
sig do
|
|
31
33
|
returns(
|
|
32
34
|
T.nilable(GrowsurfRuby::CommissionStructure::Event::TaggedSymbol)
|
|
@@ -99,7 +99,7 @@ module GrowsurfRuby
|
|
|
99
99
|
sig { returns(T.nilable(Integer)) }
|
|
100
100
|
attr_reader :approved_at
|
|
101
101
|
|
|
102
|
-
sig { params(approved_at: Integer).void }
|
|
102
|
+
sig { params(approved_at: T.nilable(Integer)).void }
|
|
103
103
|
attr_writer :approved_at
|
|
104
104
|
|
|
105
105
|
sig { returns(T.nilable(String)) }
|
|
@@ -111,7 +111,7 @@ module GrowsurfRuby
|
|
|
111
111
|
sig { returns(T.nilable(Integer)) }
|
|
112
112
|
attr_reader :exchange_rate_at
|
|
113
113
|
|
|
114
|
-
sig { params(exchange_rate_at: Integer).void }
|
|
114
|
+
sig { params(exchange_rate_at: T.nilable(Integer)).void }
|
|
115
115
|
attr_writer :exchange_rate_at
|
|
116
116
|
|
|
117
117
|
sig { returns(T.nilable(String)) }
|
|
@@ -123,13 +123,13 @@ module GrowsurfRuby
|
|
|
123
123
|
sig { returns(T.nilable(Integer)) }
|
|
124
124
|
attr_reader :paid_at
|
|
125
125
|
|
|
126
|
-
sig { params(paid_at: Integer).void }
|
|
126
|
+
sig { params(paid_at: T.nilable(Integer)).void }
|
|
127
127
|
attr_writer :paid_at
|
|
128
128
|
|
|
129
129
|
sig { returns(T.nilable(Integer)) }
|
|
130
130
|
attr_reader :payout_queued_at
|
|
131
131
|
|
|
132
|
-
sig { params(payout_queued_at: Integer).void }
|
|
132
|
+
sig { params(payout_queued_at: T.nilable(Integer)).void }
|
|
133
133
|
attr_writer :payout_queued_at
|
|
134
134
|
|
|
135
135
|
sig { returns(T.nilable(String)) }
|
|
@@ -138,7 +138,7 @@ module GrowsurfRuby
|
|
|
138
138
|
sig { returns(T.nilable(Integer)) }
|
|
139
139
|
attr_reader :reversed_at
|
|
140
140
|
|
|
141
|
-
sig { params(reversed_at: Integer).void }
|
|
141
|
+
sig { params(reversed_at: T.nilable(Integer)).void }
|
|
142
142
|
attr_writer :reversed_at
|
|
143
143
|
|
|
144
144
|
sig { returns(T.nilable(Integer)) }
|
|
@@ -158,16 +158,16 @@ module GrowsurfRuby
|
|
|
158
158
|
status:
|
|
159
159
|
GrowsurfRuby::ParticipantCommissionList::Commission::Status::OrSymbol,
|
|
160
160
|
amount_in_campaign_currency: T.nilable(Integer),
|
|
161
|
-
approved_at: Integer,
|
|
161
|
+
approved_at: T.nilable(Integer),
|
|
162
162
|
campaign_currency_iso: T.nilable(String),
|
|
163
163
|
exchange_rate: T.nilable(Float),
|
|
164
|
-
exchange_rate_at: Integer,
|
|
164
|
+
exchange_rate_at: T.nilable(Integer),
|
|
165
165
|
fx_error: T.nilable(String),
|
|
166
166
|
hold_duration: T.nilable(Integer),
|
|
167
|
-
paid_at: Integer,
|
|
168
|
-
payout_queued_at: Integer,
|
|
167
|
+
paid_at: T.nilable(Integer),
|
|
168
|
+
payout_queued_at: T.nilable(Integer),
|
|
169
169
|
provider: T.nilable(String),
|
|
170
|
-
reversed_at: Integer,
|
|
170
|
+
reversed_at: T.nilable(Integer),
|
|
171
171
|
sale_amount_in_campaign_currency: T.nilable(Integer)
|
|
172
172
|
).returns(T.attached_class)
|
|
173
173
|
end
|
|
@@ -212,16 +212,16 @@ module GrowsurfRuby
|
|
|
212
212
|
status:
|
|
213
213
|
GrowsurfRuby::ParticipantCommissionList::Commission::Status::TaggedSymbol,
|
|
214
214
|
amount_in_campaign_currency: T.nilable(Integer),
|
|
215
|
-
approved_at: Integer,
|
|
215
|
+
approved_at: T.nilable(Integer),
|
|
216
216
|
campaign_currency_iso: T.nilable(String),
|
|
217
217
|
exchange_rate: T.nilable(Float),
|
|
218
|
-
exchange_rate_at: Integer,
|
|
218
|
+
exchange_rate_at: T.nilable(Integer),
|
|
219
219
|
fx_error: T.nilable(String),
|
|
220
220
|
hold_duration: T.nilable(Integer),
|
|
221
|
-
paid_at: Integer,
|
|
222
|
-
payout_queued_at: Integer,
|
|
221
|
+
paid_at: T.nilable(Integer),
|
|
222
|
+
payout_queued_at: T.nilable(Integer),
|
|
223
223
|
provider: T.nilable(String),
|
|
224
|
-
reversed_at: Integer,
|
|
224
|
+
reversed_at: T.nilable(Integer),
|
|
225
225
|
sale_amount_in_campaign_currency: T.nilable(Integer)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
@@ -88,13 +88,13 @@ module GrowsurfRuby
|
|
|
88
88
|
sig { returns(T.nilable(Integer)) }
|
|
89
89
|
attr_reader :exchange_rate_at
|
|
90
90
|
|
|
91
|
-
sig { params(exchange_rate_at: Integer).void }
|
|
91
|
+
sig { params(exchange_rate_at: T.nilable(Integer)).void }
|
|
92
92
|
attr_writer :exchange_rate_at
|
|
93
93
|
|
|
94
94
|
sig { returns(T.nilable(Integer)) }
|
|
95
95
|
attr_reader :failed_at
|
|
96
96
|
|
|
97
|
-
sig { params(failed_at: Integer).void }
|
|
97
|
+
sig { params(failed_at: T.nilable(Integer)).void }
|
|
98
98
|
attr_writer :failed_at
|
|
99
99
|
|
|
100
100
|
sig { returns(T.nilable(String)) }
|
|
@@ -103,7 +103,7 @@ module GrowsurfRuby
|
|
|
103
103
|
sig { returns(T.nilable(Integer)) }
|
|
104
104
|
attr_reader :issued_at
|
|
105
105
|
|
|
106
|
-
sig { params(issued_at: Integer).void }
|
|
106
|
+
sig { params(issued_at: T.nilable(Integer)).void }
|
|
107
107
|
attr_writer :issued_at
|
|
108
108
|
|
|
109
109
|
sig { returns(T.nilable(String)) }
|
|
@@ -112,13 +112,13 @@ module GrowsurfRuby
|
|
|
112
112
|
sig { returns(T.nilable(Integer)) }
|
|
113
113
|
attr_reader :queued_at
|
|
114
114
|
|
|
115
|
-
sig { params(queued_at: Integer).void }
|
|
115
|
+
sig { params(queued_at: T.nilable(Integer)).void }
|
|
116
116
|
attr_writer :queued_at
|
|
117
117
|
|
|
118
118
|
sig { returns(T.nilable(Integer)) }
|
|
119
119
|
attr_reader :reversed_at
|
|
120
120
|
|
|
121
|
-
sig { params(reversed_at: Integer).void }
|
|
121
|
+
sig { params(reversed_at: T.nilable(Integer)).void }
|
|
122
122
|
attr_writer :reversed_at
|
|
123
123
|
|
|
124
124
|
sig do
|
|
@@ -134,13 +134,13 @@ module GrowsurfRuby
|
|
|
134
134
|
amount_in_campaign_currency: T.nilable(Integer),
|
|
135
135
|
campaign_currency_iso: T.nilable(String),
|
|
136
136
|
exchange_rate: T.nilable(Float),
|
|
137
|
-
exchange_rate_at: Integer,
|
|
138
|
-
failed_at: Integer,
|
|
137
|
+
exchange_rate_at: T.nilable(Integer),
|
|
138
|
+
failed_at: T.nilable(Integer),
|
|
139
139
|
fx_error: T.nilable(String),
|
|
140
|
-
issued_at: Integer,
|
|
140
|
+
issued_at: T.nilable(Integer),
|
|
141
141
|
provider: T.nilable(String),
|
|
142
|
-
queued_at: Integer,
|
|
143
|
-
reversed_at: Integer
|
|
142
|
+
queued_at: T.nilable(Integer),
|
|
143
|
+
reversed_at: T.nilable(Integer)
|
|
144
144
|
).returns(T.attached_class)
|
|
145
145
|
end
|
|
146
146
|
def self.new(
|
|
@@ -178,13 +178,13 @@ module GrowsurfRuby
|
|
|
178
178
|
amount_in_campaign_currency: T.nilable(Integer),
|
|
179
179
|
campaign_currency_iso: T.nilable(String),
|
|
180
180
|
exchange_rate: T.nilable(Float),
|
|
181
|
-
exchange_rate_at: Integer,
|
|
182
|
-
failed_at: Integer,
|
|
181
|
+
exchange_rate_at: T.nilable(Integer),
|
|
182
|
+
failed_at: T.nilable(Integer),
|
|
183
183
|
fx_error: T.nilable(String),
|
|
184
|
-
issued_at: Integer,
|
|
184
|
+
issued_at: T.nilable(Integer),
|
|
185
185
|
provider: T.nilable(String),
|
|
186
|
-
queued_at: Integer,
|
|
187
|
-
reversed_at: Integer
|
|
186
|
+
queued_at: T.nilable(Integer),
|
|
187
|
+
reversed_at: T.nilable(Integer)
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
end
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
module GrowsurfRuby
|
|
4
4
|
AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
|
|
5
5
|
|
|
6
|
+
AnalyticsAvailability = GrowsurfRuby::Models::AnalyticsAvailability
|
|
7
|
+
|
|
8
|
+
AnalyticsUnavailableReason = GrowsurfRuby::Models::AnalyticsUnavailableReason
|
|
9
|
+
|
|
6
10
|
AffiliateApplication = GrowsurfRuby::Models::AffiliateApplication
|
|
7
11
|
|
|
8
12
|
AffiliateInvite = GrowsurfRuby::Models::AffiliateInvite
|
|
@@ -51,6 +55,9 @@ module GrowsurfRuby
|
|
|
51
55
|
CampaignRetrieveAffiliateApplicationParams =
|
|
52
56
|
GrowsurfRuby::Models::CampaignRetrieveAffiliateApplicationParams
|
|
53
57
|
|
|
58
|
+
CampaignRetrieveActivationAnalyticsParams =
|
|
59
|
+
GrowsurfRuby::Models::CampaignRetrieveActivationAnalyticsParams
|
|
60
|
+
|
|
54
61
|
CampaignRetrieveAnalyticsParams =
|
|
55
62
|
GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams
|
|
56
63
|
|
|
@@ -4,8 +4,13 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Account
|
|
6
6
|
# Creates a new GrowSurf account. This is the only endpoint that does not require
|
|
7
|
-
# an API key.
|
|
8
|
-
#
|
|
7
|
+
# an API key. Before calling it, an authorized account owner must review and
|
|
8
|
+
# approve GrowSurf's [Terms of Service](https://growsurf.com/terms) and [Privacy
|
|
9
|
+
# Policy](https://growsurf.com/privacy). The account starts a 14-day Business
|
|
10
|
+
# trial without a credit card. The response includes an API key for the new
|
|
11
|
+
# account, shown once in the response. The key is a secret: store it in a secret
|
|
12
|
+
# manager and do not put it in logs, screenshots, URLs, model context, analytics,
|
|
13
|
+
# or generated output. The key is locked until the team owner's email address is
|
|
9
14
|
# verified: authenticated program and resource endpoints return a `403` with error
|
|
10
15
|
# code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
|
|
11
16
|
# /team/owner/verification-email`, then retry). A welcome email is sent to the
|
|
@@ -13,10 +18,8 @@ module GrowsurfRuby
|
|
|
13
18
|
# Accounts whose email is never verified are deleted automatically after 7 days.
|
|
14
19
|
# For security, the API key is rotated the first time the account owner signs in
|
|
15
20
|
# to the GrowSurf dashboard. Some actions (such as emailing participants)
|
|
16
|
-
# additionally require GrowSurf to verify the team first.
|
|
17
|
-
#
|
|
18
|
-
# Service](https://growsurf.com/terms) and [Privacy
|
|
19
|
-
# Policy](https://growsurf.com/privacy).
|
|
21
|
+
# additionally require GrowSurf to verify the team first. Calling this endpoint
|
|
22
|
+
# accepts those policies on the account holder's behalf.
|
|
20
23
|
sig do
|
|
21
24
|
params(
|
|
22
25
|
email: String,
|
|
@@ -4,10 +4,37 @@ module GrowsurfRuby
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Campaign
|
|
6
6
|
class Design
|
|
7
|
+
# Icon configuration for the participant Resources destination.
|
|
8
|
+
ResourcesIcon = T.type_alias do
|
|
9
|
+
{
|
|
10
|
+
type: T.nilable(T.any(String, Symbol)),
|
|
11
|
+
imageUrl: T.nilable(String)
|
|
12
|
+
}
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Participant presentation settings for Resources. Each label is limited to 100
|
|
16
|
+
# characters; imageUrl is limited to 500. Resource items use Program Resources operations.
|
|
17
|
+
Resources = T.type_alias do
|
|
18
|
+
{
|
|
19
|
+
isPublicDisplayed: T.nilable(T::Boolean),
|
|
20
|
+
title: T.nilable(String),
|
|
21
|
+
viewResourcesLinkText: T.nilable(String),
|
|
22
|
+
backLinkText: T.nilable(String),
|
|
23
|
+
copyButtonText: T.nilable(String),
|
|
24
|
+
copiedText: T.nilable(String),
|
|
25
|
+
emptyState: T.nilable(String),
|
|
26
|
+
icon: T.nilable(ResourcesIcon)
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
7
30
|
# Retrieves a program's design configuration — the same surface as the dashboard
|
|
8
31
|
# Program Editor's **Design** tab: the GrowSurf window layout, header, share
|
|
9
|
-
# channels + invite, signup form, portal/landing pages, theme styling, and the
|
|
10
|
-
# referral/affiliate summary + status sections.
|
|
32
|
+
# channels + invite, signup form, Resources presentation, portal/landing pages, theme styling, and the
|
|
33
|
+
# referral/affiliate summary + status sections. `referredExperience` includes the Claim
|
|
34
|
+
# Offer Popup for both program types, with its colors under
|
|
35
|
+
# `theme.referredExperienceOfferPopup`.
|
|
36
|
+
# `participantAvatarStyle` is `CHARACTERS`, `INITIALS`, `ANIMALS`, or `GRADIENT`; missing or
|
|
37
|
+
# unknown values mean `INITIALS`.
|
|
11
38
|
# `payoutDestinationConfirmation` is omitted when no confirmation fields are stored. Stored
|
|
12
39
|
# `null` fields are returned as `null`; omitted and `null` fields use localized defaults.
|
|
13
40
|
sig do
|
|
@@ -24,7 +51,7 @@ module GrowsurfRuby
|
|
|
24
51
|
end
|
|
25
52
|
|
|
26
53
|
# Updates a program's design configuration, including the payout-destination confirmation
|
|
27
|
-
# page copy
|
|
54
|
+
# page copy and the Claim Offer Popup under `referredExperience`. Only the fields you send are
|
|
28
55
|
# changed; anything you leave out is untouched (arrays such as `signup.fields` replace
|
|
29
56
|
# wholesale). Unknown fields, fields not available for the program type, and invalid
|
|
30
57
|
# values return a `400`. Landing-page custom code and JavaScript are not editable via the
|
|
@@ -39,7 +66,8 @@ module GrowsurfRuby
|
|
|
39
66
|
def update(
|
|
40
67
|
# GrowSurf program ID.
|
|
41
68
|
id,
|
|
42
|
-
# Partial design configuration to merge.
|
|
69
|
+
# Partial design configuration to merge. `resources` accepts visibility, title,
|
|
70
|
+
# list/back/copy labels, and an icon with type `DEFAULT`, `IMAGE`, or `NONE`.
|
|
43
71
|
body,
|
|
44
72
|
request_options: {}
|
|
45
73
|
)
|
|
@@ -8,7 +8,8 @@ module GrowsurfRuby
|
|
|
8
8
|
# Program Editor's **Emails** tab. Returns each editable email template
|
|
9
9
|
# (`subject`, `preheader`, `body`, `isEnabled`) plus the `settings` block (sender,
|
|
10
10
|
# contact, and design). The set of email templates returned depends on the program
|
|
11
|
-
# type (referral vs affiliate).
|
|
11
|
+
# type (referral vs affiliate). `offerClaimed` is available to both program types and sends
|
|
12
|
+
# while the Claim Offer Popup is enabled.
|
|
12
13
|
sig do
|
|
13
14
|
params(
|
|
14
15
|
id: String,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Resources
|
|
5
|
+
class Campaign
|
|
6
|
+
class Integrations
|
|
7
|
+
# Lists every integration this program can connect, each with its current state.
|
|
8
|
+
# Integrations that do not apply to the program type are omitted (for example,
|
|
9
|
+
# Wise on a referral program). Read-only: connecting an integration is an OAuth or
|
|
10
|
+
# credential handshake completed in the GrowSurf dashboard, so it cannot be done
|
|
11
|
+
# over the API. `connected` means credentials are stored, `enabled` means the
|
|
12
|
+
# integration is switched on and working, and `autoDisabled` means GrowSurf
|
|
13
|
+
# switched it off after repeated delivery failures — its credentials are still
|
|
14
|
+
# stored, but it delivers nothing until it is reconnected in the dashboard.
|
|
15
|
+
sig do
|
|
16
|
+
params(
|
|
17
|
+
id: String,
|
|
18
|
+
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
19
|
+
).returns(GrowsurfRuby::Models::Campaign::IntegrationListResponse)
|
|
20
|
+
end
|
|
21
|
+
def list(
|
|
22
|
+
# GrowSurf program ID.
|
|
23
|
+
id,
|
|
24
|
+
request_options: {}
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# @api private
|
|
29
|
+
sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
|
|
30
|
+
def self.new(client:)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -13,7 +13,7 @@ module GrowsurfRuby
|
|
|
13
13
|
).returns(GrowsurfRuby::Campaign::CampaignParticipant)
|
|
14
14
|
end
|
|
15
15
|
def retrieve(
|
|
16
|
-
# GrowSurf participant ID or
|
|
16
|
+
# GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
17
17
|
participant_id_or_email,
|
|
18
18
|
# GrowSurf program ID.
|
|
19
19
|
id:,
|
|
@@ -46,7 +46,7 @@ module GrowsurfRuby
|
|
|
46
46
|
).returns(GrowsurfRuby::Campaign::CampaignParticipant)
|
|
47
47
|
end
|
|
48
48
|
def update(
|
|
49
|
-
# Path param: GrowSurf participant ID or
|
|
49
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
50
50
|
participant_id_or_email,
|
|
51
51
|
# Path param: GrowSurf program ID.
|
|
52
52
|
id:,
|
|
@@ -86,7 +86,7 @@ module GrowsurfRuby
|
|
|
86
86
|
).returns(GrowsurfRuby::Models::Campaign::ParticipantDeleteResponse)
|
|
87
87
|
end
|
|
88
88
|
def delete(
|
|
89
|
-
# GrowSurf participant ID or
|
|
89
|
+
# GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
90
90
|
participant_id_or_email,
|
|
91
91
|
# GrowSurf program ID.
|
|
92
92
|
id:,
|
|
@@ -189,7 +189,7 @@ module GrowsurfRuby
|
|
|
189
189
|
).returns(GrowsurfRuby::ParticipantCommissionList)
|
|
190
190
|
end
|
|
191
191
|
def list_commissions(
|
|
192
|
-
# Path param: GrowSurf participant ID or
|
|
192
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
193
193
|
participant_id_or_email,
|
|
194
194
|
# Path param: GrowSurf program ID.
|
|
195
195
|
id:,
|
|
@@ -217,7 +217,7 @@ module GrowsurfRuby
|
|
|
217
217
|
).returns(GrowsurfRuby::ParticipantPayoutList)
|
|
218
218
|
end
|
|
219
219
|
def list_payouts(
|
|
220
|
-
# Path param: GrowSurf participant ID or
|
|
220
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
221
221
|
participant_id_or_email,
|
|
222
222
|
# Path param: GrowSurf program ID.
|
|
223
223
|
id:,
|
|
@@ -250,7 +250,7 @@ module GrowsurfRuby
|
|
|
250
250
|
).returns(GrowsurfRuby::ReferralList)
|
|
251
251
|
end
|
|
252
252
|
def list_referrals(
|
|
253
|
-
# Path param: GrowSurf participant ID or
|
|
253
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
254
254
|
participant_id_or_email,
|
|
255
255
|
# Path param: GrowSurf program ID.
|
|
256
256
|
id:,
|
|
@@ -289,7 +289,7 @@ module GrowsurfRuby
|
|
|
289
289
|
)
|
|
290
290
|
end
|
|
291
291
|
def list_rewards(
|
|
292
|
-
# Path param: GrowSurf participant ID or
|
|
292
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
293
293
|
participant_id_or_email,
|
|
294
294
|
# Path param: GrowSurf program ID.
|
|
295
295
|
id:,
|
|
@@ -334,13 +334,15 @@ module GrowsurfRuby
|
|
|
334
334
|
total_tax_amounts: T::Array[T::Hash[Symbol, T.anything]],
|
|
335
335
|
total_taxes: T::Array[T::Hash[Symbol, T.anything]],
|
|
336
336
|
transaction_id: String,
|
|
337
|
+
payment_provider: String,
|
|
338
|
+
test_mode: T::Boolean,
|
|
337
339
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
338
340
|
).returns(
|
|
339
341
|
GrowsurfRuby::Models::Campaign::ParticipantRecordTransactionResponse::Variants
|
|
340
342
|
)
|
|
341
343
|
end
|
|
342
344
|
def record_transaction(
|
|
343
|
-
# Path param: GrowSurf participant ID or
|
|
345
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
344
346
|
participant_id_or_email,
|
|
345
347
|
# Path param: GrowSurf program ID.
|
|
346
348
|
id:,
|
|
@@ -390,6 +392,8 @@ module GrowsurfRuby
|
|
|
390
392
|
total_taxes: nil,
|
|
391
393
|
# Body param
|
|
392
394
|
transaction_id: nil,
|
|
395
|
+
payment_provider: nil,
|
|
396
|
+
test_mode: nil,
|
|
393
397
|
request_options: {}
|
|
394
398
|
)
|
|
395
399
|
end
|
|
@@ -399,7 +403,8 @@ module GrowsurfRuby
|
|
|
399
403
|
# and reverses or adjusts the referrer's commission. The inverse of Record
|
|
400
404
|
# Affiliate Transaction. Identify the original transaction with the same
|
|
401
405
|
# identifier(s) you sent when recording it. Commissions already paid out to the
|
|
402
|
-
# affiliate are not clawed back
|
|
406
|
+
# affiliate are not clawed back. The amendment still updates the sale revenue used
|
|
407
|
+
# in program reporting; full refunds and chargebacks also update tax reporting.
|
|
403
408
|
sig do
|
|
404
409
|
params(
|
|
405
410
|
participant_id_or_email: String,
|
|
@@ -420,13 +425,15 @@ module GrowsurfRuby
|
|
|
420
425
|
refund_id: String,
|
|
421
426
|
refund_status: String,
|
|
422
427
|
transaction_id: String,
|
|
428
|
+
payment_provider: String,
|
|
429
|
+
test_mode: T::Boolean,
|
|
423
430
|
request_options: GrowsurfRuby::RequestOptions::OrHash
|
|
424
431
|
).returns(
|
|
425
432
|
GrowsurfRuby::Models::Campaign::ParticipantRefundTransactionResponse
|
|
426
433
|
)
|
|
427
434
|
end
|
|
428
435
|
def refund_transaction(
|
|
429
|
-
# Path param: GrowSurf participant ID or
|
|
436
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
430
437
|
participant_id_or_email,
|
|
431
438
|
# Path param: GrowSurf program ID.
|
|
432
439
|
id:,
|
|
@@ -460,6 +467,8 @@ module GrowsurfRuby
|
|
|
460
467
|
refund_status: nil,
|
|
461
468
|
# Body param
|
|
462
469
|
transaction_id: nil,
|
|
470
|
+
payment_provider: nil,
|
|
471
|
+
test_mode: nil,
|
|
463
472
|
request_options: {}
|
|
464
473
|
)
|
|
465
474
|
end
|
|
@@ -480,7 +489,7 @@ module GrowsurfRuby
|
|
|
480
489
|
)
|
|
481
490
|
end
|
|
482
491
|
def send_invites(
|
|
483
|
-
# Path param: GrowSurf participant ID or
|
|
492
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
484
493
|
participant_id_or_email,
|
|
485
494
|
# Path param: GrowSurf program ID.
|
|
486
495
|
id:,
|
|
@@ -510,7 +519,7 @@ module GrowsurfRuby
|
|
|
510
519
|
)
|
|
511
520
|
end
|
|
512
521
|
def trigger_referral(
|
|
513
|
-
# Path param: GrowSurf participant ID or
|
|
522
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
514
523
|
participant_id_or_email,
|
|
515
524
|
# Path param: GrowSurf program ID.
|
|
516
525
|
id:,
|
|
@@ -539,7 +548,7 @@ module GrowsurfRuby
|
|
|
539
548
|
)
|
|
540
549
|
end
|
|
541
550
|
def cancel_delayed_referral(
|
|
542
|
-
# GrowSurf participant ID or
|
|
551
|
+
# GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
543
552
|
participant_id_or_email,
|
|
544
553
|
# GrowSurf program ID.
|
|
545
554
|
id:,
|
|
@@ -567,7 +576,7 @@ module GrowsurfRuby
|
|
|
567
576
|
).returns(GrowsurfRuby::Models::Campaign::ParticipantEmailResponse)
|
|
568
577
|
end
|
|
569
578
|
def email(
|
|
570
|
-
# Path param: GrowSurf participant ID or
|
|
579
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
571
580
|
participant_id_or_email,
|
|
572
581
|
# Path param: GrowSurf program ID.
|
|
573
582
|
id:,
|
|
@@ -609,7 +618,7 @@ module GrowsurfRuby
|
|
|
609
618
|
)
|
|
610
619
|
end
|
|
611
620
|
def list_activity_logs(
|
|
612
|
-
# Path param: GrowSurf participant ID or
|
|
621
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
613
622
|
participant_id_or_email,
|
|
614
623
|
# Path param: GrowSurf program ID.
|
|
615
624
|
id:,
|
|
@@ -645,7 +654,7 @@ module GrowsurfRuby
|
|
|
645
654
|
)
|
|
646
655
|
end
|
|
647
656
|
def retrieve_analytics(
|
|
648
|
-
# GrowSurf participant ID or
|
|
657
|
+
# GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
649
658
|
participant_id_or_email,
|
|
650
659
|
# GrowSurf program ID.
|
|
651
660
|
id:,
|
|
@@ -690,7 +699,7 @@ module GrowsurfRuby
|
|
|
690
699
|
)
|
|
691
700
|
end
|
|
692
701
|
def get_payout_destination(
|
|
693
|
-
# GrowSurf participant ID or
|
|
702
|
+
# GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
694
703
|
participant_id_or_email,
|
|
695
704
|
# GrowSurf program ID.
|
|
696
705
|
id:,
|
|
@@ -714,7 +723,7 @@ module GrowsurfRuby
|
|
|
714
723
|
)
|
|
715
724
|
end
|
|
716
725
|
def request_payout_destination_confirmation(
|
|
717
|
-
# Path param: GrowSurf participant ID or
|
|
726
|
+
# Path param: GrowSurf participant ID or unencoded participant email address (the SDK encodes it automatically).
|
|
718
727
|
participant_id_or_email,
|
|
719
728
|
# Path param: GrowSurf program ID.
|
|
720
729
|
id:,
|