growsurf-ruby 1.2.0 → 1.3.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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/LICENSE +201 -0
  4. data/README.md +1 -1
  5. data/lib/growsurf_ruby/internal/transport/base_client.rb +21 -4
  6. data/lib/growsurf_ruby/models/affiliate_application.rb +249 -0
  7. data/lib/growsurf_ruby/models/affiliate_application_list_response.rb +42 -0
  8. data/lib/growsurf_ruby/models/affiliate_invite.rb +109 -0
  9. data/lib/growsurf_ruby/models/affiliate_invite_list_response.rb +41 -0
  10. data/lib/growsurf_ruby/models/campaign/create.rb +12 -1
  11. data/lib/growsurf_ruby/models/campaign/participant.rb +79 -4
  12. data/lib/growsurf_ruby/models/campaign/participant_analytics_response.rb +28 -17
  13. data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rb +28 -0
  14. data/lib/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rb +126 -0
  15. data/lib/growsurf_ruby/models/campaign/participant_list_payouts_params.rb +1 -0
  16. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rb +50 -0
  17. data/lib/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rb +56 -0
  18. data/lib/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rb +14 -17
  19. data/lib/growsurf_ruby/models/campaign/participant_update_params.rb +25 -9
  20. data/lib/growsurf_ruby/models/campaign/referral_source.rb +3 -0
  21. data/lib/growsurf_ruby/models/campaign/reward.rb +20 -3
  22. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +3 -3
  23. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +3 -3
  24. data/lib/growsurf_ruby/models/campaign.rb +2 -2
  25. data/lib/growsurf_ruby/models/campaign_create_affiliate_invite_params.rb +45 -0
  26. data/lib/growsurf_ruby/models/campaign_list_affiliate_applications_params.rb +57 -0
  27. data/lib/growsurf_ruby/models/campaign_list_affiliate_invites_params.rb +58 -0
  28. data/lib/growsurf_ruby/models/campaign_list_payouts_params.rb +1 -0
  29. data/lib/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rb +26 -0
  30. data/lib/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rb +26 -0
  31. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_params.rb +9 -6
  32. data/lib/growsurf_ruby/models/campaign_retrieve_analytics_response.rb +59 -11
  33. data/lib/growsurf_ruby/models/campaign_review_affiliate_application_params.rb +94 -0
  34. data/lib/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rb +26 -0
  35. data/lib/growsurf_ruby/models/email_analytics.rb +41 -0
  36. data/lib/growsurf_ruby/models/participant_payout_list.rb +8 -1
  37. data/lib/growsurf_ruby/models/reward_tax_valuation.rb +24 -9
  38. data/lib/growsurf_ruby/models.rb +19 -0
  39. data/lib/growsurf_ruby/resources/account.rb +13 -3
  40. data/lib/growsurf_ruby/resources/campaign/commission.rb +3 -2
  41. data/lib/growsurf_ruby/resources/campaign/design.rb +14 -16
  42. data/lib/growsurf_ruby/resources/campaign/emails.rb +9 -11
  43. data/lib/growsurf_ruby/resources/campaign/installation.rb +8 -12
  44. data/lib/growsurf_ruby/resources/campaign/options.rb +11 -13
  45. data/lib/growsurf_ruby/resources/campaign/participant.rb +138 -44
  46. data/lib/growsurf_ruby/resources/campaign/reward.rb +4 -3
  47. data/lib/growsurf_ruby/resources/campaign/rewards.rb +20 -8
  48. data/lib/growsurf_ruby/resources/campaign.rb +245 -15
  49. data/lib/growsurf_ruby/resources/team.rb +22 -13
  50. data/lib/growsurf_ruby/version.rb +1 -1
  51. data/lib/growsurf_ruby.rb +16 -0
  52. data/rbi/growsurf_ruby/models/affiliate_application.rbi +431 -0
  53. data/rbi/growsurf_ruby/models/affiliate_application_list_response.rbi +70 -0
  54. data/rbi/growsurf_ruby/models/affiliate_invite.rbi +167 -0
  55. data/rbi/growsurf_ruby/models/affiliate_invite_list_response.rbi +70 -0
  56. data/rbi/growsurf_ruby/models/campaign/create.rbi +17 -0
  57. data/rbi/growsurf_ruby/models/campaign/participant.rbi +169 -3
  58. data/rbi/growsurf_ruby/models/campaign/participant_activity_logs_response.rbi +3 -5
  59. data/rbi/growsurf_ruby/models/campaign/participant_analytics_response.rbi +35 -20
  60. data/rbi/growsurf_ruby/models/campaign/participant_bulk_delete_response.rbi +3 -1
  61. data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbi +48 -0
  62. data/rbi/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbi +243 -0
  63. data/rbi/growsurf_ruby/models/campaign/participant_list_payouts_params.rbi +5 -0
  64. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbi +100 -0
  65. data/rbi/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbi +118 -0
  66. data/rbi/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbi +22 -52
  67. data/rbi/growsurf_ruby/models/campaign/participant_update_params.rbi +67 -11
  68. data/rbi/growsurf_ruby/models/campaign/referral_source.rbi +9 -0
  69. data/rbi/growsurf_ruby/models/campaign/reward.rbi +23 -2
  70. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +4 -4
  71. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +4 -4
  72. data/rbi/growsurf_ruby/models/campaign.rbi +2 -2
  73. data/rbi/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbi +74 -0
  74. data/rbi/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbi +130 -0
  75. data/rbi/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbi +135 -0
  76. data/rbi/growsurf_ruby/models/campaign_list_payouts_params.rbi +5 -0
  77. data/rbi/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbi +46 -0
  78. data/rbi/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbi +46 -0
  79. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_params.rbi +15 -10
  80. data/rbi/growsurf_ruby/models/campaign_retrieve_analytics_response.rbi +68 -18
  81. data/rbi/growsurf_ruby/models/campaign_review_affiliate_application_params.rbi +167 -0
  82. data/rbi/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbi +46 -0
  83. data/rbi/growsurf_ruby/models/email_analytics.rbi +200 -0
  84. data/rbi/growsurf_ruby/models/participant_payout_list.rbi +17 -3
  85. data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +66 -9
  86. data/rbi/growsurf_ruby/models.rbi +25 -0
  87. data/rbi/growsurf_ruby/resources/account.rbi +14 -0
  88. data/rbi/growsurf_ruby/resources/campaign/commission.rbi +3 -2
  89. data/rbi/growsurf_ruby/resources/campaign/design.rbi +11 -8
  90. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +9 -6
  91. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +8 -8
  92. data/rbi/growsurf_ruby/resources/campaign/options.rbi +11 -8
  93. data/rbi/growsurf_ruby/resources/campaign/participant.rbi +131 -46
  94. data/rbi/growsurf_ruby/resources/campaign/reward.rbi +4 -3
  95. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +22 -10
  96. data/rbi/growsurf_ruby/resources/campaign.rbi +200 -18
  97. data/rbi/growsurf_ruby/resources/team.rbi +23 -0
  98. data/sig/growsurf_ruby/models/affiliate_application.rbs +192 -0
  99. data/sig/growsurf_ruby/models/affiliate_application_list_response.rbs +39 -0
  100. data/sig/growsurf_ruby/models/affiliate_invite.rbs +92 -0
  101. data/sig/growsurf_ruby/models/affiliate_invite_list_response.rbs +39 -0
  102. data/sig/growsurf_ruby/models/campaign/create.rbs +7 -0
  103. data/sig/growsurf_ruby/models/campaign/participant.rbs +62 -2
  104. data/sig/growsurf_ruby/models/campaign/participant_activity_logs_response.rbs +2 -11
  105. data/sig/growsurf_ruby/models/campaign/participant_analytics_response.rbs +12 -12
  106. data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_params.rbs +30 -0
  107. data/sig/growsurf_ruby/models/campaign/participant_get_payout_destination_response.rbs +107 -0
  108. data/sig/growsurf_ruby/models/campaign/participant_list_payouts_params.rbs +2 -1
  109. data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_params.rbs +49 -0
  110. data/sig/growsurf_ruby/models/campaign/participant_request_payout_destination_confirmation_response.rbs +57 -0
  111. data/sig/growsurf_ruby/models/campaign/participant_retrieve_analytics_params.rbs +5 -13
  112. data/sig/growsurf_ruby/models/campaign/participant_update_params.rbs +21 -7
  113. data/sig/growsurf_ruby/models/campaign/referral_source.rbs +4 -1
  114. data/sig/growsurf_ruby/models/campaign/reward.rbs +12 -0
  115. data/sig/growsurf_ruby/models/campaign_create_affiliate_invite_params.rbs +40 -0
  116. data/sig/growsurf_ruby/models/campaign_list_affiliate_applications_params.rbs +61 -0
  117. data/sig/growsurf_ruby/models/campaign_list_affiliate_invites_params.rbs +62 -0
  118. data/sig/growsurf_ruby/models/campaign_list_payouts_params.rbs +2 -1
  119. data/sig/growsurf_ruby/models/campaign_resend_affiliate_invite_params.rbs +28 -0
  120. data/sig/growsurf_ruby/models/campaign_retrieve_affiliate_application_params.rbs +28 -0
  121. data/sig/growsurf_ruby/models/campaign_retrieve_analytics_response.rbs +36 -16
  122. data/sig/growsurf_ruby/models/campaign_review_affiliate_application_params.rbs +79 -0
  123. data/sig/growsurf_ruby/models/campaign_revoke_affiliate_invite_params.rbs +28 -0
  124. data/sig/growsurf_ruby/models/email_analytics.rbs +92 -0
  125. data/sig/growsurf_ruby/models/participant_payout_list.rbs +12 -4
  126. data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +26 -4
  127. data/sig/growsurf_ruby/models.rbs +18 -0
  128. data/sig/growsurf_ruby/resources/campaign/participant.rbs +16 -2
  129. data/sig/growsurf_ruby/resources/campaign.rbs +53 -0
  130. metadata +54 -3
