growsurf-ruby 0.8.0 → 1.0.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +1 -1
  4. data/lib/growsurf_ruby/models/campaign/reward.rb +28 -1
  5. data/lib/growsurf_ruby/models/campaign/reward_create_params.rb +24 -1
  6. data/lib/growsurf_ruby/models/campaign/reward_delete_params.rb +4 -4
  7. data/lib/growsurf_ruby/models/campaign/reward_update_params.rb +27 -4
  8. data/lib/growsurf_ruby/models/campaign.rb +28 -1
  9. data/lib/growsurf_ruby/models/campaign_create_params.rb +1 -15
  10. data/lib/growsurf_ruby/models/campaign_update_params.rb +1 -50
  11. data/lib/growsurf_ruby/models/reward_tax_valuation.rb +35 -0
  12. data/lib/growsurf_ruby/models.rb +2 -0
  13. data/lib/growsurf_ruby/resources/campaign/design.rb +66 -0
  14. data/lib/growsurf_ruby/resources/campaign/emails.rb +63 -0
  15. data/lib/growsurf_ruby/resources/campaign/installation.rb +65 -0
  16. data/lib/growsurf_ruby/resources/campaign/options.rb +63 -0
  17. data/lib/growsurf_ruby/resources/campaign/rewards.rb +21 -13
  18. data/lib/growsurf_ruby/resources/campaign.rb +32 -25
  19. data/lib/growsurf_ruby/version.rb +1 -1
  20. data/lib/growsurf_ruby.rb +5 -0
  21. data/rbi/growsurf_ruby/models/campaign/reward.rbi +42 -3
  22. data/rbi/growsurf_ruby/models/campaign/reward_create_params.rbi +28 -0
  23. data/rbi/growsurf_ruby/models/campaign/reward_delete_params.rbi +4 -4
  24. data/rbi/growsurf_ruby/models/campaign/reward_update_params.rbi +32 -4
  25. data/rbi/growsurf_ruby/models/campaign.rbi +42 -3
  26. data/rbi/growsurf_ruby/models/campaign_create_params.rbi +0 -18
  27. data/rbi/growsurf_ruby/models/campaign_update_params.rbi +0 -63
  28. data/rbi/growsurf_ruby/models/reward_tax_valuation.rbi +56 -0
  29. data/rbi/growsurf_ruby/models.rbi +2 -0
  30. data/rbi/growsurf_ruby/resources/campaign/design.rbi +50 -0
  31. data/rbi/growsurf_ruby/resources/campaign/emails.rbi +49 -0
  32. data/rbi/growsurf_ruby/resources/campaign/installation.rbi +50 -0
  33. data/rbi/growsurf_ruby/resources/campaign/options.rbi +49 -0
  34. data/rbi/growsurf_ruby/resources/campaign/rewards.rbi +24 -8
  35. data/rbi/growsurf_ruby/resources/campaign.rbi +25 -30
  36. data/sig/growsurf_ruby/models/campaign/reward.rbs +18 -3
  37. data/sig/growsurf_ruby/models/campaign/reward_create_params.rbs +19 -1
  38. data/sig/growsurf_ruby/models/campaign/reward_delete_params.rbs +4 -4
  39. data/sig/growsurf_ruby/models/campaign/reward_update_params.rbs +23 -5
  40. data/sig/growsurf_ruby/models/campaign.rbs +18 -3
  41. data/sig/growsurf_ruby/models/campaign_create_params.rbs +0 -14
  42. data/sig/growsurf_ruby/models/campaign_update_params.rbs +0 -49
  43. data/sig/growsurf_ruby/models/reward_tax_valuation.rbs +19 -0
  44. data/sig/growsurf_ruby/models.rbs +2 -0
  45. data/sig/growsurf_ruby/resources/campaign/design.rbs +20 -0
  46. data/sig/growsurf_ruby/resources/campaign/emails.rbs +20 -0
  47. data/sig/growsurf_ruby/resources/campaign/installation.rbs +20 -0
  48. data/sig/growsurf_ruby/resources/campaign/options.rbs +20 -0
  49. data/sig/growsurf_ruby/resources/campaign/rewards.rbs +6 -2
  50. data/sig/growsurf_ruby/resources/campaign.rbs +8 -9
  51. metadata +17 -2
