growsurf-ruby 1.20.1 → 1.21.1
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 +1 -1
- data/lib/growsurf_ruby/internal/type/array_of.rb +4 -0
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 520daf4acec5f87016ba10fe9a5062e7e690e86f38da3f9d5586b614405e39c5
|
|
4
|
+
data.tar.gz: 903970c1d39f6cc9787d61b653932907692b3a3ca8a56eeac684c3f6b7a26055
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e63ebf55005c9d51389c8572fb955c50532fe991565e77e67e0b15e45299bef474d5ea4571b43ffdedef89f96827a4f6c0613ec536de704f1357bf4f0e4ad08
|
|
7
|
+
data.tar.gz: e081b6aeb9d254cd63861fa1d2f8926892d580b9395084b00d95b8c2e1a87364329f3cab687c8a007e5eeefadbac4ff4ec7daa06b3753c05126e398d5fd0790e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.1](https://github.com/growsurf/growsurf-ruby/compare/v1.21.0...v1.21.1) (2026-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* send enumerator and set array params as arrays ([53abd3d](https://github.com/growsurf/growsurf-ruby/commit/53abd3d152a8a45b035ea7eb2c9244c1695ddb0a))
|
|
9
|
+
* send enumerator and set array params as arrays ([d2b77fc](https://github.com/growsurf/growsurf-ruby/commit/d2b77fce1138a2fdd8441ea7564354158415ee45))
|
|
10
|
+
|
|
11
|
+
## [1.21.0](https://github.com/growsurf/growsurf-ruby/compare/v1.20.1...v1.21.0) (2026-11-18)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add reward groups and participant bulk move ([45ebfcf](https://github.com/growsurf/growsurf-ruby/commit/45ebfcf5160fcb5a35c73e8a77655eda42ecc39f))
|
|
17
|
+
* **api:** add payout attention and invite message; align group wording ([c945457](https://github.com/growsurf/growsurf-ruby/commit/c945457ee09ff72129ca8bed7a3148582413ca3f))
|
|
18
|
+
* **api:** sync REST v2 docs and types ([8752c45](https://github.com/growsurf/growsurf-ruby/commit/8752c45b5f2c7d901a0233b6cc480e8720213252))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
* align group creation and webhook event contracts ([ae2edbe](https://github.com/growsurf/growsurf-ruby/commit/ae2edbe972b87f9697ceff20cbbcdb8424193479))
|
|
24
|
+
|
|
3
25
|
## [1.20.1](https://github.com/growsurf/growsurf-ruby/compare/v1.20.0...v1.20.1) (2026-11-08)
|
|
4
26
|
|
|
5
27
|
|
data/README.md
CHANGED
|
@@ -107,6 +107,10 @@ module GrowsurfRuby
|
|
|
107
107
|
# @return [Array<Object>, Object]
|
|
108
108
|
def dump(value, state:)
|
|
109
109
|
target = item_type
|
|
110
|
+
# Enumerators (including lazy ones) and sets are not Arrays, and would
|
|
111
|
+
# otherwise be serialized as their `#to_s` text. Other Enumerables, such
|
|
112
|
+
# as Hash and IO, must stay unchanged.
|
|
113
|
+
value = value.to_a if value.is_a?(Enumerator) || value.is_a?(Set)
|
|
110
114
|
if value.is_a?(Array)
|
|
111
115
|
value.map do
|
|
112
116
|
GrowsurfRuby::Internal::Type::Converter.dump(target, _1, state: state)
|
|
@@ -19,6 +19,16 @@ module GrowsurfRuby
|
|
|
19
19
|
# @return [String, nil]
|
|
20
20
|
optional :first_name, String, api_name: :firstName
|
|
21
21
|
|
|
22
|
+
# @!attribute group_id
|
|
23
|
+
# Places the new participant in this group (`grp_…`), or in Default with `null`.
|
|
24
|
+
# This is a manual placement, so the groups' email and domain rules do not apply
|
|
25
|
+
# to them. Applied only when this request creates the participant; to move an
|
|
26
|
+
# existing participant, use Update participant. An ID that is not a group in this
|
|
27
|
+
# program returns `400` and adds no one.
|
|
28
|
+
#
|
|
29
|
+
# @return [String, nil]
|
|
30
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
31
|
+
|
|
22
32
|
# @!attribute ip_address
|
|
23
33
|
#
|
|
24
34
|
# @return [String, nil]
|
|
@@ -88,7 +98,7 @@ module GrowsurfRuby
|
|
|
88
98
|
# @return [String, nil]
|
|
89
99
|
optional :referred_by, String, api_name: :referredBy
|
|
90
100
|
|
|
91
|
-
# @!method initialize(email:, fingerprint: nil, first_name: nil, ip_address: nil, is_affiliate: nil, language: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_at: nil, referred_by: nil)
|
|
101
|
+
# @!method initialize(email:, fingerprint: nil, first_name: nil, group_id: nil, ip_address: nil, is_affiliate: nil, language: nil, last_name: nil, metadata: nil, mobile_instance_id: nil, referral_status: nil, referred_at: nil, referred_by: nil)
|
|
92
102
|
# Some parameter documentations has been truncated, see
|
|
93
103
|
# {GrowsurfRuby::Models::Campaign::Create} for more details.
|
|
94
104
|
#
|
|
@@ -98,6 +108,8 @@ module GrowsurfRuby
|
|
|
98
108
|
#
|
|
99
109
|
# @param first_name [String]
|
|
100
110
|
#
|
|
111
|
+
# @param group_id [String, nil]
|
|
112
|
+
#
|
|
101
113
|
# @param ip_address [String]
|
|
102
114
|
#
|
|
103
115
|
# @param is_affiliate [Boolean] Affiliate programs only. Controls affiliate enrollment for a new participant.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class DeleteRewardGroupResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
# The deleted group ID.
|
|
8
|
+
required :id, String
|
|
9
|
+
# The number of members moved to Default.
|
|
10
|
+
required :moved_to_default, Integer, api_name: :movedToDefault
|
|
11
|
+
# Whether the group was deleted.
|
|
12
|
+
required :success, GrowsurfRuby::Internal::Type::Boolean
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -98,6 +98,23 @@ module GrowsurfRuby
|
|
|
98
98
|
},
|
|
99
99
|
api_name: :fraudRiskLevel
|
|
100
100
|
|
|
101
|
+
# @!attribute group_id
|
|
102
|
+
# The participant's group (`grp_…`), or `null` for Default. Their new
|
|
103
|
+
# referrals earn this group's rewards.
|
|
104
|
+
#
|
|
105
|
+
# @return [String, nil]
|
|
106
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
107
|
+
|
|
108
|
+
# @!attribute group_source
|
|
109
|
+
# How the participant got into their group. `null` when no group placement was
|
|
110
|
+
# ever made.
|
|
111
|
+
#
|
|
112
|
+
# @return [Symbol, GrowsurfRuby::Models::Campaign::RewardGroupSource, nil]
|
|
113
|
+
optional :group_source,
|
|
114
|
+
enum: -> { GrowsurfRuby::Campaign::RewardGroupSource },
|
|
115
|
+
api_name: :groupSource,
|
|
116
|
+
nil?: true
|
|
117
|
+
|
|
101
118
|
# @!attribute impression_count
|
|
102
119
|
#
|
|
103
120
|
# @return [Integer, nil]
|
|
@@ -272,7 +289,7 @@ module GrowsurfRuby
|
|
|
272
289
|
# @return [Array<String>, nil]
|
|
273
290
|
optional :vanity_keys, GrowsurfRuby::Internal::Type::ArrayOf[String], api_name: :vanityKeys
|
|
274
291
|
|
|
275
|
-
# @!method initialize(id:, email:, monthly_rank:, monthly_referral_count:, rank:, referral_count:, rewards:, share_url: nil, affiliate_enrollment_source: nil, affiliate_status: nil, all_matching_fraudsters: nil, created_at: nil, fingerprint: nil, first_name: nil, fraud_reason_code: nil, fraud_risk_level: nil, impression_count: nil, invite_count: nil, ip_address: nil, is_affiliate: nil, is_new: nil, is_winner: nil, language: nil, last_name: nil, lead_count: nil, metadata: nil, mobile_instance_id: nil, monthly_referrals: nil, notes: nil, payout_settings: nil, paypal_email_address: nil, prev_monthly_rank: nil, prev_monthly_referral_count: nil, referral_lead_qualified_at: nil, referrals: nil, referral_source: nil, referral_status: nil, referred_by: nil, referrer: nil, share_count: nil, unique_impression_count: nil, unread_commissions_count: nil, unread_payouts_count: nil, unsubscribed: nil, vanity_keys: nil)
|
|
292
|
+
# @!method initialize(id:, email:, monthly_rank:, monthly_referral_count:, rank:, referral_count:, rewards:, share_url: nil, affiliate_enrollment_source: nil, affiliate_status: nil, all_matching_fraudsters: nil, created_at: nil, fingerprint: nil, first_name: nil, fraud_reason_code: nil, fraud_risk_level: nil, group_id: nil, group_source: nil, impression_count: nil, invite_count: nil, ip_address: nil, is_affiliate: nil, is_new: nil, is_winner: nil, language: nil, last_name: nil, lead_count: nil, metadata: nil, mobile_instance_id: nil, monthly_referrals: nil, notes: nil, payout_settings: nil, paypal_email_address: nil, prev_monthly_rank: nil, prev_monthly_referral_count: nil, referral_lead_qualified_at: nil, referrals: nil, referral_source: nil, referral_status: nil, referred_by: nil, referrer: nil, share_count: nil, unique_impression_count: nil, unread_commissions_count: nil, unread_payouts_count: nil, unsubscribed: nil, vanity_keys: nil)
|
|
276
293
|
# Some parameter documentations has been truncated, see
|
|
277
294
|
# {GrowsurfRuby::Models::Campaign::CampaignParticipant} for more details.
|
|
278
295
|
#
|
|
@@ -309,6 +326,10 @@ module GrowsurfRuby
|
|
|
309
326
|
#
|
|
310
327
|
# @param fraud_risk_level [Symbol, GrowsurfRuby::Models::Campaign::FraudRiskLevel]
|
|
311
328
|
#
|
|
329
|
+
# @param group_id [String, nil] The participant's group (`grp_…`), or `null` for Default.
|
|
330
|
+
#
|
|
331
|
+
# @param group_source [Symbol, GrowsurfRuby::Models::Campaign::RewardGroupSource, nil] How the participant got into their group.
|
|
332
|
+
#
|
|
312
333
|
# @param impression_count [Integer]
|
|
313
334
|
#
|
|
314
335
|
# @param invite_count [Integer]
|
|
@@ -68,7 +68,7 @@ module GrowsurfRuby
|
|
|
68
68
|
# The resolved participant's email address. Present on `DELETED` rows.
|
|
69
69
|
#
|
|
70
70
|
# @return [String, nil]
|
|
71
|
-
optional :email, String
|
|
71
|
+
optional :email, String, nil?: true
|
|
72
72
|
|
|
73
73
|
# @!attribute message
|
|
74
74
|
# Human-readable detail for `NOT_FOUND`, `DUPLICATE`, and `ERROR` rows.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Participant#bulk_move
|
|
7
|
+
class ParticipantBulkMoveParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
required :id, String
|
|
12
|
+
# GrowSurf participant IDs and/or email addresses to move. Mixed entries are
|
|
13
|
+
# allowed. 1 to 200 entries.
|
|
14
|
+
required :participants, GrowsurfRuby::Internal::Type::ArrayOf[String]
|
|
15
|
+
# The group to move them to (`grp_…`), or `nil` for Default.
|
|
16
|
+
required :group_id, String, api_name: :groupId, nil?: true
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# @see GrowsurfRuby::Resources::Campaign::Participant#bulk_move
|
|
7
|
+
class ParticipantBulkMoveResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# One entry per submitted identifier, in the same order as the request.
|
|
9
|
+
required :results, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::ParticipantBulkMoveResponse::Result] }
|
|
10
|
+
required :summary, -> { GrowsurfRuby::Campaign::ParticipantBulkMoveResponse::Summary }
|
|
11
|
+
|
|
12
|
+
class Result < GrowsurfRuby::Internal::Type::BaseModel
|
|
13
|
+
# The submitted participant ID or email address, echoed back as received.
|
|
14
|
+
required :identifier, String
|
|
15
|
+
# Zero-based position of this entry in the submitted `participants` array.
|
|
16
|
+
required :index, Integer
|
|
17
|
+
# Per-row outcome. `MOVED` — the participant was resolved and is now in the
|
|
18
|
+
# target group. `NOT_FOUND` — no participant matches the ID or email.
|
|
19
|
+
# `DUPLICATE` — the entry resolves to the same participant as an earlier entry
|
|
20
|
+
# in the same request. `ERROR` — the lookup failed for this row.
|
|
21
|
+
required :status, enum: -> { GrowsurfRuby::Campaign::ParticipantBulkMoveResponse::Result::Status }
|
|
22
|
+
# The resolved participant's email address. Present on `MOVED` rows.
|
|
23
|
+
optional :email, String, nil?: true
|
|
24
|
+
# Human-readable detail for `NOT_FOUND`, `DUPLICATE`, and `ERROR` rows.
|
|
25
|
+
optional :message, String
|
|
26
|
+
# The resolved GrowSurf participant ID. Present when the entry resolved to a
|
|
27
|
+
# participant.
|
|
28
|
+
optional :participant_id, String, api_name: :participantId
|
|
29
|
+
|
|
30
|
+
module Status
|
|
31
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
32
|
+
|
|
33
|
+
MOVED = :MOVED
|
|
34
|
+
NOT_FOUND = :NOT_FOUND
|
|
35
|
+
DUPLICATE = :DUPLICATE
|
|
36
|
+
ERROR = :ERROR
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
class Summary < GrowsurfRuby::Internal::Type::BaseModel
|
|
41
|
+
# Entries that resolved to the same participant as an earlier entry.
|
|
42
|
+
required :duplicate_count, Integer, api_name: :duplicateCount
|
|
43
|
+
# Entries that failed to look up.
|
|
44
|
+
required :error_count, Integer, api_name: :errorCount
|
|
45
|
+
# The target group, or `nil` for Default.
|
|
46
|
+
required :group_id, String, api_name: :groupId, nil?: true
|
|
47
|
+
# Entries that resolved to a participant and were moved.
|
|
48
|
+
required :moved_count, Integer, api_name: :movedCount
|
|
49
|
+
# Entries that did not match any participant.
|
|
50
|
+
required :not_found_count, Integer, api_name: :notFoundCount
|
|
51
|
+
# The number of submitted entries.
|
|
52
|
+
required :total, Integer
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -19,7 +19,7 @@ module GrowsurfRuby
|
|
|
19
19
|
required :participant_id_or_email, String
|
|
20
20
|
|
|
21
21
|
# @!attribute body
|
|
22
|
-
# HTML body for a free-form email. You can personalize it with dynamic text,
|
|
22
|
+
# 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,
|
|
23
23
|
# inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See
|
|
24
24
|
# [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
25
25
|
#
|
|
@@ -67,7 +67,7 @@ module GrowsurfRuby
|
|
|
67
67
|
#
|
|
68
68
|
# @param participant_id_or_email [String]
|
|
69
69
|
#
|
|
70
|
-
# @param body [String] HTML body for a free-form email. You can personalize it with dynamic text, inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
70
|
+
# @param body [String] 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, inserting `{{...}}` tokens like `{{firstName}}` or `{{shareUrl}}`. See [Guide to using dynamic text in GrowSurf emails](https://support.growsurf.com/article/213-guide-to-using-dynamic-text-in-growsurf-emails).
|
|
71
71
|
#
|
|
72
72
|
# @param email_type [String] The program email template to trigger (template mode). Send the camelCase email-
|
|
73
73
|
#
|
data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb
CHANGED
|
@@ -19,7 +19,7 @@ module GrowsurfRuby
|
|
|
19
19
|
required :participant_id_or_email, String
|
|
20
20
|
|
|
21
21
|
# @!attribute provider
|
|
22
|
-
# The payout provider the participant should confirm a destination for.
|
|
22
|
+
# 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.
|
|
23
23
|
#
|
|
24
24
|
# @return [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider]
|
|
25
25
|
required :provider,
|
|
@@ -30,11 +30,11 @@ module GrowsurfRuby
|
|
|
30
30
|
#
|
|
31
31
|
# @param participant_id_or_email [String]
|
|
32
32
|
#
|
|
33
|
-
# @param provider [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider] The payout provider the participant should confirm a destination for.
|
|
33
|
+
# @param provider [Symbol, GrowsurfRuby::Models::Campaign::ParticipantRequestPayoutDestinationConfirmationParams::Provider] 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.
|
|
34
34
|
#
|
|
35
35
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
36
36
|
|
|
37
|
-
# The payout provider the participant should confirm a destination for.
|
|
37
|
+
# 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.
|
|
38
38
|
module Provider
|
|
39
39
|
extend GrowsurfRuby::Internal::Type::Enum
|
|
40
40
|
|
|
@@ -62,6 +62,13 @@ module GrowsurfRuby
|
|
|
62
62
|
# @return [Integer, nil]
|
|
63
63
|
optional :fulfilled_at, Integer, api_name: :fulfilledAt, nil?: true
|
|
64
64
|
|
|
65
|
+
# @!attribute group_id
|
|
66
|
+
# The group whose reward this is (`grp_…`), saved when it was earned. `null` for
|
|
67
|
+
# Default and for rewards earned before groups existed.
|
|
68
|
+
#
|
|
69
|
+
# @return [String, nil]
|
|
70
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
71
|
+
|
|
65
72
|
# @!attribute is_available
|
|
66
73
|
#
|
|
67
74
|
# @return [Boolean, nil]
|
|
@@ -98,7 +105,7 @@ module GrowsurfRuby
|
|
|
98
105
|
# @return [Boolean, nil]
|
|
99
106
|
optional :unread, GrowsurfRuby::Internal::Type::Boolean
|
|
100
107
|
|
|
101
|
-
# @!method initialize(id:, reward_id:, status:, approved: nil, approved_at: nil, amount: nil, amount_source: nil, commission_structure: nil, currency_iso: nil, fulfilled_at: nil, is_available: nil, is_fulfilled: nil, is_referrer: nil, percent_off: nil, referred_id: nil, referrer_id: nil, unread: nil)
|
|
108
|
+
# @!method initialize(id:, reward_id:, status:, approved: nil, approved_at: nil, amount: nil, amount_source: nil, commission_structure: nil, currency_iso: nil, fulfilled_at: nil, group_id: nil, is_available: nil, is_fulfilled: nil, is_referrer: nil, percent_off: nil, referred_id: nil, referrer_id: nil, unread: nil)
|
|
102
109
|
# @param id [String]
|
|
103
110
|
# @param reward_id [String]
|
|
104
111
|
# @param status [Symbol, GrowsurfRuby::Models::Campaign::ParticipantReward::Status]
|
|
@@ -109,6 +116,7 @@ module GrowsurfRuby
|
|
|
109
116
|
# @param commission_structure [GrowsurfRuby::Models::CommissionStructure, nil]
|
|
110
117
|
# @param currency_iso [String]
|
|
111
118
|
# @param fulfilled_at [Integer]
|
|
119
|
+
# @param group_id [String, nil]
|
|
112
120
|
# @param is_available [Boolean]
|
|
113
121
|
# @param is_fulfilled [Boolean]
|
|
114
122
|
# @param is_referrer [Boolean]
|
|
@@ -28,17 +28,11 @@ module GrowsurfRuby
|
|
|
28
28
|
# @return [String]
|
|
29
29
|
required :message_text, String, api_name: :messageText
|
|
30
30
|
|
|
31
|
-
# @!
|
|
32
|
-
#
|
|
33
|
-
# @return [String]
|
|
34
|
-
required :subject_text, String, api_name: :subjectText
|
|
35
|
-
|
|
36
|
-
# @!method initialize(id:, participant_id_or_email:, email_addresses:, message_text:, subject_text:, request_options: {})
|
|
31
|
+
# @!method initialize(id:, participant_id_or_email:, email_addresses:, message_text:, request_options: {})
|
|
37
32
|
# @param id [String]
|
|
38
33
|
# @param participant_id_or_email [String]
|
|
39
34
|
# @param email_addresses [Array<String>]
|
|
40
35
|
# @param message_text [String]
|
|
41
|
-
# @param subject_text [String]
|
|
42
36
|
# @param request_options [GrowsurfRuby::RequestOptions, Hash{Symbol=>Object}]
|
|
43
37
|
end
|
|
44
38
|
end
|
|
@@ -20,10 +20,20 @@ module GrowsurfRuby
|
|
|
20
20
|
# @return [Boolean]
|
|
21
21
|
required :success, GrowsurfRuby::Internal::Type::Boolean
|
|
22
22
|
|
|
23
|
-
# @!
|
|
23
|
+
# @!attribute message
|
|
24
|
+
# Human-readable detail for the result. Empty when there is nothing to add.
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :message, String
|
|
28
|
+
|
|
29
|
+
# @!method initialize(invites_sent:, message_type:, success:, message: nil)
|
|
24
30
|
# @param invites_sent [Integer]
|
|
31
|
+
#
|
|
25
32
|
# @param message_type [String]
|
|
33
|
+
#
|
|
26
34
|
# @param success [Boolean]
|
|
35
|
+
#
|
|
36
|
+
# @param message [String] Human-readable detail for the result. Empty when there is nothing to add.
|
|
27
37
|
end
|
|
28
38
|
end
|
|
29
39
|
end
|
|
@@ -23,7 +23,7 @@ module GrowsurfRuby
|
|
|
23
23
|
# honoring a refund window before crediting a referrer. Omit this field to award
|
|
24
24
|
# credit immediately. The credit is awarded automatically once the delay elapses,
|
|
25
25
|
# and can be cancelled before then with the Cancel delayed referral trigger
|
|
26
|
-
# request.
|
|
26
|
+
# request. From `0` to `90`; `0` awards credit immediately.
|
|
27
27
|
#
|
|
28
28
|
# @return [Integer, nil]
|
|
29
29
|
optional :delay_in_days, Integer, api_name: :delayInDays
|
|
@@ -38,6 +38,15 @@ module GrowsurfRuby
|
|
|
38
38
|
# @return [String, nil]
|
|
39
39
|
optional :first_name, String, api_name: :firstName
|
|
40
40
|
|
|
41
|
+
# @!attribute group_id
|
|
42
|
+
# Moves the participant to this group (`grp_…`), or to Default with `null`. This is
|
|
43
|
+
# a manual placement, so the groups' email and domain rules do not override it
|
|
44
|
+
# later. The move applies to new referrals only; rewards already earned keep their
|
|
45
|
+
# amounts. An ID that is not a group in this program returns `400`.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
49
|
+
|
|
41
50
|
# @!attribute language
|
|
42
51
|
# The language of the participant's portal and program emails. Must be one of the
|
|
43
52
|
# program's languages (see `languages` in the program options). Send the base
|
|
@@ -86,7 +95,7 @@ module GrowsurfRuby
|
|
|
86
95
|
# @return [Array<String>, nil]
|
|
87
96
|
optional :vanity_keys, GrowsurfRuby::Internal::Type::ArrayOf[String], api_name: :vanityKeys
|
|
88
97
|
|
|
89
|
-
# @!method initialize(id:, participant_id_or_email:, affiliate_status: nil, email: nil, first_name: nil, language: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
98
|
+
# @!method initialize(id:, participant_id_or_email:, affiliate_status: nil, email: nil, first_name: nil, group_id: nil, language: nil, last_name: nil, metadata: nil, notes: nil, referral_status: nil, referred_by: nil, unsubscribed: nil, vanity_keys: nil, request_options: {})
|
|
90
99
|
# Some parameter documentations has been truncated, see
|
|
91
100
|
# {GrowsurfRuby::Models::Campaign::ParticipantUpdateParams} for more details.
|
|
92
101
|
#
|
|
@@ -100,6 +109,8 @@ module GrowsurfRuby
|
|
|
100
109
|
#
|
|
101
110
|
# @param first_name [String]
|
|
102
111
|
#
|
|
112
|
+
# @param group_id [String, nil]
|
|
113
|
+
#
|
|
103
114
|
# @param language [Symbol, GrowsurfRuby::Models::Campaign::Language, nil] The language of the participant's portal and program emails. Must be one of the
|
|
104
115
|
#
|
|
105
116
|
# @param last_name [String]
|
|
@@ -65,6 +65,13 @@ module GrowsurfRuby
|
|
|
65
65
|
# @return [String, nil]
|
|
66
66
|
optional :image_url, String, api_name: :imageUrl, nil?: true
|
|
67
67
|
|
|
68
|
+
# @!attribute group_id
|
|
69
|
+
# The group this reward belongs to (`grp_…`), or `null` for Default. A participant
|
|
70
|
+
# earns only their own group's rewards.
|
|
71
|
+
#
|
|
72
|
+
# @return [String, nil]
|
|
73
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
74
|
+
|
|
68
75
|
# @!attribute image_icon_key
|
|
69
76
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
70
77
|
# image.
|
|
@@ -163,7 +170,7 @@ module GrowsurfRuby
|
|
|
163
170
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
164
171
|
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
165
172
|
|
|
166
|
-
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, image_icon_key: nil, is_visible: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil)
|
|
173
|
+
# @!method initialize(id:, is_unlimited:, metadata:, type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, group_id: nil, image_icon_key: nil, is_visible: nil, limit: nil, limit_duration: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil)
|
|
167
174
|
# @param id [String]
|
|
168
175
|
#
|
|
169
176
|
# @param is_unlimited [Boolean]
|
|
@@ -184,6 +191,8 @@ module GrowsurfRuby
|
|
|
184
191
|
#
|
|
185
192
|
# @param image_url [String, nil]
|
|
186
193
|
#
|
|
194
|
+
# @param group_id [String, nil]
|
|
195
|
+
#
|
|
187
196
|
# @param image_icon_key [Symbol, GrowsurfRuby::Models::Campaign::Reward::ImageIconKey, nil] The starter icon shown for the reward, or `null` when `imageUrl` is your own image.
|
|
188
197
|
#
|
|
189
198
|
# @param is_visible [Boolean] Whether the reward is enabled. When `false` the reward is disabled: hidden from
|
|
@@ -52,6 +52,15 @@ module GrowsurfRuby
|
|
|
52
52
|
# @return [String, nil]
|
|
53
53
|
optional :image_url, String, api_name: :imageUrl, nil?: true
|
|
54
54
|
|
|
55
|
+
# @!attribute group_id
|
|
56
|
+
# The group this reward belongs to (`grp_…`), or `null` for Default. A participant
|
|
57
|
+
# earns only their own group's rewards.
|
|
58
|
+
# `LEADERBOARD` rewards apply to the whole program and cannot be in a group. An ID
|
|
59
|
+
# that is not a group in this program returns `400`.
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :group_id, String, api_name: :groupId, nil?: true
|
|
63
|
+
|
|
55
64
|
# @!attribute image_icon_key
|
|
56
65
|
# The starter icon shown for the reward, or `null` when `imageUrl` is your own
|
|
57
66
|
# image. Participant pages draw this icon in your program's accent color. Also set
|
|
@@ -177,7 +186,7 @@ module GrowsurfRuby
|
|
|
177
186
|
# @return [GrowsurfRuby::Models::RewardTaxValuation, nil]
|
|
178
187
|
optional :value, -> { GrowsurfRuby::RewardTaxValuation }, nil?: true
|
|
179
188
|
|
|
180
|
-
# @!method initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, image_icon_key: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
189
|
+
# @!method initialize(type:, commission_structure: nil, conversions_required: nil, coupon_code: nil, description: nil, event: nil, image_url: nil, group_id: nil, image_icon_key: nil, is_unlimited: nil, is_visible: nil, limit: nil, limit_duration: nil, metadata: nil, next_milestone_prefix: nil, next_milestone_suffix: nil, number_of_winners: nil, order: nil, referral_coupon_code: nil, referral_description: nil, referred_reward_upfront: nil, referred_value: nil, title: nil, value: nil, request_options: {})
|
|
181
190
|
# Some parameter documentations has been truncated, see
|
|
182
191
|
# {GrowsurfRuby::Models::Campaign::RewardCreateParams} for more details.
|
|
183
192
|
#
|
|
@@ -195,6 +204,8 @@ module GrowsurfRuby
|
|
|
195
204
|
#
|
|
196
205
|
# @param image_url [String]
|
|
197
206
|
#
|
|
207
|
+
# @param group_id [String, nil]
|
|
208
|
+
#
|
|
198
209
|
# @param image_icon_key [Symbol, GrowsurfRuby::Models::Campaign::RewardCreateParams::ImageIconKey, nil] The starter icon shown for the reward, or `null` when `imageUrl` is your own image.
|
|
199
210
|
#
|
|
200
211
|
# @param is_unlimited [Boolean] Whether the reward can be earned an unlimited number of times. Defaults to `true
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# A rule that places participants in a group.
|
|
7
|
+
class RewardGroupRule < GrowsurfRuby::Internal::Type::BaseModel
|
|
8
|
+
# `PARTICIPANT` — an existing participant ID; the participant moves in now.
|
|
9
|
+
# `EMAIL` — an exact email address. `DOMAIN` — a company domain such as
|
|
10
|
+
# `hooli.com`, which also matches its subdomains.
|
|
11
|
+
required :type, enum: -> { GrowsurfRuby::Campaign::RewardGroupRule::Type }
|
|
12
|
+
# The participant ID, email address, or domain. 1 to 254 characters.
|
|
13
|
+
required :value, String
|
|
14
|
+
|
|
15
|
+
module Type
|
|
16
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
17
|
+
|
|
18
|
+
PARTICIPANT = :PARTICIPANT
|
|
19
|
+
EMAIL = :EMAIL
|
|
20
|
+
DOMAIN = :DOMAIN
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# A group of participants who earn their own rewards. Its rewards are the
|
|
25
|
+
# Campaign Rewards whose `groupId` is this group's `id`.
|
|
26
|
+
class RewardGroup < GrowsurfRuby::Internal::Type::BaseModel
|
|
27
|
+
# The group ID. Participants, Campaign Rewards, and participant rewards name it
|
|
28
|
+
# as `groupId`.
|
|
29
|
+
required :id, String
|
|
30
|
+
# The group name (internal only, never shown to participants).
|
|
31
|
+
required :name, String
|
|
32
|
+
# The group's position in the program's group list.
|
|
33
|
+
required :order, Integer
|
|
34
|
+
# The rules that place participants in this group.
|
|
35
|
+
required :rules, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardGroupRule] }
|
|
36
|
+
# The code for this group's signup link. A participant who signs up through the
|
|
37
|
+
# link joins this group.
|
|
38
|
+
required :signup_code, String, api_name: :signupCode
|
|
39
|
+
# When the group was created, in Unix milliseconds.
|
|
40
|
+
required :created_at, Integer, api_name: :createdAt
|
|
41
|
+
# When the group was last changed, in Unix milliseconds.
|
|
42
|
+
required :updated_at, Integer, api_name: :updatedAt
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class RewardGroupCreateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# The group name (internal only, never shown to participants). 1 to 100
|
|
11
|
+
# characters.
|
|
12
|
+
required :name, String
|
|
13
|
+
# Omit or send an empty array. Add rules after configuring a reward.
|
|
14
|
+
optional :rules, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardGroupRule] }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class RewardGroupDeleteParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class RewardGroupListResponse < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
# The program's groups in display order. Default is not listed.
|
|
8
|
+
required :groups,
|
|
9
|
+
-> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardGroup] }
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class RewardGroupRetrieveParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
# How a participant got into their group. `MANUAL` — a move (a `PARTICIPANT`
|
|
7
|
+
# rule, Update participant, bulk move, or the dashboard), including a move to
|
|
8
|
+
# Default. `LINK` — the group's signup link. `EMAIL` — an `EMAIL` rule.
|
|
9
|
+
# `DOMAIN` — a `DOMAIN` rule.
|
|
10
|
+
module RewardGroupSource
|
|
11
|
+
extend GrowsurfRuby::Internal::Type::Enum
|
|
12
|
+
|
|
13
|
+
MANUAL = :MANUAL
|
|
14
|
+
LINK = :LINK
|
|
15
|
+
EMAIL = :EMAIL
|
|
16
|
+
DOMAIN = :DOMAIN
|
|
17
|
+
|
|
18
|
+
# @!method self.values
|
|
19
|
+
# @return [Array<Symbol>]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GrowsurfRuby
|
|
4
|
+
module Models
|
|
5
|
+
module Campaign
|
|
6
|
+
class RewardGroupUpdateParams < GrowsurfRuby::Internal::Type::BaseModel
|
|
7
|
+
extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include GrowsurfRuby::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
required :id, String
|
|
11
|
+
# The group name (internal only, never shown to participants). 1 to 100
|
|
12
|
+
# characters.
|
|
13
|
+
optional :name, String
|
|
14
|
+
# The group's position in the program's group list.
|
|
15
|
+
optional :order, Integer
|
|
16
|
+
# Replaces the group's whole rule list. Up to 500.
|
|
17
|
+
optional :rules, -> { GrowsurfRuby::Internal::Type::ArrayOf[GrowsurfRuby::Campaign::RewardGroupRule] }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|