@@ -115,6 +115,12 @@ module GrowsurfRuby
115
115
  sig { params(queued_at: Integer).void }
116
116
  attr_writer :queued_at
117
117
 
118
+ sig { returns(T.nilable(Integer)) }
119
+ attr_reader :reversed_at
120
+
121
+ sig { params(reversed_at: Integer).void }
122
+ attr_writer :reversed_at
123
+
118
124
  sig do
119
125
  params(
120
126
  id: String,
@@ -133,7 +139,8 @@ module GrowsurfRuby
133
139
  fx_error: T.nilable(String),
134
140
  issued_at: Integer,
135
141
  provider: T.nilable(String),
136
- queued_at: Integer
142
+ queued_at: Integer,
143
+ reversed_at: Integer
137
144
  ).returns(T.attached_class)
138
145
  end
139
146
  def self.new(
@@ -152,7 +159,8 @@ module GrowsurfRuby
152
159
  fx_error: nil,
153
160
  issued_at: nil,
154
161
  provider: nil,
155
- queued_at: nil
162
+ queued_at: nil,
163
+ reversed_at: nil
156
164
  )
157
165
  end
158
166
 
@@ -175,7 +183,8 @@ module GrowsurfRuby
175
183
  fx_error: T.nilable(String),
176
184
  issued_at: Integer,
