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.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/models/campaign/create.rb +13 -1
  5. data/lib/growsurf_ruby/models/campaign/delete_reward_group_response.rb +16 -0
  6. data/lib/growsurf_ruby/models/campaign/participant.rb +22 -1
  7. data/lib/growsurf_ruby/models/campaign/participant_bulk_delete_response.rb +1 -1
  8. data/lib/growsurf_ruby/models/campaign/participant_bulk_move_params.rb +20 -0
  9. data/lib/growsurf_ruby/models/campaign/participant_bulk_move_response.rb +57 -0
  10. data/lib/growsurf_ruby/models/campaign/participant_email_params.rb +2 -2
  11. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +3 -3
  12. data/lib/growsurf_ruby/models/campaign/participant_reward.rb +9 -1
  13. data/lib/growsurf_ruby/models/campaign/participant_send_invites_params.rb +1 -7
  14. data/lib/growsurf_ruby/models/campaign/participant_send_invites_response.rb +11 -1
  15. data/lib/growsurf_ruby/models/campaign/participant_trigger_referral_params.rb +1 -1
  16. data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +12 -1
  17. data/lib/growsurf_ruby/models/campaign/reward.rb +10 -1
  18. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +12 -1
  19. data/lib/growsurf_ruby/models/campaign/reward_group.rb +46 -0
  20. data/lib/growsurf_ruby/models/campaign/reward_group_create_params.rb +18 -0
  21. data/lib/growsurf_ruby/models/campaign/reward_group_delete_params.rb +14 -0
  22. data/lib/growsurf_ruby/models/campaign/reward_group_list_response.rb +13 -0
  23. data/lib/growsurf_ruby/models/campaign/reward_group_retrieve_params.rb +14 -0
  24. data/lib/growsurf_ruby/models/campaign/reward_group_source.rb +23 -0
  25. data/lib/growsurf_ruby/models/campaign/reward_group_update_params.rb +21 -0
  26. data/lib/growsurf_ruby/models/campaign/reward_list_params.rb +18 -0
  27. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +14 -3
  28. data/lib/growsurf_ruby/models/campaign/webhook_test_response.rb +2 -2
  29. data/lib/growsurf_ruby/models/campaign_list_participants_params.rb +10 -1
  30. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +12 -1
  31. data/lib/growsurf_ruby/resources/campaign/groups.rb +103 -0
  32. data/lib/growsurf_ruby/resources/campaign/participant.rb +51 -15
  33. data/lib/growsurf_ruby/resources/campaign/rewards.rb +19 -6
  34. data/lib/growsurf_ruby/resources/campaign.rb +9 -2
  35. data/lib/growsurf_ruby/version.rb +1 -1
  36. data/lib/growsurf_ruby.rb +12 -0
  37. data/rbi/growsurf_ruby/models/campaign/create.rbi +11 -0
  38. data/rbi/growsurf_ruby/models/campaign/delete_reward_group_response.rbi +39 -0
  39. data/rbi/growsurf_ruby/models/campaign/participant.rbi +26 -0
  40. data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -6
  41. data/rbi/growsurf_ruby/models/campaign/participant_bulk_move_params.rbi +41 -0
  42. data/rbi/growsurf_ruby/models/campaign/participant_bulk_move_response.rbi +172 -0
  43. data/rbi/growsurf_ruby/models/campaign/participant_email_params.rbi +2 -2
  44. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +2 -2
  45. data/rbi/growsurf_ruby/models/campaign/participant_reward.rbi +8 -0
  46. data/rbi/growsurf_ruby/models/campaign/participant_send_invites_params.rbi +0 -6
  47. data/rbi/growsurf_ruby/models/campaign/participant_send_invites_response.rbi +22 -3
  48. data/rbi/growsurf_ruby/models/campaign/participant_trigger_referral_params.rbi +2 -2
  49. data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +10 -0
  50. data/rbi/growsurf_ruby/models/campaign/reward.rbi +8 -0
  51. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +10 -0
  52. data/rbi/growsurf_ruby/models/campaign/reward_group.rbi +109 -0
  53. data/rbi/growsurf_ruby/models/campaign/reward_group_create_params.rbi +40 -0
  54. data/rbi/growsurf_ruby/models/campaign/reward_group_delete_params.rbi +37 -0
  55. data/rbi/growsurf_ruby/models/campaign/reward_group_list_response.rbi +27 -0
  56. data/rbi/growsurf_ruby/models/campaign/reward_group_retrieve_params.rbi +37 -0
  57. data/rbi/growsurf_ruby/models/campaign/reward_group_source.rbi +36 -0
  58. data/rbi/growsurf_ruby/models/campaign/reward_group_update_params.rbi +48 -0
  59. data/rbi/growsurf_ruby/models/campaign/reward_list_params.rbi +43 -0
  60. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +12 -2
  61. data/rbi/growsurf_ruby/models/campaign/webhook_test_response.rbi +2 -2
  62. data/rbi/growsurf_ruby/models/campaign_list_participants_params.rbi +13 -0
  63. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +24 -0
  64. data/rbi/growsurf_ruby/resources/campaign/groups.rbi +93 -0
  65. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +39 -9
  66. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +13 -2
  67. data/rbi/growsurf_ruby/resources/campaign.rbi +8 -0
  68. data/sig/growsurf_ruby/models/campaign/create.rbs +5 -0
  69. data/sig/growsurf_ruby/models/campaign/delete_reward_group_response.rbs +16 -0
  70. data/sig/growsurf_ruby/models/campaign/participant.rbs +10 -0
  71. data/sig/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbs +4 -6
  72. data/sig/growsurf_ruby/models/campaign/participant_bulk_move_params.rbs +24 -0
  73. data/sig/growsurf_ruby/models/campaign/participant_bulk_move_response.rbs +89 -0
  74. data/sig/growsurf_ruby/models/campaign/participant_reward.rbs +5 -0
  75. data/sig/growsurf_ruby/models/campaign/participant_send_invites_params.rbs +1 -6
  76. data/sig/growsurf_ruby/models/campaign/participant_send_invites_response.rbs +14 -3
  77. data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +5 -0
  78. data/sig/growsurf_ruby/models/campaign/reward.rbs +5 -0
  79. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +5 -0
  80. data/sig/growsurf_ruby/models/campaign/reward_group.rbs +55 -0
  81. data/sig/growsurf_ruby/models/campaign/reward_group_create_params.rbs +22 -0
  82. data/sig/growsurf_ruby/models/campaign/reward_group_delete_params.rbs +22 -0
  83. data/sig/growsurf_ruby/models/campaign/reward_group_list_response.rbs +13 -0
  84. data/sig/growsurf_ruby/models/campaign/reward_group_retrieve_params.rbs +22 -0
  85. data/sig/growsurf_ruby/models/campaign/reward_group_source.rbs +18 -0
  86. data/sig/growsurf_ruby/models/campaign/reward_group_update_params.rbs +25 -0
  87. data/sig/growsurf_ruby/models/campaign/reward_list_params.rbs +23 -0
  88. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +5 -0
  89. data/sig/growsurf_ruby/models/campaign_list_participants_params.rbs +7 -0
  90. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +9 -0
  91. data/sig/growsurf_ruby/resources/campaign/groups.rbs +42 -0
  92. data/sig/growsurf_ruby/resources/campaign/participant.rbs +9 -1
  93. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +3 -0
  94. data/sig/growsurf_ruby/resources/campaign.rbs +3 -0
  95. metadata +38 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 148935e17b06dbe8a02495ef2fc0975d50a7c129338f3b40373523241deb5a65