@@ -35,24 +35,12 @@ module GrowsurfRuby
35
35
  sig { params(currency_iso: String).void }
36
36
  attr_writer :currency_iso
37
37
 
38
- sig { returns(T.nilable(String)) }
39
- attr_reader :goal
40
-
41
- sig { params(goal: String).void }
42
- attr_writer :goal
43
-
44
38
  sig { returns(T.nilable(String)) }
45
39
  attr_reader :name
46
40
 
47
41
  sig { params(name: String).void }
48
42
  attr_writer :name
49
43
 
50
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
51
- attr_reader :options
52
-
53
- sig { params(options: T::Hash[Symbol, T.anything]).void }
54
- attr_writer :options
55
-
56
44
  sig do
57
45
  returns(T.nilable(T::Array[GrowsurfRuby::Campaign::RewardCreateParams]))
58
46
  end
@@ -71,9 +59,7 @@ module GrowsurfRuby
71
59
  company_logo_image_url: String,
72
60
  company_name: String,
73
61
  currency_iso: String,
74
- goal: String,
75
62
  name: String,
76
- options: T::Hash[Symbol, T.anything],
77
63
  rewards: T::Array[GrowsurfRuby::Campaign::RewardCreateParams::OrHash],
78
64
  request_options: GrowsurfRuby::RequestOptions::OrHash
79
65
  ).returns(T.attached_class)
@@ -83,9 +69,7 @@ module GrowsurfRuby
83
69
  company_logo_image_url: nil,
84
70
  company_name: nil,
85
71
  currency_iso: nil,
86
- goal: nil,
87
72
  name: nil,
88
- options: nil,
89
73
  rewards: nil,
90
74
  request_options: {}
91
75
  )
@@ -98,9 +82,7 @@ module GrowsurfRuby
98
82
  company_logo_image_url: String,
99
83
  company_name: String,
100
84
  currency_iso: String,
101
- goal: String,
102
85
  name: String,
103
- options: T::Hash[Symbol, T.anything],
104
86
  rewards:
105
87
  T::Array[GrowsurfRuby::Campaign::RewardCreateParams::OrHash],
106
88
  request_options: GrowsurfRuby::RequestOptions
@@ -29,54 +29,12 @@ module GrowsurfRuby
29
29
  sig { params(company_name: String).void }
30
30
  attr_writer :company_name
31
31
 
32
- sig { returns(T.nilable(String)) }
33
- attr_reader :currency_iso
34
-
35
- sig { params(currency_iso: String).void }
36
- attr_writer :currency_iso
37
-
38
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
39
- attr_reader :design
40
-
41
- sig { params(design: T::Hash[Symbol, T.anything]).void }
42
- attr_writer :design
43
-
44
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
45
- attr_reader :emails
46
-
47
- sig { params(emails: T::Hash[Symbol, T.anything]).void }
48
- attr_writer :emails
49
-
50
- sig { returns(T.nilable(String)) }
51
- attr_reader :goal
52
-
53
- sig { params(goal: String).void }
54
- attr_writer :goal
55
-
56
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
57
- attr_reader :installation
58
-
59
- sig { params(installation: T::Hash[Symbol, T.anything]).void }
60
- attr_writer :installation
61
-
62
32
  sig { returns(T.nilable(String)) }
63
33
  attr_reader :name
64
34
 
65
35
  sig { params(name: String).void }
66
36
  attr_writer :name
67
37
 
68
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
69
- attr_reader :notifications
70
-
71
- sig { params(notifications: T::Hash[Symbol, T.anything]).void }
72
- attr_writer :notifications
73
-
74
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
75
- attr_reader :options
76
-
77
- sig { params(options: T::Hash[Symbol, T.anything]).void }
78
- attr_writer :options
79
-
80
38
  sig do