177
185
  provider: T.nilable(String),
178
- queued_at: Integer
186
+ queued_at: Integer,
187
+ reversed_at: Integer
179
188
  }
180
189
  )
181
190
  end
@@ -211,6 +220,11 @@ module GrowsurfRuby
211
220
  :FAILED,
212
221
  GrowsurfRuby::ParticipantPayoutList::Payout::Status::TaggedSymbol
213
222
  )
223
+ REVERSED =
224
+ T.let(
225
+ :REVERSED,
226
+ GrowsurfRuby::ParticipantPayoutList::Payout::Status::TaggedSymbol
227
+ )
214
228
 
215
229
  sig do
216
230
  override.returns(
@@ -18,26 +18,33 @@ module GrowsurfRuby
18
18
  sig { returns(T.nilable(Float)) }
19
19
  attr_accessor :fair_market_value_usd
20
20
 
21
- # Whether the reward's value counts toward 1099 thresholds/totals. `null` = use
22
- # the smart default for the reward's source.
23
- sig { returns(T.nilable(T::Boolean)) }
24
- attr_accessor :is_tax_reportable
21
+ # The reason the recipient earns this reward. `null` inherits the program's
22
+ # confirmed tax treatment for configurable non-commission rewards. Commission
23
+ # rewards always use `NONEMPLOYEE_SERVICES`.
24
+ sig do
25
+ returns(
26
+ T.nilable(GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol)
27
+ )
28
+ end
29
+ attr_accessor :tax_character
25
30
 
26
31
  # Tax valuation settings for a reward. Only relevant when the program collects
27
32
  # tax documentation.
28
33
  sig do
29
34
  params(
30
35
  fair_market_value_usd: T.nilable(Float),
31
- is_tax_reportable: T.nilable(T::Boolean)
36
+ tax_character:
37
+ T.nilable(GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol)
32
38
  ).returns(T.attached_class)
33
39
  end
34
40
  def self.new(
35
41
  # Manual fair-market value in USD (major units) used as the fallback when the
36
42
  # reward value cannot be resolved automatically. `null` = no manual value.
37
43
  fair_market_value_usd: nil,
38
- # Whether the reward's value counts toward 1099 thresholds/totals. `null` = use
39
- # the smart default for the reward's source.
40
- is_tax_reportable: nil
44
+ # The reason the recipient earns this reward. `null` inherits the program's
45
+ # confirmed tax treatment for configurable non-commission rewards. Commission
46
+ # rewards always use `NONEMPLOYEE_SERVICES`.
47
+ tax_character: nil
41
48
  )
42
49
  end
43
50
 
@@ -45,12 +52,62 @@ module GrowsurfRuby
45
52
  override.returns(
46
53
  {
47
54
  fair_market_value_usd: T.nilable(Float),
48
- is_tax_reportable: T.nilable(T::Boolean)
55
+ tax_character:
56
+ T.nilable(
57
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::OrSymbol
58
+ )
49
59
  }
50
60
  )
51
61
  end
52
62
  def to_hash
53
63
  end
64
+
65
+ # The U.S. federal tax character of a reward.
66
+ module TaxCharacter
67
+ extend GrowsurfRuby::Internal::Type::Enum
68
+
69
+ TaggedSymbol =
70
+ T.type_alias do
71
+ T.all(Symbol, GrowsurfRuby::RewardTaxValuation::TaxCharacter)
72
+ end
73
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
74
+
75
+ NONEMPLOYEE_SERVICES =
76
+ T.let(
77
+ :NONEMPLOYEE_SERVICES,
78
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
79
+ )
80
+ PRIZE_OR_AWARD =
81
+ T.let(
82
+ :PRIZE_OR_AWARD,
83
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
84
+ )
85
+ PURCHASE_REBATE =
86
+ T.let(
87
+ :PURCHASE_REBATE,
88
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
89
+ )
90
+ OTHER_INCOME =
91
+ T.let(
92
+ :OTHER_INCOME,
93
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
94
+ )
95
+ REVIEW_REQUIRED =
96
+ T.let(
97
+ :REVIEW_REQUIRED,
98
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
99
+ )
100
+
101
+ sig do
102
+ override.returns(
103
+ T::Array[
104
+ GrowsurfRuby::RewardTaxValuation::TaxCharacter::TaggedSymbol
105
+ ]
106
+ )
107
+ end
108
+ def self.values
109
+ end
110
+ end
54
111
  end
55
112
  end
56
113
  end
@@ -3,6 +3,10 @@
3
3
  module GrowsurfRuby
4
4
  AccountCreateParams = GrowsurfRuby::Models::AccountCreateParams
5
5
 
6
+ AffiliateApplication = GrowsurfRuby::Models::AffiliateApplication
7
+
8
+ AffiliateInvite = GrowsurfRuby::Models::AffiliateInvite
9
+
6
10
  Team = GrowsurfRuby::Models::Team
7
11
 
8
12
  TeamUpdateParams = GrowsurfRuby::Models::TeamUpdateParams
@@ -11,11 +15,20 @@ module GrowsurfRuby
11
15
 
12
16
  CampaignAPI = GrowsurfRuby::Models::CampaignAPI
13
17
 
18
+ CampaignCreateAffiliateInviteParams =
19
+ GrowsurfRuby::Models::CampaignCreateAffiliateInviteParams
20
+
14
21
  CampaignCreateMobileParticipantTokenParams =
15
22
  GrowsurfRuby::Models::CampaignCreateMobileParticipantTokenParams
16
23
 
17
24
  CampaignCreateParams = GrowsurfRuby::Models::CampaignCreateParams
18
25
 
26
+ CampaignListAffiliateApplicationsParams =
27
+ GrowsurfRuby::Models::CampaignListAffiliateApplicationsParams
28
+
29
+ CampaignListAffiliateInvitesParams =
30
+ GrowsurfRuby::Models::CampaignListAffiliateInvitesParams
31
+
19
32
  CampaignListCommissionsParams =
20
33
  GrowsurfRuby::Models::CampaignListCommissionsParams
21
34
 
@@ -32,11 +45,23 @@ module GrowsurfRuby
32
45
  CampaignListReferralsParams =
33
46
  GrowsurfRuby::Models::CampaignListReferralsParams
34
47
 
48
+ CampaignResendAffiliateInviteParams =
49
+ GrowsurfRuby::Models::CampaignResendAffiliateInviteParams
50
+
51
+ CampaignRetrieveAffiliateApplicationParams =
52
+ GrowsurfRuby::Models::CampaignRetrieveAffiliateApplicationParams
53
+
35
54
  CampaignRetrieveAnalyticsParams =
36
55
  GrowsurfRuby::Models::CampaignRetrieveAnalyticsParams
37
56
 
38
57
  CampaignRetrieveParams = GrowsurfRuby::Models::CampaignRetrieveParams
39
58
 
59
+ CampaignReviewAffiliateApplicationParams =
60
+ GrowsurfRuby::Models::CampaignReviewAffiliateApplicationParams
61
+
62
+ CampaignRevokeAffiliateInviteParams =
63
+ GrowsurfRuby::Models::CampaignRevokeAffiliateInviteParams
64
+
40
65
  CampaignUpdateParams = GrowsurfRuby::Models::CampaignUpdateParams
41
66
 
42
67
  CommissionStructure = GrowsurfRuby::Models::CommissionStructure
@@ -3,6 +3,20 @@
3
3
  module GrowsurfRuby
4
4
  module Resources
5
5
  class Account
6
+ # Creates a new GrowSurf account. This is the only endpoint that does not require
7
+ # an API key. The response includes an API key for the new account, shown once in
8
+ # the response. The key is locked until the team owner's email address is
9
+ # verified: authenticated program and resource endpoints return a `403` with error
10
+ # code `EMAIL_NOT_VERIFIED_ERROR` until then (resend the email via `POST
11
+ # /team/owner/verification-email`, then retry). A welcome email is sent to the
12
+ # address with the verification link and a set-password link for dashboard access.
13
+ # Accounts whose email is never verified are deleted automatically after 7 days.
14
+ # For security, the API key is rotated the first time the account owner signs in
15
+ # to the GrowSurf dashboard. Some actions (such as emailing participants)
16
+ # additionally require GrowSurf to verify the team first. By creating an account
17
+ # you agree, on behalf of the account holder, to GrowSurf's [Terms of
18
+ # Service](https://growsurf.com/terms) and [Privacy
19
+ # Policy](https://growsurf.com/privacy).
6
20
  sig do
7
21
  params(
8
22
  email: String,
@@ -5,7 +5,7 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  # Affiliate transaction, commission, and payout operations.
7
7
  class Commission
8
- # Removes a pending participant commission.
8
+ # **Affiliate programs only.** Removes a pending participant commission.
9
9
  sig do
10
10
  params(
11
11
  commission_id: String,
@@ -22,7 +22,8 @@ module GrowsurfRuby
22
22
  )
23
23
  end
24
24
 
25
- # Approves a pending participant commission so it can become eligible for payout.
25
+ # **Affiliate programs only.** Approves a pending participant commission so it can
26
+ # become eligible for payout.
26
27
  sig do
27
28
  params(
28
29
  commission_id: String,
@@ -5,9 +5,11 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Design
7
7
  # Retrieves a program's design configuration — the same surface as the dashboard
8
- # Program Editor's **Design** tab. This is a large, deeply nested object whose
9
- # available fields depend on the program type; the response includes every field
10
- # and its current value, which is the same shape you send back on update.
8
+ # 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. Available fields depend on the program type.
11
+ # `payoutDestinationConfirmation` is omitted when no confirmation fields are stored. Stored
12
+ # `null` fields are returned as `null`; omitted and `null` fields use localized defaults.
11
13
  sig do
12
14
  params(
13
15
  id: String,
@@ -21,11 +23,12 @@ module GrowsurfRuby
21
23
  )
22
24
  end
23
25
 
24
- # Updates a program's design configuration. Only the fields you send are changed;
25
- # anything you leave out is untouched (arrays such as `signup.fields` replace
26
- # wholesale). The request body is a partial design object. To see the full object
27
- # with every field and its current value, `GET` this resource, then `PATCH` back
28
- # only the fields you want to change.
26
+ # Updates a program's design configuration, including the payout-destination confirmation
27
+ # page copy configured from payout integration cards. Only the fields you send are
28
+ # changed; anything you leave out is untouched (arrays such as `signup.fields` replace
29
+ # wholesale). Unknown fields, fields not available for the program type, and invalid
30
+ # values return a `400`. Landing-page custom code and JavaScript are not editable via the
31
+ # API.
29
32
  sig do
30
33
  params(
31
34
  id: String,
@@ -5,9 +5,10 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Emails
7
7
  # Retrieves a program's email configuration — the same surface as the dashboard
8
- # Program Editor's **Emails** tab. To see the full object with every field and its
9
- # current value, `GET` this resource, then `PATCH` back only the fields you want to
10
- # change.
8
+ # Program Editor's **Emails** tab. Returns each editable email template
9
+ # (`subject`, `preheader`, `body`, `isEnabled`) plus the `settings` block (sender,
10
+ # contact, and design). The set of email templates returned depends on the program
11
+ # type (referral vs affiliate).
11
12
  sig do
12
13
  params(
13
14
  id: String,
@@ -22,9 +23,11 @@ module GrowsurfRuby
22
23
  end
23
24
 
24
25
  # Updates a program's email configuration. Only the fields you send are changed;
25
- # anything you leave out is untouched. The request body is a partial email
26
- # configuration object. To see the full object with every field and its current
27
- # value, `GET` this resource, then `PATCH` back only the fields you want to change.
26
+ # omitted fields are left untouched. You may only write the email templates the
27
+ # dashboard exposes for the program type writing a template that is not
28
+ # available for the program type returns a `400`. Some fields are read-only
29
+ # (`settings.sender.fromEmail`, whose custom value requires dashboard domain
30
+ # verification).
28
31
  sig do
29
32
  params(
30
33
  id: String,
@@ -5,10 +5,9 @@ module GrowsurfRuby
5
5
  class Campaign
6
6
  class Installation
7
7
  # Retrieves a program's installation configuration — the same surface as the
8
- # dashboard Program Editor's **Installation** tab. This is a nested object whose
9
- # available fields depend on the program type. To see the full object with every
10
- # field and its current value, `GET` this resource, then `PATCH` back only the
11
- # fields you want to change.
8
+ # dashboard Program Editor's **Installation** tab (plus the Mobile SDK settings).
9
+ # Includes the referral trigger (referral programs only), signup tracking method,
10
+ # share URL and whitelist, custom-form signup settings, and mobile SDK settings.
12
11
  sig do
13
12
  params(
14
13
  id: String,
@@ -23,10 +22,11 @@ module GrowsurfRuby
23
22
  end
24
23
 
25
24
  # Updates a program's installation configuration. Only the fields you send are
26
- # changed; anything you leave out is untouched. The request body is a partial
27
- # installation configuration object. To see the full object with every field and
28
- # its current value, `GET` this resource, then `PATCH` back only the fields you
29
- # want to change.
25
+ # changed; omitted fields are left untouched. `referralTrigger` is only available
26
+ # for referral programs. `mobile.publicKey` is read-only; if no key exists yet,
27
+ # enabling `mobile.isEnabled` creates one. Changing `shareUrl` re-resolves its
28
+ # redirect destinations, which may take a moment to complete. URLs must include an
29
+ # explicit `http://` or `https://` scheme.
30
30
  sig do
31
31
  params(
32
32
  id: String,
@@ -4,10 +4,11 @@ module GrowsurfRuby
4
4
  module Resources
5
5
  class Campaign
6
6
  class Options
7
- # Retrieves a program's options configuration — the same surface as the dashboard
8
- # Program Editor's **Options** tab. To see the full object with every field and its
9
- # current value, `GET` this resource, then `PATCH` back only the fields you want to
10
- # change.
7
+ # Retrieves a program's options — the same surface as the dashboard Program
8
+ # Editor's **Options** tab. Includes reward/fraud approval, anti-fraud lists +
9
+ # toggles, referral cookie/credit windows, reCAPTCHA, affiliate enrollment +
10
+ # application review, payout threshold + tax settings (affiliate only), and
11
+ # notification-email settings. `fraud.recaptcha.secretKey` is never returned.
11
12
  sig do
12
13
  params(
13
14
  id: String,
@@ -21,10 +22,12 @@ module GrowsurfRuby
21
22
  )
22
23
  end
23
24
 
24
- # Updates a program's options configuration. Only the fields you send are changed;
25
- # anything you leave out is untouched. The request body is a partial options
26
- # configuration object. To see the full object with every field and its current
27
- # value, `GET` this resource, then `PATCH` back only the fields you want to change.
25
+ # Updates a program's options. Only the fields you send are changed. Some fields
26
+ # are program-type specific (`requireManualRewardApproval`/`autoFulfillRewards`
27
+ # are referral-only; `affiliateApplicationMode`/`affiliateReapplicationPolicy`
28
+ # and `payoutThreshold`/`taxDocumentation` are affiliate-only, and affiliate
29
+ # programs require `requireParticipantAuth: true`). `fraud.recaptcha.secretKey`
30
+ # is write-only. `referralCreditWindowDays: null` means "never expires".
28
31
  sig do
29
32
  params(
30
33
  id: String,