4
- data.tar.gz: 4e717289d0284d6938f7f5aa9bfa06473ccb8f99d550d9c8ccf1ba326b171d9a
3
+ metadata.gz: ca562d07f14b6b4bb9ddfe6c3b406d324bc3a177b24e401e57ec57a9be6a028d
4
+ data.tar.gz: ce11d1705332aa0833becd801c6f4da9665f20c256c1cc9160bfc8dae0fdaccc
5
5
  SHA512:
6
- metadata.gz: 40c9a940e10974af9aceea6783fa4ae1c566f0570b571e63c61dea60c3078102df6ce65c00970c560be6dfe217e857cdd49ae5872f6e0894ec1679487f8362b0
7
- data.tar.gz: 9e2d350314eb9890790fbca44cf0d6a2432a8a21d3f0fc491f6c2c56dc8868308c1725e3b69a37f57c247e8df949ee2244911757c30b07cf499f1f15fd39e83a
6
+ metadata.gz: 2761d2e88df9386702e1bd5890f19f1febf44172aeb23d07fa9c81abca15800e092f8511d7366f3efa163b5a503fcf449ac0c283dfc4caae7770fd8ea8a9297c
7
+ data.tar.gz: b62aee56c7f15ab87782a66dfb5bb729b17cc8c6a9eccfa316bafac29d40deaa3cb20da563174124d7b4891daa722c3ef74e4ecc571e592bb7fa600560eb8324
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.21.0](https://github.com/growsurf/growsurf-ruby/compare/v1.20.1...v1.21.0) (2026-11-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * add reward groups and participant bulk move ([45ebfcf](https://github.com/growsurf/growsurf-ruby/commit/45ebfcf5160fcb5a35c73e8a77655eda42ecc39f))
9
+ * **api:** add payout attention and invite message; align group wording ([c945457](https://github.com/growsurf/growsurf-ruby/commit/c945457ee09ff72129ca8bed7a3148582413ca3f))
10
+ * **api:** sync REST v2 docs and types ([8752c45](https://github.com/growsurf/growsurf-ruby/commit/8752c45b5f2c7d901a0233b6cc480e8720213252))
11
+
12
+
13
+ ### Documentation
14
+
15
+ * align group creation and webhook event contracts ([ae2edbe](https://github.com/growsurf/growsurf-ruby/commit/ae2edbe972b87f9697ceff20cbbcdb8424193479))
16
+
3
17
  ## [1.20.1](https://github.com/growsurf/growsurf-ruby/compare/v1.20.0...v1.20.1) (2026-11-08)
4
18
 
5
19
 
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "growsurf-ruby", "~> 1.20.1"
20
+ gem "growsurf-ruby", "~> 1.21.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -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
  #
@@ -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
- # @!attribute subject_text
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
- # @!method initialize(invites_sent:, message_type:, success:)
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
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ module Campaign
6
+ # @see GrowsurfRuby::Resources::Campaign::Rewards#list
7
+ class RewardListParams < GrowsurfRuby::Internal::Type::BaseModel
8
+ extend GrowsurfRuby::Internal::Type::RequestParameters::Converter
9
+ include GrowsurfRuby::Internal::Type::RequestParameters
10
+
11
+ # Return only this group's rewards. To get Default's rewards, omit `groupId`
12
+ # and keep the rewards whose `groupId` is `null`. An ID that is not a group in this program
13
+ # returns `404`.
14
+ optional :group_id, String
15
+ end
16
+ end
17
+ end
18
+ end