81
39
  returns(T.nilable(GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol))
82
40
  end
@@ -94,14 +52,7 @@ module GrowsurfRuby
94
52
  id: String,
95
53
  company_logo_image_url: String,
96
54
  company_name: String,
97
- currency_iso: String,
98
- design: T::Hash[Symbol, T.anything],
99
- emails: T::Hash[Symbol, T.anything],
100
- goal: String,
101
- installation: T::Hash[Symbol, T.anything],
102
55
  name: String,
103
- notifications: T::Hash[Symbol, T.anything],
104
- options: T::Hash[Symbol, T.anything],
105
56
  status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
106
57
  request_options: GrowsurfRuby::RequestOptions::OrHash
107
58
  ).returns(T.attached_class)
@@ -110,14 +61,7 @@ module GrowsurfRuby
110
61
  id:,
111
62
  company_logo_image_url: nil,
112
63
  company_name: nil,
113
- currency_iso: nil,
114
- design: nil,
115
- emails: nil,
116
- goal: nil,
117
- installation: nil,
118
64
  name: nil,
119
- notifications: nil,
120
- options: nil,
121
65
  status: nil,
122
66
  request_options: {}
123
67
  )
@@ -129,14 +73,7 @@ module GrowsurfRuby
129
73
  id: String,
130
74
  company_logo_image_url: String,
131
75
  company_name: String,
132
- currency_iso: String,
133
- design: T::Hash[Symbol, T.anything],
134
- emails: T::Hash[Symbol, T.anything],
135
- goal: String,
136
- installation: T::Hash[Symbol, T.anything],
137
76
  name: String,
138
- notifications: T::Hash[Symbol, T.anything],
139
- options: T::Hash[Symbol, T.anything],
140
77
  status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
141
78
  request_options: GrowsurfRuby::RequestOptions
142
79
  }
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Models
5
+ # Tax valuation settings for a reward. Only relevant when the program collects
6
+ # tax documentation.
7
+ class RewardTaxValuation < GrowsurfRuby::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ GrowsurfRuby::RewardTaxValuation,
12
+ GrowsurfRuby::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Manual fair-market value in USD (major units) used as the fallback when the
17
+ # reward value cannot be resolved automatically. `null` = no manual value.
18
+ sig { returns(T.nilable(Float)) }
19
+ attr_accessor :fair_market_value_usd
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
25
+
26
+ # Tax valuation settings for a reward. Only relevant when the program collects
27
+ # tax documentation.
28
+ sig do
29
+ params(
30
+ fair_market_value_usd: T.nilable(Float),
31
+ is_tax_reportable: T.nilable(T::Boolean)
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+ # Manual fair-market value in USD (major units) used as the fallback when the
36
+ # reward value cannot be resolved automatically. `null` = no manual value.
37
+ 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
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ fair_market_value_usd: T.nilable(Float),
48
+ is_tax_reportable: T.nilable(T::Boolean)
49
+ }
50
+ )
51
+ end
52
+ def to_hash
53
+ end
54
+ end
55
+ end
56
+ end
@@ -42,4 +42,6 @@ module GrowsurfRuby
42
42
  ParticipantPayoutList = GrowsurfRuby::Models::ParticipantPayoutList
43
43
 
44
44
  ReferralList = GrowsurfRuby::Models::ReferralList
45
+
46
+ RewardTaxValuation = GrowsurfRuby::Models::RewardTaxValuation
45
47
  end
@@ -0,0 +1,50 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Resources
5
+ class Campaign
6
+ class Design
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. See the API reference for the full
10
+ # field list.
11
+ sig do
12
+ params(
13
+ id: String,
14
+ request_options: GrowsurfRuby::RequestOptions::OrHash
15
+ ).returns(T::Hash[Symbol, T.anything])
16
+ end
17
+ def retrieve(
18
+ # GrowSurf program ID.
19
+ id,
20
+ request_options: {}
21
+ )
22
+ end
23
+
24
+ # Updates a program's design configuration. Only the fields you send are changed.
25
+ # The request body is a partial design object — see the API reference for the full
26
+ # field list.
27
+ sig do
28
+ params(
29
+ id: String,
30
+ body: T::Hash[Symbol, T.anything],
31
+ request_options: GrowsurfRuby::RequestOptions::OrHash
32
+ ).returns(T::Hash[Symbol, T.anything])
33
+ end
34
+ def update(
35
+ # GrowSurf program ID.
36
+ id,
37
+ # Partial design configuration to merge.
38
+ body,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ # @api private
44
+ sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
45
+ def self.new(client:)
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,49 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Resources
5
+ class Campaign
6
+ class Emails
7
+ # Retrieves a program's email configuration — the same surface as the dashboard
8
+ # Program Editor's **Emails** tab. This is a large, nested object. See the API
9
+ # reference for the full field list.
10
+ sig do
11
+ params(
12
+ id: String,
13
+ request_options: GrowsurfRuby::RequestOptions::OrHash
14
+ ).returns(T::Hash[Symbol, T.anything])
15
+ end
16
+ def retrieve(
17
+ # GrowSurf program ID.
18
+ id,
19
+ request_options: {}
20
+ )
21
+ end
22
+
23
+ # Updates a program's email configuration. Only the fields you send are changed.
24
+ # The request body is a partial email configuration object — see the API reference
25
+ # for the full field list.
26
+ sig do
27
+ params(
28
+ id: String,
29
+ body: T::Hash[Symbol, T.anything],
30
+ request_options: GrowsurfRuby::RequestOptions::OrHash
31
+ ).returns(T::Hash[Symbol, T.anything])
32
+ end
33
+ def update(
34
+ # GrowSurf program ID.
35
+ id,
36
+ # Partial email configuration to merge.
37
+ body,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ # @api private
43
+ sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
44
+ def self.new(client:)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,50 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Resources
5
+ class Campaign
6
+ class Installation
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. See the API reference for the full
10
+ # field list.
11
+ sig do
12
+ params(
13
+ id: String,
14
+ request_options: GrowsurfRuby::RequestOptions::OrHash
15
+ ).returns(T::Hash[Symbol, T.anything])
16
+ end
17
+ def retrieve(
18
+ # GrowSurf program ID.
19
+ id,
20
+ request_options: {}
21
+ )
22
+ end
23
+
24
+ # Updates a program's installation configuration. Only the fields you send are
25
+ # changed. The request body is a partial installation configuration object — see
26
+ # the API reference for the full field list.
27
+ sig do
28
+ params(
29
+ id: String,
30
+ body: T::Hash[Symbol, T.anything],
31
+ request_options: GrowsurfRuby::RequestOptions::OrHash
32
+ ).returns(T::Hash[Symbol, T.anything])
33
+ end
34
+ def update(
35
+ # GrowSurf program ID.
36
+ id,
37
+ # Partial installation configuration to merge.
38
+ body,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ # @api private
44
+ sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
45
+ def self.new(client:)
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,49 @@
1
+ # typed: strong
2
+
3
+ module GrowsurfRuby
4
+ module Resources
5
+ class Campaign
6
+ class Options
7
+ # Retrieves a program's options configuration — the same surface as the dashboard
8
+ # Program Editor's **Options** tab. This is a large, nested object. See the API
9
+ # reference for the full field list.
10
+ sig do
11
+ params(
12
+ id: String,
13
+ request_options: GrowsurfRuby::RequestOptions::OrHash
14
+ ).returns(T::Hash[Symbol, T.anything])
15
+ end
16
+ def retrieve(
17
+ # GrowSurf program ID.
18
+ id,
19
+ request_options: {}
20
+ )
21
+ end
22
+
23
+ # Updates a program's options configuration. Only the fields you send are changed.
24
+ # The request body is a partial options configuration object — see the API
25
+ # reference for the full field list.
26
+ sig do
27
+ params(
28
+ id: String,
29
+ body: T::Hash[Symbol, T.anything],
30
+ request_options: GrowsurfRuby::RequestOptions::OrHash
31
+ ).returns(T::Hash[Symbol, T.anything])
32
+ end
33
+ def update(
34
+ # GrowSurf program ID.
35
+ id,
36
+ # Partial options configuration to merge.
37
+ body,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ # @api private
43
+ sig { params(client: GrowsurfRuby::Client).returns(T.attached_class) }
44
+ def self.new(client:)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -44,7 +44,9 @@ module GrowsurfRuby
44
44
  referral_coupon_code: String,
45
45
  referral_description: String,
46
46
  referred_reward_upfront: T::Boolean,
47
+ referred_value: GrowsurfRuby::RewardTaxValuation::OrHash,
47
48
  title: String,
49
+ value: GrowsurfRuby::RewardTaxValuation::OrHash,
48
50
  request_options: GrowsurfRuby::RequestOptions::OrHash
49
51
  ).returns(GrowsurfRuby::Models::Campaign::Reward)
50
52
  end
@@ -90,17 +92,23 @@ module GrowsurfRuby
90
92
  referral_description: nil,
91
93
  # Body param
92
94
  referred_reward_upfront: nil,
95
+ # Body param: Tax valuation for the referred friend's side of a double-sided
96
+ # reward. Defaults to not tax-reportable (a purchase rebate).
97
+ referred_value: nil,
93
98
  # Body param
94
99
  title: nil,
100
+ # Body param: Tax valuation for the reward (the referrer's side of a
101
+ # double-sided reward). Used by tax documentation / 1099 reporting.
102
+ value: nil,
95
103
  request_options: {}
96
104
  )
97
105
  end
98
106
 
99
- # Updates an existing program reward. Only the fields you send are changed; `type`
107
+ # Updates an existing campaign reward. Only the fields you send are changed; `type`
100
108
  # is immutable and must not be supplied.
101
109
  sig do
102
110
  params(
103
- reward_id: String,
111
+ campaign_reward_id: String,
104
112
  id: String,
105
113
  commission_structure: GrowsurfRuby::CommissionStructure::OrHash,
106
114
  conversions_required: Integer,
@@ -121,13 +129,15 @@ module GrowsurfRuby
121
129
  referral_coupon_code: String,
122
130
  referral_description: String,
123
131
  referred_reward_upfront: T::Boolean,
132
+ referred_value: GrowsurfRuby::RewardTaxValuation::OrHash,
124
133
  title: String,
134
+ value: GrowsurfRuby::RewardTaxValuation::OrHash,
125
135
  request_options: GrowsurfRuby::RequestOptions::OrHash
126
136
  ).returns(GrowsurfRuby::Models::Campaign::Reward)
127
137
  end
128
138
  def update(
129
- # Path param: Program reward ID.
130
- reward_id,
139
+ # Path param: Campaign reward ID.
140
+ campaign_reward_id,
131
141
  # Path param: GrowSurf program ID.
132
142
  id:,
133
143
  # Body param
@@ -167,23 +177,29 @@ module GrowsurfRuby
167
177
  referral_description: nil,
168
178
  # Body param
169
179
  referred_reward_upfront: nil,
180
+ # Body param: Tax valuation for the referred friend's side of a double-sided
181
+ # reward. Defaults to not tax-reportable (a purchase rebate).
182
+ referred_value: nil,
170
183
  # Body param
171
184
  title: nil,
185
+ # Body param: Tax valuation for the reward (the referrer's side of a
186
+ # double-sided reward). Used by tax documentation / 1099 reporting.
187
+ value: nil,
172
188
  request_options: {}
173
189
  )
174
190
  end
175
191
 
176
- # Deletes a program reward.
192
+ # Deletes a campaign reward.
177
193
  sig do
178
194
  params(
179
- reward_id: String,
195
+ campaign_reward_id: String,
180
196
  id: String,
181
197
  request_options: GrowsurfRuby::RequestOptions::OrHash
182
198
  ).returns(GrowsurfRuby::Models::Campaign::DeleteRewardResponse)
183
199
  end
184
200
  def delete(
185
- # Program reward ID.
186
- reward_id,
201
+ # Campaign reward ID.
202
+ campaign_reward_id,
187
203
  # GrowSurf program ID.
188
204
  id:,
189
205
  request_options: {}
@@ -14,10 +14,26 @@ module GrowsurfRuby
14
14
  sig { returns(GrowsurfRuby::Resources::Campaign::Commission) }
15
15
  attr_reader :commission
16
16
 
17
- # Program reward configuration operations.
17
+ # Campaign reward configuration operations.
18
18
  sig { returns(GrowsurfRuby::Resources::Campaign::Rewards) }
19
19
  attr_reader :rewards
20
20
 
21
+ # Program Editor "Design" tab configuration operations.
22
+ sig { returns(GrowsurfRuby::Resources::Campaign::Design) }
23
+ attr_reader :design
24
+
25
+ # Program Editor "Emails" tab configuration operations.
26
+ sig { returns(GrowsurfRuby::Resources::Campaign::Emails) }
27
+ attr_reader :emails
28
+
29
+ # Program Editor "Options" tab configuration operations.
30
+ sig { returns(GrowsurfRuby::Resources::Campaign::Options) }
31
+ attr_reader :options
32
+
33
+ # Program Editor "Installation" tab configuration operations.
34
+ sig { returns(GrowsurfRuby::Resources::Campaign::Installation) }
35
+ attr_reader :installation
36
+
21
37
  # Retrieves a program for the given program ID.
22
38
  sig do
23
39
  params(
@@ -42,15 +58,15 @@ module GrowsurfRuby
42
58
  end
43
59
 
44
60
  # Creates a program. Only `type` is required; everything else is server-defaulted.
61
+ # Editor-tab configuration (design, emails, options, installation) is not accepted
62
+ # here — configure it via the config sub-resources after the program is created.
45
63
  sig do
46
64
  params(
47
65
  type: GrowsurfRuby::CampaignCreateParams::Type::OrSymbol,
48
66
  company_logo_image_url: String,
49
67
  company_name: String,
50
68
  currency_iso: String,
51
- goal: String,
52
69
  name: String,
53
- options: T::Hash[Symbol, T.anything],
54
70
  rewards: T::Array[GrowsurfRuby::Campaign::RewardCreateParams::OrHash],
55
71
  request_options: GrowsurfRuby::RequestOptions::OrHash
56
72
  ).returns(GrowsurfRuby::CampaignAPI)
@@ -60,34 +76,27 @@ module GrowsurfRuby
60
76
  type:,
61
77
  company_logo_image_url: nil,
62
78
  company_name: nil,
63
- # ISO 4217 currency code. Defaults to USD.
79
+ # ISO 4217 currency code. Defaults to USD. Chosen when the program is created and
80
+ # immutable afterward — it cannot be changed on update.
64
81
  currency_iso: nil,
65
- goal: nil,
66
82
  # The program name. Defaults to "Untitled Program".
67
83
  name: nil,
68
- # A curated subset of program options to shallow-merge onto the defaults.
69
- options: nil,
70
84
  # Optional inline rewards to create with the program.
71
85
  rewards: nil,
72
86
  request_options: {}
73
87
  )
74
88
  end
75
89
 
76
- # Updates a program. Only the fields you send are changed. `type` and `urlId` are
77
- # immutable.
90
+ # Updates a program's identity and lifecycle. Only the fields you send are changed.
91
+ # `type`, `urlId`, and `currencyISO` are immutable. Editor-tab configuration (design, emails,
92
+ # options, installation) is edited via the dedicated config sub-resources, not
93
+ # here.
78
94
  sig do
79
95
  params(
80
96
  id: String,
81
97
  company_logo_image_url: String,
82
98
  company_name: String,
83
- currency_iso: String,
84
- design: T::Hash[Symbol, T.anything],
85
- emails: T::Hash[Symbol, T.anything],
86
- goal: String,
87
- installation: T::Hash[Symbol, T.anything],
88
99
  name: String,
89
- notifications: T::Hash[Symbol, T.anything],
90
- options: T::Hash[Symbol, T.anything],
91
100
  status: GrowsurfRuby::CampaignUpdateParams::Status::OrSymbol,
92
101
  request_options: GrowsurfRuby::RequestOptions::OrHash
93
102
  ).returns(GrowsurfRuby::CampaignAPI)
@@ -100,21 +109,7 @@ module GrowsurfRuby
100
109
  # Body param
101
110
  company_name: nil,
102
111
  # Body param
103
- currency_iso: nil,
104
- # Body param
105
- design: nil,
106
- # Body param
107
- emails: nil,
108
- # Body param
109
- goal: nil,
110
- # Body param
111
- installation: nil,
112
- # Body param
113
112
  name: nil,
114
- # Body param
115
- notifications: nil,
116
- # Body param
117
- options: nil,
118
113
  # Body param: The program status. Transitions are validated; DELETED is not
119
114
  # allowed.
120
115
  status: nil,
@@ -18,8 +18,11 @@ module GrowsurfRuby
18
18
  next_milestone_suffix: String?,
19
19
  number_of_winners: Integer?,
20
20
  order: Integer?,
21
+ referral_coupon_code: String?,
21
22
  referral_description: String?,
22
- referred_reward_upfront: bool
23
+ referred_reward_upfront: bool,
24
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
25
+ value: GrowsurfRuby::RewardTaxValuation?
23
26
  }
24
27
 
25
28
  class Reward < GrowsurfRuby::Internal::Type::BaseModel
@@ -53,12 +56,18 @@ module GrowsurfRuby
53
56
 
54
57
  attr_accessor order: Integer?
55
58
 
59
+ attr_accessor referral_coupon_code: String?
60
+
56
61
  attr_accessor referral_description: String?
57
62
 
58
63
  attr_reader referred_reward_upfront: bool?
59
64
 
60
65
  def referred_reward_upfront=: (bool) -> bool
61
66
 
67
+ attr_accessor referred_value: GrowsurfRuby::RewardTaxValuation?
68
+
69
+ attr_accessor value: GrowsurfRuby::RewardTaxValuation?
70
+
62
71
  def initialize: (
63
72
  id: String,
64
73
  is_unlimited: bool,
@@ -75,8 +84,11 @@ module GrowsurfRuby
75
84
  ?next_milestone_suffix: String?,
76
85
  ?number_of_winners: Integer?,
77
86
  ?order: Integer?,
87
+ ?referral_coupon_code: String?,
78
88
  ?referral_description: String?,
79
- ?referred_reward_upfront: bool
89
+ ?referred_reward_upfront: bool,
90
+ ?referred_value: GrowsurfRuby::RewardTaxValuation?,
91
+ ?value: GrowsurfRuby::RewardTaxValuation?
80
92
  ) -> void
81
93
 
82
94
  def to_hash: -> {
@@ -95,8 +107,11 @@ module GrowsurfRuby
95
107
  next_milestone_suffix: String?,
96
108
  number_of_winners: Integer?,
97
109
  order: Integer?,
110
+ referral_coupon_code: String?,
98
111
  referral_description: String?,
99
- referred_reward_upfront: bool
112
+ referred_reward_upfront: bool,
113
+ referred_value: GrowsurfRuby::RewardTaxValuation?,
114
+ value: GrowsurfRuby::RewardTaxValuation?
100
115
  }
101
116
 
102
117
  type type_ =